Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/en/agent-integrations/16-capability-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The table shows the default path. Turning on [recall digests](#recall-digest) ch

### Session-start context

Integrations that use the shared plugin code inject one `<openviking-context>` block at session start. It holds the user profile (`viking://user/<space>/memories/profile.md`), an index of the `preferences/` and `entities/` memories, and an `<available-skills>` catalog:
Integrations that use the shared plugin code inject one `<openviking-context>` block at session start. It holds the user profile (`viking://user/<space>/memories/profile.md`), an index of the `preferences/` and `entities/` memories, and an `<available-skills>` catalog. When the session has an actor peer, the same files under `viking://user/<space>/peers/<peer>/memories/` are added: the profile, preferences, and entities have no message range, so extraction writes the user's own facts to the user root even in a peer session. The user root comes first; the peer profile is a second `<user-profile>` element without the lines it shares with the user profile, and both roots share one budget:

```text
<openviking-context source="startup">
Expand Down Expand Up @@ -233,7 +233,7 @@ When each integration injects it:

Budgets and limits:

- `profileTokenBudget` (default 10,000 tokens) covers the profile and the memory index. The profile gets half. An oversized profile keeps its first 8 lines and its end; an oversized listing ends with `... +N more`. Token estimates count CJK characters as 1.5 tokens and other text as four characters per token.
- `profileTokenBudget` (default 10,000 tokens) covers the profiles and the memory index. The profiles get half: the user profile first, the peer profile what is left, or a one-line pointer to its URI when less than 200 tokens remain. The two roots split the index budget. An oversized profile keeps its first 8 lines and its end; an oversized listing ends with `... +N more`. Token estimates count CJK characters as 1.5 tokens and other text as four characters per token.
- `skillCatalogTokenBudget` (default 1,200 tokens, `OPENVIKING_SKILL_CATALOG_TOKEN_BUDGET`) is a separate budget for the skill catalog. `skillCatalog` (`OPENVIKING_SKILL_CATALOG`) or a budget of 0 turns the catalog off.
- The catalog comes from one `GET /api/v1/skills` request. The user's own skills come first, and an account skill with the same name as a user skill is left out. Each description is cut to about 40 tokens. If descriptions do not fit, the catalog lists names only; if names do not fit, it ends with `... +N more`, or shrinks to a one-line count. Servers without that endpoint get no catalog.
- `sessionStartMaxBytes` caps the whole block in UTF-8 bytes: 9,500 for Claude Code and Codex, whose hosts move hook output above about 10,000 characters into a file and show only a preview; 20,000 for ZCode, which drops output above 32 KB; no cap elsewhere. Above the cap, the memory index is dropped first, then the skill catalog.
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/agent-integrations/16-capability-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ skill 走单独的路径。创建、安装或替换 skill 用 MCP `add_skill`

### 会话开场上下文

使用共享插件代码的集成会在会话开始时注入一个 `<openviking-context>` 块,包含用户 profile(`viking://user/<space>/memories/profile.md`)、`preferences/` 和 `entities/` 记忆的索引,以及 `<available-skills>` skill 清单:
使用共享插件代码的集成会在会话开始时注入一个 `<openviking-context>` 块,包含用户 profile(`viking://user/<space>/memories/profile.md`)、`preferences/` 和 `entities/` 记忆的索引,以及 `<available-skills>` skill 清单。会话带有 actor peer 时,还会加入 `viking://user/<space>/peers/<peer>/memories/` 下的同名文件:profile、preferences 和 entities 没有消息范围,所以即使在 peer 会话中,抽取也会把用户本人的事实写到用户根目录。用户根目录在前;peer profile 是第二个 `<user-profile>` 元素,并去掉与用户 profile 相同的行;两个根目录共用同一份预算:

```text
<openviking-context source="startup">
Expand Down Expand Up @@ -232,7 +232,7 @@ skill 走单独的路径。创建、安装或替换 skill 用 MCP `add_skill`

预算与限制:

- `profileTokenBudget`(默认 10,000 token)覆盖 profile 和记忆索引,profile 占一半。profile 超长时保留前 8 行和结尾;清单超长时以 `... +N more` 结尾。token 估算中,CJK 字符按 1.5 token 计,其他文本按每 4 个字符 1 token 计。
- `profileTokenBudget`(默认 10,000 token)覆盖 profile 和记忆索引,profile 占一半:先放用户 profile,peer profile 使用剩余部分,剩余不足 200 token 时只放一行指向其 URI 的提示。两个根目录分摊索引预算。profile 超长时保留前 8 行和结尾;清单超长时以 `... +N more` 结尾。token 估算中,CJK 字符按 1.5 token 计,其他文本按每 4 个字符 1 token 计。
- `skillCatalogTokenBudget`(默认 1,200 token,`OPENVIKING_SKILL_CATALOG_TOKEN_BUDGET`)是 skill 清单的独立预算。`skillCatalog`(`OPENVIKING_SKILL_CATALOG`)或把预算设为 0 都会关闭清单。
- 清单来自一次 `GET /api/v1/skills` 请求。用户自己的 skill 排在前面,与用户 skill 同名的账户 skill 不再列出。每条描述截到约 40 token。描述放不下时只列名称;名称也放不下时以 `... +N more` 结尾,或缩成一行数量。服务端没有该接口时不注入清单。
- `sessionStartMaxBytes` 按 UTF-8 字节限制整个块:Claude Code 和 Codex 为 9,500,因为这两个宿主会把超过约 10,000 字符的 hook 输出存成文件,只显示预览;ZCode 为 20,000,因为它会丢弃超过 32 KB 的输出;其他集成不设上限。超出上限时,先去掉记忆索引,再去掉 skill 清单。
Expand Down
2 changes: 1 addition & 1 deletion examples/agent-hook-plugin/hosts/codebuddy/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
"version": "0.5.26",
"version": "0.5.27",
"description": "Long-term semantic memory for the CodeBuddy Code CLI, powered by OpenViking. Injects relevant context at session start and on each prompt, and captures the conversation back into OpenViking.",
"author": {
"name": "OpenViking",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
"version": "0.5.26",
"version": "0.5.27",
"clients": [
"cursor"
],
Expand Down
2 changes: 1 addition & 1 deletion examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
"version": "0.5.26",
"version": "0.5.27",
"description": "Long-term semantic memory for Kimi Code CLI, powered by OpenViking.",
"author": {
"name": "OpenViking",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
"version": "0.5.26",
"version": "0.5.27",
"clients": [
"kimicode"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
"version": "0.5.26",
"version": "0.5.27",
"clients": [
"trae",
"trae-cn"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
"version": "0.5.26",
"version": "0.5.27",
"clients": [
"zcode"
],
Expand Down
2 changes: 1 addition & 1 deletion examples/agent-hook-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agent-hook-plugin",
"version": "0.5.26",
"version": "0.5.27",
"description": "Long-term semantic memory for Cursor, TRAE, TRAE CN, ZCode, Kimi Code and CodeBuddy Code — powered by OpenViking. Auto-recall relevant memories and capture the conversation as it happens.",
"author": {
"name": "OpenViking",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
"version": "0.7.19",
"version": "0.7.20",
"description": "Long-term semantic memory for Claude Code, powered by OpenViking. Auto-recall relevant memories at session start and capture important information during conversations.",
"author": {
"name": "OpenViking",
Expand Down
2 changes: 1 addition & 1 deletion examples/claude-code-memory-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claude-code-openviking-memory",
"version": "0.7.19",
"version": "0.7.20",
"description": "OpenViking memory plugin for Claude Code — semantic long-term memory",
"type": "module",
"scripts": {
Expand Down
162 changes: 130 additions & 32 deletions examples/claude-code-memory-plugin/scripts/shared/profile-inject.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/codex-memory-plugin/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
"version": "0.11.16",
"version": "0.11.17",
"description": "Long-term semantic memory for Codex, powered by OpenViking. Recall on UserPromptSubmit, incremental add_message on Stop (per turn), commit on SessionEnd (Codex >= 0.145) and on PreCompact, with an idle/ended sweep on SessionStart as the fallback for signals, crashes and older Codex builds. Includes a local stdio MCP proxy that reads OpenViking credentials from env/ovcli.conf.",
"author": {
"name": "OpenViking",
Expand Down
Loading
Loading