The agent runtime may emit tool file URLs in three shapes: a
markdown link [text](url), a backticked URL `url`, or a bare URL.
The current re_sign_file_url_answer only matches the markdown form, so
bare and backticked tool file URLs keep the long-lived INTERNAL_FILES_URL
host and 5xx at serve time. The re_sign is only meaningful at the
URL-form branch, so this is purely a regex widening.
Split the common /files/.../timestamp=&nonce=&sign= core into a named
subpattern, then run it three times in the answer string:
- markdown link: [text](url)
- backticked URL: `url`
- bare URL
The rest of the function (URL classification into tools/ vs upload vs
image-preview, sign + rewire) is unchanged.
Refs #40788