Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hooks.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
# no hooks.json here and nothing generates one; tools/generate.py refuses this host by
# name for exactly that reason.
repo=memvara/memvara
sha=026be5cfd815419fa4c7eda2cb0ada109ea22cab
sha=f7e32effb4c20b68588a56e7b2a59f1b59b26602
path=plugin/hooks
host=opencode
10 changes: 6 additions & 4 deletions hooks/lib/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,12 @@ def remember_kwargs(memory_type: "str | None", turn: str, hosted: bool,
"""
kwargs: dict = {"confidence": 0.7}
if memory_type:
# The hosted tool takes the type's name. The local library takes its enum, and a
# plain string fails there with `AttributeError: 'str' object has no attribute
# 'value'` when the claim is stored. Every fact this hook wrote to a local store
# failed that way, and capture.log recorded each one under `failed=`.
# The hosted tool takes the type's name. The local library takes its enum, and
# before #270 a plain string failed there with `AttributeError: 'str' object has
# no attribute 'value'` when the claim was stored, so every fact this hook wrote
# to a local store failed and capture.log recorded each one under `failed=`. The
# library converts a name itself now; converting here as well keeps the hook
# working with an installed library older than that fix.
kwargs["memory_type"] = memory_type if hosted else _memory_type(memory_type)
# The label the host writes under. It is stored on every claim and rendered back
# by `memory_why`, so it is a fact about recorded history rather than a string to
Expand Down
Loading