52 Commits
Author SHA1 Message Date
Sanderhoff-alt e4e5f8b285 fix(embed): inherit unset LLM settings instead of overwriting them (#3253) (#3359)
HindsightEmbedded forwarded every LLM/daemon setting on every construction, using
placeholder defaults for the ones the caller never mentioned. The embed manager
merges the caller's config over the profile .env and copies any non-None
HINDSIGHT_* entry into the daemon environment, so a client built without
credentials overwrote a key inherited from the profile or the parent shell --
and _register_profile then persisted the placeholders back into the profile's
.env file, leaving a profile configured for anthropic recorded as groq on disk.

llm_provider, llm_api_key, llm_model, log_level and idle_timeout now default to
None and are omitted when not passed, so the daemon resolves them from the
profile .env, then the parent environment, then its own defaults. An explicit
empty string remains an override, which is how a local LLM service with no
authentication clears an inherited key.
2026-08-19 12:09:57 +02:00
Sanderhoff-alt b8947a24e9 fix(ci): authenticate Hermes compatibility clone (#3536) 2026-08-17 13:13:30 +02:00
Sanderhoff-alt e32e6f2468 docs: specify Claude Sonnet benchmark version (#3468) 2026-08-14 14:47:54 +02:00
Sanderhoff-alt 4afe43e63d refactor(kb): create page and mental model atomically (#3369)
Knowledge pages and their backing mental models share one lifecycle, but
they were committed in separate transactions. A page insert failure could
therefore leave an orphaned mental model.

Extract mental-model embedding generation and insertion into typed helpers.
Create the bank, mental model, and page through one connection and transaction,
so any page failure rolls back all related writes. Preserve the duplicate-page
contract by returning None only for uq_kp_folder_pagename.

Add PostgreSQL and Oracle regression coverage for rollback after a real mental
model insert, plus parent-validation and duplicate-name coverage.
2026-08-13 13:33:05 +02:00
Sanderhoff-alt 4e5b4ceecc fix(api): correct stale OpenAPI examples (#3436)
Keep bank configuration examples limited to fields that can actually be
overridden per bank, and replace the static LLM setting examples in the
endpoint descriptions.

Complete the operations and version response examples with their required
fields, and use the real refresh_mental_model operation type.

Regenerate the OpenAPI documentation, docs skill mirror, and generated client
descriptions.
2026-08-13 09:43:45 +02:00
Sanderhoff-alt 0c2e384287 fix(release): ship Rust CLI license notices (#3447)
Publish the Hindsight MIT license and generated third-party license notices
alongside the Rust CLI release assets. Generate the manifest from Cargo.lock
with cargo-about and preserve the complete dependency license text.

Run generation and verification in the Rust CLI PR test job so unsupported
license expressions fail before a release tag. Generate the platform-independent
manifest once in the Linux amd64 release job and fail if required assets are
missing before publishing.

Disable ClearlyDefined lookups to keep CI generation deterministic.

Fixes #3446
2026-08-13 09:39:32 +02:00
Sanderhoff-alt 82859af02b docs(reflect): clarify tag-scoped directive behavior (#3038)
Explain how tags, tags_match, tag_groups, and directive isolation
interact across REST, MCP, versioned docs, and agent skills.

Clarify the different defaults used by reflect and directive listing,
then regenerate OpenAPI and supported client artifacts.
2026-08-12 07:41:47 +02:00
Sanderhoff-alt 0e652006d1 fix(control-plane): surface direct request failures (#3333)
Show errors from document export, transfer import, and file uploads
that bypass the shared API error interceptor.

Format API errors safely so structured validation details remain
readable.
2026-08-10 14:41:56 +02:00
Sanderhoff-alt 362c719f1e fix(config): report deleted import banks as conflicts (#3035)
Raise a dedicated persistence conflict when a validated bank config
update can no longer find its bank row.

Map this race to HTTP 409 for template imports while preserving PATCH
404 behavior and 400 responses for invalid configuration. Add an
event-coordinated regression test for the deletion window.
2026-08-04 18:38:55 +02:00
Sanderhoff-alt 751deb47be fix(retain): sync metadata to unchanged memories (#3011)
Keep metadata and tags on unchanged memory units aligned with their
document during delta retain.

Cover metadata-only replace and append paths with regression tests.

Closes #3008
2026-08-04 18:33:16 +02:00
Sanderhoff-alt 79c9f4afeb fix(openclaw): default recall injection to user context (#3066)
Default recalled memories to user context so dynamic recall content no
longer invalidates the stable system prompt prefix on every turn.

Keep explicit prepend and append settings unchanged. Align the manifest,
docs, and tests with the cache-friendly default.

Closes #3061
2026-07-31 17:12:20 +02:00
Sanderhoff-alt bc604ab91b fix(packaging): bundle licenses in Python distributions (#3067)
Stage the canonical repository license in each isolated Python build
context so wheels and source distributions include the MIT text.

Declare SPDX license metadata and verify every release artifact before
publishing to prevent repository firewalls from quarantining packages.

Closes #3054
2026-07-30 16:55:15 +02:00
Sanderhoff-alt f61d383acf feat(file-parser): support custom OCR headers (#3065)
Allow MarkItDown OCR clients to receive operator-defined default
headers for proxy routing and request tracing.

Wire the JSON environment setting through parser construction, document
the option, and cover configured and unset behavior.
2026-07-30 16:42:44 +02:00
Sanderhoff-alt c5643fdf5c fix(reflect): apply exact empty scope to mental models (#3039)
Apply the exact tag filter even when the requested tag list is empty.
This keeps mental-model retrieval aligned with facts and observations.

Add a regression test that verifies the generated query selects only the
untagged global scope.
2026-07-29 15:56:59 +02:00
Sanderhoff-altandNicolò Boschi feac397324 chore(repo): remove unused code (#3007)
* chore(api): remove unused code

Remove confirmed unreferenced helpers from the API and engine.

Delete tests only where they cover superseded internal paths. Keep
active test helpers and public memory operations unchanged.

* chore(cli): remove unused code

Remove dead CLI configuration, client, and output helpers.

Drop the parser implementation and tests used only by the retired
output path.

* chore(control-plane): remove unused code

Remove unused ControlPlaneClient methods and unreachable directive
detail state from the think view.

* chore(dev): remove unused code

Remove unreferenced benchmark and repository maintenance helpers.

* chore(embed): remove unused code

Remove the unused daemon port lookup helper while preserving current
profile-based daemon discovery.

* chore(integrations): remove unused code

Remove unreferenced helpers across supported integrations.

Drop tests only for retired internal paths and retain active test and
lifecycle infrastructure.

* test(consolidation): port prompt regression tests to split builders

The dead-code cleanup removed build_batch_consolidation_prompt and its tests,
but those tests guarded behaviors that are still live in the current
build_consolidation_system_prompt / build_consolidation_input path:

- brace-safety of a mission / capacity note containing literal { } (a lone
  brace would raise KeyError in the internal str.format() and crash
  consolidation)
- output-language directive injection into the cached system prompt
- the built-in default mission when none is supplied

Re-add these as regression tests against the current builders instead of
dropping the coverage. Also fix a stale comment referencing the removed
utils.extract_facts module.

---------

Co-authored-by: Nicolò Boschi <[email protected]>
2026-07-29 11:18:30 +02:00
Sanderhoff-alt 20caf8aa5c refactor(retain): require explicit semantic link thresholds (#3004)
Require semantic-link thresholds to be passed explicitly to the
low-level ANN, within-batch, and batch-creation helpers.

Make the streaming final-ANN threshold keyword-only to prevent
positional argument mistakes, and rename the forwarding test to match
what it verifies.
2026-07-28 14:24:49 +02:00
Sanderhoff-altandNicolò Boschi 73b575c7a3 fix(graph): queue edited and restored memories for relinking (#2893)
* fix(graph): queue edited and restored memories for relinking

Graph maintenance rebuilds outgoing temporal and semantic links only for
units explicitly present in its queue. Edits and restores submitted the
worker without queuing the affected unit, so its outgoing links could
remain missing.

Queue edited units together with incoming-link victims in one sorted
insert to preserve the global lock order. Queue restored units after
their searchable fields have been rebuilt.

Cover outgoing-only restore and bidirectional edit cases, including a
single queue write for the edited unit and its victims.

Fixes #2889.

* test(graph): cover the outgoing-only relink case; tidy enqueue helper

The PR's tests only exercised mutually linked units, so the branch the bug
actually lived in — an edited/reverted unit with outgoing links but no
incoming ones, where the victim lookup is empty — was untested.

Tests:
- enqueue_relink_victims: include_affected_units with no victims (returns
  the unit itself), with victims (one combined sorted insert), and the
  default opt-out for delete callers.
- Curation: an outgoing-only edit queues itself, plus two end-to-end tests
  that let the inline SyncTaskBackend drain the queue and assert the
  temporal link is actually rebuilt after an edit and after a revert.

All five fail on the pre-fix engine.

Tidy:
- Rename deleted_unit_ids -> affected_unit_ids; with the new flag the
  helper also takes units that stay live, so the old name/doc misled at
  the edit call site. Same for the debug log wording.
- Spell out at both call sites why the edit combines self+victims in one
  insert, why the invalidating edit opts out, and that revert rebuilds
  only the reverted unit's outgoing links.

---------

Co-authored-by: Nicolò Boschi <[email protected]>
2026-07-24 17:58:44 +02:00
Sanderhoff-altandNicolò Boschi 0f47c7a8dc fix(auth): authorize bank writes before provisioning (#2646)
* fix(config): validate bank config updates before creating banks

Route external bank configuration writes through MemoryEngine so tenant
authentication and UPDATE_BANK_CONFIG authorization happen consistently.

Validate profile and configuration changes before creating a bank or
persisting either one. Rejected configuration updates through PUT,
PATCH, import, and MCP therefore leave no empty bank or partial profile
changes behind.

Keep memory-defense validation behavior unchanged, and cover the new
ordering and delegation paths with regression tests.

* fix(import): preflight template operations before creating banks

Preflight every template operation before creating a missing bank.
Reject duplicate mental models and directives before applying changes.

Reuse request-local authorization decisions while the import executes,
avoiding duplicate hook calls that may reserve quota or depend on time.
Precheck mental-model refresh availability so common failures do not
leave a newly created bank or a partially applied template behind.

Document that the authorization context creates the bank after all
checks pass.

* fix(mcp): create banks through public engine APIs

Delegate MCP bank creation to MemoryEngine's public profile and update
APIs instead of calling _ensure_bank_exists() directly.

Use get_bank_profile() for default creation and update_bank() when name
or mission fields are supplied. This keeps lifecycle validation and
authorization ordering inside the engine and avoids duplicate reads.

Add coverage for both public API paths and assert that MCP never invokes
the private creation helper.

* fix(config): fail loudly when persisting config for a missing bank

Bank creation moved out of ConfigResolver into MemoryEngine, but the
persist step still returned normally when the UPDATE matched zero rows.
A caller that skipped provisioning silently discarded its overrides
while reporting success — the failure mode #1940 originally fixed.

Raise instead, and translate the concurrent-delete case in update_bank's
update-only path into the same 404 its final profile read would produce.

* test(mcp): assert update_bank calls instead of a fixture's forwarding

The mock_memory fixture re-implemented _do_update_bank's routing by
forwarding config_updates to _config_resolver.update_bank_config, so the
existing assertions verified the fake rather than production code — they
would still pass if _do_update_bank stopped sending config entirely.

Assert on the update_bank mock, which is the call the tool now makes.

* test(api): cover the 404 mapping for a delete racing the config write

---------

Co-authored-by: Nicolò Boschi <[email protected]>
2026-07-24 16:35:03 +02:00
Sanderhoff-alt ada3329bb9 feat(config): make embedding thresholds configurable (#2875)
Expose graph seed, temporal semantic, and semantic-link similarity
thresholds through HindsightConfig while preserving existing defaults.

Wire the settings through retrieval, retain, streaming, and graph
maintenance paths. Add validation, environment examples, documentation,
and regression coverage.

Document how to calibrate all five embedding-dependent thresholds and
note that semantic-link changes do not rebuild existing graphs.
2026-07-24 15:13:57 +02:00
Sanderhoff-alt 17d0a0c068 fix(docs): regenerate documentation skill (#2870) 2026-07-21 15:52:05 +02:00
Sanderhoff-alt 91ee2537e2 fix(cli): sync regenerated OpenAPI operation changes (#2867)
* fix(cli): pass tag filters to list memories

OpenAPI added tags and tags_match to list_memories in #2848, but the
CLI wrapper still passed the previous positional arguments. Generated
Rust client builds then failed with E0061.

Pass None for both filters to preserve existing CLI behavior and match
the generated method signature.

* feat(cli): expose terminal operation deletion

OpenAPI added delete_operation in #2777 without exposing it through
the Rust CLI or accounting for it in the coverage manifest. The CLI
coverage check therefore rejected branches rebased onto that change.

Add operation delete with confirmation and --yes support. Pass the
request through the generated client and cover command parsing. This
counts the endpoint as implemented without a coverage exception.
2026-07-21 14:53:15 +02:00
Sanderhoff-alt dddd571a99 fix(ci): avoid rebuilding docs in verify-generated-files (#2739)
Run the existing build-docs job for every PR so the production docs
build remains an unconditional check.

Generate OpenAPI directly in verify-generated-files to avoid rebuilding
the Docusaurus site serially in that job.
2026-07-20 14:30:32 +02:00
Sanderhoff-alt 188f8fcb32 fix(engine): consolidate duplicated engine definitions (#2691)
Centralize causal taxonomy and transfer history table definitions.
Use shared canonical type in import; remove the unused seed.
2026-07-20 14:00:52 +02:00
Sanderhoff-alt d7059d2840 fix(recall): remove unused graph seed inputs (#2683)
Graph retrieval always selects its own bounded semantic seeds.

Remove the unused semantic_seeds and temporal_seeds inputs from
the graph retriever interface and link-expansion implementation.
The recall orchestrator no longer passes placeholder None values.

Document why graph seeds stay independent: the semantic and
temporal retrieval arms use different candidate limits and thresholds,
so reusing them would silently change graph recall behavior.

Add a regression assertion that the graph call contains no removed
seed inputs.
2026-07-20 13:59:59 +02:00
Sanderhoff-alt 0108cd7019 chore: remove stray local state files (#2472) 2026-07-20 10:41:58 +02:00
Sanderhoff-alt aad0af9756 feat(auth): add create bank validation hook (#2395)
Add a precise operation-validator hook for bank creation, with a
no-op default so deployments without custom validators keep existing
behavior.

Route lazy bank creation through the hook from retain, imports, MCP
create_bank, and the default get_bank_profile auto-create path. This
keeps create-bank authorization separate from bank-scoped write
validation, which often assumes the target bank already exists.

Add regression coverage for rejected creation, existing-bank skips,
HTTP create/import paths, async retain, profile auto-create, and MCP
create_bank.
2026-07-20 10:40:01 +02:00
Sanderhoff-alt bd49f6a7c7 fix(mcp): prevent get_bank from creating banks (#2393)
Treat the get_bank MCP tool as read-only by looking up bank profiles
without auto-creation in both single-bank and multi-bank modes.

Add regression coverage for missing banks so get_bank returns a
not-found error instead of creating the bank.
2026-07-20 10:38:34 +02:00
Sanderhoff-alt 4b52b10e2e fix(recall): preserve combined graph activation scores (#2679)
Link expansion ranks candidates by an additive entity, semantic,
and causal score, but returned the raw score from one signal as
activation. Cross-fact-type graph merging then re-ranked candidates
using that raw value.

Store the final additive score as activation and add a regression test
for cross-fact-type ordering.
2026-07-13 10:35:20 -04:00
Sanderhoff-alt 84b9aa56ce fix(engine): clarify causal link compatibility (#2685)
Clarify that retain creates caused_by only. Storage and recall keep reading
historical causal link types, and transfer import alone restores them.

Correct stale code comments and tests, and preserve legacy edge types and
endpoints during transfer without widening the retain write contract.
2026-07-13 10:07:26 -04:00
Sanderhoff-alt b9d16fe86f fix(recall): scope entity fanout cap by fact type (#2681)
Apply each entity fanout cap only after filtering candidates by fact type.
This prevents high-volume fact types from excluding valid target candidates.

Cover the PostgreSQL and Oracle CTE builders with a regression test.
2026-07-13 09:54:22 -04:00
Sanderhoff-alt 7bab4db28d fix(recall): decouple temporal seed threshold (#2595)
Keep recall min_scores.semantic scoped to the semantic retrieval arm.

Temporal retrieval uses embeddings only to choose time-window entry
points. Reusing the request-level semantic floor there made temporal
recall unexpectedly narrower.

Callers that only wanted to prune weak semantic matches could also
narrow temporal recall. That made the min_scores contract surprising
and inconsistent with graph seed selection.

Use the temporal entry-point default instead. Semantic and BM25 request
floors remain unchanged.
2026-07-09 10:28:20 -04:00
Sanderhoff-alt ae7099fd02 fix(opencode): install plugin SDK at runtime (#2574)
The OpenCode plugin imports @opencode-ai/plugin/tool from its
built dist entrypoint, so the package must be present in
OpenCode's isolated plugin cache. Keeping it only as a peer
dependency lets npm skip it during plugin installation, which can
make the plugin fail to load with ERR_MODULE_NOT_FOUND.

Move @opencode-ai/plugin into dependencies and remove the
peer-only declaration. Keep @vectorize-io/hindsight-client as a
runtime dependency, and sync package-lock.json so npm installs the
cache tree needed by OpenCode.

Verified with npm run build, npm pack --json, and a local opencode
plugin install from the generated tarball. The generated cache
contained both runtime dependencies and direct import of the
plugin entrypoint succeeded.
2026-07-07 13:49:47 -04:00
Sanderhoff-alt 5cc1482a72 fix(memory): return metadata from memory browse endpoints (#2583)
The list and get memory-unit paths selected tags and timing fields
but skipped the memory_units metadata column, so metadata retained
on facts was invisible outside recall.

Select and serialize metadata for live and invalidated memory units,
add a curation regression test for both paths, and update docs plus
OpenAPI examples.
2026-07-07 11:11:04 -04:00
Sanderhoff-alt a99a1ebf9b chore(docs): sync hindsight docs skill references (#2461)
Update generated hindsight-docs skill references with Requesty provider
entries that are already present in the source documentation.

This keeps the generated skill bundle in sync with the docs generator so
pre-commit no longer rewrites these files.
2026-06-30 10:18:32 +02:00
Sanderhoff-alt 12a6739fc9 refactor(extensions): centralize operation names (#2419)
Add PrecheckOperation, BankReadOperation, and BankWriteOperation
StrEnum types for operation validator hook contexts. Use them at
every precheck and validate_bank_read/write call site while
preserving string comparison compatibility for existing extensions.

Tests:
- uv run pytest tests/test_extensions.py -q
- ./scripts/hooks/lint.sh
2026-06-30 10:18:20 +02:00
Sanderhoff-alt d8ee10a78d chore(repo): remove playwright debug artifacts (#2460)
Remove accidentally committed Playwright MCP logs, page snapshots, and
root-level screenshot artifacts.

Ignore future Playwright MCP output so local browser debugging does not
show up as repository changes.
2026-06-30 10:18:05 +02:00
Sanderhoff-alt a7d1f26f98 fix(api): prevent PATCH bank from creating banks (#2391)
Treat PATCH /v1/default/banks/{bank_id} as update-only by using a
non-creating bank profile lookup and returning 404 when the bank is
missing.

Add a regression test proving the endpoint does not create a bank as a
side effect.
2026-06-25 12:31:11 +02:00
Sanderhoff-alt 0673131a80 fix(api): keep dry-run extract from creating banks (#2394)
Use the non-creating bank-profile lookup when dry-run extraction
resolves the optional narrator name. A preview endpoint promises no
persistence, so probing a missing bank must not insert a bank row.

Add a regression test that calls dry-run extraction against a missing
bank and verifies the bank still does not exist afterwards.
2026-06-25 12:30:13 +02:00
Sanderhoff-alt 6e02a0829f fix(hooks): keep uv lockfile frozen during lint (#2397)
Run the pre-commit uv sync and workspace uv run commands with
--frozen so linting uses the checked-in lockfile without rewriting it
during ordinary code changes.

This avoids local uv resolver freshness checks producing unrelated
uv.lock diffs while preserving explicit dependency update workflows.
2026-06-25 12:29:13 +02:00
Sanderhoff-alt 8e66c397a9 fix(memory-defense): correct displayed pattern count (#2369) 2026-06-23 15:03:20 +02:00
Sanderhoff-alt f4bac2d41d fix(mcp): restore custom tool instructions (#2288)
Restore HINDSIGHT_API_MCP_INSTRUCTIONS for HTTP MCP servers.
Append the extra guidance only to retain and recall tool
descriptions, matching the original local MCP behavior without
changing reflect or other management tools.
2026-06-18 10:40:58 +02:00
Sanderhoff-alt 39abf0ad3f fix(tests): wait for testcontainers port mappings (#2283) 2026-06-18 10:35:37 +02:00
Sanderhoff-alt 8426b0c359 fix(tests): isolate backsweep migration pg0 state (#2282) 2026-06-18 10:33:26 +02:00
Sanderhoff-alt 5ee53c512f feat(api): add optional MarkItDown OCR support (#2145)
MarkItDown advertises image extensions, but without OCR config it can
fail screenshots or scanned images with low-level no-content errors.

Add server-level MarkItDown OCR config that is off by default and
independent from HINDSIGHT_API_LLM_*. When OCR is enabled, the OCR API
key, base URL, and model are required explicitly.

Wire those settings into MarkItDown's llm_client support with a built-in
OCR prompt. Image uploads now fail fast with actionable errors when OCR
is disabled or required settings are missing.

Docs and front-end copy explain that image OCR depends on server config
and requires an OpenAI-compatible OCR/vision endpoint.

Closes #927
2026-06-17 12:07:58 +02:00
Sanderhoff-alt 60fea4c254 docs: fix stale documentation links (#2221)
Update integration and installation documentation URLs so they point
to the public Hindsight docs site instead of stale Cloud docs paths.
2026-06-16 16:18:29 +02:00
Sanderhoff-alt dff223f552 docs: update configuration guidance (#2228) 2026-06-16 15:55:41 +02:00
Sanderhoff-alt d0c54560ad feat(api): improve Chinese temporal query parsing (#2220)
Move explicit period extraction out of DateparserQueryAnalyzer. The analyzer
now delegates range parsing to temporal_periods, which keeps the public API and
non-Chinese rules while Chinese-specific rules and boundary handling live in
chinese_temporal_periods.

Handle simplified and traditional Chinese expressions for relative days,
weeks, months, years, weekends, half-year periods, Chinese month names,
quarters, and rolling past/future windows.

Separate precise point expressions from fuzzy range expressions so phrases such
as 两天前, 前两天, 几天前, and 一两周前 map to the intended constraint shape
instead of relying on dateparser fallback behavior.

Keep open future starts such as 明天起, 下周起, and 三天后开始 unconstrained
because the API only represents closed ranges.

Guard Chinese matching so non-CJK queries skip the Chinese regex path, while
Chinese substring checks avoid treating ordinary names and words as temporal
constraints.
2026-06-16 12:20:59 +02:00
Sanderhoff-alt 59d5319b84 feat(retain): make structured chunk size configurable (#2139)
Add retain_structured_chunk_size as an explicit retain chunking knob
for structured inputs. When unset, structured inputs follow the
effective retain_chunk_size instead of the hidden 1.5x overflow factor.

Thread the setting through retain extraction, append/prepend chunking,
bank config resolution, templates, MCP docs, maintained clients,
generated OpenAPI artifacts, the control-plane retain strategy UI, and
the Rust CLI set-config command.

Validate retain_chunk_size and retain_structured_chunk_size as positive
integers while allowing either value to be smaller. Keep the existing
retain_max_completion_tokens check scoped to retain_chunk_size.

Preserve upstream validation details for client errors through the
control-plane proxy so UI alerts and toasts can show concrete
configuration errors without exposing server-side failure details.

Update chunking, config, hierarchical config, template, MCP, client
payload, control-plane serialization, SDK-response, API-client, and
retain UI validation tests for the new behavior.
2026-06-15 15:51:51 +02:00
Sanderhoff-alt c96106cc01 chore: remove dead code and stale config (#2135)
Remove unreferenced backend helpers, stale UI/docs components, and
unused imports across the API, control plane, clients, and integrations.

Drop obsolete consolidated-observation helpers and unused scoring code,
clean orphaned React/docs components, and remove stale Radix dependencies.

Align release scripts, Helm docs, lockfiles, generated clients, and
current API examples with the package and endpoint surface still in use.
2026-06-11 17:12:03 +02:00
Sanderhoff-alt 7738021155 fix(api): honor explicit daemon host and port (#1821)
Daemon mode previously inferred whether --host or --port was supplied by
comparing parsed values with the loaded config. If a CLI value matched an
env-derived default, such as HINDSIGHT_API_PORT=9555 with --port 9555,
the daemon treated the port as implicit and fell back to
DEFAULT_DAEMON_PORT.

Track explicit host/port through argparse itself using SUPPRESS defaults,
so argparse-accepted long-option abbreviations such as --po and --ho
follow the same path. Return a named dataclass from the resolver and cover
the daemon parsing edge cases in tests.

Fixes #1786.
2026-05-28 17:45:30 +02:00
Sanderhoff-alt 93232213c2 chore: regenerate docs-skill references after v0.7.1 (#1822)
Output of ./scripts/generate-docs-skill.sh - picks up the API
version bump (0.7.0 -> 0.7.1) in openapi.json. CI's
verify-generated-files gate flags this as out-of-sync on every new
branch off main; this commit clears the gate without affecting API
behaviour.

Also folds in the ./scripts/hooks/lint.sh formatter output for the
priority parser so the lint hook stays clean.
2026-05-28 16:32:49 +02:00
Sanderhoff-alt 2de19e578b fix(api): anchor recall recency to query timestamp (#1788)
Use recall question_date/query_timestamp as the reference time for combined
scoring instead of always using server utcnow(). This keeps historical replay
and offline evaluations from penalizing memories that were recent at query
time.

Normalize naive query timestamps to UTC before scoring, update
API/client/OpenAPI/docs/MCP descriptions, and add recall-level coverage proving
combined scoring receives the query-time anchor.
2026-05-28 11:15:30 +02:00