fleet-memory/hindsight-docs/sidebars.ts
Ben 0b17a67c70
feat: add Hindsight memory integration for OpenAI Codex CLI (#730)
* feat(codex): add Hindsight memory integration for OpenAI Codex CLI

Hooks-based integration that gives Codex CLI long-term memory via Hindsight.
Three hooks keep memory in sync: SessionStart (daemon pre-warm), UserPromptSubmit
(recall + context injection), Stop (retain conversation to memory).

Key differences from the Claude Code integration:
- Codex transcript format: JSONL with {msg: {type, message}} (user_message/agent_message)
- No CODEX_PLUGIN_ROOT env var — install.sh writes hooks.json with absolute paths
- State stored in ~/.hindsight/codex/state/ (not CLAUDE_PLUGIN_DATA)
- No async: true in hooks (not supported by Codex)
- No SessionEnd event
- hooks.json written to ~/.codex/hooks.json with codex_hooks = true in config.toml

* fix(codex): fix transcript parser for actual Codex disk format

Codex stores sessions as rollout-*.jsonl with response_item entries:
  User:      {type:response_item, payload:{type:message, role:user, content:[{type:input_text, text:...}]}}
  Assistant: {type:response_item, payload:{type:message, role:assistant, phase:final_answer, content:[{type:output_text, text:...}]}}

Previous parser expected an undocumented {msg:{type:user_message}} format from the Rust protocol spec
that does not match the actual on-disk storage format.

* feat(codex): add reflect mode to UserPromptSubmit hook

Add recallMode config option (default: 'recall') that switches the
UserPromptSubmit hook between:
- 'recall': existing behavior, fast raw facts list
- 'reflect': agentic synthesis loop, returns coherent prose answer

Also adds reflect() method to HindsightClient and HINDSIGHT_RECALL_MODE
env var override. Reflect uses a 25s timeout (vs 10s for recall).

* feat(codex): auto mode for recall/reflect selection

Add recallMode: 'auto' (new default) that picks the operation per-query:
- Synthesis patterns (what do you know, what's my, summarize, etc.) → reflect
- All other prompts → recall (fast, raw facts, better for code tasks)

* feat(codex): add automated test suite and finalize recall-only mode

* docs(codex): add docs page and sidebar entry for Codex CLI integration
2026-03-30 10:51:53 +02:00

405 lines
11 KiB
TypeScript

import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
developerSidebar: [
{
type: 'category',
label: 'Architecture',
collapsible: false,
items: [
{
type: 'doc',
id: 'developer/index',
label: 'Overview',
customProps: { icon: 'lu-book' },
},
{
type: 'doc',
id: 'developer/retain',
label: 'Retain',
customProps: { icon: 'lu-brain' },
},
{
type: 'doc',
id: 'developer/retrieval',
label: 'Recall',
customProps: { icon: 'lu-search' },
},
{
type: 'doc',
id: 'developer/reflect',
label: 'Reflect',
customProps: { icon: 'lu-message' },
},
{
type: 'doc',
id: 'developer/observations',
label: 'Observations',
customProps: { icon: 'lu-activity' },
},
{
type: 'doc',
id: 'developer/multilingual',
label: 'Multilingual',
customProps: { icon: 'lu-languages' },
},
{
type: 'doc',
id: 'developer/performance',
label: 'Performance',
customProps: { icon: 'lu-zap' },
},
{
type: 'doc',
id: 'developer/storage',
label: 'Storage',
customProps: { icon: 'lu-database' },
},
{
type: 'doc',
id: 'developer/rag-vs-hindsight',
label: 'RAG vs Memory',
customProps: { icon: 'lu-compare' },
},
],
},
{
type: 'category',
label: 'API',
collapsible: false,
items: [
{
type: 'doc',
id: 'developer/api/quickstart',
label: 'Quick Start',
customProps: { icon: 'lu-rocket' },
},
{
type: 'doc',
id: 'developer/api/retain',
label: 'Retain',
customProps: { icon: 'lu-brain' },
},
{
type: 'doc',
id: 'developer/api/recall',
label: 'Recall',
customProps: { icon: 'lu-search' },
},
{
type: 'doc',
id: 'developer/api/reflect',
label: 'Reflect',
customProps: { icon: 'lu-message' },
},
{
type: 'doc',
id: 'developer/api/mental-models',
label: 'Mental Models',
customProps: { icon: 'lu-layers' },
},
{
type: 'doc',
id: 'developer/api/memory-banks',
label: 'Memory Banks',
customProps: { icon: 'lu-memory' },
},
{
type: 'doc',
id: 'developer/api/documents',
label: 'Documents',
customProps: { icon: 'lu-file' },
},
{
type: 'doc',
id: 'developer/api/operations',
label: 'Operations',
customProps: { icon: 'lu-cpu' },
},
{
type: 'doc',
id: 'developer/api/webhooks',
label: 'Webhooks',
customProps: { icon: 'lu-webhook' },
},
{
type: 'link',
href: '/api-reference',
label: 'API Reference',
customProps: { icon: 'lu-book-open', iconAfter: 'lu-arrow-up-right' },
},
],
},
{
type: 'category',
label: 'Clients',
collapsible: false,
items: [
{
type: 'doc',
id: 'sdks/python',
label: 'Python',
customProps: { icon: 'si-python' },
},
{
type: 'doc',
id: 'sdks/nodejs',
label: 'TypeScript',
customProps: { icon: '/img/icons/typescript.png' },
},
{
type: 'doc',
id: 'sdks/go',
label: 'Go',
customProps: { icon: 'si-go' },
},
{
type: 'doc',
id: 'sdks/cli',
label: 'CLI',
customProps: { icon: 'lu-terminal' },
},
{
type: 'doc',
id: 'sdks/embed',
label: 'Embedded Python',
customProps: { icon: '/img/icons/package.svg' },
},
],
},
{
type: 'category',
label: 'Integrations',
collapsible: false,
items: [
{
type: 'doc',
id: 'sdks/integrations/local-mcp',
label: 'Local MCP Server',
customProps: { icon: '/img/icons/mcp.png' },
},
{
type: 'doc',
id: 'sdks/integrations/litellm',
label: 'LiteLLM',
customProps: { icon: '/img/icons/litellm.png' },
},
{
type: 'doc',
id: 'sdks/integrations/claude-code',
label: 'Claude Code',
customProps: { icon: '/img/icons/claudecode.svg' },
},
{
type: 'doc',
id: 'sdks/integrations/codex',
label: 'OpenAI Codex CLI',
customProps: { icon: '/img/icons/terminal.svg' },
},
{
type: 'doc',
id: 'sdks/integrations/openclaw',
label: 'OpenClaw',
customProps: { icon: '/img/icons/openclaw.png' },
},
{
type: 'doc',
id: 'sdks/integrations/ai-sdk',
label: 'Vercel AI SDK',
customProps: { icon: '/img/icons/vercel.png' },
},
{
type: 'doc',
id: 'sdks/integrations/chat',
label: 'Vercel Chat SDK',
customProps: { icon: '/img/icons/vercel.png' },
},
{
type: 'doc',
id: 'sdks/integrations/crewai',
label: 'CrewAI',
customProps: { icon: '/img/icons/crewai.png' },
},
{
type: 'doc',
id: 'sdks/integrations/pydantic-ai',
label: 'Pydantic AI',
customProps: { icon: '/img/icons/pydanticai.png' },
},
{
type: 'doc',
id: 'sdks/integrations/agno',
label: 'Agno',
customProps: { icon: '/img/icons/agno.png' },
},
{
type: 'doc',
id: 'sdks/integrations/hermes',
label: 'Hermes Agent',
customProps: { icon: '/img/icons/hermes.png' },
},
{
type: 'doc',
id: 'sdks/integrations/langgraph',
label: 'LangGraph / LangChain',
customProps: { icon: '/img/icons/langgraph.png' },
},
{
type: 'doc',
id: 'sdks/integrations/nemoclaw',
label: 'NemoClaw',
customProps: { icon: '/img/icons/nemoclaw.png' },
},
{
type: 'doc',
id: 'sdks/integrations/strands',
label: 'Strands Agents',
customProps: { icon: '/img/icons/strands.png' },
},
{
type: 'doc',
id: 'sdks/integrations/ag2',
label: 'AG2',
customProps: { icon: '/img/icons/ag2.svg' },
},
{
type: 'doc',
id: 'sdks/integrations/skills',
label: 'Skills',
customProps: { icon: '/img/icons/skills.png' },
},
],
},
{
type: 'category',
label: 'Hosting',
collapsible: false,
items: [
{
type: 'link',
href: 'https://ui.hindsight.vectorize.io/signup',
label: 'Cloud',
customProps: { icon: 'lu-cloud', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'doc',
id: 'developer/installation',
label: 'Installation',
customProps: { icon: 'lu-package' },
},
{
type: 'doc',
id: 'developer/services',
label: 'Services',
customProps: { icon: 'lu-server' },
},
{
type: 'doc',
id: 'developer/configuration',
label: 'Configuration',
customProps: { icon: 'lu-settings' },
},
{
type: 'doc',
id: 'developer/admin-cli',
label: 'Admin CLI',
customProps: { icon: 'lu-terminal' },
},
{
type: 'doc',
id: 'developer/extensions',
label: 'Extensions',
customProps: { icon: 'lu-plug' },
},
{
type: 'doc',
id: 'developer/models',
label: 'Models',
customProps: { icon: 'lu-cpu' },
},
{
type: 'doc',
id: 'developer/monitoring',
label: 'Monitoring',
customProps: { icon: 'lu-activity' },
},
{
type: 'doc',
id: 'developer/mcp-server',
label: 'MCP Server',
customProps: { icon: 'lu-network' },
},
],
},
{
type: 'category',
label: 'Resources',
collapsible: false,
items: [
{
type: 'link',
href: '/best-practices',
label: 'Best Practices',
customProps: { icon: 'lu-star', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'link',
href: '/faq',
label: 'FAQ',
customProps: { icon: 'lu-circle-help', iconAfter: 'lu-arrow-up-right' },
},
],
},
{
type: 'category',
label: 'More',
collapsible: false,
items: [
{
type: 'link',
href: '/cookbook',
label: 'Cookbook',
customProps: { icon: 'lu-book', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'link',
href: '/blog',
label: 'Blog',
customProps: { icon: 'lu-rss', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'link',
href: 'https://join.slack.com/t/hindsight-space/shared_invite/zt-3nhbm4w29-LeSJ5Ixi6j8PdiYOCPlOgg',
label: 'Community',
customProps: { icon: 'si-slack', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'link',
href: 'https://github.com/vectorize-io/hindsight',
label: 'GitHub',
customProps: { icon: 'si-github', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'link',
href: 'https://benchmarks.hindsight.vectorize.io/',
label: 'Benchmarks',
customProps: { icon: 'lu-chart-bar', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'link',
href: 'https://benchmarks.hindsight.vectorize.io/',
label: 'Which Model Should I Use?',
customProps: { icon: 'lu-cpu', iconAfter: 'lu-arrow-up-right' },
},
{
type: 'link',
href: 'https://arxiv.org/abs/2512.12818',
label: 'Paper',
customProps: { icon: 'lu-file-text', iconAfter: 'lu-arrow-up-right' },
},
],
},
],
};
export default sidebars;