fleet-memory/hindsight-docs
Nicolò Boschi 7e339e1677
feat: ai sdk integration (#299)
* feat: ai sdk integration

* more fixes

* fix(security): mental model refresh tag-based security

- Mental model refresh now passes tags with all_strict matching
- Consolidation only triggers refresh for mental models with matching tags
- Consolidation filters related observations by tags (all_strict)
- Added tests to verify tag-based security boundaries
- Updated OpenAPI spec to include tags and text_preview in list_documents
- Added tags column to documents UI table

* chore: regenerate OpenAPI spec after rebase

* fix: improve consolidation prompt for contradiction handling and mental model refresh security

- Enhanced consolidation prompt to be more explicit about capturing temporal changes in contradictions
- Fixed mental model refresh security: tagged memories now only trigger refresh of mental models with matching tags
- Added stricter tag filtering to prevent cross-scope mental model refreshes

Fixes test_consolidation_merges_contradictions by improving LLM instructions to use temporal markers like "used to X, now Y" when merging contradictory facts.

Note: test_refresh_with_tags_only_accesses_same_tagged_models still needs investigation - REFLECT operation may need additional tag filtering.

* fix: mental model refresh security - proper tag filtering in search

Fixed tool_search_mental_models to properly handle all_strict tag matching mode by using the centralized build_tags_where_clause function. Previously, the function only handled "all" vs "any" modes and always included untagged mental models when using non-"all" modes.

This ensures that when a tagged mental model is refreshed with all_strict matching, it cannot access untagged mental models, preventing cross-scope information leakage.

Fixes test_refresh_with_tags_only_accesses_same_tagged_models.

Note: test_sensory_dimension_preservation is failing but this is a pre-existing issue on main branch - the LLM model (gpt-oss-20b) is not extracting facts from sensory text. Not related to security changes.

* chore: apply formatting from pre-commit hook

* fix: allow untagged mental models to be refreshed by any consolidation

Untagged mental models are considered "global" and should be refreshed
by any consolidation, regardless of whether tagged or untagged memories
were consolidated. This maintains security boundaries while allowing
global mental models to stay fresh.

When tagged memories are consolidated:
- Refresh mental models with matching tags (security boundary)
- Also refresh untagged mental models (they're global)
- DO NOT refresh mental models with different tags

When untagged memories are consolidated:
- Only refresh untagged mental models
- DO NOT refresh tagged mental models (security boundary)

Fixes test_consolidation_only_refreshes_matching_tagged_models.
2026-02-04 20:25:59 +01:00
..
blog doc: release notes for 0.4.0 (#217) 2026-01-28 16:54:05 +01:00
docs feat: HindsightEmbedded python SDK (#293) 2026-02-04 14:41:19 +01:00
examples doc: add blog (#201) 2026-01-28 15:42:14 +01:00
src doc: changelog for 0.4.8 (#283) 2026-02-03 14:04:55 +01:00
static feat: ai sdk integration (#299) 2026-02-04 20:25:59 +01:00
versioned_docs doc: update cookbook (#284) 2026-02-03 15:34:41 +01:00
versioned_sidebars doc: update cookbook (#284) 2026-02-03 15:34:41 +01:00
.gitignore rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
docusaurus.config.ts doc: release notes for 0.4.0 (#217) 2026-01-28 16:54:05 +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 doc: update cookbook (#284) 2026-02-03 15:34:41 +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.