* fix(microsoft-foundry): bound az login device-code subprocess
Add a 5-minute timeout to the az login spawn so a stalled Azure CLI
does not block the caller indefinitely. The timeout kills the child
process and rejects the promise with a descriptive message.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(microsoft-foundry): reject login timeout immediately
* refactor(microsoft-foundry): use shared process timeout
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(microsoft-foundry): decode spawn pipes statefully with setEncoding('utf8')
Co-Authored-By: SunnyShu0925 <sunny.shu0925@gmail.com>
child_process spawn stdout/stderr .on('data') handlers in
azLoginDeviceCodeWithOptions received raw Buffer chunks. When a
multi-byte UTF-8 code point straddled a chunk boundary, String(chunk)
produced U+FFFD (replacement characters) for the split partial
sequences.
Fix the same way as PR #108518 (provider-local-service) and #109220
(voice-call ngrok): call setEncoding('utf8') on the pipe streams before
attaching data listeners so Node's stream decoder reassembles full code
points across chunk boundaries.
Test: PassThrough stream that receives a 4-byte smiley (U+1F60A) split
mid-sequence across two Buffer writes. With setEncoding, the reassembled
output is the clean code point, not U+FFFD.
* test(microsoft-foundry): replace PassThrough test with azLoginDeviceCodeWithOptions regression
* test(microsoft-foundry): add real-spawn integration test for split-byte setEncoding proof
* fix: add :unknown to catch callback variable for oxlint
* chore: add proof script for setEncoding utf8 split-byte fix
* remove standalone proof script (proof lives in PR body + test coverage)
* test(microsoft-foundry): tighten UTF-8 stream regression
Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Microsoft Foundry: add native provider
* Microsoft Foundry: tighten review fixes
* Microsoft Foundry: enable by default
* Microsoft Foundry: stabilize API routing