Commit Graph

13 Commits

Author SHA1 Message Date
Peter Steinberger
e5999c7316 fix(microsoft-foundry): honor Azure device-code lifetime (#113741)
* fix(microsoft-foundry): honor device-code lifetime

Co-authored-by: wangmiao0668000666 <wang.miao86@xydigit.com>

* fix(microsoft-foundry): allow login completion grace

---------

Co-authored-by: wangmiao0668000666 <wang.miao86@xydigit.com>
2026-07-25 08:33:05 -07:00
wangmiao0668000666
6935293626 fix(microsoft-foundry): bound az login device-code subprocess (#112369)
* 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>
2026-07-25 07:20:19 -07:00
SunnyShu
a510a8e3a5 fix(microsoft-foundry): keep spawn pipe streams UTF-8 safe across chunk splits (#109499)
* 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>
2026-07-20 18:51:12 -07:00
Peter Steinberger
db02a96c4c refactor(process): route bounded commands through Execa (#106495)
* refactor(process): centralize bounded command execution

* refactor(process): migrate core one-shot commands

* refactor(plugins): migrate one-shot commands

* fix(process): await Windows tree termination

* chore(plugin-sdk): refresh process runtime surface

* refactor(process): migrate remaining bounded commands

* refactor(process): normalize command result handling

* refactor(process): split execution responsibilities

* chore(plugin-sdk): refresh API baseline

* chore(process): remove release-owned changelog entry

* fix(process): narrow binary command input checks

* fix(process): cap sandbox command output

* fix(qa-lab): preserve exact node probe env

* chore(ci): refresh dead export baseline

* fix(process): preserve force-kill command deadlines

* fix(process): avoid post-exit timeout reclassification

* test(process): update scp staging wrapper mock

* test(process): update remaining wrapper mocks

* refactor(qa-lab): preserve Execa tar execution
2026-07-13 11:07:35 -07:00
huangjianxiong
c335ecdb73 fix(microsoft-foundry): keep Azure CLI error truncation UTF-16 safe (#102604)
* fix(microsoft-foundry): keep Azure CLI error truncation UTF-16 safe

Replace `.slice(0, 300)` with `truncateUtf16Safe(normalized, 300)` in
summarizeAzErrorMessage to prevent surrogate pair corruption.

Ref. lsr911 pattern — mechanical substitution, no behavior change.

* test(microsoft-foundry): cover UTF-16-safe CLI errors

* test(microsoft-foundry): assert complete CLI error

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-09 11:49:35 +01:00
Vincent Koc
2fa9a5eaa0 fix(foundry): scope Entra tokens by API 2026-06-11 11:11:20 +09:00
Peter Steinberger
4fa5092cdc docs: document small extension sources 2026-06-04 21:02:07 -04:00
Vincent Koc
c96181fdbe fix(foundry): wrap malformed az token json 2026-05-14 19:10:08 +08:00
Peter Steinberger
827b0de0ce refactor: reduce plugin sdk surface 2026-05-10 12:37:10 +01:00
Peter Steinberger
05f607c149 refactor: trim provider internal exports 2026-05-01 15:16:02 +01:00
Peter Steinberger
22955fcdcb refactor: simplify foundry cli output handling 2026-04-10 23:43:27 +01:00
Peter Steinberger
b52f106533 refactor: dedupe ui foundry trimmed readers 2026-04-08 01:36:39 +01:00
MetaX e|acc
a16dd967da feat: Add Microsoft Foundry provider with Entra ID authentication (#51973)
* Microsoft Foundry: add native provider

* Microsoft Foundry: tighten review fixes

* Microsoft Foundry: enable by default

* Microsoft Foundry: stabilize API routing
2026-03-26 01:33:14 -05:00