| 527 | } |
| 528 | |
| 529 | func toolListBundle(response ToolsResponseRecord) outputBundle { |
| 530 | return listBundle( |
| 531 | response, |
| 532 | response.Tools, |
| 533 | toolOperatorToolsValue, |
| 534 | []string{"TOOL ID", "BACKEND", "SOURCE", "STATUS", "CALLABLE", "REASONS"}, |
| 535 | "tools", |
| 536 | []string{ |
| 537 | toolOperatorToolIDKey, |
| 538 | toolOperatorBackendKey, |
| 539 | automationSourceKey, |
| 540 | automationStatusKey, |
| 541 | "callable", |
| 542 | toolOperatorReasonsKey, |
| 543 | }, |
| 544 | func(item ToolRecord) []string { |
| 545 | return []string{ |
| 546 | item.Descriptor.ToolID.String(), |
| 547 | string(item.Descriptor.Backend.Kind), |
| 548 | toolSourceSummary(item.Descriptor.Source), |
| 549 | toolAvailabilitySummary(item.Availability), |
| 550 | formatBool(item.Decision.Callable), |
| 551 | joinReasons(item.Availability.ReasonCodes, item.Decision.ReasonCodes), |
| 552 | } |
| 553 | }, |
| 554 | func(item ToolRecord) []string { |
| 555 | return []string{ |
| 556 | item.Descriptor.ToolID.String(), |
| 557 | string(item.Descriptor.Backend.Kind), |
| 558 | toolSourceSummary(item.Descriptor.Source), |
| 559 | toolAvailabilitySummary(item.Availability), |
| 560 | formatBool(item.Decision.Callable), |
| 561 | joinReasons(item.Availability.ReasonCodes, item.Decision.ReasonCodes), |
| 562 | } |
| 563 | }, |
| 564 | ) |
| 565 | } |
| 566 | |
| 567 | func toolInfoBundle(response *ToolResponseRecord) outputBundle { |
| 568 | tool := response.Tool |