MCPcopy Create free account
hub / github.com/modelscope/ms-agent / load_skill_resources

Method load_skill_resources

ms_agent/skill/auto_skills.py:240–259  ·  view source on GitHub ↗

Phase 2: Load resources based on execution plan. Args: context: SkillContext with plan from Phase 1. Returns: SkillContext with loaded resources.

(self, context: SkillContext)

Source from the content-addressed store, hash-verified

238 return context
239
240 def load_skill_resources(self, context: SkillContext) -> SkillContext:
241 """
242 Phase 2: Load resources based on execution plan.
243
244 Args:
245 context: SkillContext with plan from Phase 1.
246
247 Returns:
248 SkillContext with loaded resources.
249 """
250 if not context.plan or not context.plan.can_handle:
251 logger.warning('No valid plan, skipping resource loading')
252 return context
253
254 context.load_from_plan()
255 logger.info(
256 f'Loaded resources: scripts={len(context.scripts)}, '
257 f'refs={len(context.references)}, res={len(context.resources)}')
258
259 return context
260
261 def generate_execution_commands(
262 self, context: SkillContext) -> List[Dict[str, Any]]:

Callers

nothing calls this directly

Calls 1

load_from_planMethod · 0.80

Tested by

no test coverage detected