* fix(feishu): normalize media upload multipart data
Convert Feishu SDK multipart Buffer upload parts into explicit FormData
before they reach the wrapped HTTP transport. The SDK upload helpers
pass multipart data as a plain object with Buffer media parts; relying on
implicit serialization in the timeout/proxy-aware HTTP wrapper was fragile
and caused file/image delivery failures (400 volc-dcdn / write ECONNRESET)
even though the same credentials succeeded via a standalone SDK upload.
Adds normalizeMultipartUploadData, applied on the request path of the
shared Feishu HTTP instance, plus a regression test covering the
multipart-to-FormData normalization.
Rebased onto current origin/main, which replaced the old synchronous
injectTimeout path with the async proxy-aware injectRequestOptions flow;
the multipart normalization is now applied before that flow.
* fix(feishu): scope multipart media normalization
* test(feishu): mark multipart auth fixture synthetic
* test(feishu): use field-shaped secret fixtures
* fix(feishu): validate multipart upload endpoints
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* refactor(ai): invert plugin coupling behind the transport host port
* fix(ai): queue custom transport registrations until the host is configured
* refactor(ai): remove relocated transport sources from src/agents
* fix(ai): source core stream types from canonical packages and fix tarball fixtures
* fix(ai): invert plugin transport host wiring
* fix(ai): harden managed transport projection
* test(ai): register synchronous stream in transport mock
* fix(ai): lazily install transport runtime host
* fix(ai): preserve completion compat detection
* fix(anthropic): complete transcript reverse-scan windows across short reads
readLocalClaudeTranscriptPage filled each reverse-scan window with a single
positional read and threw "Claude transcript changed while it was being read"
whenever bytesRead !== size. A positional read may return fewer bytes than
requested inside an unchanged file, so a benign short read failed the transcript
page load with a message implying the file changed. The forward metadata scan in
the same file already loops short reads; the reverse scan did not.
Fill each window across short reads, advancing both the buffer offset and the
file position. A zero-byte read before the window is filled is premature EOF and
still throws the same error.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(anthropic): tighten transcript short-read coverage
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(extensions/anthropic): write migrated model entries as own properties
* test(extensions/anthropic): guard optional models value in Object.hasOwn assertions
---------
Co-authored-by: chengzhichao-xydt <chengzhichao-xydt@users.noreply.github.com>
* fix(feishu): fall back media replies
* test(feishu): polish media fallback coverage
* test(feishu): cover media fallback policy wiring
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(github-copilot): strip encrypted_content from reasoning replay items
* refactor(github-copilot): name replay sanitizer accurately
Use one provider-boundary sanitizer name for both connection-bound IDs and session-bound encrypted reasoning, and assert the final stream payload drops ciphertext.\n\nCo-authored-by: openperf <16864032@qq.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* refactor(media): consolidate parallel media-kind unions onto canonical MediaKind
One canonical MediaKind union (media-core constants) replaces ~40
duplicate/parallel kind declarations across core and channel plugins;
channel-specific narrower contracts derive via Extract/Exclude. Also
fixes a review-caught fallback bug where a stored "unknown" reply-chain
kind preempted MIME inference and relabeled images as documents.
* refactor(ui): derive attachment kinds from MediaKind
* fix(telegram): drop type-dead unknown guard in reply-context kind fallback
* style(telegram): format media kind fallback
* fix(tlon): bound Urbit auth response body drain to prevent OOM
Replace the unbounded response.text() body drain (discarded after reading
to finalize set-cookie headers) with a streaming reader capped at 64 KiB.
When no body stream is available, fall back to text() for compatibility.
A hostile or misconfigured Urbit endpoint could previously stream an
arbitrarily large body into memory during login.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(tlon): add curly braces to drain loop for lint compliance
* fix(tlon): remove unbounded text() fallback, cancel reader in finally
Remove the unbounded response.text() body-less fallback path. When no body
stream is available, there is nothing to drain — cookie headers are already
finalised. Move reader.cancel() into a finally block so the reader is
released even when read() throws.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.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>
Add configContracts.dangerousFlags for network="default", per-field uiHints,
and configSchema/Zod field descriptions to the MXC sandbox plugin manifest.
Only network is flagged dangerous; containment "process" and "processcontainer"
currently resolve to the same Windows ProcessContainer. Align the manifest
description with the plugin entry and update the config schema test for the new
timeout description.
Copilot-Session: c299e8bd-b71c-4bb4-94a9-9c248543102a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Support ClickClack v1 setup claim URLs for split-origin and path-mounted deployments while preserving legacy setup flows and private transport overrides.
Refs #111919.
Prepared head SHA: c13ce82e38
Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
Final producer batch of the media-placeholder program: Telegram primary
bodies are caption-only with one aligned structured fact per native
media; the message-cache kind-parsing regex is deleted (native kind
stored directly); reply-chain, debounce/forward, group-history, and
ambient transcript lines render structured facts via the shared
formatter (removing the plugin-local duplicate of the caption-less
literal); audio-transcript and sticker-description replacements gate on
structured facts instead of exact placeholder strings. Also restores
unconditional failed-retryable recording when media resolution is
aborted for live updates, so shutdown cannot silently settle an
undispatched update.
* feat(channels): batch 3 producers drop media placeholder bodies
Media-placeholder program batch 3: iMessage, Signal, and WhatsApp stop
minting <media:kind> placeholder bodies. Primary bodies carry captions
only with one aligned structured fact per native attachment (type-only
for missing/rejected/oversized). Echo, quote, and pending-history
records gain structured media facts so dedupe and previews work without
rendered text. Signal media-only outbound sends drop the placeholder
body entirely (signal-cli accepts attachment-only sends; recipients now
see just the media). WhatsApp audio preflight de-stringed; qa-lab
sticker recognizer moved to structured facts; WhatsApp gif maps to
video (presentation mode, no behavioral consumer).
* test(whatsapp): keep media classifier private