Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
feat(docs): redesign homepage and unify documentation navigation (#5300)
Zayn Jarvis75cf53a5310b
diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.tsindex 70a6fd02b..67f08a4ad 100644--- a/docs/.vitepress/config.ts+++ b/docs/.vitepress/config.ts@@ -2,13 +2,12 @@ import fs from 'node:fs'import path from 'node:path'import { fileURLToPath } from 'node:url'import { defineConfig, type DefaultTheme } from 'vitepress'+import { titleFromMarkdown, sidebarSection, localizedSectionSidebarItems, localizedGroupedSidebarItems, localizedReferenceSidebarItems, localizedAboutSidebarItems, designSidebar } from './docs-navigation'const docsRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')const repo = process.env.GITHUB_REPOSITORY || 'volcengine/OpenViking'const githubRepositoryUrl = `https://github.com/${repo}?utm_source=docs&utm_medium=referral&utm_campaign=docs`const base = process.env.DOCS_BASE || '/'-const withTrailingSlash = (url: string) => (url.endsWith('/') ? url : `${url}/`)-const mainSiteBase = withTrailingSlash(process.env.OPENVIKING_SITE_BASE || 'https://www.openviking.ai/')const preferenceBootstrapScript = `;(() => {const prefix = 'openviking-preferences:'const cookieKey = 'openviking-preferences'@@ -29,34 +28,6 @@ const preferenceBootstrapScript = `;(() => {} catch {}})()`-const sectionNames: Record<string, string> = {- 'getting-started': 'Getting Started',- configuration: 'Configuration',- concepts: 'Concepts',- guides: 'Guides',- 'agent-integrations': 'Agent Integrations',- 'context-compilation': 'Context Compilation',- migration: 'Migration',- api: 'API Reference',- faq: 'FAQ',- about: 'About',- design: 'Design Notes'-}--const zhSectionNames: Record<string, string> = {- 'getting-started': '开始使用',- configuration: '配置',- concepts: '核心概念',- guides: '指南',- 'agent-integrations': 'Agent 集成',- 'context-compilation': '上下文编译',- migration: '迁移指南',- api: 'API 参考',- faq: '常见问题',- about: '关于',- design: '设计文档'-}-const navLabels = {en: {start: 'Getting Started',@@ -76,642 +47,6 @@ const navLabels = {}}-function titleFromMarkdown(filePath: string): string {- const content = fs.readFileSync(filePath, 'utf8')- const heading = content.match(/^#\s+(.+)$/m)?.[1]- const fallback = path.basename(filePath, '.md')- return (heading || fallback).replace(/^\d+[-_]/, '').trim()-}--function linkFor(filePath: string): string {- const relativePath = path.relative(docsRoot, filePath).replaceAll(path.sep, '/')- return `/${relativePath.replace(/\.md$/, '')}`-}--function sidebarSection(dir: string, title: string, collapsed = true): DefaultTheme.SidebarItem {- const absoluteDir = path.join(docsRoot, dir)- const items = fs- .readdirSync(absoluteDir)- .filter((file) => file.endsWith('.md'))- .sort((a, b) => a.localeCompare(b, undefined, { numeric: true }))- .map((file) => {- const filePath = path.join(absoluteDir, file)- return {- text: titleFromMarkdown(filePath),- link: linkFor(filePath)- }- })-- return { text: title, collapsed, items }-}--const gettingStartedSidebar = {- en: [- ['01-introduction.md', 'Introduction'],- ['02-quickstart.md', 'Quick Start'],- ['04-setup-for-agent.md', 'Server Setup for Agent'],- ['05-cli-setup.md', 'OpenViking CLI']- ],- zh: [- ['01-introduction.md', '简介'],- ['02-quickstart.md', '快速开始'],- ['04-setup-for-agent.md', '服务端安装(Agent 版)'],- ['05-cli-setup.md', 'OpenViking CLI']- ]-} as const--const agentIntegrationSidebar = {- en: {- overview: 'Integration Overview',- topItems: [- ['16-capability-reference.md', 'Capability Reference'],- ['18-plugin-development.md', 'Plugin Development']- ],- groups: [- {- text: 'Developer Tools',- items: [- ['02-claude-code.md', 'Claude Code'],- ['04-codex.md', 'Codex'],- ['10-opencode.md', 'OpenCode'],- ['12-cursor.md', 'Cursor'],- ['13-trae.md', 'TRAE / TRAE CN'],- ['17-dsh.md', 'DeepSeek Harness']- ]- },- {- text: 'Agents & Frameworks',- items: [- ['03-openclaw.md', 'OpenClaw'],- ['05-hermes.md', 'Hermes'],- ['07-langchain-langgraph.md', 'LangChain / LangGraph'],- ['11-pi.md', 'pi']- ]- },- {- text: 'General Integration',- items: [- ['14-openviking-helper.md', 'OpenViking Helper'],- ['15-agent-plugins.md', 'Agent Plugins 1.0'],- ['06-mcp-clients.md', 'MCP Clients'],- ['09-log-ingestion.md', 'Local Log Import'],- ['08-community-plugins.md', 'Community Integrations']- ]- }- ]- },- zh: {- overview: '集成概览',- topItems: [- ['16-capability-reference.md', '集成能力参考'],- ['18-plugin-development.md', '插件开发与维护']- ],- groups: [- {- text: '开发工具',- items: [- ['02-claude-code.md', 'Claude Code'],- ['04-codex.md', 'Codex'],- ['10-opencode.md', 'OpenCode'],- ['12-cursor.md', 'Cursor'],- ['13-trae.md', 'TRAE / TRAE CN'],- ['17-dsh.md', 'DeepSeek Harness']- ]- },- {- text: 'Agent 与框架',- items: [- ['03-openclaw.md', 'OpenClaw'],- ['05-hermes.md', 'Hermes'],- ['07-langchain-langgraph.md', 'LangChain / LangGraph'],- ['11-pi.md', 'pi']- ]- },- {- text: '通用接入',- items: [- ['14-openviking-helper.md', 'OpenViking Helper'],- ['15-agent-plugins.md', 'Agent Plugins 1.0'],- ['06-mcp-clients.md', 'MCP 客户端'],- ['09-log-ingestion.md', '本地日志导入'],- ['08-community-plugins.md', '社区集成']- ]- }- ]- }-} as const--const apiReferenceSidebar = {- en: {- overview: 'Overview',- groups: [- {- text: 'Core Data',- items: [- ['02-resources.md', 'Resources'],- ['12-content.md', 'Content'],- ['03-filesystem.md', 'File System'],- ['04-skills.md', 'Skills'],- ['05-sessions.md', 'Sessions'],- ['16-memory.md', 'Memory'],- ['19-agent-evolution.md', 'Agent Evolution']- ]- },- {- text: 'Retrieval',- items: [['06-retrieval.md', 'Retrieval']]- },- {- text: 'Data Lifecycle',- items: [- ['15-watches.md', 'Resource Watches'],- ['11-snapshot.md', 'Snapshots'],- ['14-ovpack.md', 'OVPack']- ]- },- {- text: 'Operations & Observability',- items: [- ['07-system.md', 'System Status'],- ['17-tasks.md', 'Background Tasks'],- ['18-observer.md', 'Runtime Observability'],- ['09-metrics.md', 'Metrics']- ]- },- {- text: 'Identity & Governance',- items: [- ['08-admin.md', 'Multi-Tenancy'],- ['10-privacy.md', 'Privacy']- ]- },- {- text: 'Protocols & Extensions',- items: [- ['22-openviking-assets.md', 'OpenViking Assets'],- ['20-webdav.md', 'WebDAV'],- ['23-agent-runtime.md', 'Agent Runtime API'],- ['24-vikingbot.md', 'VikingBot API']- ]- },- {- text: 'Documentation Maintenance',- items: [['99-api-doc-writing-guide.md', 'API Docs Guide']]- }- ]- },- zh: {- overview: '概览',- groups: [- {- text: '核心数据',- items: [- ['02-resources.md', '资源'],- ['12-content.md', '内容'],- ['03-filesystem.md', '文件系统'],- ['04-skills.md', '技能'],- ['05-sessions.md', '会话'],- ['16-memory.md', '记忆'],- ['19-agent-evolution.md', 'Agent 进化']- ]- },- {- text: '检索',- items: [['06-retrieval.md', '检索']]- },- {- text: '数据生命周期',- items: [- ['15-watches.md', '资源 Watch'],- ['11-snapshot.md', '快照'],- ['14-ovpack.md', 'OVPack']- ]- },- {- text: '运维与观测',- items: [- ['07-system.md', '系统状态'],- ['17-tasks.md', '后台任务'],- ['18-observer.md', '运行观测'],- ['09-metrics.md', '监控指标']- ]- },- {- text: '身份与治理',- items: [- ['08-admin.md', '多租户'],- ['10-privacy.md', '隐私配置']- ]- },- {- text: '协议与扩展',- items: [- ['22-openviking-assets.md', 'OpenViking Assets'],- ['20-webdav.md', 'WebDAV'],- ['23-agent-runtime.md', 'Agent Runtime API'],- ['24-vikingbot.md', 'VikingBot API']- ]- },- {- text: '文档维护',- items: [['99-api-doc-writing-guide.md', 'API 文档规范']]- }- ]- }-} as const--const conceptsSidebar = {- en: {- overview: 'Overview',- groups: [- {- text: 'Core Model',- items: [- ['02-context-types.md', 'Context Types'],- ['03-context-layers.md', 'Context Layers'],- ['04-viking-uri.md', 'Viking URI']- ]- },- {- text: 'Storage & Processing',- items: [- ['05-storage.md', 'Storage'],- ['06-extraction.md', 'Extraction'],- ['07-retrieval.md', 'Retrieval'],- ['08-session.md', 'Sessions']- ]- },- {- text: 'Reliability & Governance',- items: [- ['09-transaction.md', 'Transactions & Recovery'],- ['10-encryption.md', 'Encryption'],- ['11-multi-tenant.md', 'Multi-Tenancy'],- ['12-metrics.md', 'Metrics'],- ['13-privacy.md', 'Privacy'],- ['14-multi-write-storage.md', 'Multi-Write Storage'],- ['16-queue-lifecycle.md', 'Queue State and Completion']- ]- },- {- text: 'Example',- items: [['15-vikingbot.md', 'VikingBot']]- }- ]- },- zh: {- overview: '概览',- groups: [- {- text: '核心模型',- items: [- ['02-context-types.md', '上下文类型'],- ['03-context-layers.md', '上下文层级'],- ['04-viking-uri.md', 'Viking URI']- ]- },- {- text: '存储与处理',- items: [- ['05-storage.md', '存储架构'],- ['06-extraction.md', '上下文提取'],- ['07-retrieval.md', '检索机制'],- ['08-session.md', '会话管理']- ]- },- {- text: '可靠性与治理',- items: [- ['09-transaction.md', '事务与恢复'],- ['10-encryption.md', '数据加密'],- ['11-multi-tenant.md', '多租户'],- ['12-metrics.md', '监控指标'],- ['13-privacy.md', '隐私配置'],- ['14-multi-write-storage.md', '多写存储'],- ['16-queue-lifecycle.md', '队列状态与完成语义']- ]- },- {- text: '应用案例',- items: [['15-vikingbot.md', 'VikingBot']]- }- ]- }-} as const--const guidesSidebar = {- en: {- groups: [- {- text: 'Configuration & Deployment',- items: [- ['01-configuration.md', 'Configuration'],- ['02-volcengine-purchase-guide.md', 'Model Purchase'],- ['03-deployment.md', 'Server Deployment'],- ['04-authentication.md', 'Authentication'],- ['08-encryption.md', 'Encryption'],- ['11-oauth.md', 'OAuth 2.1'],- ['12-public-access.md', 'Public Access']- ]- },- {- text: 'Integration & Extension',- items: [- ['06-mcp-integration.md', 'MCP Integration'],- ['09-ovpack.md', 'OVPack'],- ['18-openviking-assets.md', 'OpenViking Assets'],- ['10-prompt-guide.md', 'Prompt Customization'],- ['17-vikingbot.md', 'VikingBot']- ]- },- {- text: 'Observability',- items: [- ['05-observability.md', 'Observability & Diagnostics'],- ['07-operation-telemetry.md', 'Operation Telemetry'],- ['11-grafana-prometheus.md', 'Prometheus / Grafana'],- ['12-vikingbot-metrics-validation.md', 'VikingBot Metrics Validation']- ]- },- {- text: 'Storage & Performance',- items: [- ['13-multi-write-storage.md', 'Multi-Write Storage'],- ['14-ragfs-cache.md', 'RAGFS Cache'],- ['15-snapshot.md', 'Snapshots'],- ['16-cuvs.md', 'cuVS Vector Search']- ]- }- ]- },- zh: {- groups: [- {- text: '配置与部署',- items: [- ['01-configuration.md', '基础配置'],- ['02-volcengine-purchase-guide.md', '模型购买'],- ['03-deployment.md', '服务端部署'],- ['04-authentication.md', '身份认证'],- ['08-encryption.md', '数据加密'],- ['11-oauth.md', 'OAuth 2.1'],- ['12-public-access.md', '公网访问']- ]- },- {- text: '集成与扩展',- items: [- ['06-mcp-integration.md', 'MCP 集成'],- ['09-ovpack.md', 'OVPack'],- ['18-openviking-assets.md', 'OpenViking Assets'],- ['10-prompt-guide.md', 'Prompt 自定义'],- ['17-vikingbot.md', 'VikingBot']- ]- },- {- text: '可观测性',- items: [- ['05-observability.md', '可观测性与排障'],- ['07-operation-telemetry.md', '操作遥测'],- ['11-grafana-prometheus.md', 'Prometheus / Grafana'],- ['12-vikingbot-metrics-validation.md', 'VikingBot 指标验证']- ]- },- {- text: '存储与性能',- items: [- ['13-multi-write-storage.md', '多写存储'],- ['14-ragfs-cache.md', 'RAGFS 缓存'],- ['15-snapshot.md', '快照管理'],- ['16-cuvs.md', 'cuVS 向量检索']- ]- }- ]- }-} as const--type StructuredSidebarCopy = {- readonly overview: string- readonly topItems?: ReadonlyArray<readonly [string, string]>- readonly groups: ReadonlyArray<{- readonly text: string- readonly items: ReadonlyArray<readonly [string, string]>- }>-}--type GroupedSidebarCopy = Pick<StructuredSidebarCopy, 'groups'>--function configuredSidebarItem(- locale: 'en' | 'zh',- section: string,- [file, text]: readonly [string, string]-): DefaultTheme.SidebarItem {- return {- text,- link: linkFor(path.join(docsRoot, locale, section, file))- }-}--function configuredSidebarGroups(- locale: 'en' | 'zh',- section: string,- groups: GroupedSidebarCopy['groups']-): DefaultTheme.SidebarItem[] {- return groups.map((group) => ({- text: group.text,- collapsed: false,- items: group.items.map((item) => configuredSidebarItem(locale, section, item))- }))-}--function groupedSidebarSection(- locale: 'en' | 'zh',- section: string,- title: string,- copy: GroupedSidebarCopy,- collapsed = true-): DefaultTheme.SidebarItem {- return {- text: title,- collapsed,- items: configuredSidebarGroups(locale, section, copy.groups)- }-}--function structuredSidebarSection(- locale: 'en' | 'zh',- section: string,- title: string,- copy: StructuredSidebarCopy,- collapsed = true,- overviewFile = '01-overview.md'-): DefaultTheme.SidebarItem {- return {- text: title,- collapsed,- items: [- configuredSidebarItem(locale, section, [overviewFile, copy.overview]),- ...(copy.topItems ?? []).map((item) => configuredSidebarItem(locale, section, item)),- ...configuredSidebarGroups(locale, section, copy.groups)- ]- }-}--function agentIntegrationSection(- locale: 'en' | 'zh',- title: string,- collapsed = true-): DefaultTheme.SidebarItem {- return structuredSidebarSection(- locale,- 'agent-integrations',- title,- agentIntegrationSidebar[locale],- collapsed- )-}--function gettingStartedSection(- locale: 'en' | 'zh',- title: string,- collapsed = true-): DefaultTheme.SidebarItem {- return {- text: title,- collapsed,- items: gettingStartedSidebar[locale].map((item) =>- configuredSidebarItem(locale, 'getting-started', item)- )- }-}--function apiReferenceSection(- locale: 'en' | 'zh',- title: string,- collapsed = true-): DefaultTheme.SidebarItem {- return structuredSidebarSection(locale, 'api', title, apiReferenceSidebar[locale], collapsed)-}--function conceptsSection(- locale: 'en' | 'zh',- title: string,- collapsed = true-): DefaultTheme.SidebarItem {- return structuredSidebarSection(- locale,- 'concepts',- title,- conceptsSidebar[locale],- collapsed,- '01-architecture.md'- )-}--function guidesSection(- locale: 'en' | 'zh',- title: string,- collapsed = true-): DefaultTheme.SidebarItem {- const section = groupedSidebarSection(locale, 'guides', title, guidesSidebar[locale], collapsed)- // Nest the Context Compilation pages under the "Integration & Extension" group.- const integrationGroupTitle = locale === 'zh' ? '集成与扩展' : 'Integration & Extension'- const integrationGroup = section.items?.find((item) => item.text === integrationGroupTitle)- if (integrationGroup?.items) {- const labels = locale === 'zh' ? zhSectionNames : sectionNames- integrationGroup.items.push(- sidebarSection(`${locale}/context-compilation`, labels['context-compilation'], true)- )- }- return section-}--function migrationSection(- locale: 'en' | 'zh',- title: string,- collapsed = true-): DefaultTheme.SidebarItem {- return {- text: title,- collapsed,- items: [- {- text: '0.3.x → 0.4.0',- link: linkFor(path.join(docsRoot, locale, 'migration', '01-user-peer-model.md'))- }- ]- }-}--type LocalizedSidebarSection =- | 'getting-started'- | 'configuration'- | 'concepts'- | 'guides'- | 'agent-integrations'- | 'migration'--type LocalizedSidebarSectionBuilder = (- locale: 'en' | 'zh',- title: string,- collapsed?: boolean-) => DefaultTheme.SidebarItem--const localizedSidebarSectionBuilders: Record<- LocalizedSidebarSection,- LocalizedSidebarSectionBuilder-> = {- 'getting-started': gettingStartedSection,- configuration: (locale, title, collapsed = true) =>- sidebarSection(`${locale}/configuration`, title, collapsed),- concepts: conceptsSection,- guides: guidesSection,- 'agent-integrations': agentIntegrationSection,- migration: migrationSection-}--function localizedSidebarSection(- locale: 'en' | 'zh',- section: LocalizedSidebarSection,- title: string,- collapsed = true-): DefaultTheme.SidebarItem {- return localizedSidebarSectionBuilders[section](locale, title, collapsed)-}--function localizedSectionSidebarItems(- locale: 'en' | 'zh',- section: LocalizedSidebarSection-): DefaultTheme.SidebarItem[] {- const labels = locale === 'zh' ? zhSectionNames : sectionNames- return [localizedSidebarSection(locale, section, labels[section], false)]-}--function localizedGroupedSidebarItems(- locale: 'en' | 'zh',- sections: ReadonlyArray<Exclude<LocalizedSidebarSection, 'concepts'>>-): DefaultTheme.SidebarItem[] {- const labels = locale === 'zh' ? zhSectionNames : sectionNames-- return sections.map((section) =>- localizedSidebarSection(locale, section, labels[section], false)- )-}--function localizedReferenceSidebarItems(locale: 'en' | 'zh'): DefaultTheme.SidebarItem[] {- const labels = locale === 'zh' ? zhSectionNames : sectionNames- return [apiReferenceSection(locale, labels.api, false)]-}--function localizedAboutSidebarItems(locale: 'en' | 'zh'): DefaultTheme.SidebarItem[] {- const labels = locale === 'zh' ? zhSectionNames : sectionNames- return [sidebarSection(`${locale}/about`, labels.about, false)]-}--const designSidebar: DefaultTheme.SidebarItem[] = [- sidebarSection('design', sectionNames.design, false)-]-const enNav: DefaultTheme.NavItem[] = [{ text: navLabels.en.start, link: '/en/getting-started/01-introduction', activeMatch: '/en/(getting-started|configuration|agent-integrations)/' },{ text: navLabels.en.concepts, link: '/en/concepts/01-architecture', activeMatch: '/en/concepts/' },@@ -817,9 +152,10 @@ function buildLlmsTxt(siteConfig: any) {const srcDir = siteConfig.srcDirconst outDir = siteConfig.outDir- const files = collectAllMdFiles(srcDir)+ const allFiles = collectAllMdFiles(srcDir)+ const files = allFiles.filter(({ relativePath }) => relativePath.replaceAll(path.sep, '/').startsWith('en/'))- // Group by section prefix (e.g. en/getting-started, zh/concepts)+ // The machine-readable index and full corpus use the English documentation.const sections = new Map<string, { title: string; url: string }[]>()for (const { relativePath, absPath } of files) {const parts = relativePath.replace(/\\/g, '/').split('/')@@ -855,7 +191,7 @@ function buildLlmsTxt(siteConfig: any) {const fullLines: string[] = ['# OpenViking — Full Documentation','',- '> This file contains the complete documentation for LLM consumption.',+ '> This file contains the English documentation for LLM consumption.','',]for (const { relativePath, absPath } of files) {@@ -864,9 +200,15 @@ function buildLlmsTxt(siteConfig: any) {}fs.writeFileSync(path.join(outDir, 'llms-full.txt'), fullLines.join('\n'), 'utf-8')- // Per-page llms.txt: /{page-path}/llms.txt returns the raw markdown of that page- for (const { relativePath, absPath } of files) {- const content = fs.readFileSync(absPath, 'utf-8')+ // Keep existing URLs, including /zh/, but serve their English counterpart.+ for (const { relativePath, absPath } of allFiles) {+ const normalized = relativePath.replaceAll(path.sep, '/')+ const englishPath = normalized.startsWith('zh/')+ ? path.join(srcDir, normalized.replace(/^zh\//, 'en/'))+ : normalized.startsWith('en/') ? absPath : null+ const content = englishPath && fs.existsSync(englishPath)+ ? fs.readFileSync(englishPath, 'utf-8')+ : '# English documentation\n\nNo English version is available for this page. See the [documentation index](' + siteUrl + base + '/llms.txt).\n'const pageDir = path.join(outDir, relativePath.replace(/\.md$/, ''))fs.mkdirSync(pageDir, { recursive: true })fs.writeFileSync(path.join(pageDir, 'llms.txt'), content, 'utf-8')@@ -891,9 +233,10 @@ export default defineConfig({transformPageData(pageData, { siteConfig }) {const srcPath = path.join(siteConfig.srcDir, pageData.relativePath)try {- pageData.frontmatter._rawMarkdown = fs.readFileSync(srcPath, 'utf-8')+ // Raw SFC closing tags must not terminate VitePress's generated script block.+ pageData.frontmatter._rawMarkdownEncoded = encodeURIComponent(fs.readFileSync(srcPath, 'utf-8'))} catch {- pageData.frontmatter._rawMarkdown = ''+ pageData.frontmatter._rawMarkdownEncoded = ''}},buildEnd(siteConfig) {@@ -912,7 +255,10 @@ export default defineConfig({const candidate = stripped ? path.join(docsRoot, stripped + '.md') : nullif (candidate && fs.existsSync(candidate)) {res.setHeader('Content-Type', 'text/plain; charset=utf-8')- res.end(fs.readFileSync(candidate, 'utf-8'))+ const english = candidate.replace(/([/\\])zh([/\\])/, '$1en$2')+ res.end(fs.existsSync(english)+ ? fs.readFileSync(english, 'utf-8')+ : '# English documentation\n\nNo English version is available for this page. See /llms.txt.\n')} else {next()}@@ -930,12 +276,13 @@ export default defineConfig({},themeConfig: {logo: '/ov-logo.png',- logoLink: mainSiteBase,+ logoLink: '/',+ nav: enNav,socialLinks: [{ icon: 'github', link: githubRepositoryUrl }],footer: {- message: 'Released under the Apache-2.0 License.',+ message: 'Open source under the AGPL-3.0 License.',copyright: 'Copyright OpenViking contributors'}},@@ -945,6 +292,7 @@ export default defineConfig({lang: 'en-US',link: '/en/',themeConfig: {+ logoLink: '/en/',nav: enNav,outline: {level: [2, 3]@@ -958,6 +306,7 @@ export default defineConfig({'/en/context-compilation/': localizedGroupedSidebarItems('en', ['guides', 'migration']),'/en/migration/': localizedGroupedSidebarItems('en', ['guides', 'migration']),'/en/api/': localizedReferenceSidebarItems('en'),+ '/en/faq/': [sidebarSection('en/faq', 'FAQ', false)],'/en/about/': localizedAboutSidebarItems('en'),'/design/': designSidebar}@@ -970,6 +319,7 @@ export default defineConfig({title: 'OpenViking',description: '面向 AI Agent 的开源上下文数据库',themeConfig: {+ logoLink: '/zh/',nav: zhNav,sidebar: {'/zh/getting-started/': localizedGroupedSidebarItems('zh', ['getting-started', 'configuration', 'agent-integrations']),@@ -980,6 +330,7 @@ export default defineConfig({'/zh/context-compilation/': localizedGroupedSidebarItems('zh', ['guides', 'migration']),'/zh/migration/': localizedGroupedSidebarItems('zh', ['guides', 'migration']),'/zh/api/': localizedReferenceSidebarItems('zh'),+ '/zh/faq/': [sidebarSection('zh/faq', '常见问题', false)],'/zh/about/': localizedAboutSidebarItems('zh')},outline: {diff --git a/docs/.vitepress/docs-navigation.ts b/docs/.vitepress/docs-navigation.tsnew file mode 100644index 000000000..835fbaf28--- /dev/null+++ b/docs/.vitepress/docs-navigation.ts@@ -0,0 +1,683 @@+import fs from 'node:fs'+import path from 'node:path'+import { fileURLToPath } from 'node:url'+import type { DefaultTheme } from 'vitepress'+const docsRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')++const sectionNames: Record<string, string> = {+ 'getting-started': 'Getting Started',+ configuration: 'Configuration',+ concepts: 'Concepts',+ guides: 'Guides',+ 'agent-integrations': 'Agent Integrations',+ 'context-compilation': 'Context Compilation',+ migration: 'Migration',+ api: 'API Reference',+ faq: 'FAQ',+ about: 'About',+ design: 'Design Notes'+}++const zhSectionNames: Record<string, string> = {+ 'getting-started': '开始使用',+ configuration: '配置',+ concepts: '核心概念',+ guides: '指南',+ 'agent-integrations': 'Agent 集成',+ 'context-compilation': '上下文编译',+ migration: '迁移指南',+ api: 'API 参考',+ faq: '常见问题',+ about: '关于',+ design: '设计文档'+}++export function titleFromMarkdown(filePath: string): string {+ const content = fs.readFileSync(filePath, 'utf8')+ const heading = content.match(/^#\s+(.+)$/m)?.[1]+ const fallback = path.basename(filePath, '.md')+ return (heading || fallback).replace(/^\d+[-_]/, '').trim()+}++function linkFor(filePath: string): string {+ const relativePath = path.relative(docsRoot, filePath).replaceAll(path.sep, '/')+ return `/${relativePath.replace(/\.md$/, '')}`+}++export function sidebarSection(dir: string, title: string, collapsed = true): DefaultTheme.SidebarItem {+ const absoluteDir = path.join(docsRoot, dir)+ const items = fs+ .readdirSync(absoluteDir)+ .filter((file) => file.endsWith('.md'))+ .sort((a, b) => a.localeCompare(b, undefined, { numeric: true }))+ .map((file) => {+ const filePath = path.join(absoluteDir, file)+ return {+ text: titleFromMarkdown(filePath),+ link: linkFor(filePath)+ }+ })++ return { text: title, collapsed, items }+}++const gettingStartedSidebar = {+ en: [+ ['01-introduction.md', 'Introduction'],+ ['02-quickstart.md', 'Quick Start'],+ ['04-setup-for-agent.md', 'Server Setup for Agent'],+ ['05-cli-setup.md', 'OpenViking CLI']+ ],+ zh: [+ ['01-introduction.md', '简介'],+ ['02-quickstart.md', '快速开始'],+ ['04-setup-for-agent.md', '服务端安装(Agent 版)'],+ ['05-cli-setup.md', 'OpenViking CLI']+ ]+} as const++const agentIntegrationSidebar = {+ en: {+ overview: 'Integration Overview',+ topItems: [+ ['16-capability-reference.md', 'Capability Reference'],+ ['18-plugin-development.md', 'Plugin Development']+ ],+ groups: [+ {+ text: 'Developer Tools',+ items: [+ ['02-claude-code.md', 'Claude Code'],+ ['04-codex.md', 'Codex'],+ ['10-opencode.md', 'OpenCode'],+ ['12-cursor.md', 'Cursor'],+ ['13-trae.md', 'TRAE / TRAE CN'],+ ['17-dsh.md', 'DeepSeek Harness']+ ]+ },+ {+ text: 'Agents & Frameworks',+ items: [+ ['03-openclaw.md', 'OpenClaw'],+ ['05-hermes.md', 'Hermes'],+ ['07-langchain-langgraph.md', 'LangChain / LangGraph'],+ ['11-pi.md', 'pi']+ ]+ },+ {+ text: 'General Integration',+ items: [+ ['14-openviking-helper.md', 'OpenViking Helper'],+ ['15-agent-plugins.md', 'Agent Plugins 1.0'],+ ['06-mcp-clients.md', 'MCP Clients'],+ ['09-log-ingestion.md', 'Local Log Import'],+ ['08-community-plugins.md', 'Community Integrations']+ ]+ }+ ]+ },+ zh: {+ overview: '集成概览',+ topItems: [+ ['16-capability-reference.md', '集成能力参考'],+ ['18-plugin-development.md', '插件开发与维护']+ ],+ groups: [+ {+ text: '开发工具',+ items: [+ ['02-claude-code.md', 'Claude Code'],+ ['04-codex.md', 'Codex'],+ ['10-opencode.md', 'OpenCode'],+ ['12-cursor.md', 'Cursor'],+ ['13-trae.md', 'TRAE / TRAE CN'],+ ['17-dsh.md', 'DeepSeek Harness']+ ]+ },+ {+ text: 'Agent 与框架',+ items: [+ ['03-openclaw.md', 'OpenClaw'],+ ['05-hermes.md', 'Hermes'],+ ['07-langchain-langgraph.md', 'LangChain / LangGraph'],+ ['11-pi.md', 'pi']+ ]+ },+ {+ text: '通用接入',+ items: [+ ['14-openviking-helper.md', 'OpenViking Helper'],+ ['15-agent-plugins.md', 'Agent Plugins 1.0'],+ ['06-mcp-clients.md', 'MCP 客户端'],+ ['09-log-ingestion.md', '本地日志导入'],+ ['08-community-plugins.md', '社区集成']+ ]+ }+ ]+ }+} as const++const apiReferenceSidebar = {+ en: {+ overview: 'Overview',+ groups: [+ {+ text: 'Core Data',+ items: [+ ['02-resources.md', 'Resources'],+ ['12-content.md', 'Content'],+ ['03-filesystem.md', 'File System'],+ ['04-skills.md', 'Skills'],+ ['05-sessions.md', 'Sessions'],+ ['16-memory.md', 'Memory'],+ ['19-agent-evolution.md', 'Agent Evolution']+ ]+ },+ {+ text: 'Retrieval',+ items: [['06-retrieval.md', 'Retrieval']]+ },+ {+ text: 'Data Lifecycle',+ items: [+ ['15-watches.md', 'Resource Watches'],+ ['11-snapshot.md', 'Snapshots'],+ ['14-ovpack.md', 'OVPack']+ ]+ },+ {+ text: 'Operations & Observability',+ items: [+ ['07-system.md', 'System Status'],+ ['17-tasks.md', 'Background Tasks'],+ ['18-observer.md', 'Runtime Observability'],+ ['09-metrics.md', 'Metrics']+ ]+ },+ {+ text: 'Identity & Governance',+ items: [+ ['08-admin.md', 'Multi-Tenancy'],+ ['10-privacy.md', 'Privacy']+ ]+ },+ {+ text: 'Protocols & Extensions',+ items: [+ ['22-openviking-assets.md', 'OpenViking Assets'],+ ['20-webdav.md', 'WebDAV'],+ ['23-agent-runtime.md', 'Agent Runtime API'],+ ['24-vikingbot.md', 'VikingBot API']+ ]+ },+ {+ text: 'Documentation Maintenance',+ items: [['99-api-doc-writing-guide.md', 'API Docs Guide']]+ }+ ]+ },+ zh: {+ overview: '概览',+ groups: [+ {+ text: '核心数据',+ items: [+ ['02-resources.md', '资源'],+ ['12-content.md', '内容'],+ ['03-filesystem.md', '文件系统'],+ ['04-skills.md', '技能'],+ ['05-sessions.md', '会话'],+ ['16-memory.md', '记忆'],+ ['19-agent-evolution.md', 'Agent 进化']+ ]+ },+ {+ text: '检索',+ items: [['06-retrieval.md', '检索']]+ },+ {+ text: '数据生命周期',+ items: [+ ['15-watches.md', '资源 Watch'],+ ['11-snapshot.md', '快照'],+ ['14-ovpack.md', 'OVPack']+ ]+ },+ {+ text: '运维与观测',+ items: [+ ['07-system.md', '系统状态'],+ ['17-tasks.md', '后台任务'],+ ['18-observer.md', '运行观测'],+ ['09-metrics.md', '监控指标']+ ]+ },+ {+ text: '身份与治理',+ items: [+ ['08-admin.md', '多租户'],+ ['10-privacy.md', '隐私配置']+ ]+ },+ {+ text: '协议与扩展',+ items: [+ ['22-openviking-assets.md', 'OpenViking Assets'],+ ['20-webdav.md', 'WebDAV'],+ ['23-agent-runtime.md', 'Agent Runtime API'],+ ['24-vikingbot.md', 'VikingBot API']+ ]+ },+ {+ text: '文档维护',+ items: [['99-api-doc-writing-guide.md', 'API 文档规范']]+ }+ ]+ }+} as const++const conceptsSidebar = {+ en: {+ overview: 'Overview',+ groups: [+ {+ text: 'Core Model',+ items: [+ ['02-context-types.md', 'Context Types'],+ ['03-context-layers.md', 'Context Layers'],+ ['04-viking-uri.md', 'Viking URI']+ ]+ },+ {+ text: 'Storage & Processing',+ items: [+ ['05-storage.md', 'Storage'],+ ['06-extraction.md', 'Extraction'],+ ['07-retrieval.md', 'Retrieval'],+ ['08-session.md', 'Sessions']+ ]+ },+ {+ text: 'Reliability & Governance',+ items: [+ ['09-transaction.md', 'Transactions & Recovery'],+ ['10-encryption.md', 'Encryption'],+ ['11-multi-tenant.md', 'Multi-Tenancy'],+ ['12-metrics.md', 'Metrics'],+ ['13-privacy.md', 'Privacy'],+ ['14-multi-write-storage.md', 'Multi-Write Storage'],+ ['16-queue-lifecycle.md', 'Queue State and Completion']+ ]+ },+ {+ text: 'Example',+ items: [['15-vikingbot.md', 'VikingBot']]+ }+ ]+ },+ zh: {+ overview: '概览',+ groups: [+ {+ text: '核心模型',+ items: [+ ['02-context-types.md', '上下文类型'],+ ['03-context-layers.md', '上下文层级'],+ ['04-viking-uri.md', 'Viking URI']+ ]+ },+ {+ text: '存储与处理',+ items: [+ ['05-storage.md', '存储架构'],+ ['06-extraction.md', '上下文提取'],+ ['07-retrieval.md', '检索机制'],+ ['08-session.md', '会话管理']+ ]+ },+ {+ text: '可靠性与治理',+ items: [+ ['09-transaction.md', '事务与恢复'],+ ['10-encryption.md', '数据加密'],+ ['11-multi-tenant.md', '多租户'],+ ['12-metrics.md', '监控指标'],+ ['13-privacy.md', '隐私配置'],+ ['14-multi-write-storage.md', '多写存储'],+ ['16-queue-lifecycle.md', '队列状态与完成语义']+ ]+ },+ {+ text: '应用案例',+ items: [['15-vikingbot.md', 'VikingBot']]+ }+ ]+ }+} as const++const guidesSidebar = {+ en: {+ groups: [+ {+ text: 'Configuration & Deployment',+ items: [+ ['01-configuration.md', 'Configuration'],+ ['02-volcengine-purchase-guide.md', 'Model Purchase'],+ ['03-deployment.md', 'Server Deployment'],+ ['04-authentication.md', 'Authentication'],+ ['08-encryption.md', 'Encryption'],+ ['11-oauth.md', 'OAuth 2.1'],+ ['12-public-access.md', 'Public Access']+ ]+ },+ {+ text: 'Integration & Extension',+ items: [+ ['06-mcp-integration.md', 'MCP Integration'],+ ['09-ovpack.md', 'OVPack'],+ ['18-openviking-assets.md', 'OpenViking Assets'],+ ['10-prompt-guide.md', 'Prompt Customization'],+ ['17-vikingbot.md', 'VikingBot']+ ]+ },+ {+ text: 'Observability',+ items: [+ ['05-observability.md', 'Observability & Diagnostics'],+ ['07-operation-telemetry.md', 'Operation Telemetry'],+ ['11-grafana-prometheus.md', 'Prometheus / Grafana'],+ ['12-vikingbot-metrics-validation.md', 'VikingBot Metrics Validation']+ ]+ },+ {+ text: 'Storage & Performance',+ items: [+ ['13-multi-write-storage.md', 'Multi-Write Storage'],+ ['14-ragfs-cache.md', 'RAGFS Cache'],+ ['15-snapshot.md', 'Snapshots'],+ ['16-cuvs.md', 'cuVS Vector Search']+ ]+ }+ ]+ },+ zh: {+ groups: [+ {+ text: '配置与部署',+ items: [+ ['01-configuration.md', '基础配置'],+ ['02-volcengine-purchase-guide.md', '模型购买'],+ ['03-deployment.md', '服务端部署'],+ ['04-authentication.md', '身份认证'],+ ['08-encryption.md', '数据加密'],+ ['11-oauth.md', 'OAuth 2.1'],+ ['12-public-access.md', '公网访问']+ ]+ },+ {+ text: '集成与扩展',+ items: [+ ['06-mcp-integration.md', 'MCP 集成'],+ ['09-ovpack.md', 'OVPack'],+ ['18-openviking-assets.md', 'OpenViking Assets'],+ ['10-prompt-guide.md', 'Prompt 自定义'],+ ['17-vikingbot.md', 'VikingBot']+ ]+ },+ {+ text: '可观测性',+ items: [+ ['05-observability.md', '可观测性与排障'],+ ['07-operation-telemetry.md', '操作遥测'],+ ['11-grafana-prometheus.md', 'Prometheus / Grafana'],+ ['12-vikingbot-metrics-validation.md', 'VikingBot 指标验证']+ ]+ },+ {+ text: '存储与性能',+ items: [+ ['13-multi-write-storage.md', '多写存储'],+ ['14-ragfs-cache.md', 'RAGFS 缓存'],+ ['15-snapshot.md', '快照管理'],+ ['16-cuvs.md', 'cuVS 向量检索']+ ]+ }+ ]+ }+} as const++type StructuredSidebarCopy = {+ readonly overview: string+ readonly topItems?: ReadonlyArray<readonly [string, string]>+ readonly groups: ReadonlyArray<{+ readonly text: string+ readonly items: ReadonlyArray<readonly [string, string]>+ }>+}++type GroupedSidebarCopy = Pick<StructuredSidebarCopy, 'groups'>++function configuredSidebarItem(+ locale: 'en' | 'zh',+ section: string,+ [file, text]: readonly [string, string]+): DefaultTheme.SidebarItem {+ return {+ text,+ link: linkFor(path.join(docsRoot, locale, section, file))+ }+}++function configuredSidebarGroups(+ locale: 'en' | 'zh',+ section: string,+ groups: GroupedSidebarCopy['groups']+): DefaultTheme.SidebarItem[] {+ return groups.map((group) => ({+ text: group.text,+ collapsed: false,+ items: group.items.map((item) => configuredSidebarItem(locale, section, item))+ }))+}++function groupedSidebarSection(+ locale: 'en' | 'zh',+ section: string,+ title: string,+ copy: GroupedSidebarCopy,+ collapsed = true+): DefaultTheme.SidebarItem {+ return {+ text: title,+ collapsed,+ items: configuredSidebarGroups(locale, section, copy.groups)+ }+}++function structuredSidebarSection(+ locale: 'en' | 'zh',+ section: string,+ title: string,+ copy: StructuredSidebarCopy,+ collapsed = true,+ overviewFile = '01-overview.md'+): DefaultTheme.SidebarItem {+ return {+ text: title,+ collapsed,+ items: [+ configuredSidebarItem(locale, section, [overviewFile, copy.overview]),+ ...(copy.topItems ?? []).map((item) => configuredSidebarItem(locale, section, item)),+ ...configuredSidebarGroups(locale, section, copy.groups)+ ]+ }+}++function agentIntegrationSection(+ locale: 'en' | 'zh',+ title: string,+ collapsed = true+): DefaultTheme.SidebarItem {+ return structuredSidebarSection(+ locale,+ 'agent-integrations',+ title,+ agentIntegrationSidebar[locale],+ collapsed+ )+}++function gettingStartedSection(+ locale: 'en' | 'zh',+ title: string,+ collapsed = true+): DefaultTheme.SidebarItem {+ return {+ text: title,+ collapsed,+ items: gettingStartedSidebar[locale].map((item) =>+ configuredSidebarItem(locale, 'getting-started', item)+ )+ }+}++function apiReferenceSection(+ locale: 'en' | 'zh',+ title: string,+ collapsed = true+): DefaultTheme.SidebarItem {+ return structuredSidebarSection(locale, 'api', title, apiReferenceSidebar[locale], collapsed)+}++function conceptsSection(+ locale: 'en' | 'zh',+ title: string,+ collapsed = true+): DefaultTheme.SidebarItem {+ return structuredSidebarSection(+ locale,+ 'concepts',+ title,+ conceptsSidebar[locale],+ collapsed,+ '01-architecture.md'+ )+}++function guidesSection(+ locale: 'en' | 'zh',+ title: string,+ collapsed = true+): DefaultTheme.SidebarItem {+ const section = groupedSidebarSection(locale, 'guides', title, guidesSidebar[locale], collapsed)+ // Nest the Context Compilation pages under the "Integration & Extension" group.+ const integrationGroupTitle = locale === 'zh' ? '集成与扩展' : 'Integration & Extension'+ const integrationGroup = section.items?.find((item) => item.text === integrationGroupTitle)+ if (integrationGroup?.items) {+ const labels = locale === 'zh' ? zhSectionNames : sectionNames+ integrationGroup.items.push(+ sidebarSection(`${locale}/context-compilation`, labels['context-compilation'], true)+ )+ }+ return section+}++function migrationSection(+ locale: 'en' | 'zh',+ title: string,+ collapsed = true+): DefaultTheme.SidebarItem {+ return {+ text: title,+ collapsed,+ items: [+ {+ text: '0.3.x → 0.4.0',+ link: linkFor(path.join(docsRoot, locale, 'migration', '01-user-peer-model.md'))+ }+ ]+ }+}++type LocalizedSidebarSection =+ | 'getting-started'+ | 'configuration'+ | 'concepts'+ | 'guides'+ | 'agent-integrations'+ | 'migration'++type LocalizedSidebarSectionBuilder = (+ locale: 'en' | 'zh',+ title: string,+ collapsed?: boolean+) => DefaultTheme.SidebarItem++const localizedSidebarSectionBuilders: Record<+ LocalizedSidebarSection,+ LocalizedSidebarSectionBuilder+> = {+ 'getting-started': gettingStartedSection,+ configuration: (locale, title, collapsed = true) =>+ sidebarSection(`${locale}/configuration`, title, collapsed),+ concepts: conceptsSection,+ guides: guidesSection,+ 'agent-integrations': agentIntegrationSection,+ migration: migrationSection+}++function localizedSidebarSection(+ locale: 'en' | 'zh',+ section: LocalizedSidebarSection,+ title: string,+ collapsed = true+): DefaultTheme.SidebarItem {+ return localizedSidebarSectionBuilders[section](locale, title, collapsed)+}++export function localizedSectionSidebarItems(+ locale: 'en' | 'zh',+ section: LocalizedSidebarSection+): DefaultTheme.SidebarItem[] {+ const labels = locale === 'zh' ? zhSectionNames : sectionNames+ return [localizedSidebarSection(locale, section, labels[section], false)]+}++export function localizedGroupedSidebarItems(+ locale: 'en' | 'zh',+ sections: ReadonlyArray<Exclude<LocalizedSidebarSection, 'concepts'>>+): DefaultTheme.SidebarItem[] {+ const labels = locale === 'zh' ? zhSectionNames : sectionNames++ return sections.map((section) =>+ localizedSidebarSection(locale, section, labels[section], false)+ )+}++export function localizedReferenceSidebarItems(locale: 'en' | 'zh'): DefaultTheme.SidebarItem[] {+ const labels = locale === 'zh' ? zhSectionNames : sectionNames+ return [apiReferenceSection(locale, labels.api, false)]+}++export function localizedAboutSidebarItems(locale: 'en' | 'zh'): DefaultTheme.SidebarItem[] {+ const labels = locale === 'zh' ? zhSectionNames : sectionNames+ return [sidebarSection(`${locale}/about`, labels.about, false)]+}++export const designSidebar: DefaultTheme.SidebarItem[] = [+ sidebarSection('design', sectionNames.design, false)+]+++// The homepage map uses the same entries, labels and order as article sidebars.+export function documentationSections(locale: 'en' | 'zh') {+ const labels = locale === 'zh' ? zhSectionNames : sectionNames+ return [+ ...localizedGroupedSidebarItems(locale, ['getting-started', 'configuration', 'agent-integrations']),+ ...localizedSectionSidebarItems(locale, 'concepts'),+ ...localizedGroupedSidebarItems(locale, ['guides', 'migration']),+ ...localizedReferenceSidebarItems(locale),+ sidebarSection(`${locale}/faq`, labels.faq, false),+ ...localizedAboutSidebarItems(locale)+ ]+}diff --git a/docs/.vitepress/theme/CopyMarkdownButton.vue b/docs/.vitepress/theme/CopyMarkdownButton.vueindex ac3a53457..56cf471e6 100644--- a/docs/.vitepress/theme/CopyMarkdownButton.vue+++ b/docs/.vitepress/theme/CopyMarkdownButton.vue@@ -33,7 +33,7 @@ const items = computed(() => {})async function copyToClipboard() {- const md: string = frontmatter.value._rawMarkdown ?? ''+ const md = decodeURIComponent(frontmatter.value._rawMarkdownEncoded ?? '')if (!md) returnawait navigator.clipboard.writeText(md)copied.value = truediff --git a/docs/.vitepress/theme/LlmsTxtLink.vue b/docs/.vitepress/theme/LlmsTxtLink.vueindex a8d66a109..76598d3af 100644--- a/docs/.vitepress/theme/LlmsTxtLink.vue+++ b/docs/.vitepress/theme/LlmsTxtLink.vue@@ -14,11 +14,10 @@ const copied = ref(false)const copyFailed = ref(false)let resetTimer: ReturnType<typeof window.setTimeout> | undefined-const isZh = computed(() => page.value.relativePath.startsWith('zh/'))const copyLabel = computed(() => {- if (copyFailed.value) return isZh.value ? '链接复制失败' : 'Copy failed'- if (copied.value) return isZh.value ? '链接已复制' : 'Link copied'- return isZh.value ? '复制链接' : 'Copy link'+ if (copyFailed.value) return 'Copy failed'+ if (copied.value) return 'Link copied'+ return 'Copy link'})async function writeClipboard(text: string) {@@ -60,7 +59,7 @@ async function copyLlmsLink() {<template><div v-if="isDoc" class="llms-link-wrap">- <a :href="llmsUrl" target="_blank" rel="noopener" class="llms-link">+ <a :href="llmsUrl" target="_blank" rel="noopener" class="llms-link" title="English plain text"><svgxmlns="http://www.w3.org/2000/svg"width="14"diff --git a/docs/.vitepress/theme/components/DocBreadcrumb.vue b/docs/.vitepress/theme/components/DocBreadcrumb.vuenew file mode 100644index 000000000..32bc27c48--- /dev/null+++ b/docs/.vitepress/theme/components/DocBreadcrumb.vue@@ -0,0 +1,18 @@+<script setup>+import { computed } from 'vue'+import { useData, withBase } from 'vitepress'+import { sections } from '../docs-sections'+const { page, lang } = useData()+const locale = computed(() => lang.value.startsWith('zh') ? 'zh' : 'en')+const section = computed(() => {+ const directory = page.value.relativePath.split('/')[1]+ return sections.find(item => item.id === (directory === 'context-compilation' ? 'guides' : directory))+})+</script>+<template>+ <nav class="doc-breadcrumb" :aria-label="locale === 'zh' ? '面包屑导航' : 'Breadcrumb'">+ <a :href="withBase(`/${locale}/`)">{{ locale === 'zh' ? '文档首页' : 'Documentation' }}</a>+ <template v-if="section"><span aria-hidden="true">/</span><a :href="withBase(`/${locale}/#section-${section.id}`)">{{ section[locale] }}</a></template>+ <span aria-hidden="true">/</span><span aria-current="page">{{ page.title }}</span>+ </nav>+</template>diff --git a/docs/.vitepress/theme/components/DocsHome.vue b/docs/.vitepress/theme/components/DocsHome.vuenew file mode 100644index 000000000..e56d15e48--- /dev/null+++ b/docs/.vitepress/theme/components/DocsHome.vue@@ -0,0 +1,145 @@+<script setup>+import { computed, ref, onMounted, onBeforeUnmount } from 'vue'+import { useData, withBase } from 'vitepress'+import SideRays from './SideRays.vue'+import { data as catalog } from '../docs-catalog.data'+import './docs-home.css'++const { lang, isDark } = useData()+const zh = computed(() => lang.value.startsWith('zh'))+const locale = computed(() => zh.value ? 'zh' : 'en')+const t = (en, cn) => zh.value ? cn : en+const link = path => withBase(`/${locale.value}/${path}`)+const selected = ref('resources')+const filter = ref('')+const expanded = ref(new Set(['getting-started']))+const copied = ref(false)+const copyError = ref(false)+let copyTimer+function openSection(id) {+ if (id.startsWith('section-')) expanded.value = new Set([...expanded.value, id.slice(8)])+}+function openHashSection() { openSection(window.location.hash.slice(1)) }+function toggleSection(id, event) {+ if (filter.value) return+ const next = new Set(expanded.value)+ if (event.target.open) next.add(id)+ else next.delete(id)+ expanded.value = next+}+onMounted(() => { openHashSection(); window.addEventListener('hashchange', openHashSection) })+onBeforeUnmount(() => { clearTimeout(copyTimer); window.removeEventListener('hashchange', openHashSection) })+const install = 'npm install -g @openviking/cli'+async function copyInstall() {+ try {+ await navigator.clipboard.writeText(install)+ copied.value = true; copyError.value = false+ clearTimeout(copyTimer)+ copyTimer = setTimeout(() => { copied.value = false }, 2200)+ } catch { copyError.value = true }+}+const context = computed(() => ({+ resources: { name: 'resources/', files: ['project/', ' .abstract.md', ' .overview.md', ' architecture.md'], tag: t('External knowledge', '外部知识') },+ memories: { name: 'user/alice/memories/', files: ['preferences/', ' writing-style.md', 'experiences/', ' debugging.md'], tag: t('Retained experience', '保留经验') },+ agent: { name: 'agent/', files: ['skills/', ' code-review/', ' SKILL.md', 'rules/', ' coding.md'], tag: t('Skills & rules', '技能与规则') }+}[selected.value]))+const atlas = computed(() => catalog[locale.value].map(section => ({ ...section,+ pages: section.pages.filter(page => `${section[locale.value]} ${section.id} ${page.title} ${page.file} ${page.group}`.toLowerCase().includes(filter.value.trim().toLowerCase()))+})).filter(section => section.pages.length))+const total = computed(() => catalog[locale.value].reduce((n, section) => n + section.pages.length, 0))+const shown = computed(() => atlas.value.reduce((n, section) => n + section.pages.length, 0))+const paths = computed(() => [+ { label: t('RETRIEVAL', '检索'), icon: '↗', title: t('Run your first retrieval', '完成第一次检索'), description: t('Connect to a service, import a document, and find what matters.', '连接服务,导入文档,找到所需的上下文。'), href: 'getting-started/02-quickstart', action: t('Start building', '开始使用'), primary: true },+ { label: 'AGENT', icon: '⌘', title: t('Connect your agent', '接入你的 Agent'), description: t('Add cross-session memory to the tools you already use.', '为正在使用的工具加入跨会话记忆。'), href: 'agent-integrations/01-overview', action: t('Explore integrations', '查看集成') },+ { label: 'API', icon: '{}', title: t('Build with the API', '通过 API 构建'), description: t('Work with resources, sessions, and retrieval from your application.', '在应用中管理资源、会话和检索。'), href: 'api/01-overview', action: t('Open API reference', '查看 API') }+])+const agents = [+ ['Claude Code', '02-claude-code'],+ ['Codex', '04-codex'],+ ['Cursor', '12-cursor'],+ ['Hermes', '05-hermes'],+ ['OpenCode', '10-opencode']+]+</script>++<template>+ <div class="docs-home">+ <section class="home-hero" aria-labelledby="home-title">+ <div class="hero-light" aria-hidden="true">+ <SideRays :speed="0.65" :ray-color1="isDark ? '#e7b967' : '#a16207'" :ray-color2="isDark ? '#78aaff' : '#1d4ed8'" :intensity="isDark ? 1.8 : 1.15" :spread="2" :tilt="-8" :saturation="isDark ? 1.1 : 0.9" :blend="0.55" :falloff="1.6" :opacity="isDark ? 0.85 : 0.8" />+ </div>+ <div class="home-shell hero-inner">+ <div class="hero-copy">+ <p class="eyebrow"><span class="status-dot" /> OPENVIKING <span class="eyebrow-separator">/</span> {{ t('DOCUMENTATION', '开发者文档') }}</p>+ <h1 id="home-title">{{ t('Context worth', '让上下文,') }}<br><em>{{ t('keeping.', '掌握在你自己手里') }}</em></h1>+ <p class="hero-description">{{ t('The context database for AI agents.', '面向 AI Agent 的上下文数据库。') }}<br>{{ t('Bring knowledge, memory, and skills into one filesystem. Build agents that carry their context forward.', '用一个文件系统组织知识、记忆和技能,让 Agent 在每次任务中接着积累。') }}</p>+ <div class="hero-actions">+ <a class="home-button primary" :href="link('getting-started/02-quickstart')">{{ t('Get started', '快速开始') }} <span aria-hidden="true">↗</span></a>+ <a class="home-button secondary" href="#explore">{{ t('Explore the docs', '浏览文档') }} <span aria-hidden="true">↓</span></a>+ </div>+ <p class="hero-footnote">{{ t('Open source. Inspectable context. Your infrastructure.', '开源 · 上下文可读可查 · 自主部署') }}</p>+ </div>+ <div class="context-workspace">+ <div class="workspace-top"><span>OpenViking</span><span class="workspace-caption">{{ t('CONTEXT MODEL', '上下文结构示意') }}</span></div>+ <div class="workspace-body">+ <div class="context-folders" :aria-label="t('Context types', '上下文类型')">+ <span class="tree-root">viking://</span>+ <button v-for="key in ['resources', 'memories', 'agent']" :key="key" :aria-pressed="selected === key" :class="{ selected: selected === key }" @click="selected = key"><svg viewBox="0 0 20 20" fill="none" aria-hidden="true"><path d="M2.5 5.5h5l2 2h8v9h-15zM2.5 5.5v-2h5l2 2h8v2" stroke="currentColor" stroke-width="1.2" /></svg>{{ key === 'agent' ? 'agent/' : key }}<span aria-hidden="true">↗</span></button>+ <div class="tree-legend"><span class="status-dot" />{{ t('One filesystem', '同一个文件系统') }}</div>+ </div>+ <div class="context-preview" aria-live="polite">+ <div class="file-path">{{ context.name }}</div>+ <div v-for="(file, index) in context.files" :key="index" class="file-line" :style="{ paddingLeft: `${file.length - file.trimStart().length}ch` }"><span aria-hidden="true">{{ file.endsWith('/') ? '⌄' : '─' }}</span><code>{{ file.trim() }}</code><small v-if="selected === 'resources' && file.includes('abstract')">L0</small><small v-else-if="selected === 'resources' && file.includes('overview')">L1</small><small v-else-if="selected === 'resources' && file.endsWith('.md')">L2</small></div>+ <span class="context-tag">{{ context.tag }}</span>+ </div>+ </div>+ <div class="workspace-bottom"><code>ls <span>·</span> tree <span>·</span> read <span>·</span> find</code><span>{{ t('Familiar by design', '像文件一样使用') }}</span></div>+ </div>+ </div>+ <div class="home-shell hero-index"><span>01 — {{ t('START HERE', '从这里开始') }}</span><span>{{ t('A field guide to agent context', 'Agent 上下文使用手册') }} <span aria-hidden="true">↓</span></span></div>+ </section>++ <div class="home-shell">+ <section class="start-section" :aria-label="t('Choose your path', '选择使用路径')">+ <a v-for="path in paths" :key="path.href" :href="link(path.href)" class="path-card" :class="{ featured: path.primary }">+ <div class="path-top"><span>{{ path.label }}</span><span class="path-icon" aria-hidden="true">{{ path.icon }}</span></div>+ <h2>{{ path.title }}</h2><p>{{ path.description }}</p>+ <span class="path-action">{{ path.action }} <span aria-hidden="true">→</span></span>+ </a>+ </section>+ <div class="install-strip">+ <div><span class="status-dot" /><span>{{ t('Have a server? Start with the CLI.', '已有服务?从 CLI 开始。') }}</span><a :href="link('getting-started/05-cli-setup')">{{ t('Connection guide', '连接指南') }} ↗</a></div>+ <button @click="copyInstall" :aria-label="t('Copy CLI install command', '复制 CLI 安装命令')"><code><span aria-hidden="true">$ </span>{{ install }}</code><span aria-live="polite">{{ copyError ? t('Select to copy', '请选中复制') : copied ? t('Copied', '已复制') : t('Copy', '复制') }}</span></button>+ </div>++ <section class="concept-section" aria-labelledby="concept-title">+ <div class="section-intro"><p class="eyebrow">02 — {{ t('THE MENTAL MODEL', '理解工作方式') }}</p><h2 id="concept-title">{{ t('A filesystem you can reason about.', '上下文,也可以像文件一样清楚。') }}</h2><p>{{ t('Browse the structure. Read the summary. Load the detail when you need it.', '先看目录,再读摘要,需要时才加载全文。') }}</p></div>+ <div class="layer-grid">+ <a :href="link('concepts/03-context-layers')" class="layer-item"><div class="layer-art abstract" aria-hidden="true"><span /><span /></div><div class="layer-heading"><code>L0</code><h3>{{ t('The abstract', '摘要') }}</h3></div><p>{{ t('A short description to decide whether a directory is relevant.', '用一段简述判断目录是否相关。') }}</p><span class="layer-file">.abstract.md <span>↗</span></span></a>+ <a :href="link('concepts/03-context-layers')" class="layer-item"><div class="layer-art overview" aria-hidden="true"><span /><span /><span /><span /></div><div class="layer-heading"><code>L1</code><h3>{{ t('The overview', '概览') }}</h3></div><p>{{ t('Structure and key points to plan what to read next.', '了解结构和要点,决定接下来读什么。') }}</p><span class="layer-file">.overview.md <span>↗</span></span></a>+ <a :href="link('concepts/07-retrieval')" class="layer-item"><div class="layer-art detail" aria-hidden="true"><span /><span /><span /><span /><span /><span /></div><div class="layer-heading"><code>L2</code><h3>{{ t('The source', '原文') }}</h3></div><p>{{ t('The full content, retrieved with its surrounding context.', '按需读取全文,保留内容所在的上下文。') }}</p><span class="layer-file">{{ t('Original content', '原始内容') }} <span>↗</span></span></a>+ </div>+ </section>++ <section class="integration-strip" :aria-label="t('Agent integrations', 'Agent 集成')"><div><p class="eyebrow">03 — {{ t('INTEGRATIONS', 'Agent 集成') }}</p><h2>{{ t('Your agent. With memory.', '你的 Agent,有了记忆。') }}</h2><a :href="link('agent-integrations/01-overview')">{{ t('All integrations', '全部集成') }} ↗</a></div><div class="agent-links"><a v-for="agent in agents" :key="agent[0]" :href="link(`agent-integrations/${agent[1]}`)">{{ agent[0] }}<span aria-hidden="true">↗</span></a></div></section>++ <section class="integration-strip" :aria-label="t('Deployment and operations', '部署与运维')">+ <div><p class="eyebrow">04 — {{ t('DEPLOYMENT', '部署与运维') }}</p><h2>{{ t('Plan your deployment.', '准备部署。') }}</h2><a :href="link('guides/03-deployment')">{{ t('Deployment options', '选择部署方式') }} ↗</a></div>+ <div class="agent-links">+ <a :href="link('guides/01-configuration')">{{ t('Configuration', '基础配置') }}<span aria-hidden="true">↗</span></a>+ <a :href="link('guides/04-authentication')">{{ t('Authentication', '身份认证') }}<span aria-hidden="true">↗</span></a>+ <a :href="link('guides/05-observability')">{{ t('Observability', '可观测性') }}<span aria-hidden="true">↗</span></a>+ </div>+ </section>++ <section id="explore" class="explore-section" aria-labelledby="explore-title">+ <div class="section-intro"><p class="eyebrow">05 — {{ t('DOCUMENTATION ATLAS', '文档地图') }}</p><h2 id="explore-title">{{ t('Find your next step.', '下一步。') }}</h2><p>{{ t('From a first connection to the details of a running system.', '寻找每个细节。') }}</p></div>+ <div class="atlas-layout">+ <aside class="atlas-aside"><label for="doc-filter">{{ t('Find a page', '查找页面') }}</label><div class="atlas-input"><span aria-hidden="true">⌕</span><input id="doc-filter" v-model="filter" type="search" :placeholder="t('Title or filename…', '标题或文件名…')" /></div><p class="atlas-count" role="status">{{ filter ? shown : total }} {{ t('pages', '篇文档') }} <span>/ {{ locale.toUpperCase() }}</span></p><nav :aria-label="t('Documentation sections', '文档章节')"><a v-for="section in atlas" :key="section.id" :href="`#section-${section.id}`" @click="openSection(`section-${section.id}`)">{{ section[locale] }}<span>{{ section.pages.length }} {{ t('pages', '篇') }}</span></a></nav><a class="atlas-machine" :href="withBase('/llms.txt')"><span>↳ llms.txt</span><span>{{ t('For your agent', '给你的 Agent') }} ↗</span></a></aside>+ <div class="atlas-tree"><p v-if="!atlas.length" class="atlas-empty">{{ t('No matching pages. Try “memory”, “API”, or a filename.', '没有匹配页面。试试“记忆”“API”或文件名。') }}</p><details v-for="section in atlas" :id="`section-${section.id}`" :key="`${locale}-${section.id}-${!!filter}`" :open="!!filter || expanded.has(section.id)" @toggle="toggleSection(section.id, $event)" class="atlas-group"><summary><span class="folder-glyph" aria-hidden="true">⌑</span><span><strong>{{ section[locale] }}</strong><small>{{ zh ? section.zhNote : section.enNote }}</small></span><span class="section-count">{{ section.pages.length }} {{ t('pages', '篇') }}</span><span class="expand-glyph" aria-hidden="true">+</span></summary><ul><template v-for="(page, index) in section.pages" :key="page.href"><li v-if="page.group && page.group !== section.pages[index - 1]?.group" class="atlas-subgroup">{{ page.group }}</li><li><a :href="withBase(page.href)"><span class="page-branch" aria-hidden="true">↳</span><span>{{ page.title }}</span><span class="page-arrow" aria-hidden="true">↗</span></a></li></template></ul></details></div>+ </div>+ </section>+ <section class="home-closing"><div><p class="eyebrow">06 — {{ t('BUILT IN THE OPEN', '一起构建') }}</p><h2>{{ t('Keep exploring.', '继续探索。') }}</h2><p>{{ t('Read the source, ask a question, or help shape what comes next.', '读源码、提问题,或参与下一步的构建。') }}</p></div><div><a href="https://github.com/volcengine/OpenViking">GitHub <span>↗</span></a><a :href="link('about/02-changelog')">{{ t('Changelog', '更新日志') }} <span>↗</span></a><a :href="link('about/01-about-us')">{{ t('Community', '加入社区') }} <span>↗</span></a></div></section>+ </div>+ </div>+</template>diff --git a/docs/.vitepress/theme/components/LocaleSwitch.vue b/docs/.vitepress/theme/components/LocaleSwitch.vuenew file mode 100644index 000000000..9edf2838b--- /dev/null+++ b/docs/.vitepress/theme/components/LocaleSwitch.vue@@ -0,0 +1,36 @@+<script setup lang="ts">+import { computed } from 'vue'+import { useData, useRouter, withBase } from 'vitepress'++const { lang, page, hash } = useData()+const router = useRouter()+const locale = computed(() => lang.value.startsWith('zh') ? 'zh' : 'en')++function switchLocale(next: 'en' | 'zh') {+ if (next === locale.value) return+ const relative = page.value.relativePath+ .replace(/^(en|zh)\//, '')+ .replace(/(^|\/)index\.md$/, '$1')+ .replace(/\.md$/, '')+ // Unlocalized design notes have no counterpart; use the selected docs home.+ const target = /^(en|zh)\//.test(page.value.relativePath) ? relative : ''+ void router.go(withBase(`/${next}/${target}`) + hash.value)+}+</script>++<template>+ <div class="ov-locale-switch" role="group" :aria-label="locale === 'zh' ? '语言' : 'Language'">+ <button type="button" lang="en" :aria-pressed="locale === 'en'" aria-label="English" @click="switchLocale('en')">EN</button>+ <button type="button" lang="zh-CN" :aria-pressed="locale === 'zh'" aria-label="简体中文" @click="switchLocale('zh')">中</button>+ </div>+</template>++<style scoped>+/* Same segmented structure and measurements as blog.openviking.ai's b-seg. */+.ov-locale-switch { display: flex; flex: 0 0 auto; padding: 2px; border: 1px solid var(--vp-c-divider); border-radius: 999px; background: var(--vp-c-bg-alt); }+button { padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--vp-c-text-2); font: 11px/1.6 var(--vp-font-family-mono); cursor: pointer; }+button[aria-pressed='true'] { background: var(--vp-c-text-1); color: var(--vp-c-bg); }+button:hover:not([aria-pressed='true']) { color: var(--vp-c-text-1); }+button:focus-visible { outline: 2px solid var(--vp-c-brand-1); outline-offset: 3px; }+@media (max-width: 374px) { button { padding-inline: 8px; } }+</style>diff --git a/docs/.vitepress/theme/components/SideRays.css b/docs/.vitepress/theme/components/SideRays.cssnew file mode 100644index 000000000..ca2ce769e--- /dev/null+++ b/docs/.vitepress/theme/components/SideRays.css@@ -0,0 +1,2 @@+.side-rays-container { width: 100%; height: 100%; position: absolute; inset: 0; pointer-events: none; overflow: hidden; }+.side-rays-container canvas { display: block; width: 100%; height: 100%; }diff --git a/docs/.vitepress/theme/components/SideRays.vue b/docs/.vitepress/theme/components/SideRays.vuenew file mode 100644index 000000000..c00caaccd--- /dev/null+++ b/docs/.vitepress/theme/components/SideRays.vue@@ -0,0 +1,145 @@+<script setup>+// SideRays shader by React Bits (https://reactbits.dev/backgrounds/side-rays).+// Vue lifecycle adapter: one context, reactive uniforms, offscreen/hidden pause.+import { onMounted, onBeforeUnmount, ref, watch } from 'vue'+import './SideRays.css'++const props = defineProps({+ speed: { default: 2.5 }, rayColor1: { default: '#EAB308' },+ rayColor2: { default: '#96c8ff' }, intensity: { default: 2 },+ spread: { default: 2 }, origin: { default: 'top-right' }, tilt: { default: 0 },+ saturation: { default: 1.5 }, blend: { default: 0.75 },+ falloff: { default: 1.6 }, opacity: { default: 1 }+})+const container = ref(null)+let dispose = () => {}+let cancelled = false+const rgb = hex => /^#?([a-f\d]{6})$/i.test(hex)+ ? hex.replace('#', '').match(/../g).map(v => parseInt(v, 16) / 255) : [1, 1, 1]+let sync = () => {}+watch(props, () => sync())+onBeforeUnmount(() => { cancelled = true; dispose() })+onMounted(async () => {+ // OGL never enters the server renderer or the article-page bundle.+ const { Renderer, Program, Triangle, Mesh } = await import('ogl')+ if (cancelled || !container.value) return+ const el = container.value+ let renderer+ try { renderer = new Renderer({ dpr: Math.min(devicePixelRatio, 2), alpha: true }) }+ catch { return } // The CSS glow remains when WebGL is unavailable.+ const gl = renderer.gl+ if (!gl) return+ const uniforms = {+ iTime: { value: 0 }, iResolution: { value: [1, 1] },+ ...Object.fromEntries(['Speed', 'RayColor1', 'RayColor2', 'Intensity', 'Spread', 'FlipX', 'FlipY', 'Tilt', 'Saturation', 'Blend', 'Falloff', 'Opacity'].map(k => ['i' + k, { value: 0 }]))+ }+ sync = () => {+ for (const key of ['speed', 'intensity', 'spread', 'tilt', 'saturation', 'blend', 'falloff', 'opacity'])+ uniforms['i' + key[0].toUpperCase() + key.slice(1)].value = props[key]+ uniforms.iRayColor1.value = rgb(props.rayColor1)+ uniforms.iRayColor2.value = rgb(props.rayColor2)+ uniforms.iFlipX.value = props.origin.endsWith('left') ? 1 : 0+ uniforms.iFlipY.value = props.origin.startsWith('bottom') ? 1 : 0+ }+ sync()+ const geometry = new Triangle(gl)+ const program = new Program(gl, {+ vertex: `attribute vec2 position;+void main() { gl_Position = vec4(position, 0.0, 1.0); }`,+ fragment: `precision highp float;+uniform float iTime;+uniform vec2 iResolution;+uniform float iSpeed;+uniform vec3 iRayColor1;+uniform vec3 iRayColor2;+uniform float iIntensity;+uniform float iSpread;+uniform float iFlipX;+uniform float iFlipY;+uniform float iTilt;+uniform float iSaturation;+uniform float iBlend;+uniform float iFalloff;+uniform float iOpacity;+float rayStrength(vec2 raySource, vec2 rayRefDirection, vec2 coord, float seedA, float seedB, float speed) {+ vec2 sourceToCoord = coord - raySource;+ float cosAngle = dot(normalize(sourceToCoord), rayRefDirection);+ return clamp((0.45 + 0.15 * sin(cosAngle * seedA + iTime * speed)) ++ (0.3 + 0.2 * cos(-cosAngle * seedB + iTime * speed)), 0.0, 1.0) *+ clamp((iResolution.x - length(sourceToCoord)) / iResolution.x, 0.5, 1.0);+}+void main() {+ vec2 fragCoord = gl_FragCoord.xy;+ if (iFlipX > 0.5) fragCoord.x = iResolution.x - fragCoord.x;+ if (iFlipY > 0.5) fragCoord.y = iResolution.y - fragCoord.y;+ vec2 coord = vec2(fragCoord.x, iResolution.y - fragCoord.y);+ vec2 rayPos = vec2(iResolution.x * 1.1, -0.5 * iResolution.y);+ float tiltRad = iTilt * 3.14159265 / 180.0;+ float cs = cos(tiltRad);+ float sn = sin(tiltRad);+ vec2 rel = coord - rayPos;+ vec2 tiltedCoord = vec2(rel.x * cs - rel.y * sn, rel.x * sn + rel.y * cs) + rayPos;+ float halfSpread = iSpread * 0.275;+ vec2 rayRefDir1 = normalize(vec2(cos(0.785398 + halfSpread), sin(0.785398 + halfSpread)));+ vec2 rayRefDir2 = normalize(vec2(cos(0.785398 - halfSpread), sin(0.785398 - halfSpread)));+ vec4 rays1 = vec4(iRayColor1, 1.0) * rayStrength(rayPos, rayRefDir1, tiltedCoord, 36.2214, 21.11349, iSpeed);+ vec4 rays2 = vec4(iRayColor2, 1.0) * rayStrength(rayPos, rayRefDir2, tiltedCoord, 22.3991, 18.0234, iSpeed * 0.2);+ vec4 color = rays1 * (1.0 - iBlend) * 0.9 + rays2 * iBlend * 0.9;+ float distanceToLight = length(fragCoord.xy - vec2(rayPos.x, iResolution.y - rayPos.y)) / iResolution.y;+ float brightness = iIntensity * 0.4 / pow(max(distanceToLight, 0.001), iFalloff);+ color.rgb *= brightness;+ float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));+ color.rgb = mix(vec3(gray), color.rgb, iSaturation);+ color.a = max(color.r, max(color.g, color.b)) * iOpacity;+ gl_FragColor = color;+}`, uniforms+ })+ const mesh = new Mesh(gl, { geometry, program })+ el.appendChild(gl.canvas)+ let frame = 0, visible = false, lost = false, elapsed = 0, last = 0+ const motion = matchMedia('(prefers-reduced-motion: reduce)')+ const draw = t => {+ frame = 0+ if (cancelled || lost) return+ if (last) elapsed += Math.min(t - last, 64)+ last = t+ uniforms.iTime.value = motion.matches ? 0 : elapsed * 0.001+ renderer.render({ scene: mesh })+ if (visible && !document.hidden && !motion.matches) frame = requestAnimationFrame(draw)+ }+ const schedule = () => {+ cancelAnimationFrame(frame); frame = 0; last = 0+ if (visible && !document.hidden && !lost) frame = requestAnimationFrame(draw)+ }+ const resize = () => {+ if (!el.clientWidth || !el.clientHeight) return+ renderer.dpr = Math.min(devicePixelRatio, 2)+ renderer.setSize(el.clientWidth, el.clientHeight)+ uniforms.iResolution.value = [gl.drawingBufferWidth, gl.drawingBufferHeight]+ schedule()+ }+ const syncUniforms = sync+ sync = () => { syncUniforms(); schedule() }+ const observer = new IntersectionObserver(([entry]) => { visible = entry.isIntersecting; schedule() })+ const sizes = new ResizeObserver(resize)+ const onLost = () => { lost = true; cancelAnimationFrame(frame) }+ gl.canvas.addEventListener('webglcontextlost', onLost)+ observer.observe(el); sizes.observe(el)+ document.addEventListener('visibilitychange', schedule)+ motion.addEventListener('change', schedule)+ resize()+ dispose = () => {+ cancelAnimationFrame(frame)+ observer.disconnect(); sizes.disconnect()+ document.removeEventListener('visibilitychange', schedule)+ motion.removeEventListener('change', schedule)+ gl.canvas.removeEventListener('webglcontextlost', onLost)+ geometry.remove(); program.remove()+ gl.getExtension('WEBGL_lose_context')?.loseContext()+ gl.canvas.remove()+ sync = () => {}+ }+})+</script>++<template><div ref="container" class="side-rays-container" aria-hidden="true" /></template>diff --git a/docs/.vitepress/theme/components/docs-home.css b/docs/.vitepress/theme/components/docs-home.cssnew file mode 100644index 000000000..df4409a30--- /dev/null+++ b/docs/.vitepress/theme/components/docs-home.css@@ -0,0 +1,140 @@+.docs-home { --home-line: var(--vp-c-divider); --home-muted: var(--vp-c-text-2); overflow: clip; color: var(--vp-c-text-1); margin-top: calc(-1 * var(--vp-nav-height)); }+.home-shell { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }+.docs-home a { text-decoration: none; }+.docs-home a, .docs-home button { -webkit-tap-highlight-color: transparent; }+.docs-home :is(a, button, input, summary):focus-visible { outline: 2px solid var(--vp-c-brand-1); outline-offset: 5px; }+/* Extend the canvas behind the glass navbar, keeping the content at its original offset. */+.home-hero { position: relative; isolation: isolate; padding-top: var(--vp-nav-height); border-bottom: 1px solid var(--home-line); }+.hero-light { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 100% 0%, #668dc318, transparent 60%); mask-image: linear-gradient(#000 65%, transparent); }+.hero-light .side-rays-container { mix-blend-mode: multiply; }+.dark .hero-light .side-rays-container { mix-blend-mode: screen; }+.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-block: 92px 80px; align-items: center; }+.eyebrow { display: flex; align-items: center; gap: 9px; font: 10px/1.6 var(--vp-font-family-mono); letter-spacing: .11em; color: var(--home-muted); }+.eyebrow-separator { opacity: .4; margin-inline: 4px; }+.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--vp-c-brand-1); }+.hero-copy h1 { font-family: var(--vp-font-family-display); margin: 28px 0 23px; font-size: clamp(44px, 5.3vw, 72px); line-height: 1.05; letter-spacing: -.058em; font-weight: 500; }+.hero-copy h1 em { font-family: var(--vp-font-family-display); font-weight: 400; color: var(--vp-c-brand-1); letter-spacing: -.055em; }+:lang(zh) .hero-copy h1 { line-height: 1.25; letter-spacing: -.045em; }+:lang(zh) .hero-copy h1 em { display: inline-block; max-width: 100%; font-style: normal; text-wrap: balance; }+.hero-description { max-width: 470px; font-size: 16px; line-height: 1.85; color: var(--home-muted); }+.hero-description::first-line { color: var(--vp-c-text-1); }+.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }+.home-button { display: inline-flex; gap: 28px; align-items: center; justify-content: space-between; padding: 12px 19px; font-size: 13px; font-weight: 600; border: 1px solid var(--home-line); border-radius: 6px; transition: background .2s, border-color .2s; }+.home-button.primary { background: var(--vp-c-text-1); color: var(--vp-c-bg); border-color: var(--vp-c-text-1); }+.home-button.primary:hover { background: var(--vp-c-brand-1); border-color: var(--vp-c-brand-1); }+.home-button.secondary:hover { background: var(--vp-c-bg-soft); }+.hero-footnote { color: var(--home-muted); font-size: 11px; margin-top: 21px; }+.hero-index { display: flex; justify-content: space-between; padding-bottom: 18px; color: var(--home-muted); font: 10px/1.7 var(--vp-font-family-mono); letter-spacing: .06em; }+.hero-index > span:last-child { display: flex; gap: 35px; }+.context-workspace { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 386px; border: 1px solid var(--home-line); border-radius: 10px; background: color-mix(in srgb, var(--vp-c-bg) 86%, transparent); box-shadow: 0 24px 70px -35px #19395830; overflow: hidden; transform: rotate(-1deg); }+.dark .context-workspace { box-shadow: 0 24px 70px -35px #0008; }+.workspace-top { display: flex; align-items: center; gap: 10px; height: 60px; border-bottom: 1px solid var(--home-line); padding: 17px 20px; font: 13px var(--vp-font-family-mono); }+.workspace-caption { margin-left: auto; font-size: 8px; letter-spacing: .1em; color: var(--home-muted); }+.workspace-body { display: grid; grid-template-columns: .95fr 1.2fr; min-height: 0; }+.context-folders { padding: 22px 12px 16px; border-right: 1px solid var(--home-line); }+.tree-root { display: block; font: 11px var(--vp-font-family-mono); margin: 0 10px 17px; color: var(--home-muted); }+.context-folders button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: 11px var(--vp-font-family-mono); padding: 10px 9px; border-radius: 4px; color: var(--home-muted); }+.context-folders button svg { width: 17px; height: 17px; }+.context-folders button > span { margin-left: auto; opacity: 0; }+.context-folders button.selected { color: var(--vp-c-brand-1); background: var(--vp-c-brand-soft); }+.context-folders button:hover { background: var(--vp-c-bg-soft); }+.context-folders button.selected > span { opacity: 1; }+.tree-legend { display: flex; align-items: center; gap: 6px; font-size: 9px; margin: 24px 9px 0; color: var(--home-muted); }+.tree-legend .status-dot { width: 4px; height: 4px; flex-basis: 4px; }+.context-preview { padding: 25px 20px 20px; overflow: auto; }+.file-path { font: 10px var(--vp-font-family-mono); color: var(--home-muted); padding-bottom: 16px; white-space: nowrap; }+.file-line { display: flex; align-items: center; gap: 8px; font-size: 11px; line-height: 29px; white-space: nowrap; }+.file-line > span { color: var(--home-muted); }+.file-line small { font: 8px var(--vp-font-family-mono); margin-left: auto; color: var(--vp-c-brand-1); }+.context-tag { display: inline-block; margin-top: 17px; padding: 3px 7px; font: 8px/1.5 var(--vp-font-family-mono); color: var(--home-muted); border: 1px solid var(--home-line); border-radius: 3px; }+.workspace-bottom { display: flex; justify-content: space-between; gap: 8px; padding: 11px 21px; font-size: 8px; color: var(--home-muted); border-top: 1px solid var(--home-line); }+.workspace-bottom code span { margin-inline: 5px; opacity: .5; }+.start-section { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; padding-top: 30px; }+.path-card { display: flex; flex-direction: column; padding: 25px 26px; border: 1px solid var(--home-line); border-radius: 7px; transition: border-color .2s, background .2s; }+.path-card:hover { border-color: var(--vp-c-brand-1); background: var(--vp-c-bg-alt); }+.path-card.featured { background: var(--vp-c-brand-soft); border-color: color-mix(in srgb, var(--vp-c-brand-1) 24%, var(--home-line)); }+.path-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font: 10px var(--vp-font-family-mono); color: var(--home-muted); }+.path-icon { font-size: 20px; color: var(--vp-c-brand-1); }+.path-card h2 { font-size: 18px; font-weight: 500; letter-spacing: -.02em; }+.path-card p { margin: 9px 0 24px; max-width: 290px; font-size: 13px; line-height: 1.7; color: var(--home-muted); }+.path-action { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; margin-top: auto; }+.path-card.featured .path-action { color: var(--vp-c-brand-1); }+.install-strip { margin-top: 18px; display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 16px 20px; border: 1px solid var(--home-line); border-radius: 6px; font-size: 11px; }+.install-strip > div { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }+.install-strip a { color: var(--home-muted); text-decoration: underline; text-underline-offset: 3px; }+.install-strip button { display: flex; gap: 22px; align-items: center; text-align: left; }+.install-strip code { font-size: 11px; user-select: text; }+.install-strip code span { color: var(--vp-c-brand-1); }+.install-strip button > span { color: var(--home-muted); font-size: 10px; min-width: 36px; }+.concept-section { padding-block: 82px 56px; }+.section-intro h2 { margin: 17px 0 12px; font-size: 32px; font-weight: 500; line-height: 1.3; letter-spacing: -.04em; }+.section-intro > p:last-child { font-size: 14px; color: var(--home-muted); line-height: 1.7; }+.layer-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 34px; border: 1px solid var(--home-line); border-radius: 7px; overflow: hidden; }+.layer-item { padding: 28px 30px; }+.layer-item + .layer-item { border-left: 1px solid var(--home-line); }+.layer-item:hover { background: var(--vp-c-bg-alt); }+.layer-art { height: 76px; display: flex; flex-direction: column; gap: 6px; justify-content: center; position: relative; width: 132px; padding: 10px 15px; border-left: 1px solid var(--home-line); margin-bottom: 24px; }+.layer-art span { height: 3px; width: 82%; background: var(--vp-c-brand-1); opacity: .32; border-radius: 2px; }+.layer-art span:nth-child(2n) { width: 65%; opacity: .18; }+.layer-art.abstract span { height: 6px; }+.layer-art.overview span:first-child { height: 5px; margin-bottom: 3px; }+.layer-art.detail span { height: 2px; }+.layer-heading { display: flex; align-items: center; gap: 10px; }+.layer-heading code { font-size: 10px; color: var(--vp-c-brand-1); border: 1px solid var(--home-line); border-radius: 3px; padding: 1px 5px; }+.layer-heading h3 { font-size: 16px; font-weight: 500; }+.layer-item p { font-size: 13px; line-height: 1.7; color: var(--home-muted); margin: 12px 0 24px; max-width: 280px; }+.layer-file { display: flex; justify-content: space-between; font: 10px var(--vp-font-family-mono); color: var(--home-muted); }+.integration-strip { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 26px; border-block: 1px solid var(--home-line); }+.integration-strip h2 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }+.integration-strip > div > a { font-size: 11px; color: var(--home-muted); }+.agent-links { display: flex; flex-wrap: wrap; gap: 12px; }+.agent-links a { border: 1px solid var(--home-line); padding: 9px 12px; border-radius: 5px; display: flex; gap: 16px; }+.agent-links a:hover { color: var(--vp-c-brand-1); border-color: var(--vp-c-brand-1); }+.agent-links a span { opacity: .5; }+.explore-section { padding-block: 80px; scroll-margin-top: 96px; }+.atlas-layout { display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: start; margin-top: 38px; }+.atlas-aside { position: sticky; top: 96px; }+.atlas-aside label { display: block; font-size: 11px; margin-bottom: 9px; }+.atlas-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--home-line); border-radius: 5px; padding: 8px 12px; }+.atlas-input span { font-size: 20px; color: var(--home-muted); }+.atlas-input input { width: 100%; min-width: 0; font-size: 12px; background: transparent; }+.atlas-count { font: 10px var(--vp-font-family-mono); color: var(--home-muted); margin-block: 13px 24px; }+.atlas-count span { float: right; }+.atlas-aside nav { display: grid; }+.atlas-aside nav a { display: flex; justify-content: space-between; padding: 7px 0; font-size: 12px; color: var(--home-muted); }+.atlas-aside nav a:hover { color: var(--vp-c-brand-1); }+.atlas-aside nav a span { font: 10px var(--vp-font-family-mono); opacity: .7; }+.atlas-machine { display: grid; gap: 6px; border-top: 1px solid var(--home-line); margin-top: 24px; padding-top: 18px; }+.atlas-machine > span:first-child { font: 11px var(--vp-font-family-mono); }+.atlas-machine > span:last-child { font-size: 10px; color: var(--home-muted); }+.atlas-group { border-top: 1px solid var(--home-line); scroll-margin-top: 100px; }+.atlas-group:last-child { border-bottom: 1px solid var(--home-line); }+.atlas-group summary { display: flex; align-items: center; gap: 18px; list-style: none; padding: 21px 8px; cursor: pointer; }+.atlas-group summary::-webkit-details-marker { display: none; }+.atlas-group summary:hover strong { color: var(--vp-c-brand-1); }+.folder-glyph { font-size: 25px; color: var(--vp-c-brand-1); }+.atlas-group strong { display: block; font-size: 15px; font-weight: 500; }+.atlas-group small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.6; color: var(--home-muted); }+.section-count { margin-left: auto; font: 10px var(--vp-font-family-mono); color: var(--home-muted); }+.expand-glyph { width: 20px; text-align: center; font-size: 18px; color: var(--home-muted); }+.atlas-group[open] .expand-glyph { transform: rotate(45deg); }+.atlas-group ul { list-style: none; margin: 0 0 20px 18px; padding-left: 20px; border-left: 1px solid var(--home-line); }+.atlas-group li a { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 4px; font-size: 12px; }+.atlas-group li a:hover { background: var(--vp-c-bg-alt); color: var(--vp-c-brand-1); }+.page-branch { color: var(--home-muted); opacity: .6; }+.atlas-subgroup { padding: 20px 12px 6px; color: var(--home-muted); font-size: 10px; letter-spacing: .03em; }+.page-arrow { color: var(--home-muted); margin-left: auto; }+.atlas-empty { padding: 30px; border: 1px dashed var(--home-line); font-size: 14px; color: var(--home-muted); }+.home-closing { display: flex; justify-content: space-between; gap: 30px; border-top: 1px solid var(--home-line); padding: 46px 0 62px; }+.home-closing h2 { font: 36px/1.3 var(--vp-font-family-display); margin: 15px 0 10px; }+.home-closing p:last-child { font-size: 13px; color: var(--home-muted); }+.home-closing > div:last-child { display: grid; min-width: 220px; align-content: center; }+.home-closing a { display: flex; justify-content: space-between; padding: 10px 0; font-size: 13px; }+.home-closing a:hover { color: var(--vp-c-brand-1); }+@media (min-width: 1600px) { .hero-inner { padding-block: 115px 96px; } }+@media (max-width: 1100px) { .hero-inner { gap: 30px; } .workspace-body { grid-template-columns: .9fr 1.1fr; } .context-preview { padding-inline: 12px; } .file-line { font-size: 10px; } .install-strip { flex-wrap: wrap; } .atlas-layout { gap: 36px; } .integration-strip { align-items: flex-start; flex-direction: column; gap: 18px; } }+@media (max-width: 800px) { .home-shell { width: calc(100% - 48px); } .hero-inner { grid-template-columns: 1fr; padding-block: 52px 36px; gap: 40px; } .hero-copy h1 { font-size: 62px; } .hero-description { max-width: 530px; } .context-workspace { transform: none; max-width: 570px; width: 100%; } .workspace-body { grid-template-columns: .95fr 1.2fr; } .context-preview { padding-inline: 24px; } .file-line { font-size: 12px; } .start-section { gap: 10px; grid-template-columns: 1fr; } .path-card { padding: 21px 23px; } .path-top { margin-bottom: 10px; } .path-card p { max-width: none; margin-bottom: 16px; } .path-action { justify-content: flex-start; gap: 20px; } .layer-item { padding: 22px 18px; } .atlas-layout { grid-template-columns: 190px 1fr; gap: 25px; } .hero-index > span:last-child { display: none; } }+@media (max-width: 580px) { .hero-copy h1 { font-size: 52px; } .hero-description { font-size: 14px; } .home-button { padding: 11px 14px; gap: 18px; } .hero-footnote { font-size: 10px; } .workspace-caption { font-size: 7px; } .context-workspace { height: 362px; } .workspace-top { height: 54px; padding: 14px; } .context-folders { padding-inline: 7px; } .context-folders button { gap: 5px; font-size: 10px; padding-inline: 6px; } .context-folders button > span { display: none; } .context-preview { padding-inline: 12px; } .file-line { font-size: 10px; gap: 5px; } .file-path { font-size: 8px; } .workspace-bottom { padding-inline: 14px; font-size: 7px; } .install-strip { padding: 15px; gap: 16px; } .install-strip button { gap: 12px; width: 100%; justify-content: space-between; } .install-strip code { font-size: 9px; } .section-intro h2 { font-size: 27px; } .concept-section { padding-block: 56px 32px; } .layer-grid { grid-template-columns: 1fr; } .layer-item { padding: 25px; position: relative; } .layer-item + .layer-item { border-left: 0; border-top: 1px solid var(--home-line); } .layer-art { float: right; width: 82px; height: 64px; margin: 0 0 10px 20px; } .layer-item p { max-width: 220px; } .layer-file { clear: both; } .atlas-layout { grid-template-columns: 1fr; gap: 24px; } .atlas-aside { position: static; } .atlas-aside nav, .atlas-machine { display: none; } .atlas-count { margin-bottom: 0; } .explore-section { padding-block: 56px; } .atlas-group summary { gap: 12px; } .atlas-group small { font-size: 10px; } .atlas-group ul { margin-left: 12px; padding-left: 8px; } .home-closing { flex-direction: column; padding-block: 35px; } .home-closing > div:last-child { min-width: 0; } .agent-links { gap: 8px; } }+@media (prefers-reduced-motion: reduce) { .docs-home *, .docs-home *::before, .docs-home *::after { scroll-behavior: auto !important; transition: none !important; } }++.integration-strip .eyebrow { margin-bottom: 12px; }diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.cssindex d2647393e..41344e658 100644--- a/docs/.vitepress/theme/custom.css+++ b/docs/.vitepress/theme/custom.css@@ -1,17 +1,20 @@+@import "./fonts.css";+:root {--vp-layout-max-width: 100vw;- --vp-c-brand-1: #0f766e;- --vp-c-brand-2: #115e59;- --vp-c-brand-3: #14b8a6;- --vp-c-brand-soft: rgba(20, 184, 166, 0.16);- --vp-c-bg: #fbf8ef;- --vp-c-bg-alt: #f3efe2;- --vp-c-bg-elv: #fffdf7;- --vp-c-bg-soft: #f1eadb;- --vp-c-text-1: #17211f;- --vp-c-text-2: #47534f;- --vp-font-family-base: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;- --vp-font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;+ --vp-c-brand-1: #285e52;+ --vp-c-brand-2: #1d4d42;+ --vp-c-brand-3: #347361;+ --vp-c-brand-soft: rgba(52, 115, 97, 0.07);+ --vp-c-bg: #fafaf7;+ --vp-c-bg-alt: #f2f3ef;+ --vp-c-bg-elv: #ffffff;+ --vp-c-bg-soft: #eeefeb;+ --vp-c-text-1: #202723;+ --vp-c-text-2: #5c665f;+ --vp-font-family-base: "Space Grotesk", sans-serif;+ --vp-font-family-display: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;+ --vp-font-family-mono: "JetBrains Mono", monospace;/* Embed-widget theming. The widget renders in a shadow root whose :host does`all: initial` — that resets inherited properties but NOT custom@@ -49,7 +52,7 @@.VPContent .VPDoc.has-aside > .container > .content > .content-container {width: 100%;- max-width: 1200px;+ max-width: 800px;}}@@ -60,16 +63,16 @@}.dark {- --vp-c-brand-1: #5eead4;- --vp-c-brand-2: #2dd4bf;- --vp-c-brand-3: #0f766e;- --vp-c-brand-soft: rgba(45, 212, 191, 0.18);- --vp-c-bg: #0f0f0f;- --vp-c-bg-alt: #080808;- --vp-c-bg-elv: #1a1a1a;- --vp-c-bg-soft: #1e1e1e;- --vp-c-text-1: #edf7f3;- --vp-c-text-2: #bbcac5;+ --vp-c-brand-1: #b3d5bb;+ --vp-c-brand-2: #c3e6cb;+ --vp-c-brand-3: #527b61;+ --vp-c-brand-soft: rgba(179, 213, 187, 0.07);+ --vp-c-bg: #101312;+ --vp-c-bg-alt: #141816;+ --vp-c-bg-elv: #1b201d;+ --vp-c-bg-soft: #1d231f;+ --vp-c-text-1: #e9ece7;+ --vp-c-text-2: #a0aaa2;/* The rest of the --ovw-* map inherits from --vp-* and flips with thisblock; only the two literals need restating. */@@ -77,63 +80,6 @@--ovw-accent-border: rgba(94, 234, 212, 0.34);}-.VPHome {- background:- radial-gradient(circle at 12% 18%, rgba(20, 184, 166, 0.22), transparent 28rem),- radial-gradient(circle at 88% 12%, rgba(234, 179, 8, 0.16), transparent 24rem),- linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 36%);-}--.VPHero .name,-.VPHero .text {- letter-spacing: -0.045em;-}--.VPHero .image-bg {- background-image: linear-gradient(135deg, rgba(20, 184, 166, 0.28), rgba(234, 179, 8, 0.18));- filter: blur(44px);-}--.VPFeature {- border-color: rgba(15, 118, 110, 0.18);- background: linear-gradient(180deg, rgba(255, 253, 247, 0.88), rgba(241, 234, 219, 0.72));-}--.dark .VPFeature {- border-color: rgba(94, 234, 212, 0.16);- background: linear-gradient(180deg, rgba(22, 33, 30, 0.9), rgba(16, 24, 22, 0.82));-}--@media (min-width: 960px) {- .VPNav {- box-sizing: border-box;- background-color: var(--vp-c-bg);- border-bottom: 1px solid var(--vp-c-divider);- }-- .VPNavBar,- .VPNavBar.has-sidebar {- background-color: var(--vp-c-bg);- }-- .VPNavBar .divider {- display: none;- }-- .VPNav .VPNavBarTitle.has-sidebar .title {- border-bottom: 0 !important;- }-- .VPNavBarTranslations {- display: flex !important;- }-- .VPNavBarExtra .group.translations,- .VPNavBarExtra .translations {- display: none !important;- }-}-.VPNavBarSearch {display: none !important;}@@ -484,36 +430,6 @@transition: padding-right 0.24s ease, right 0.24s ease;}- /* VitePress absolutely positions the title against the sidebar column; once- the whole layout is inset, that anchor is wrong and the logo collides with- the content. Let it sit in the flex row instead. */- html.ov-assistant-open .VPNavBar.has-sidebar .wrapper {- padding-right: 16px;- padding-left: 16px;- }-- html.ov-assistant-open .VPNavBar.has-sidebar .container > .title {- position: relative;- top: auto;- left: auto;- width: auto;- flex: 0 0 auto;- padding: 0;- }-- html.ov-assistant-open .VPNavBar.has-sidebar .container > .content {- padding-right: 0;- padding-left: 24px;- }-- html.ov-assistant-open .VPNavBarTitle .logo {- display: block;- width: 28px;- height: 28px;- flex: 0 0 28px;- object-fit: cover;- }-html.ov-assistant-open .VPContent .VPDoc {padding-right: 60px;padding-left: 60px;diff --git a/docs/.vitepress/theme/docs-catalog.data.ts b/docs/.vitepress/theme/docs-catalog.data.tsnew file mode 100644index 000000000..82de7d79a--- /dev/null+++ b/docs/.vitepress/theme/docs-catalog.data.ts@@ -0,0 +1,33 @@+import path from 'node:path'+import type { DefaultTheme } from 'vitepress'+import { documentationSections } from '../docs-navigation.ts'+import { sections } from './docs-sections.ts'++type CatalogPage = { title: string; href: string; file: string; group: string }++function collectPages(items: DefaultTheme.SidebarItem[], parents: string[] = []): CatalogPage[] {+ return items.flatMap(item => [+ ...(item.link ? [{+ title: item.text || item.link,+ href: item.link,+ file: `${path.basename(item.link)}.md`,+ group: parents.join(' / ')+ }] : []),+ ...collectPages(item.items || [], item.text ? [...parents, item.text] : parents)+ ])+}++export default {+ watch: ['../../en/**/*.md', '../../zh/**/*.md', '../docs-navigation.ts', './docs-sections.ts'],+ load() {+ return Object.fromEntries(['en', 'zh'].map((locale: 'en' | 'zh') => [locale,+ documentationSections(locale).map(section => {+ const pages = collectPages(section.items || [])+ const id = pages[0]?.href.split('/')[2]+ const metadata = sections.find(item => item.id === id)+ if (!metadata) throw new Error(`Missing documentation section: ${id}`)+ return { ...metadata, [locale]: section.text, pages }+ })+ ]))+ }+}diff --git a/docs/.vitepress/theme/docs-catalog.test.ts b/docs/.vitepress/theme/docs-catalog.test.tsnew file mode 100644index 000000000..da220bdeb--- /dev/null+++ b/docs/.vitepress/theme/docs-catalog.test.ts@@ -0,0 +1,30 @@+import assert from 'node:assert/strict'+import { existsSync } from 'node:fs'+import { fileURLToPath } from 'node:url'+import test from 'node:test'+import catalog from './docs-catalog.data.ts'++const data = catalog.load()+for (const locale of ['en', 'zh']) {+ test(`${locale} map links resolve without duplicate or retired entries`, () => {+ const pages = data[locale].flatMap(section => section.pages)+ assert.equal(new Set(pages.map(page => page.href)).size, pages.length)+ for (const page of pages) {+ assert.ok(existsSync(fileURLToPath(new URL(`../../${page.href.slice(1)}.md`, import.meta.url))), page.href)+ }+ assert.deepEqual(data[locale][0].pages.map(page => page.file), [+ '01-introduction.md', '02-quickstart.md', '04-setup-for-agent.md', '05-cli-setup.md'+ ])+ })++ test(`${locale} map preserves sidebar order and compilation hierarchy`, () => {+ const guides = data[locale].find(section => section.id === 'guides')!+ const deployment = guides.pages.findIndex(page => page.file === '03-deployment.md')+ assert.equal(guides.pages[deployment + 1].file, '04-authentication.md')+ assert.equal(guides.pages[deployment].group, guides.pages[deployment + 1].group)+ const compilation = guides.pages.filter(page => page.href.includes('/context-compilation/'))+ assert.ok(compilation.length > 0)+ assert.ok(compilation.every(page => page.group.includes(' / ')))+ assert.ok(!data[locale].some(section => section.id === 'context-compilation'))+ })+}diff --git a/docs/.vitepress/theme/docs-sections.ts b/docs/.vitepress/theme/docs-sections.tsnew file mode 100644index 000000000..f08d82170--- /dev/null+++ b/docs/.vitepress/theme/docs-sections.ts@@ -0,0 +1,12 @@+// Descriptions and breadcrumb targets for the shared documentation navigation.+export const sections = [+ { id: 'getting-started', en: 'Getting Started', zh: '开始使用', enNote: 'Install, connect, and run your first retrieval.', zhNote: '安装、连接服务,完成第一次检索。' },+ { id: 'configuration', en: 'Configuration', zh: '配置', enNote: 'Server and client settings, field by field.', zhNote: '逐项查看服务端和客户端配置。' },+ { id: 'agent-integrations', en: 'Agent Integrations', zh: 'Agent 集成', enNote: 'Give your agent memory across sessions.', zhNote: '让 Agent 在不同会话之间保留记忆。' },+ { id: 'concepts', en: 'Concepts', zh: '核心概念', enNote: 'Understand the filesystem behind the context.', zhNote: '理解上下文背后的文件系统。' },+ { id: 'guides', en: 'Guides', zh: '指南', enNote: 'Configure, deploy, and observe your service.', zhNote: '配置、部署和监控服务。' },+ { id: 'migration', en: 'Migration', zh: '迁移指南', enNote: 'Move an existing installation forward.', zhNote: '升级现有部署。' },+ { id: 'api', en: 'API Reference', zh: 'API 参考', enNote: 'Resources, memory, retrieval, and administration.', zhNote: '资源、记忆、检索和管理接口。' },+ { id: 'faq', en: 'FAQ', zh: '常见问题', enNote: 'Find answers when something gets in the way.', zhNote: '查找问题和解决办法。' },+ { id: 'about', en: 'About', zh: '关于', enNote: 'Changelog, roadmap, and ways to contribute.', zhNote: '更新日志、路线图和参与方式。' }+]diff --git a/docs/.vitepress/theme/fonts.css b/docs/.vitepress/theme/fonts.cssnew file mode 100644index 000000000..22ce74b91--- /dev/null+++ b/docs/.vitepress/theme/fonts.css@@ -0,0 +1,3 @@+/* Font files and families match https://openviking.ai/. */+@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('./fonts/space-grotesk-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD }+@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('./fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD }diff --git a/docs/.vitepress/theme/fonts/jetbrains-mono-LICENSE.txt b/docs/.vitepress/theme/fonts/jetbrains-mono-LICENSE.txtnew file mode 100644index 000000000..821a3dac2--- /dev/null+++ b/docs/.vitepress/theme/fonts/jetbrains-mono-LICENSE.txt@@ -0,0 +1,93 @@+Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)++This Font Software is licensed under the SIL Open Font License, Version 1.1.++This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/docs/.vitepress/theme/fonts/jetbrains-mono-latin.woff2 b/docs/.vitepress/theme/fonts/jetbrains-mono-latin.woff2new file mode 100644index 000000000..2ca6ac605Binary files /dev/null and b/docs/.vitepress/theme/fonts/jetbrains-mono-latin.woff2 differdiff --git a/docs/.vitepress/theme/fonts/space-grotesk-LICENSE.txt b/docs/.vitepress/theme/fonts/space-grotesk-LICENSE.txtnew file mode 100644index 000000000..d5666d708--- /dev/null+++ b/docs/.vitepress/theme/fonts/space-grotesk-LICENSE.txt@@ -0,0 +1,93 @@+Copyright 2020 The Space Grotesk Project Authors (https://github.com/floriankarsten/space-grotesk)++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+http://scripts.sil.org/OFL+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/docs/.vitepress/theme/fonts/space-grotesk-latin.woff2 b/docs/.vitepress/theme/fonts/space-grotesk-latin.woff2new file mode 100644index 000000000..7b0e76a5cBinary files /dev/null and b/docs/.vitepress/theme/fonts/space-grotesk-latin.woff2 differdiff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.tsindex bd14b9647..647ee42b0 100644--- a/docs/.vitepress/theme/index.ts+++ b/docs/.vitepress/theme/index.ts@@ -1,5 +1,8 @@-import { h } from 'vue'+import { h, defineAsyncComponent } from 'vue'import DefaultTheme from 'vitepress/theme'+import DocBreadcrumb from './components/DocBreadcrumb.vue'+import LocaleSwitch from './components/LocaleSwitch.vue'+import { useData, withBase } from 'vitepress'import type { EnhanceAppContext } from 'vitepress'import CopyMarkdownButton from './CopyMarkdownButton.vue'import LlmsTxtLink from './LlmsTxtLink.vue'@@ -8,6 +11,7 @@ import ApiExampleTabsEnhancer from './ApiExampleTabsEnhancer.vue'import { initVikingBotWidget, syncVikingBotLocale } from './vikingbot-widget'import { trackPageView } from './track'import './custom.css'+import './reading.css'type OpenVikingPreference = {lang?: 'zh' | 'en'@@ -303,16 +307,21 @@ if (typeof window !== 'undefined') {export default {extends: DefaultTheme,Layout() {+ const { lang } = useData()+ const zh = lang.value.startsWith('zh')return h(DefaultTheme.Layout, null, {- 'doc-before': () => h('div', { class: 'doc-page-actions' }, [+ 'doc-before': () => [h(DocBreadcrumb), h('div', { class: 'doc-page-actions' }, [h(LlmsTxtLink),h(CopyMarkdownButton)- ]),+ ])],+ 'sidebar-nav-before': () => h('a', { class: 'sidebar-home-link', href: withBase(zh ? '/zh/' : '/en/') }, zh ? '← 文档首页' : '← Documentation home'),'doc-after': () => h(ApiExampleTabsEnhancer),- 'nav-bar-content-before': () => h(OpenVikingSearch)+ 'nav-bar-content-before': () => h(OpenVikingSearch),+ 'nav-bar-content-after': () => h(LocaleSwitch)})},- enhanceApp({ router }: EnhanceAppContext) {+ enhanceApp({ app, router }: EnhanceAppContext) {+ app.component('DocsHome', defineAsyncComponent(() => import('./components/DocsHome.vue')))if (import.meta.env.SSR || typeof window === 'undefined') returntrackPageView(window.location.pathname)diff --git a/docs/.vitepress/theme/reading.css b/docs/.vitepress/theme/reading.cssnew file mode 100644index 000000000..a881e1ade--- /dev/null+++ b/docs/.vitepress/theme/reading.css@@ -0,0 +1,80 @@+:root { --vp-c-divider: #20272320; --vp-sidebar-width: 280px; }+.dark { --vp-c-divider: #e9ece71c; }+.VPHome { margin-bottom: 0 !important; }+.VPNavBarTitle .title { font-size: 16px; letter-spacing: -.035em; }+.VPNavBarTitle .logo { width: 27px; height: 27px; object-fit: contain; }+.VPNavBarTitle .title::after { content: ' / docs'; font-family: var(--vp-font-family-mono); font-size: 11px; color: var(--vp-c-text-2); margin-left: 10px; letter-spacing: 0; font-weight: 400; }+.VPNavBarMenuLink { font-size: 12px !important; }+.ov-docs-search-trigger { border-radius: 5px; height: 34px; min-width: 155px; background: transparent; font-size: 12px; }+.ov-docs-search-trigger kbd { font-size: 10px; min-width: 38px; border: 0; background: var(--vp-c-bg-alt); }+.doc-breadcrumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; margin-bottom: 22px; font-size: 11px; line-height: 1.6; color: var(--vp-c-text-2); }+.doc-breadcrumb a:hover { color: var(--vp-c-brand-1); }+.doc-breadcrumb [aria-current] { color: var(--vp-c-text-1); }+.doc-breadcrumb > span:not([aria-current]) { opacity: .4; }+.sidebar-home-link { display: block; padding: 8px 0 22px; margin-bottom: 5px; font-size: 12px; color: var(--vp-c-text-2); border-bottom: 1px solid var(--vp-c-divider); }+.sidebar-home-link:hover { color: var(--vp-c-brand-1); }+.VPSidebarItem.level-0 > .item .text { font-size: 12px; letter-spacing: .01em; }+.VPSidebarItem.level-1 > .item .text { font-size: 12px; }+.VPSidebarItem.is-active > .item > .link { background: var(--vp-c-brand-soft); border-radius: 4px; padding-inline: 8px; margin-inline: -8px; }+.vp-doc h1 { font-size: 36px; line-height: 1.2; letter-spacing: -.045em; font-weight: 600; }+.vp-doc h2 { font-weight: 500; letter-spacing: -.025em; padding-top: 28px; margin-top: 44px; }+.vp-doc p, .vp-doc li { line-height: 1.85; }+.vp-doc p { color: var(--vp-c-text-2); }+.vp-doc p strong { color: var(--vp-c-text-1); }+.vp-doc div[class*='language-'] { border: 1px solid var(--vp-c-divider); border-radius: 6px; }+.vp-doc :not(pre) > code { border-radius: 3px; }+.VPDocFooter .pager-link { border-radius: 6px; }+.VPFooter { background: var(--vp-c-bg-alt); }+.VPFooter .message, .VPFooter .copyright { font-size: 11px; }+@media (min-width: 960px) { .VPDoc .content-container { max-width: 800px !important; } }+@media (max-width: 767px) { .VPNavBarTitle .title::after { display: none; } .ov-docs-search-trigger { min-width: 58px; width: 58px; } .vp-doc h1 { font-size: 29px; } .doc-breadcrumb { font-size: 10px; } }++/* Use identical geometry before hydration and on every route. VitePress adds+ .has-sidebar after rendering; it must not reposition the header children. */+.VPNav { background: transparent; border: 0; }+.VPNav .VPNavBar {+ background: color-mix(in srgb, var(--vp-c-bg) 72%, transparent) !important;+ -webkit-backdrop-filter: blur(20px) saturate(145%);+ backdrop-filter: blur(20px) saturate(145%);+ border-bottom: 1px solid var(--vp-c-divider);+ box-shadow: inset 0 1px 0 color-mix(in srgb, var(--vp-c-bg-elv) 45%, transparent);+ transition: none;+}+.VPNav .VPNavBar .wrapper { padding: 0; }+.VPNav .VPNavBar > .wrapper > .container { width: min(1200px, calc(100% - 96px)); max-width: none; margin-inline: auto; }+.VPNav .VPNavBar > .wrapper > .container > .title { position: static; inset: auto; width: auto; padding: 0; height: var(--vp-nav-height); background: transparent; transition: none; }+.VPNav .VPNavBar > .wrapper > .container > .content { position: static; padding: 0 0 0 24px; min-width: 0; }+.VPNav .VPNavBar .content-body { background: transparent !important; transition: none; }+.VPNav .VPNavBar .VPNavBarTitle .title { border-bottom: 0; }+.VPNav .VPNavBar .divider { display: none; }+.VPNav .VPNavBarTranslations,+.VPNav .VPNavScreenTranslations,+.VPNav .VPNavBarExtra .translations { display: none !important; }+.VPNav .ov-docs-search { order: 0; }+.VPNav .VPNavBarMenu { order: 1; }+.VPNav .ov-locale-switch { order: 2; margin-left: 16px; }+.VPNav .VPNavBarAppearance { order: 3; }+.VPNav .VPNavBarSocialLinks { order: 4; }+.VPNav .VPNavBarExtra { order: 5; }+.VPNav .VPNavBarHamburger { order: 6; }+@media (max-width: 1279px) and (min-width: 768px) {+ .VPNav .ov-docs-search-trigger { min-width: 72px; width: 72px; padding-inline: 10px; }+ .VPNav .ov-docs-search-trigger-label, .VPNav .ov-docs-search-trigger kbd { display: none; }+ .VPNav .ov-docs-search-trigger-compact { display: inline; }+}+@media (max-width: 800px) {+ .VPNav .VPNavBar > .wrapper > .container { width: calc(100% - 48px); }+}+@media (max-width: 767px) {+ .VPNav .VPNavBar .content-body { gap: 8px; }+ .VPNav .VPNavBar > .wrapper > .container > .content { padding-left: 12px; }+ .VPNav .ov-docs-search { margin-right: 0; }+ .VPNav .ov-locale-switch { margin-left: 0; }+ .VPNav .VPNavBarHamburger { width: 24px; }+}+@media (max-width: 374px) {+ .VPNav .VPNavBarTitle .title { font-size: 13px; }+ .VPNav .VPNavBarTitle .logo { width: 21px; height: 21px; margin-right: 5px; }+ .VPNav .VPNavBar .content-body { gap: 5px; }+ .VPNav .ov-docs-search-trigger { width: 43px; min-width: 43px; padding: 0 4px; }+}diff --git a/docs/en/index.md b/docs/en/index.mdnew file mode 100644index 000000000..29b4b9e8c--- /dev/null+++ b/docs/en/index.md@@ -0,0 +1,8 @@+---+layout: home+markdownStyles: false+title: Documentation+description: Build with OpenViking. Get started, connect your agent, and explore the context filesystem, memory, retrieval, and APIs.+---++<DocsHome />diff --git a/docs/index.md b/docs/index.mdindex 7ca2b6b89..29b4b9e8c 100644--- a/docs/index.md+++ b/docs/index.md@@ -1,26 +1,8 @@---layout: home--hero:- name: OpenViking Docs- text: Context database documentation- tagline: A focused reference for building agent memory, resources, skills, and retrieval flows with OpenViking.- image:- src: /ov-logo.png- alt: OpenViking- actions:- - theme: brand- text: Read English Docs- link: /en/getting-started/01-introduction- - theme: alt- text: 查看中文文档- link: /zh/getting-started/01-introduction--features:- - title: Agent Context- details: Learn how OpenViking organizes memory, resources, and skills through a file-system paradigm.- - title: Retrieval Architecture- details: Explore hierarchical context loading, recursive retrieval, sessions, metrics, and observability.- - title: Operations Ready- details: Find deployment, authentication, encryption, telemetry, and API references in one place.+markdownStyles: false+title: Documentation+description: Build with OpenViking. Get started, connect your agent, and explore the context filesystem, memory, retrieval, and APIs.---++<DocsHome />diff --git a/docs/package-lock.json b/docs/package-lock.jsonindex baae2367e..382fb8b95 100644--- a/docs/package-lock.json+++ b/docs/package-lock.json@@ -7,6 +7,9 @@"": {"name": "openviking-docs","version": "0.0.0",+ "dependencies": {+ "ogl": "^1.0.11"+ },"devDependencies": {"vitepress": "1.6.4"}@@ -2013,6 +2016,12 @@"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"}},+ "node_modules/ogl": {+ "version": "1.0.11",+ "resolved": "https://registry.npmjs.org/ogl/-/ogl-1.0.11.tgz",+ "integrity": "sha512-kUpC154AFfxi16pmZUK4jk3J+8zxwTWGPo03EoYA8QPbzikHoaC82n6pNTbd+oEaJonaE8aPWBlX7ad9zrqLsA==",+ "license": "Unlicense"+ },"node_modules/oniguruma-to-es": {"version": "3.1.1","resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-3.1.1.tgz",diff --git a/docs/package.json b/docs/package.jsonindex 1d0430ab7..75134a0c9 100644--- a/docs/package.json+++ b/docs/package.json@@ -14,5 +14,8 @@},"devDependencies": {"vitepress": "1.6.4"+ },+ "dependencies": {+ "ogl": "^1.0.11"}}diff --git a/docs/zh/index.md b/docs/zh/index.mdnew file mode 100644index 000000000..5f884ca61--- /dev/null+++ b/docs/zh/index.md@@ -0,0 +1,8 @@+---+layout: home+markdownStyles: false+title: 开发者文档+description: 从安装和 Agent 集成开始,探索 OpenViking 的上下文文件系统、记忆、检索与 API。+---++<DocsHome />