fleet-memory/hindsight-docs/sidebars.ts
Nicolò Boschi abbf874d84
feat: webhook system with retain.completed event, UI, and docs (#487)
* doc: update cookbook

* fix(cookbook): preserve tag keys during sync, strip local .md links

- Fix extract_tags_from_readme/notebook to return dict[str,str] preserving
  sdk/topic keys instead of bare values, preventing topics like
  "Customer Service" from being misclassified as SDK
- Add strip_local_md_links() to remove relative .md references that
  would cause broken link errors in Docusaurus build

* ci: run test-doc-examples independently without waiting for test-rust-cli

Build the CLI directly in the job instead of downloading the artifact,
so test-doc-examples can start at the beginning in parallel with all other jobs.

* feat: webhook system with task-owned retry, retain.completed event, and UI

- New webhook system: register per-bank webhooks with HMAC signing, configurable
  HTTP method/timeout/headers/params (http_config JSONB), and PATCH support
- Webhook deliveries run as async_operations (webhook_delivery type) with
  task-owned retry via RetryTaskAt exception and exponential backoff
  (60s / 5m / 30m / 2h / 8h, max 6 attempts)
- New retain.completed event fires per-document for both sync and async retain
- Delivery debug info (status code, response body) stored in result_metadata
- Control plane UI: webhooks tab per bank with create/edit/delete and a
  deliveries table with cursor pagination and expandable response details
- 28 webhook tests covering HMAC signing, delivery retries, CRUD endpoints,
  PATCH update, and retain.completed queuing
- Docs page at developer/api/webhooks documenting event payloads and delivery
- OpenAPI spec and all client SDKs (Python, TypeScript, Rust, Go) regenerated

* fix: update tests for task-owned retry model and guard _webhook_manager attribute

- test_worker.py: test_executor_exception_triggers_retry now raises RetryTaskAt
  (plain exceptions are immediate failures in the new system); rename
  test_executor_exception_marks_failed_after_max_retries to
  test_executor_exception_marks_failed_immediately to reflect new semantics
- test_batch_api.py: remove max_retries kwarg from WorkerPoller constructor
- memory_engine.py: use getattr for _webhook_manager in _fire_retain_webhook
  to avoid AttributeError when engine is created without __init__ (tests)

* fix: remove max_retries from benchmark WorkerPoller call

* fix(webhooks): transactional outbox, observations_deleted tracking, sidebar

- Queue webhook delivery rows atomically with the primary operation using the
  transactional outbox pattern — prevents lost events on process crash:
  - Retain (sync + async): outbox_callback passed into orchestrator.retain_batch
    and called inside the DB transaction, replacing the post-commit fire call
  - Consolidation: new _mark_operation_completed_and_fire_webhook combines the
    status UPDATE and webhook INSERT in one transaction
  - Added fire_event_with_conn() to WebhookManager for in-connection delivery

- Track observations_deleted count in consolidation stats and expose it in the
  consolidation.completed webhook payload (was always None)

- Add Webhooks page to docs sidebar

- Document at-least-once delivery guarantee with operation_id dedup guidance

* fix(ui): add retain.completed to available webhook event types

* feat(ui): add delete confirmation dialog for webhooks

* fix(webhooks): include operation_id in task_payload so delivery is marked completed

The task_payload JSON was missing the operation_id field, causing execute_task
to see operation_id=None and skip _mark_operation_completed — leaving every
delivery row stuck in 'pending' forever.

Added a test that inserts a real async_operations row and verifies the status
transitions to 'completed' after a successful execute_task call.

* style: fix prettier formatting in webhooks-view
2026-03-04 14:17:01 +01:00

252 lines
5.3 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',
},
{
type: 'doc',
id: 'developer/retain',
label: 'Retain',
},
{
type: 'doc',
id: 'developer/retrieval',
label: 'Recall',
},
{
type: 'doc',
id: 'developer/reflect',
label: 'Reflect',
},
{
type: 'doc',
id: 'developer/observations',
label: 'Observations',
},
{
type: 'doc',
id: 'developer/multilingual',
label: 'Multilingual',
},
{
type: 'doc',
id: 'developer/performance',
label: 'Performance',
},
{
type: 'doc',
id: 'developer/storage',
label: 'Storage',
},
{
type: 'doc',
id: 'developer/rag-vs-hindsight',
label: 'RAG vs Memory',
},
],
},
{
type: 'category',
label: 'API',
collapsible: false,
items: [
{
type: 'doc',
id: 'developer/api/quickstart',
label: 'Quick Start',
},
{
type: 'doc',
id: 'developer/api/retain',
label: 'Retain',
},
{
type: 'doc',
id: 'developer/api/recall',
label: 'Recall',
},
{
type: 'doc',
id: 'developer/api/reflect',
label: 'Reflect',
},
{
type: 'doc',
id: 'developer/api/mental-models',
label: 'Mental Models',
},
{
type: 'doc',
id: 'developer/api/memory-banks',
label: 'Memory Banks',
},
{
type: 'doc',
id: 'developer/api/documents',
label: 'Documents',
},
{
type: 'doc',
id: 'developer/api/operations',
label: 'Operations',
},
{
type: 'doc',
id: 'developer/api/webhooks',
label: 'Webhooks',
},
],
},
{
type: 'category',
label: 'Hosting',
collapsible: false,
items: [
{
type: 'doc',
id: 'developer/installation',
label: 'Installation',
},
{
type: 'doc',
id: 'developer/services',
label: 'Services',
},
{
type: 'doc',
id: 'developer/configuration',
label: 'Configuration',
},
{
type: 'doc',
id: 'developer/admin-cli',
label: 'Admin CLI',
},
{
type: 'doc',
id: 'developer/extensions',
label: 'Extensions',
},
{
type: 'doc',
id: 'developer/models',
label: 'Models',
},
{
type: 'doc',
id: 'developer/monitoring',
label: 'Monitoring',
},
{
type: 'doc',
id: 'developer/mcp-server',
label: 'MCP Server',
},
],
},
],
sdksSidebar: [
{
type: 'category',
label: 'Clients',
collapsible: false,
items: [
{
type: 'doc',
id: 'sdks/python',
label: 'Python',
},
{
type: 'doc',
id: 'sdks/nodejs',
label: 'Node.js',
},
{
type: 'doc',
id: 'sdks/go',
label: 'Go',
customProps: {
icon: "/img/icons/golang.png"
}
},
{
type: 'doc',
id: 'sdks/cli',
label: 'CLI',
},
{
type: 'doc',
id: 'sdks/embed',
label: 'Embedded Python',
},
],
},
{
type: 'category',
label: 'Integrations',
collapsible: false,
items: [
{
type: 'doc',
id: 'sdks/integrations/local-mcp',
label: 'Local MCP Server',
},
{
type: 'doc',
id: 'sdks/integrations/litellm',
label: 'LiteLLM',
},
{
type: 'doc',
id: 'sdks/integrations/openclaw',
label: 'OpenClaw',
},
{
type: 'doc',
id: 'sdks/integrations/ai-sdk',
label: 'Vercel AI SDK',
},
{
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/skills',
label: 'Skills',
},
],
},
],
};
export default sidebars;