MCPcopy
hub / github.com/apache/caldera / capabilities

Method capabilities

app/objects/c_agent.py:159–170  ·  view source on GitHub ↗

Get abilities that the agent is capable of running :param abilities: List of abilities to check agent capability :type abilities: List[Ability] :return: List of abilities the agents is capable of running :rtype: List[Ability]

(self, abilities)

Source from the content-addressed store, hash-verified

157 return self.jitter('%d/%d' % (self.sleep_min, self.sleep_max))
158
159 async def capabilities(self, abilities):
160 """Get abilities that the agent is capable of running
161 :param abilities: List of abilities to check agent capability
162 :type abilities: List[Ability]
163 :return: List of abilities the agents is capable of running
164 :rtype: List[Ability]
165 """
166 capabilities = []
167 for ability in abilities:
168 if self.privileged_to_run(ability) and ability.find_executors(self.executors, self.platform):
169 capabilities.append(ability)
170 return capabilities
171
172 async def get_preferred_executor(self, ability):
173 """Get preferred executor for ability

Callers 3

taskMethod · 0.95
find_abilitiesMethod · 0.80
_generate_new_linksMethod · 0.80

Calls 2

privileged_to_runMethod · 0.95
find_executorsMethod · 0.80

Tested by

no test coverage detected