Commit Graph
11 Commits
Author SHA1 Message Date
750390b0cf fix(server): map HTTP status for error-envelope return sites in stats/debug/sessions (#3722)
Several routers returned Response(status='error', error=ErrorInfo(...))
directly, so FastAPI shipped them with HTTP 200 instead of the mapped
status from ERROR_CODE_TO_HTTP_STATUS. Web-studio's sessions API only
survived because of a code-based fallback; other clients (e.g. a generic
HTTP retry layer) would treat these as success and never surface the
error.

Switch the seven return sites to error_response() so the canonical
mapping drives the HTTP status, and add the three previously-unmapped
codes (INTERNAL_ERROR, NO_VECTOR_DB, INVALID_FILTER) to the map.

Residual follow-up from PR #1764 (ac9f679a).

Co-authored-by: ming <silverchris@foxmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-07 19:55:02 +08:00
fujiajie666 c91b0d36f2 feat: implement Skill-driven knowledge compilation for ov compile (#3567)
* feat(compile): implement skill-driven ov compile

Require a Skill and run compile tasks through VikingBot AgentLoop with structured wiki bundle rendering and durable task state.

Add OpenViking batch-write and bot proxy APIs, Python SDK and Rust CLI support, shared link and memory helpers, tests, and a One-Page demo.

* fix(compile): refine defaults, links, and failure handling

* fix(compile): normalize skill tools and degrade gracefully

* feat(compile): support skill-defined artifact outputs

* feat(compile): improve artifact reliability and wiki navigation

* feat(compile): support generating and updating skill packages

* fix(compile): validate OKF frontmatter and catalog page types

* feat(compile): rank target catalog and validate updates lazily

* feat(compile): tag generated wiki files for search

* fix(compile): preserve generated skill artifacts in submissions

* fix(compile): enforce fixed toolset and workspace artifact submissions

* fix(skills): preserve nested metadata in skill frontmatter

* fix(compile): normalize wiki paths and citation line breaks

* docs(examples): remove outdated compile demos

* docs(api): document compile and batch-write endpoints

* fix(content): allow arbitrary resource files in batch writes

* fix(compile): harden task lifecycle, auth, and execution

* fix(compile): disable direct exec by default

* fix(compile): allow file-only tasks when exec is disabled

* fix(compile): prevent task lock leaks
2026-07-28 20:33:25 +08:00
Haoyu Zhangandzhanghaoyu.la aa53e7aede feat: 实现 commit、restore、show 文件系统多版本管理功能 (#2756)
* feat: 实现 commit、restore、show 文件系统多版本管理功能

fix: 修复commit时删除文件

fix: commit 的 fast path 1 添加 Racy-clean 机制

fix: 将 sdk 中的 git 命令改为 snapshot 命令,同步修改单测

fix: 多版本管理的文件存储目录改为 .ovgit

feat: snapshot cli 渲染

fix: 修复 restore 时将删除的文件回滚时,目录不存在的问题

feat: restore 命令的 project_dir 参数改为可选,不传时默认全目录回滚

feat: 更新文档

fix: 删除暂未使用的配置参数

feat: 新增示例脚本

fix: 修复示例代码

fix: 修复 restore 返回的 task id 任务完成状态

feat: 在 restore 修改文件系统时加锁

fix: fix openviking_sdk

* feat: 将git多版本管理功能改为默认打开,并复用agfs的配置参数作为默认值

* fix: restore 命令改为先完成 ref 一致性协议再写回 VFS;object store 并发改为使用唯一 temp path

* fix: 在 git 配置检验层去除未实现的cas_mode = "redis_lock"模式

* fix: 在 Rust GitService 边界统一校验 account

* fix: 当前commit不支持通过 path 传入目录,增加报错信息

* fix: 将git文件默认存储路径统一为 .ovgit

* fix: restore 时写入 VFS 失败时返回详细的报错,并继续触发 reindex

* fix: 校验 commit、restore、show 的路径

* feat: 实现 commit 时指定目录

---------

Co-authored-by: zhanghaoyu.la <zhanghaoyu.la@bytedance.com>
2026-06-25 11:28:04 +08:00
Jiahui Zhou e9e6ce5e9a feat(server): add request-scoped http profiling (#2125) 2026-05-25 10:42:28 +08:00
Jiahui Zhouandqin-ctx ac3346422a feat(rebuild): add rebuild api scaffold (#1592)
* feat(admin): add rebuild api scaffold

feat: add admin rebuild API

fix: harden admin rebuild execution

feat(cli): add rebuild command support

fix(rebuild): support namespace rebuild routing

refactor(rebuild): unify memory semantic rebuild mode

refactor(rebuild): move http endpoint to content route

fix(rebuild): skip root namespace vectorization

fix(rebuild): harden namespace classification

refactor: rename rebuild api to reindex

refactor: rename reindex executor module

refactor(reindex): remove unused reason field

* fix(reindex): tighten namespace URI handling

Share segment-based Viking URI classification across context inference and reindex execution, add skill namespace support, and require root reindex requests to select an account.

* refactor: reuse indexing pipeline in reindex

* Revert "refactor: reuse indexing pipeline in reindex"

This reverts commit 2725fe6733.

* fix(reindex): respect semantic vectorization skips

Avoid scheduling semantic DAG vectorization work during semantic_and_vectors reindex, and keep resource vector text selection aligned with normal vectorize_file handling for non-text files.

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-05-08 17:48:33 +08:00
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
yepperandqin-ctx 2e1619c352 Feature/add resource increment (#659)
* feat(semantic): add embedding task tracker and incremental update support

Implement embedding task tracker to monitor completion of vectorization tasks
Add support for incremental updates with file change status tracking
Optimize vectorization by reducing file reads with pre-computed status
Introduce VectorizeTask structure for better task management
Update semantic DAG executor to handle both full and incremental updates

* fix(semantic_processor): correct directory sync order and rename abstract to overview

Update the directory synchronization process to properly handle vector data files before directory deletion. Also rename 'abstract' parameter to 'overview' for clarity in the embedding utils.

* feat(embedding): add tracker decrement for failed enqueues

refactor(semantic_processor): simplify sync diff implementation

fix(summarizer): improve temp_uris empty check

test(embedding): add tests for tracker decrement cases

style(embedding_tracker): remove dataclass decorator

* fix(semantic_processor): change log level from warning to error for sync failures
refactor(tests): update vectorize methods to include semantic_msg_id parameter
test: add dummy tracker for embedding task tests
chore: remove obsolete test files

* fix: context overview

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-03-16 21:59:16 +08:00
zhoujiahui b280b56b30 feat(trace): add request-level trace metrics and API support (#640)
refactor: replace operation trace with telemetry

fix telemetry demo skill ingestion

simplify telemetry summary metric keys

rename remaining trace telemetry artifacts

feat: support configurable telemetry payloads

docs: rewrite operation telemetry design in chinese

fix: reject telemetry for async session commit

refactor: isolate telemetry orchestration

refactor: remove telemetry from find payloads

refactor: remove telemetry event payloads

fix(trace): keep only telemetry-related changes

fix(trace): remove top-level usage from telemetry responses

feat(console): default telemetry on proxied operations
2026-03-15 22:44:15 +08:00
Qin Haojie 20b5dabed8 Revert "feat(resource): implement incremental update with COW pattern (#535)" (#584)
This reverts commit ebd573ccc4.
2026-03-13 23:26:19 +08:00
yepper ebd573ccc4 feat(resource): implement incremental update with COW pattern (#535)
* feat(resource): implement incremental update with COW pattern

Add support for incremental updates using copy-on-write pattern. Key changes include:
- Add ResourceLockManager for managing concurrent updates
- Introduce EmbeddingTaskTracker to track embedding task completion
- Modify TreeBuilder to support temp URIs and skip conflict resolution
- Update SemanticDagExecutor to handle incremental updates
- Extend memory extractor/compressor to work with temp URIs
- Add exists() method to VikingFS for URI existence checks
- Update Context to include temp_uri field

* refactor(resource_lock): clean up imports and improve code formatting

style: fix code formatting and whitespace issues across multiple files

feat(viking_fs): add copy_directory method for recursive directory copying

refactor(session): simplify temp URI creation and cleanup logic

style(memory_extractor): improve code formatting and line wrapping

refactor(semantic_processor): clean up imports and improve sync diff logic

style(compressor): fix code formatting and line wrapping

refactor(embedding_tracker): clean up code and improve logging

style(session): fix code formatting and whitespace issues

refactor(resource_lock): improve error handling and code organization

* refactor(storage): remove resource lock and improve semantic processing

- Remove ResourceLockManager and related lock handling code
- Simplify semantic processor by removing path locking mechanism
- Improve error handling and logging in sync operations
- Add new test files for storage components
- Clean up unused imports and update dependencies

* style(tests): clean up unused imports in test files

Remove unused imports across multiple test files to improve code cleanliness and reduce potential confusion. This includes removing unused mock objects, context classes, and constants that are not referenced in the tests.

* style: reformat code for better readability and consistency

Refactor long lines and adjust formatting to improve code readability. Changes include:
- Breaking long lines to adhere to line length limits
- Reformatting dictionary and list literals for consistency
- Adjusting indentation in multi-line statements
2026-03-12 22:42:56 +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