Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 2 additions & 1 deletion .github/scripts/ci_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def changed(pattern):
r"^(examples/[^/]*(plugin|extension)[^/]*/|examples/memory-plugin-shared/|"
r"agent-plugins/|\.github/scripts/.*(plugin|marketplace|installer)|"
r"\.github/workflows/pr\.yml)|"
r"^(examples/)?(\.claude-plugin|\.agents/plugins)/marketplace\.json$"
r"^(examples/)?(\.claude-plugin|\.agents/plugins)/marketplace\.json$|"
r"^tests/fixtures/server_feature_versions\.json$"
)
# Keep unfamiliar paths on the safe side: only known independent trees
# bypass API tests. Added/removed/renamed paths are all included in the diff.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gateway.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: OpenViking Gateway
on:
pull_request:
paths: ["openviking_gateway/**", "tests/gateway/**", "scripts/gateway_*", "tests/fixtures/gateway_upstream_urls.json", "openviking_cli/utils/config/openviking_gateway_config.py", "openviking_cli/utils/config/encryption_config.py", "openviking_cli/utils/config/agfs_config.py", "openviking/server/account_stores/redis_client.py", "pyproject.toml", "MANIFEST.in", "openviking_cli/setup_wizard.py", "openviking/crypto/**", ".github/workflows/gateway.yml"]
paths: ["openviking_gateway/**", "tests/gateway/**", "scripts/gateway_*", "tests/fixtures/gateway_upstream_urls.json", "tests/fixtures/server_feature_versions.json", "openviking_cli/utils/config/openviking_gateway_config.py", "openviking_cli/utils/config/encryption_config.py", "openviking_cli/utils/config/agfs_config.py", "openviking/server/account_stores/redis_client.py", "pyproject.toml", "MANIFEST.in", "openviking_cli/setup_wizard.py", "openviking/crypto/**", ".github/workflows/gateway.yml"]
workflow_dispatch:
jobs:
test:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ jobs:
- name: Committed generator output must be up to date
run: |
# A module the closure grew reaches the committed lanes as an
# untracked file, which `git diff` does not see at all.
status=$(git status --porcelain --untracked-files=normal -- examples agent-plugins)
# untracked file, which `git diff` does not see at all. The gateway
# package holds a committed copy of the server feature table.
status=$(git status --porcelain --untracked-files=normal -- examples agent-plugins openviking_gateway)
if [ -n "$status" ]; then
printf '%s\n' "$status"
exit 1
Expand Down
3 changes: 2 additions & 1 deletion docs/.vitepress/theme/docs-sections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ export const sections: DocSection[] = [
]),
g('Memory and tools', '记忆与工具', [
p('gateway/04-openviking-tools'),
p('gateway/05-long-conversations')
p('gateway/05-long-conversations'),
p('gateway/14-seal-secrets')
]),
g('Manage in Studio', '在 Studio 中管理', [
p('gateway/06-manage-in-studio'),
Expand Down
21 changes: 21 additions & 0 deletions docs/en/agent-integrations/02-claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@ Configuration priority: Environment variables > `ovcli.conf` > `ov.conf` > Built
| `OPENVIKING_CAPTURE_FILTERS` | `""` | CSV of sed-style regex rules applied to every captured turn (same grammar) |
| `OPENVIKING_MEMORY_ENABLED` | (auto) | Force on/off |
| `OPENVIKING_DEBUG` | `false` | Write logs to `~/.openviking/logs/cc-hooks.log` |
| `OPENVIKING_SEAL_SECRETS` | `false` | Seal secrets out of what the model sees (`sealSecrets`; needs OpenViking server 0.5.7 or newer) |
| `OPENVIKING_ENROLL_TOOL_SECRETS` | `false` | With `sealSecrets` on, also store new secrets found in tool output (`enrollToolSecrets`) |

Most of these knobs can also live in `ovcli.conf` under `plugin` — see [Plugin Settings](../configuration/02-client.md#plugin-settings). The two filter knobs are better written there, as JSON arrays, because the environment form is split on commas.

Sealing secrets is described in [Seal secrets](#seal-secrets).

If recall latency matters most, see [Low-latency recall](./01-overview.md#low-latency-recall) for the environment-variable and `ovcli.conf` settings that disable query expansion and result compression.

With a user/admin key, the server derives identity from the key. Set `OPENVIKING_ACCOUNT` and `OPENVIKING_USER` only for trusted mode, using values supplied by your administrator. The complete list of environment variables is available in the [plugin README](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#configuration).
Expand All @@ -126,6 +130,23 @@ Under each answer, the plugin adds a one-line card listing the OpenViking source

The cards need Claude Code 2.1.286 or newer with plugin hooks modules enabled. On older versions, or with modules off, no cards are shown, and recall, capture and the other hooks work as before. See [Source cards](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#source-cards) in the plugin README.

## Seal secrets {#seal-secrets}

With `sealSecrets` on, the plugin replaces the secrets your OpenViking server knows with <code v-pre>{{ov_privacy:…}}</code> references in what Claude reads, and gives tools the real values back. It is off by default and needs OpenViking server 0.5.7 or newer. It runs on your machine.

| Setting | Environment variable | Default | Effect |
|---------|----------------------|---------|--------|
| `sealSecrets` | `OPENVIKING_SEAL_SECRETS` | `false` | Turns sealing on |
| `enrollToolSecrets` | `OPENVIKING_ENROLL_TOOL_SECRETS` | `false` | Also stores new secrets found in tool output |

Set them in `ovcli.conf` (see the plugin README) or in the environment; a changed setting takes effect in a new session. Sealing runs in the plugin's hooks module, so it needs what [Source cards](#source-cards) need; where the module is not loaded, nothing is sealed.

- **Sealed:** your prompt, tool results, and the files, reminders and hook context Claude Code attaches. New secrets are stored from your prompt, and from tool results only with `enrollToolSecrets`. A reference Claude writes in a tool call becomes the real value before the tool runs. The local transcript stores prompts and tool results with references; for attached files and reminders it keeps Claude Code's own record, with the original text.
- **When sealing cannot be done** (a server older than 0.5.7, a failed `/health`, seal or resolve call), it stops: your prompt is not sent, a tool result is withheld, and a tool call whose references cannot be resolved does not run. The message says why. Upgrade the server or restore the connection, or turn `sealSecrets` off.
- **Not covered:** the system prompt, slash-command arguments, skill bodies, and history written before sealing was turned on.

Details: [plugin README](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#seal-secrets).

## Troubleshooting

| Issue | Cause | Solution |
Expand Down
17 changes: 17 additions & 0 deletions docs/en/agent-integrations/11-pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,23 @@ Settings resolve highest priority first: `OPENVIKING_*` environment variables, t

Takeover is fail-open: if pending writes cannot flush, commit fails, the archive overview is not ready, or the branch fingerprint no longer matches, pi keeps full local history or falls back to its default compaction. Set `OPENVIKING_DEBUG_LOG=/tmp/ov-pi.log` when validating boundary advances; the log is JSON Lines, one record per event. `OV_DEBUG_LOG` is a deprecated alias that still works.

## Seal secrets {#seal-secrets}

`sealSecrets` keeps the secrets your OpenViking server knows out of what the model sees; a reference the model writes in a tool call is turned back into the real value for the tool only. It is off by default and needs OpenViking server 0.5.7 or newer.

| Setting | Environment variable | Default | Effect |
|---------|----------------------|---------|--------|
| `sealSecrets` | `OPENVIKING_SEAL_SECRETS` | `false` | Seals what you type and every tool result |
| `enrollToolSecrets` | `OPENVIKING_ENROLL_TOOL_SECRETS` | `false` | Also stores new secrets found in tool results |

Neither can be set in a workspace file.

- **Sealed:** what you type and every tool result, before pi stores or sends them, so the model and the session file see references (<code v-pre>{{ov_privacy:…}}</code>). New secrets in what you type are stored automatically; a reference the model writes in a tool call becomes the real value for the tool only.
- **When sealing cannot be done** (a server older than 0.5.7, a failed `/health`, seal or resolve call), it stops: what you typed is not sent, a tool result is withheld, and a tool call whose references cannot be resolved does not run. pi tells you why. Upgrade the server or restore the connection, or turn `sealSecrets` off.
- **Not covered:** the system prompt and context files, skill and prompt-template text, recall blocks, compaction summaries, and history from before sealing was turned on.

Details: [extension README](https://github.com/volcengine/OpenViking/blob/main/examples/pi-coding-agent-extension/README.md#secret-sealing).

## Verify

Start `pi`. Once connected, the footer shows an `OV ✓` status segment, and `/viking` prints the current session mapping and how many `openviking_*` tools registered. Ask pi about something you mentioned in an earlier session to confirm recall.
Expand Down
1 change: 1 addition & 0 deletions docs/en/api/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ This catalog follows the routes actually mounted by the server. Each group headi
| GET | `/api/v1/privacy-configs` | List privacy configuration categories |
| GET | `/api/v1/privacy-configs/tree` | List current targets and field metadata as a tree without values |
| POST | `/api/v1/privacy-configs/scan` | Scan or repair registered values in content |
| POST | `/api/v1/privacy-configs/seal` | Replace registered values in texts with references, optionally enrolling new tokens |
| GET | `/api/v1/privacy-configs/{category}` | List category targets |
| GET | `/api/v1/privacy-configs/{category}/{target_key}` | Get the active configuration |
| GET | `/api/v1/privacy-configs/{category}/{target_key}/fields` | List safe active-field metadata without values |
Expand Down
Loading
Loading