(input, options = {})
| 400 | } |
| 401 | return { |
| 402 | canRunNow: true, |
| 403 | boundary: route.startsWith('/') ? 'agent-route' : 'local-command', |
| 404 | risk: route === 'direct-edit' ? 'low' : 'medium', |
| 405 | approval: null, |
| 406 | }; |
| 407 | } |
| 408 | |
| 409 | function skillNameForRoute(route) { |
| 410 | const match = String(route || '').trim().match(/^\/([a-z][a-z0-9-]*)/i); |
| 411 | return match ? match[1].toLowerCase() : null; |
| 412 | } |
| 413 | |
| 414 | function activationBoundary(projectRoot, selected, options = {}) { |
| 415 | const skill = skillNameForRoute(selected); |
| 416 | if (!skill) return { skill: null, context: null, decision: null }; |
| 417 | const context = options.activationContext || config.loadActivationContext(projectRoot, { |
| 418 | runtime: options.runtime, |
| 419 | runtimeId: options.runtimeId, |
no test coverage detected