* 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
102 lines
4.9 KiB
Text
102 lines
4.9 KiB
Text
hindsight_client_api/__init__.py
|
|
hindsight_client_api/api/__init__.py
|
|
hindsight_client_api/api/banks_api.py
|
|
hindsight_client_api/api/directives_api.py
|
|
hindsight_client_api/api/documents_api.py
|
|
hindsight_client_api/api/entities_api.py
|
|
hindsight_client_api/api/files_api.py
|
|
hindsight_client_api/api/memory_api.py
|
|
hindsight_client_api/api/mental_models_api.py
|
|
hindsight_client_api/api/monitoring_api.py
|
|
hindsight_client_api/api/operations_api.py
|
|
hindsight_client_api/api/webhooks_api.py
|
|
hindsight_client_api/api_client.py
|
|
hindsight_client_api/api_response.py
|
|
hindsight_client_api/configuration.py
|
|
hindsight_client_api/exceptions.py
|
|
hindsight_client_api/models/__init__.py
|
|
hindsight_client_api/models/add_background_request.py
|
|
hindsight_client_api/models/async_operation_submit_response.py
|
|
hindsight_client_api/models/background_response.py
|
|
hindsight_client_api/models/bank_config_response.py
|
|
hindsight_client_api/models/bank_config_update.py
|
|
hindsight_client_api/models/bank_list_item.py
|
|
hindsight_client_api/models/bank_list_response.py
|
|
hindsight_client_api/models/bank_profile_response.py
|
|
hindsight_client_api/models/bank_stats_response.py
|
|
hindsight_client_api/models/budget.py
|
|
hindsight_client_api/models/cancel_operation_response.py
|
|
hindsight_client_api/models/child_operation_status.py
|
|
hindsight_client_api/models/chunk_data.py
|
|
hindsight_client_api/models/chunk_include_options.py
|
|
hindsight_client_api/models/chunk_response.py
|
|
hindsight_client_api/models/clear_memory_observations_response.py
|
|
hindsight_client_api/models/consolidation_response.py
|
|
hindsight_client_api/models/create_bank_request.py
|
|
hindsight_client_api/models/create_directive_request.py
|
|
hindsight_client_api/models/create_mental_model_request.py
|
|
hindsight_client_api/models/create_mental_model_response.py
|
|
hindsight_client_api/models/create_webhook_request.py
|
|
hindsight_client_api/models/delete_document_response.py
|
|
hindsight_client_api/models/delete_response.py
|
|
hindsight_client_api/models/directive_list_response.py
|
|
hindsight_client_api/models/directive_response.py
|
|
hindsight_client_api/models/disposition_traits.py
|
|
hindsight_client_api/models/document_response.py
|
|
hindsight_client_api/models/entity_detail_response.py
|
|
hindsight_client_api/models/entity_include_options.py
|
|
hindsight_client_api/models/entity_input.py
|
|
hindsight_client_api/models/entity_list_item.py
|
|
hindsight_client_api/models/entity_list_response.py
|
|
hindsight_client_api/models/entity_observation_response.py
|
|
hindsight_client_api/models/entity_state_response.py
|
|
hindsight_client_api/models/features_info.py
|
|
hindsight_client_api/models/file_retain_response.py
|
|
hindsight_client_api/models/graph_data_response.py
|
|
hindsight_client_api/models/http_validation_error.py
|
|
hindsight_client_api/models/include_options.py
|
|
hindsight_client_api/models/list_documents_response.py
|
|
hindsight_client_api/models/list_memory_units_response.py
|
|
hindsight_client_api/models/list_tags_response.py
|
|
hindsight_client_api/models/memory_item.py
|
|
hindsight_client_api/models/mental_model_list_response.py
|
|
hindsight_client_api/models/mental_model_response.py
|
|
hindsight_client_api/models/mental_model_trigger.py
|
|
hindsight_client_api/models/observation_scopes.py
|
|
hindsight_client_api/models/operation_response.py
|
|
hindsight_client_api/models/operation_status_response.py
|
|
hindsight_client_api/models/operations_list_response.py
|
|
hindsight_client_api/models/recall_request.py
|
|
hindsight_client_api/models/recall_response.py
|
|
hindsight_client_api/models/recall_result.py
|
|
hindsight_client_api/models/reflect_based_on.py
|
|
hindsight_client_api/models/reflect_directive.py
|
|
hindsight_client_api/models/reflect_fact.py
|
|
hindsight_client_api/models/reflect_include_options.py
|
|
hindsight_client_api/models/reflect_llm_call.py
|
|
hindsight_client_api/models/reflect_mental_model.py
|
|
hindsight_client_api/models/reflect_request.py
|
|
hindsight_client_api/models/reflect_response.py
|
|
hindsight_client_api/models/reflect_tool_call.py
|
|
hindsight_client_api/models/reflect_trace.py
|
|
hindsight_client_api/models/retain_request.py
|
|
hindsight_client_api/models/retain_response.py
|
|
hindsight_client_api/models/source_facts_include_options.py
|
|
hindsight_client_api/models/tag_item.py
|
|
hindsight_client_api/models/timestamp.py
|
|
hindsight_client_api/models/token_usage.py
|
|
hindsight_client_api/models/tool_calls_include_options.py
|
|
hindsight_client_api/models/update_directive_request.py
|
|
hindsight_client_api/models/update_disposition_request.py
|
|
hindsight_client_api/models/update_mental_model_request.py
|
|
hindsight_client_api/models/update_webhook_request.py
|
|
hindsight_client_api/models/validation_error.py
|
|
hindsight_client_api/models/validation_error_loc_inner.py
|
|
hindsight_client_api/models/version_response.py
|
|
hindsight_client_api/models/webhook_delivery_list_response.py
|
|
hindsight_client_api/models/webhook_delivery_response.py
|
|
hindsight_client_api/models/webhook_http_config.py
|
|
hindsight_client_api/models/webhook_list_response.py
|
|
hindsight_client_api/models/webhook_response.py
|
|
hindsight_client_api/rest.py
|
|
hindsight_client_api_README.md
|