Commit Graph
10 Commits
Author SHA1 Message Date
Qin Haojie d47f2106ee refactor: remove unused and deprecated APIs (#3272)
Delete dead compatibility paths and test-only helpers so unsupported APIs do not remain as accidental contracts.
2026-07-16 10:49:56 +08:00
Qin Haojie e648b2679c feat(ovpack): add v2 manifest and backup restore (#1927)
* feat(ovpack): add v2 manifest and conflict policy

Add a portable OVPack manifest for scalar metadata and make imports validate scope, derived files, and conflicts before writing.

* fix(ovpack): remove import vectorize option

Make OVPack imports always rebuild vectors in the target environment, keep legacy packages compatible, and reject unsupported manifest versions before writing.

* fix(ovpack): remove force import alias

Use on_conflict as the single OVPack import conflict policy and reject removed force inputs.

* fix(ovpack): regenerate runtime vector metadata

Keep type portable but stop exporting or applying created_at, updated_at, and active_count from OVPack manifests.

* fix(ovpack): validate manifest contents

* fix(ovpack): require manifests for imports

* fix(ovpack): close manifest validation gaps

* fix(ovpack): defer parent creation until validation passes

* fix(ovpack): remove export size guard

* fix(ovpack): support session and scope-root restores

* docs(ovpack): document full backup migration

* feat(ovpack): add backup restore workflow

* fix(ovpack): validate import scope compatibility
2026-05-11 11:09:35 +08:00
chethanuk 320108f2eb docs: fix pytest coverage command in tests README (#1373) 2026-04-13 14:20:56 +08:00
Qin HaojieClaude Opus 4.6AutoCoder
2c598e88c5 feat(session): async commit, session metadata, and archive continuity threading (#900)
* feat(session): make commit two-phase with async memory extraction

Session commit now returns immediately after archiving messages (Phase 1).
Summary generation and memory extraction (Phase 2) run in the background
via asyncio.create_task(), returning a task_id for polling progress.

- Add get_task() API across all client layers for querying background task status
- get_session() auto-creates session if it does not exist
- Remove wait parameter and telemetry from commit endpoint
- Add .done completion marker to archive directories
- Update docs (EN/ZH) and tests for new two-phase flow

* feat(session): add .meta.json persistence and auto_create control for get_session

SessionService.get() now defaults to auto_create=False, raising NotFoundError
for missing sessions. A new SessionMeta dataclass tracks created_at, updated_at,
message_count, commit_count, memories_extracted (by category), last_commit_at,
and cumulative llm_token_usage. Meta is persisted to .meta.json and updated on
add_message, commit Phase 1 (message clear), and commit Phase 2 completion
(token usage, memory counts via bind_telemetry). All client layers
(local/async/sync/HTTP) and API docs updated accordingly.

* fix: remove session vectorize

* support commit for openclaw-plugin (#902)

Made-with: Cursor

* fix: reuse latest archive overview in session context

Thread the latest completed archive overview into archive summary generation and memory extraction, and simplify search context assembly to current messages plus the latest archive overview.

Co-Authored-By: Claude Opus 4.6

* refactor: session overview

---------

Co-authored-by: AutoCoder <wulf234@163.com>
2026-03-24 22:30:16 +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 3165ffa0da feat: add HTTP Server and Python HTTP Client (T2 & T4) (#109)
* feat: add Server/Client architecture with HTTP API and restructure documentation

  - Implement FastAPI-based HTTP server (openviking/server/) with REST API
  - Add client abstraction layer (LocalClient, HTTPClient, BaseClient)
  - Add CLI entry point (python -m openviking serve)
  - Fix bugs: session.session_id, link/unlink param names, hmac.compare_digest
  - Restructure docs: remove numbered prefixes, add guides/, rewrite API reference
    with both Python SDK and HTTP API (curl) examples (en/zh)
  - Add quickstart-server, deployment, authentication, monitoring guides
  - Update examples and design docs to reflect implementation

* 提供单测 和 文档

* Merge branch 'main' into feature/server_client

* feat: add server/client examples and server tests

* fix: cross-references

* fix : tests
2026-02-09 21:12:15 +08:00
zemuandqin-ctx 847f507f51 fix(storage): make VikingFS.mkdir() actually create the target directory (#96)
mkdir() only called _ensure_parent_dirs() which creates parent
directories but not the final component. The method returned without
ever calling agfs.mkdir(path), making every mkdir() call a no-op.

Add the missing agfs.mkdir(path) call after parent directory creation
and exist_ok handling.

Fixes #90

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-02-09 12:03:18 +08:00
zemu f3dd18adc7 fix(agfs): close socket on error path in _check_port_available (#97)
When sock.bind() raises OSError (port in use), the socket was never
closed because sock.close() was only on the success path. Move
sock.close() into a finally block so the socket is always released.

Fixes #91
2026-02-09 11:42:50 +08:00
zemu 0b6f864036 fix(parse): prevent Zip Slip path traversal in _extract_zip (CWE-22) (#89)
Replace unsafe zipfile.extractall() with per-member extraction
and 5-layer defense-in-depth validation.
2026-02-07 16:09:03 +08:00
qin-ctx f98dc0ed1c first commit 2026-01-29 20:29:19 +08:00