(response ToolApprovalRecord)
| 615 | } |
| 616 | |
| 617 | func toolApprovalBundle(response ToolApprovalRecord) outputBundle { |
| 618 | return outputBundle{ |
| 619 | jsonValue: struct { |
| 620 | Approval ToolApprovalRecord `json:"approval"` |
| 621 | }{Approval: response}, |
| 622 | human: func() (string, error) { |
| 623 | return renderHumanSection("Tool Approval", []keyValue{ |
| 624 | {Label: toolOperatorToolIDValue, Value: response.ToolID.String()}, |
| 625 | {Label: "Approval Token", Value: stringOrDash(response.ApprovalToken)}, |
| 626 | {Label: "Input Digest", Value: stringOrDash(response.InputDigest)}, |
| 627 | {Label: toolOperatorExpiresValue, Value: stringOrDash(formatTime(response.ExpiresAt))}, |
| 628 | }), nil |
| 629 | }, |
| 630 | toon: func() (string, error) { |
| 631 | return renderToonObject( |
| 632 | "tool_approval", |
| 633 | []string{toolOperatorToolIDKey, "approval_token", "input_digest", toolOperatorExpiresAtKey}, |
| 634 | []string{ |
| 635 | response.ToolID.String(), |
| 636 | response.ApprovalToken, |
| 637 | response.InputDigest, |
| 638 | formatTime(response.ExpiresAt), |
| 639 | }, |
| 640 | ), nil |
| 641 | }, |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | func toolInvokeBundle(response ToolInvokeResponseRecord) outputBundle { |
| 646 | return outputBundle{ |
no test coverage detected