File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13987,13 +13987,27 @@ async def _send_fed():
1398713987 return
1398813988 # Attach validated token fields to task for audit
1398913989 log.info(f"🎫 capability_token validated: jti={raw_cap_token.get('jti')} skill={skill_id_for_tier}")
13990+ # ── v3.19: skill_id routing — validate skill exists in AgentCard ──────────
13991+ if skill_id_for_tier:
13992+ _skill_valid, _skill_err = _validate_skill_id(skill_id_for_tier, peer_id=caller_peer_id)
13993+ if not _skill_valid:
13994+ self._json({
13995+ "ok": False,
13996+ "error_code": ERR_SKILL_NOT_FOUND,
13997+ "error": _skill_err,
13998+ "skill_id": skill_id_for_tier,
13999+ "peer_id": caller_peer_id,
14000+ }, 400)
14001+ return
14002+
1399014003 # v2.51: T3 human_confirmation_required gate
1399114004 t3_confirm = _needs_human_confirmation(skill_id_for_tier)
1399214005 task = _create_task(payload,
1399314006 message_id=body.get("message_id"),
1399414007 task_id=body.get("task_id"), # BUG-006 fix: pass client task_id
1399514008 context_id=body.get("context_id"), # v1.7: propagate context_id to SSE events
13996- initial_state=TASK_CONFIRMATION_PENDING if t3_confirm else None)
14009+ initial_state=TASK_CONFIRMATION_PENDING if t3_confirm else None,
14010+ skill_id=skill_id_for_tier) # v3.19: skill_id routing
1399714011 # v2.52: audit skill_id + peer_id at task creation
1399814012 if skill_id_for_tier:
1399914013 _audit_card_skills = (_status.get("agent_card") or {}).get("skills", [])
You can’t perform that action at this time.
0 commit comments