(ctx context.Context, state *AgentState, out chan<- StreamEvent)
| 437 | } |
| 438 | e.skillRecoveryReady[agentScope] = true |
| 439 | } |
| 440 | |
| 441 | func (e *CoreExecutionEngine) ResolvePermission(decision string, toolName string) { |
| 442 | e.mu.Lock() |
| 443 | ch := e.permissionFuture |
| 444 | e.mu.Unlock() |
| 445 | if ch == nil { |
| 446 | return |
| 447 | } |
| 448 | if decision == "" { |
| 449 | decision = PermissionDeny |
| 450 | } |
| 451 | select { |
| 452 | case ch <- permissionDecision{decision: decision, toolName: toolName}: |
| 453 | default: |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | func (e *CoreExecutionEngine) ResolveSkillPermission(granted bool) { |
| 458 | e.mu.Lock() |
| 459 | ch := e.skillPermissionCh |
| 460 | e.mu.Unlock() |
| 461 | if ch == nil { |
| 462 | return |
| 463 | } |
| 464 | select { |
| 465 | case ch <- granted: |
| 466 | default: |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | func (e *CoreExecutionEngine) SkillNames(cwd string) []string { |
| 471 | if e == nil || e.skillRegistry == nil { |
| 472 | return nil |
| 473 | } |
| 474 | if strings.TrimSpace(cwd) == "" { |
| 475 | cwd = e.Config.CWD |
| 476 | } |
| 477 | visible := e.skillRegistry.ListVisible(cwd) |
| 478 | names := make([]string, 0, len(visible)) |
| 479 | for _, skill := range visible { |
| 480 | names = append(names, skill.CanonicalName) |
| 481 | } |
| 482 | sort.Strings(names) |
| 483 | return names |
| 484 | } |
| 485 | |
| 486 | func (e *CoreExecutionEngine) ResolveMCPTrust(granted bool) { |
| 487 | e.mu.Lock() |
| 488 | ch := e.mcpTrustCh |
| 489 | e.mu.Unlock() |
| 490 | if ch == nil { |
| 491 | return |
| 492 | } |
| 493 | select { |
| 494 | case ch <- granted: |
| 495 | default: |
| 496 | } |
no test coverage detected