Commit graph

25 commits

Author SHA1 Message Date
xzq.xu
f89ea89ffb fix: use resolved tool_obj for fallback tool execution
When the LLM returns a short tool name that doesn't match the deduped
key in tool_map, the fallback scan correctly resolves tool_obj via
schema.name. However the execution branch still checked
`tool_name not in tool_map` and passed `tool_map[tool_name]`, so
fallback-resolved tools were never executed.

Change the condition to check `tool_obj is None` and pass `tool_obj`
directly to _execute_tool_call.

Closes #15

Made-with: Cursor
2026-04-03 23:10:28 +08:00
xzq.xu
6f581f6de4 fix: add missing Logger.set_level() method
__main__.py calls Logger.set_level(args.log_level) when --log-level
is passed, but the method did not exist on Logger, causing an
AttributeError. Add set_level(level: str) that resolves the name
to a logging constant and reconfigures via configure(force=True).

Closes #13

Made-with: Cursor
2026-04-03 23:10:28 +08:00
xzq.xu
171c1b76f8 fix: replace ErrorCode enum calls with GroundingError raises
ErrorCode is a str Enum whose members are not callable. Calling
`raise ErrorCode.SESSION_NOT_FOUND(name)` produces a TypeError
instead of the intended session-not-found error. Replace all 5
occurrences with `raise GroundingError(..., code=ErrorCode.SESSION_NOT_FOUND)`.

Closes #11

Made-with: Cursor
2026-04-03 23:10:28 +08:00
spidercatfly
e1a8524475 feat: migrate cloud search to server-side embedding endpoint 2026-04-02 23:17:44 +08:00
Dennis-yxchen
2fb8024ff6 fix: pass max_iterations in no-skill path and unique workflow IDs
- Forward resolved max_iterations to grounding agent in no-skill execution path
- Use hash-based workflow ID to prevent collision across roots and separator ambiguity

Co-authored-by: wul48527-code <wul48527-code@users.noreply.github.com>
2026-03-31 19:08:56 +08:00
Dennis-yxchen
028c5b01f9 fix: use hash-based workflow ID to prevent separator collisions
The previous __-joined scheme was not injective: a directory named
a__b and a nested path a/b both mapped to the same ID. Use a sha256
hash suffix of the resolved path instead, which is collision-free
and keeps the dir name as a human-readable prefix.

Added regression test for separator collision case.
2026-03-31 17:38:39 +08:00
Dennis-yxchen
e48e22afc8 fix: use unique workflow ID to prevent collision across roots
workflow_dir.name was used as the discovery key and API ID, so two
different WORKFLOW_ROOTS containing a leaf directory with the same
name would silently drop one. Use root name + relative path joined
with __ as a stable unique ID instead.

Co-authored-by: wul48527-code <wul48527-code@users.noreply.github.com>
2026-03-31 17:18:38 +08:00
xlrrrr
29a3869d49 fix: improve MiniMax compatibility 2026-03-31 17:18:13 +08:00
Dennis-yxchen
64a3076058 fix: pass max_iterations to grounding agent in no-skill execution path
Without this, the no-skill path ignores the resolved max_iterations
and uses whatever default the agent has, instead of the configured
grounding_max_iterations value.

Co-authored-by: wul48527-code <wul48527-code@users.noreply.github.com>
2026-03-31 17:03:00 +08:00
Dennis-yxchen
f845c5f7fb fix(security): harden zip extraction and import_skill against path traversal
- Add resolve() + is_relative_to() check in _extract_zip() to block
  nested traversal entries like nested/../../escape.txt
- Sanitize server-provided skill name in import_skill() to prevent
  directory escape via malicious record metadata
- Add 6 regression tests covering both attack vectors

Closes #17

Co-authored-by: LeftX <xzq-xu@users.noreply.github.com>
2026-03-31 16:23:56 +08:00
xlrrrr
63b01cfcef fix: CLI entry point now respects OPENSPACE_MODEL and OPENSPACE_LLM_* env vars 2026-03-31 15:36:13 +08:00
who96
fb02862d44 Refresh local registry for local skill search 2026-03-31 15:20:23 +08:00
who96
f4451aa0ac mcp: keep local skill search lightweight 2026-03-31 15:20:23 +08:00
Dennis-yxchen
aa16419e46 docs: update register_skill_dir docstring to reflect idempotent return 2026-03-31 14:58:01 +08:00
d 🔹
c8fb895feb fix: register_skill_dir returns existing SkillMeta for already-registered skills
Fixes #29. When a skill is already registered, register_skill_dir()
returned None, which caused fix_skill() to incorrectly report a failure.

Now returns the existing SkillMeta instead of None when the skill_id
is already present in the registry, making register_skill_dir() truly
idempotent as its callers (fix_skill, _auto_register_skill_dirs) expect.
2026-03-28 19:06:42 +00:00
xlrrrr
67125c378d docs: update openclaw setup instructions in host_skills README 2026-03-28 10:53:53 +08:00
xlrrrr
978e8fbc92 docs: update openclaw setup instructions in host_skills README 2026-03-28 10:35:03 +08:00
Dennis-yxchen
800aa6b074
Merge pull request #10 from warren618/fix/evolver-confirmation-parsing
fix(evolver): use word-boundary matching in _parse_confirmation to prevent false positives
2026-03-27 21:37:08 +08:00
warren618
1257f4cfee fix(evolver): use stem-style matching for confirm/reject/skip keywords
Per reviewer feedback: keep strict \byes\b / \bno\b word boundaries to
prevent false positives, but widen confirm/reject/skip to stem-style
\bconfirm\w*\b etc. so common LLM variants like "confirmed", "rejected",
"skipping" still parse correctly instead of falling through to the
default False path.
2026-03-27 13:34:20 +08:00
xlr
e0ce168904 fix: prevent stdio deadlock on Windows 2026-03-27 13:08:32 +08:00
warren618
9333eaed42 fix(evolver): use word-boundary matching in _parse_confirmation to prevent false positives 2026-03-26 12:06:11 +08:00
xlrrrr
38b51c8605 feat: re-scan skill dirs on each call 2026-03-26 11:21:48 +08:00
xlrrrr
dd8740e37a feat: re-scan skill dirs on each call 2026-03-26 11:14:54 +08:00
xlrrrr
4aade50316 fix: rename platform package to platforms 2026-03-26 00:09:50 +08:00
spidercatfly
6ff4861f88 initial commit 2026-03-24 16:03:22 +08:00