Commit Graph

486 Commits (bd957a3a8b46976724570936bc37e052d4ec2fc5)

Author SHA1 Message Date
Gustavo Madeira Santana e11b5d584c
Tests: isolate Matrix extension hotspots 8 months ago
Altay 9c25544e6c
test(ci): fix stale regression expectations (#57899) 8 months ago
Shakker aff6883f93 fix: avoid over-sharding single include-file test batches 8 months ago
Sean c6f2db1506
fix: prevent gateway attachment offload regressions (#55513) (thanks @Syysean)
* feat(gateway): implement claim check pattern to prevent OOM on large attachments

* fix: sanitize mediaId, refine trimEnd, remove warn log, add threshold and absolute path

* fix: enforce maxBytes before decoding and use dynamic path from saveMediaBuffer

* fix: enforce absolute maxBytes limit before Buffer allocation and preserve file extensions

* fix: align saveMediaBuffer arguments and satisfy oxfmt linter

* chore: strictly enforce linting rules (curly braces, unused vars, and error typing)

* fix: restrict offload to mainstream mimes to avoid extension-loss bug in store.ts for BMP/TIFF

* fix: restrict offload to mainstream mimes to bypass store.ts extension-loss bug

* chore: document bmp/tiff exclusion from offload whitelist in MIME_TO_EXT

* feat: implement agent-side resolver for opaque media URIs and finalize contract

* fix: support unicode media URIs and allow consecutive dots in safe IDs based on Codex review

* fix(gateway): enforce strict fail-fast for oversized media to prevent OOM bypass

* refactor(gateway): harden media offload with performance and security optimizations

This update refines the Claim Check pattern with industrial-grade guards:

- Performance: Implemented sampled Base64 validation for large payloads (>4KB) to prevent event loop blocking.
- Security: Added null-byte (\u0000) detection and reinforced path traversal guards.
- I18n: Updated media-uri regex to a blacklist-based character class for Unicode/Chinese filename support, with oxlint bypass for intentional control regex.
- Robustness: Enhanced error diagnostics with JSON-serialized IDs.

* fix: add HEIC/HEIF to offload allowlist and pass maxBytes to saveMediaBuffer

* fix(gateway): clean up offloaded media files on attachment parse failure

Address Codex review feedback: track saved media IDs and implement best-effort cleanup via deleteMediaBuffer if subsequent attachments fail validation, preventing orphaned files on disk.

* fix(gateway): enforce full base64 validation to prevent whitespace padding bypass

Address Codex review feedback: remove early return in isValidBase64 so padded payloads cannot bypass offload thresholds and reintroduce memory pressure. Updated related comments.

* fix(gateway): preserve offloaded media metadata and fix validation error mapping

Address Codex review feedback:
- Add \offloadedRefs\ to \ParsedMessageWithImages\ to expose structured metadata for offloaded attachments, preventing transcript media loss.
- Move \erifyDecodedSize\ outside the storage try-catch block to correctly surface client base64 validation failures as 4xx errors instead of 5xx \MediaOffloadError\.
- Add JSDoc TODOs indicating that upstream callers (chat.ts, agent.ts, server-node-events.ts) must explicitly pass the \supportsImages\ flag.

* fix(agents): explicitly allow media store dir when loading offloaded images

Address Codex review feedback: Pass getMediaDir() to loadWebMedia's localRoots for media-uri refs to prevent legacy path resolution mismatches from silently dropping large attachments.

* fix(gateway): resolve attachment offload regressions and error mapping

Address Codex review feedback:
- Pass \supportsImages\ dynamically in \chat.ts\ and \gent.ts\ based on model catalog, and explicitly in \server-node-events.ts\.
- Persist \offloadedRefs\ into the transcript pipeline in \chat.ts\ to preserve media metadata for >2MB attachments.
- Correctly map \MediaOffloadError\ to 5xx (UNAVAILABLE) to differentiate server storage faults from 4xx client validation errors.

* fix(gateway): dynamically compute supportsImages for overrides and node events

Address follow-up Codex review feedback:

- Use effective model (including overrides) to compute \supportsImages\ in \gent.ts\.

- Move session load earlier in \server-node-events.ts\ to dynamically compute \supportsImages\ rather than hardcoding true.

* fix(gateway): resolve capability edge cases reported by codex

Address final Codex edge cases:
- Refactor \gent.ts\ to compute \supportsImages\ even when no session key is present, ensuring text-only override requests without sessions safely drop attachments.
- Update catalog lookups in \chat.ts\, \gent.ts\, and \server-node-events.ts\ to strictly match both \id\ and \provider\ to prevent cross-provider model collisions.

* fix(agents): restore before_install hook for skill installs

Restore the plugin scanner security hook that was accidentally dropped during merge conflict resolution.

* fix: resolve attachment pathing, defer parsing after auth gates, and clean up node-event mocks

* fix: resolve syntax errors in test-env, fix missing helper imports, and optimize parsing sequence in node events

* fix(gateway): re-enforce message length limit after attachment parsing

Adds a secondary check to ensure the 20,000-char cap remains effective even after media markers are appended during the offload flow.

* fix(gateway): prevent dropping valid small images and clean up orphaned media on size rejection

* fix(gateway): share attachment image capability checks

* fix(gateway): preserve mixed attachment order

* fix: fail closed on unknown image capability (#55513) (thanks @Syysean)

* fix: classify offloaded attachment refs explicitly (#55513) (thanks @Syysean)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
8 months ago
Gustavo Madeira Santana 74ea42e210 Tests: relax targeted unit planner split assertion 8 months ago
Gustavo Madeira Santana f380305ee4
Tests: restore extension plugin test seams 8 months ago
qsam 47839d3b9a
fix(mattermost): detect stale websocket after bot disable/enable cycle (#53604)
Merged via squash.

Prepared head SHA: 818d437a5438eb9e90aa67e74a05b7e2090ae049
Co-authored-by: Qinsam <19649380+Qinsam@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
8 months ago
Peter Steinberger 25074de838
fix: restore lightweight root help startup 8 months ago
Gustavo Madeira Santana 2481c0a9b6
Tests: keep channel helpers on public plugin surfaces 8 months ago
Gustavo Madeira Santana acea28a9bb
Telegram: fix extension-fast test seams 8 months ago
Gustavo Madeira Santana f44174cf61
Extensions: stabilize telegram registry contracts 8 months ago
Vincent Koc 8657b65b05 fix(ci): rename extension test support for boundary guards 8 months ago
Vincent Koc b82fd50472 fix(test): add extension-safe test helper bridges 8 months ago
Peter Steinberger 9857d40923
fix(runtime): stabilize image generation auth/runtime loading 8 months ago
Peter Steinberger 63cbc097b5
refactor(channels): route core through registered plugin capabilities 8 months ago
Peter Steinberger 0fdf724125
test: trim stale extension boundary allowlist 8 months ago
Peter Steinberger cfac0e8698
refactor: move plugin-owned test support into plugins 8 months ago
Peter Steinberger 1efef8205c
fix: stabilize extensions surface test gate 8 months ago
Peter Steinberger 07c6981c70
refactor: localize zalo test support 8 months ago
Peter Steinberger 4635810385
fix: stabilize unit test planner scheduling 8 months ago
Peter Steinberger d9274444b7
fix: keep beta on newer prereleases 8 months ago
Peter Steinberger aed87a608e
fix: stabilize bundled plugin ci lanes 8 months ago
Peter Steinberger 73477eee4c fix: harden ACP plugin tools bridge (#56867) (thanks @joe2643) 8 months ago
Gustavo Madeira Santana dc192d7b2f
Build: mirror Matrix crypto WASM runtime deps (#57163)
Merged via squash.

Prepared head SHA: b3aeb9d08ae8065533ff3b753bace26500c39aa5
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
8 months ago
Peter Steinberger 855878b4f0
fix: stabilize serial test suite 8 months ago
Peter Steinberger fc5fdcb091
refactor(plugin-sdk): remove bundled provider setup shims 8 months ago
Peter Steinberger 58dde4b016
test(contracts): hoist shared plugin mock ids 8 months ago
Peter Steinberger 8a6d1b9f1e
test(contracts): avoid sync telegram vitest harness loads 8 months ago
Peter Steinberger 8e0ab35b0e
refactor(plugins): decouple bundled plugin runtime loading 8 months ago
Peter Steinberger 5ebccf5e30 test: harden zalo webhook lifecycle tests 8 months ago
Gustavo Madeira Santana 225d58b74a
test: ignore stale isolated state dir in live env staging 8 months ago
Peter Steinberger 03826b8075 fix(test): harden planner artifact cleanup and profile env fallback 8 months ago
Gustavo Madeira Santana d3673fd53e
Tests: isolate xAI contract lanes 8 months ago
Gustavo Madeira Santana 5289e8f0fe
Tests: lazy-load web search contract registries 8 months ago
Gustavo Madeira Santana bd1c48e4d9
Tests: lazy-load extension contract registries 8 months ago
Gustavo Madeira Santana 0b8bc0e1b4
Tests: cap CI extension batch concurrency 8 months ago
Peter Steinberger 587e18cd3f chore: prepare 2026.3.28-beta.1 release 8 months ago
Peter Steinberger 46c2928234 fix(plugins): stabilize provider contract loading 8 months ago
huntharo fb989f0402 Tests: restore provider runtime contract wrapper 8 months ago
huntharo 5ed8ee6832 xAI: switch bundled provider defaults to Responses 8 months ago
Peter Steinberger 914becee52 fix: isolate live test home from real config 8 months ago
Tak Hoffman 7a878164b0
ci: align bun shard counts with windows (#56429)
* ci: align bun shard counts with windows

* ci: retrigger stuck windows shard
8 months ago
Peter Steinberger 23772bb785 test: exclude topology fixtures from vitest collection 8 months ago
Tak Hoffman 3a34e6b65d
Add reusable TypeScript topology analyzer for public surface usage 8 months ago
Peter Steinberger 5df53a99b1 fix: set localstorage file for test planner workers 8 months ago
Peter Steinberger 4757c32f63 test: silence planner fixture stderr 8 months ago
Ayaan Zaidi 0ebd7df9dc
test(feishu): stabilize bot-menu lifecycle replay 8 months ago
Peter Steinberger a955537a61 fix: slim provider sdk surfaces 8 months ago
Peter Steinberger a631604247 fix(ci): stabilize browser bundled integration tests 8 months ago
Peter Steinberger c4e6fdf94d
refactor(xai): move bundled xai runtime into plugin
Co-authored-by: Harold Hunt <harold@pwrdrvr.com>
8 months ago