forked from HAL9000/cleveragents-core
c47e6445d0
Add ActorCompiler module that translates GRAPH-type ActorConfigSchema definitions into LangGraph NodeConfig/Edge structures with LSP binding metadata. Includes subgraph resolution with cross-actor cycle detection, entry/exit validation, and CompilationMetadata for diagnostics. New files: - src/cleveragents/actor/compiler.py: Core compiler with compile_actor() - features/actor_compiler.feature: 13 Behave scenarios - features/steps/actor_compiler_steps.py: Step definitions - robot/actor_compiler.robot: 4 Robot smoke tests - benchmarks/actor_compiler_bench.py: ASV performance benchmarks - docs/reference/actor_compiler.md: Compilation pipeline reference Modified: - src/cleveragents/actor/__init__.py: Export compiler types - vulture_whitelist.py: Whitelist new public API ISSUES CLOSED: #158
69 lines
3.0 KiB
Plaintext
69 lines
3.0 KiB
Plaintext
*** Settings ***
|
|
Documentation Agent Skills discovery integration tests
|
|
Library OperatingSystem
|
|
Library Collections
|
|
Library helper_skill_discovery.py
|
|
Variables ${CURDIR}/common_vars.py
|
|
|
|
*** Test Cases ***
|
|
|
|
Parse Single Agent Skills Path
|
|
[Documentation] Parse a single comma-separated path string
|
|
${paths}= Parse Agent Skills Paths /opt/skills
|
|
Length Should Be ${paths} 1
|
|
|
|
Parse Multiple Agent Skills Paths
|
|
[Documentation] Parse multiple comma-separated paths
|
|
${paths}= Parse Agent Skills Paths /opt/skills,/home/user/skills
|
|
Length Should Be ${paths} 2
|
|
|
|
Parse Empty Agent Skills Paths
|
|
[Documentation] Empty string returns no paths
|
|
${paths}= Parse Agent Skills Paths ${EMPTY}
|
|
Length Should Be ${paths} 0
|
|
|
|
Discover Agent Skills From Directory
|
|
[Documentation] Scan a temp directory with SKILL.md folders
|
|
${tmpdir}= Create Agent Skills Directory 2
|
|
${discovered}= Scan Agent Skills Directory ${tmpdir}
|
|
Length Should Be ${discovered} 2
|
|
Cleanup Temp Directory ${tmpdir}
|
|
|
|
Discover Agent Skills Skips Folders Without SKILL MD
|
|
[Documentation] Directories without SKILL.md are skipped
|
|
${tmpdir}= Create Mixed Directory
|
|
${discovered}= Scan Agent Skills Directory ${tmpdir}
|
|
Length Should Be ${discovered} 1
|
|
Cleanup Temp Directory ${tmpdir}
|
|
|
|
Build ToolSpec From Discovered Skill
|
|
[Documentation] Build a ToolSpec with agent_skills source metadata
|
|
${spec}= Build Agent Skill ToolSpec my-tool /opt/skills/my-tool
|
|
Should Be Equal ${spec.name} agent_skills/my-tool
|
|
Should Be Equal ${spec.source} agent_skills
|
|
Dictionary Should Contain Key ${spec.source_metadata} path
|
|
|
|
Register Discovered Skills Without Conflicts
|
|
[Documentation] Register skills in an empty ToolRegistry
|
|
${result}= Register Agent Skills In Fresh Registry 3
|
|
Should Be Equal As Integers ${result}[registered_count] 3
|
|
Should Be Equal As Integers ${result}[conflict_count] 0
|
|
|
|
Register Discovered Skills With Conflict Skip
|
|
[Documentation] Name collisions are skipped with skip strategy
|
|
${result}= Register Agent Skills With Collision skip
|
|
Should Be Equal As Integers ${result}[registered_count] 0
|
|
Should Be Equal As Integers ${result}[conflict_count] 1
|
|
|
|
Register Discovered Skills With Conflict Replace
|
|
[Documentation] Name collisions are replaced with replace strategy
|
|
${result}= Register Agent Skills With Collision replace
|
|
Should Be Equal As Integers ${result}[registered_count] 1
|
|
Should Be Equal As Integers ${result}[conflict_count] 1
|
|
|
|
Config Key Registered
|
|
[Documentation] skills.agent_skills_paths config key exists
|
|
${entry}= Get Config Entry skills.agent_skills_paths
|
|
Should Not Be Equal ${entry} ${None}
|
|
Should Be Equal ${entry.env_var} CLEVERAGENTS_SKILLS_AGENT_SKILLS_PATHS
|