diff --git a/hooks.lock b/hooks.lock index e70b424..8c80abe 100644 --- a/hooks.lock +++ b/hooks.lock @@ -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 diff --git a/hooks/lib/write.py b/hooks/lib/write.py index 2693c1b..4098006 100644 --- a/hooks/lib/write.py +++ b/hooks/lib/write.py @@ -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