fleet-memory/hindsight-docs
Nicolò Boschi f9a8a8e01e
fix: resolve based_on schema/serialization issues in reflect API (#348)
* fix: add default values to OpenAPI schema for default_factory fields

This commit fixes the OpenAPI schema to include default values for fields
using default_factory, which improves schema accuracy and client generation.

Changes:
1. Added FieldWithDefault() helper to inject default values into OpenAPI schema
2. Updated 14 fields using default_factory to include defaults in schema:
   - ReflectBasedOn.{memories, mental_models, directives}
   - ReflectTrace.{tool_calls, llm_calls}
   - All tags fields
   - All trigger fields
   - All include fields

3. Regenerated OpenAPI spec with proper defaults

4. Added tests to verify API returns correct format with empty banks

Note: This fixes the schema but doesn't change the v0.3.0 -> v0.4.0 breaking
change where based_on went from list to object. Clients should handle both
formats for backward compatibility.

* fix: remove client imports from API test

The test was failing in CI because it imported the client library
which isn't installed in the API test environment.

Changed to test only API JSON response format, not client parsing.
This is more appropriate for an API test anyway.

* test: add client tests for ReflectResponse parsing

Added comprehensive tests in hindsight-clients/python/tests to verify:
- v0.4.0+ format with empty based_on object
- v0.4.0+ format with null based_on
- v0.4.0+ format with populated facts
- v0.3.0 format (list) correctly fails validation
- Missing based_on field handling

These tests document the v0.3.0 -> v0.4.0 breaking change where
based_on changed from list to object.
2026-02-12 11:26:12 +01:00
..
blog Copy page button on docs 2026-02-11 19:21:24 -07:00
docs feat: add reverse proxy support (#346) 2026-02-12 10:09:53 +01:00
examples doc: add blog (#201) 2026-01-28 15:42:14 +01:00
src Copy page button on docs 2026-02-11 19:21:24 -07:00
static fix: resolve based_on schema/serialization issues in reflect API (#348) 2026-02-12 11:26:12 +01:00
versioned_docs Replace waitlist links with direct Hindsight Cloud signup URL (#349) 2026-02-11 20:51:32 +01:00
versioned_sidebars docs: add AI SDK integration documentation (#304) 2026-02-05 17:05:18 +01:00
.gitignore rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
docusaurus.config.ts Replace waitlist links with direct Hindsight Cloud signup URL (#349) 2026-02-11 20:51:32 +01:00
package.json doc: hide next version (#226) 2026-01-29 08:46:21 +01:00
README.md rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
sidebars.ts docs: add AI SDK integration documentation (#304) 2026-02-05 17:05:18 +01:00
tsconfig.json rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
versions.json doc: release notes for 0.4.0 (#217) 2026-01-28 16:54:05 +01:00

Website

This website is built using Docusaurus, a modern static website generator.

Installation

npm install

Local Development

npm start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

USE_SSH=true npm run deploy

Not using SSH:

GIT_USER=<Your GitHub username> npm run deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.