refactor: extract CLI scaffold templates to .tpl files, include handle in 401 responses
Move inline template strings from cli.ts into separate .tpl files under
src/templates/ for readability and maintainability. Update xrpc template
with $hatk import and typed query results. Include viewer handle in
ScopeMissing and proxy error responses so the generated client can
preserve identity across re-authentication redirects.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>