maybe_extract_skill() sliced the LLM response from the first '{' to the
last '}'. When a model emits a stray brace in prose before the real
object (e.g. "uses {placeholder} then {...}"), the slice starts at the
prose brace, json.loads fails, and a valid skill is silently dropped.
Factor parsing into _extract_json_object(), which tries the whole
(de-fenced) string first and then each '{' start position, returning the
first candidate that parses to a JSON object.
Adds tests/test_skill_extractor_json.py.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| memory.py | ||
| memory_extractor.py | ||
| memory_vector.py | ||
| service.py | ||
| skill_extractor.py | ||
| skill_format.py | ||
| skill_importer.py | ||
| skills.py | ||