[PR #8249] [MERGED] feat(agents): keep active streams running and support animated banners #8562

Closed
opened 2026-11-07 16:45:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8249
Author: @SpicyMarinara
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/agent-update-header


📝 Commits (4)

  • 712a587 feat(agents): move update control and expose gallery animation
  • 682be45 fix(agents): renew generation timeouts on provider activity
  • ad4682e Merge branch 'staging' into feat/agent-update-header
  • afe9ddb fix(llm): read completed JSON responses to streaming requests

📊 Changes

33 files changed (+2557 additions, -152 deletions)

View changed files

📝 .env.example (+3 -3)
📝 docs/CONFIGURATION.md (+1 -1)
📝 packages/client/src/components/agents/AgentCatalogView.tsx (+17 -10)
📝 packages/client/src/localization/locales/en.json (+1 -0)
📝 packages/server/src/config/runtime-config.ts (+4 -4)
📝 packages/server/src/services/agents/agent-executor.ts (+9 -46)
📝 packages/server/src/services/agents/agent-progress.ts (+32 -5)
➕ packages/server/src/services/capability-packages/capability-gallery-animation.service.ts (+108 -0)
📝 packages/server/src/services/capability-packages/capability-integrations.service.ts (+8 -0)
📝 packages/server/src/services/capability-packages/capability-language-model.service.ts (+14 -14)
📝 packages/server/src/services/llm/base-provider.ts (+76 -4)
📝 packages/server/src/services/llm/providers/anthropic.provider.ts (+2 -5)
📝 packages/server/src/services/llm/providers/claude-subscription.provider.ts (+8 -1)
📝 packages/server/src/services/llm/providers/google.provider.ts (+3 -8)
📝 packages/server/src/services/llm/providers/grok-subscription.provider.ts (+16 -3)
📝 packages/server/src/services/llm/providers/openai.provider.ts (+92 -7)
📝 packages/server/src/utils/security.ts (+14 -3)
📝 packages/shared/src/schemas/capability-package.schema.ts (+2 -1)
📝 packages/shared/src/types/generation-integration.ts (+15 -0)
📝 scripts/regressions/advanced-memory-post-generation.regression.ts (+1 -1)

...and 13 more files

📄 Description

Linked issue

Closes #8248. Package UI and media changes: Marinara-Agents #1661, closing Pasta-Devs/Marinara-Agents#1660. Translated configuration packs: #8250.

Why this change

Gacha Forge chapter forging can hit the shared five-minute agent deadline while its provider is still working. A local fixture reproduced this hard cutoff; the reported production Opus failure still needs a live retry. Active streams should be allowed to finish across connection types. Gacha's requested banner animations also need an Engine-owned bridge to existing video connections.

What changed

  • Measure agent-call inactivity instead of total elapsed time. Actual response data, thinking, stream keepalives and subscription subprocess events renew the budget; caller cancellation and silent-request protection remain effective. Apply the policy to normal and downloadable agents, with fresh budgets per call.
  • Request upstream streaming for quiet internal completions, including Anthropic and Google tool rounds. Preserve protocol restrictions and known non-streaming models. Compatible endpoints can retry once as buffered only after an explicit upstream 400/422 streaming rejection; generic failures, partial output and cancellation cannot replay a generation. Read a completed JSON response when an endpoint ignores the streaming request, without resending it. Deliver final text through an existing callback once and honor cancellation before and after callbacks.
  • Move an available agent Update action into the detail header beside Refresh, with localized accessibility text and mobile visibility/pending states.
  • Add Capability API 1.384's optional gallery-image animation integration. Resolve an actual saved Global Gallery image, validate its contained file, convert supported reference formats, and reuse existing saved video connections, credentials, admission, fallback and prompt logging. A loop requests matching first/last frames where supported.
  • Document the inactivity semantics in the environment template and English configuration guide; mirror the configuration description in all ten downloadable language packs via #8250.

Validation

Completed local checks:

  • pnpm check, localization/version checks, and git diff --check.
  • Seven browser shell smoke cases; six before/after agent-control cases covering dark/light desktop Chromium, mobile Chromium and mobile WebKit.
  • Fifteen inactivity cases, including concurrent Anthropic/OpenAI-compatible streams continuing beyond a 10-second test budget while an independent silent connection times out.
  • Real local HTTP provider fixtures for quiet tool rounds, buffered-only fallback, streaming callbacks, known Pro/ChatGPT constraints, partial failures, cancellation, retry limits and usage/tool results; existing provider compatibility/completion/caching regressions.
  • Normal-agent, SDK/subprocess, raw-response activity and focused gallery integration regressions; 25 capability-package regression files passed. Replayed all 24 previously failing Node regression files locally after correcting JSON-response handling; fixed two fixtures so their SSE finish reasons retain the same negative cases as their buffered responses. Final callback cancellation guards pass focused HTTP fixtures, strict TypeScript and the full Engine check.
  • Local CodeRabbit review and independent source review. Fixed substantive findings and reran review. Dismissed the cancellation-result-schema finding after comparing parent/current code: the executor/pipeline's success:false conversion already exists and is outside this timeout change. Details are recorded in local review proof; this is not a claim of zero findings or a cancellation-presentation fix.

The validation checklist remains a human to-do list:

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked light/dark, mobile, empty and error states manually
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually retry chapter forging with the reported official Opus connection, including preforging the full chapter.
  • Manually verify Update beside Refresh on desktop/mobile and after an available update completes.
  • Manually verify the selected real video provider's reference input and loop quality.
  • Verify physical Android/iOS behavior. Browser emulation is the current device proof boundary.

No paid live model or video calls were made. The existing output budgets were retained; this change addresses the reproduced deadline path rather than asserting every malformed-chapter failure has the same cause.

Docs and release impact

English timeout documentation is included; translated packs are in #8250. Root app version remains 2.5.1; the capability API gains minor 384. Package release 1.15.0 is maintained in Marinara-Agents. Engine must land before the package's animation feature can be used.

  • Manually inspect the English and translated configuration descriptions
  • Verify package install/update with the matching Engine capability API

UI evidence

Downloadable browser screenshot evidence. Download the standalone HTML and open it locally to view 14 untouched PNGs. It includes actual Update before/after captures, final banner Sources/playback/fallback captures, and separately labeled archived Home Music UI captures. It records runtime hashes and browser emulation limits; the downloaded image bytes were verified against the originals.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8249 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/agent-update-header` --- ### 📝 Commits (4) - [`712a587`](https://github.com/Pasta-Devs/Marinara-Engine/commit/712a5875de2b6147ba687b8e2eb7b86f63118952) feat(agents): move update control and expose gallery animation - [`682be45`](https://github.com/Pasta-Devs/Marinara-Engine/commit/682be4511e45a674d9f321e713a014f4807167de) fix(agents): renew generation timeouts on provider activity - [`ad4682e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ad4682e34a651c70ab45a6c0a6d69e5edb65958c) Merge branch 'staging' into feat/agent-update-header - [`afe9ddb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/afe9ddbd424dae2e0dae9188936689f0f0a5a80a) fix(llm): read completed JSON responses to streaming requests ### 📊 Changes **33 files changed** (+2557 additions, -152 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+3 -3) 📝 `docs/CONFIGURATION.md` (+1 -1) 📝 `packages/client/src/components/agents/AgentCatalogView.tsx` (+17 -10) 📝 `packages/client/src/localization/locales/en.json` (+1 -0) 📝 `packages/server/src/config/runtime-config.ts` (+4 -4) 📝 `packages/server/src/services/agents/agent-executor.ts` (+9 -46) 📝 `packages/server/src/services/agents/agent-progress.ts` (+32 -5) ➕ `packages/server/src/services/capability-packages/capability-gallery-animation.service.ts` (+108 -0) 📝 `packages/server/src/services/capability-packages/capability-integrations.service.ts` (+8 -0) 📝 `packages/server/src/services/capability-packages/capability-language-model.service.ts` (+14 -14) 📝 `packages/server/src/services/llm/base-provider.ts` (+76 -4) 📝 `packages/server/src/services/llm/providers/anthropic.provider.ts` (+2 -5) 📝 `packages/server/src/services/llm/providers/claude-subscription.provider.ts` (+8 -1) 📝 `packages/server/src/services/llm/providers/google.provider.ts` (+3 -8) 📝 `packages/server/src/services/llm/providers/grok-subscription.provider.ts` (+16 -3) 📝 `packages/server/src/services/llm/providers/openai.provider.ts` (+92 -7) 📝 `packages/server/src/utils/security.ts` (+14 -3) 📝 `packages/shared/src/schemas/capability-package.schema.ts` (+2 -1) 📝 `packages/shared/src/types/generation-integration.ts` (+15 -0) 📝 `scripts/regressions/advanced-memory-post-generation.regression.ts` (+1 -1) _...and 13 more files_ </details> ### 📄 Description ## Linked issue Closes #8248. Package UI and media changes: [Marinara-Agents #1661](https://github.com/Pasta-Devs/Marinara-Agents/pull/1661), closing Pasta-Devs/Marinara-Agents#1660. Translated configuration packs: #8250. ## Why this change Gacha Forge chapter forging can hit the shared five-minute agent deadline while its provider is still working. A local fixture reproduced this hard cutoff; the reported production Opus failure still needs a live retry. Active streams should be allowed to finish across connection types. Gacha's requested banner animations also need an Engine-owned bridge to existing video connections. ## What changed - Measure agent-call inactivity instead of total elapsed time. Actual response data, thinking, stream keepalives and subscription subprocess events renew the budget; caller cancellation and silent-request protection remain effective. Apply the policy to normal and downloadable agents, with fresh budgets per call. - Request upstream streaming for quiet internal completions, including Anthropic and Google tool rounds. Preserve protocol restrictions and known non-streaming models. Compatible endpoints can retry once as buffered only after an explicit upstream 400/422 streaming rejection; generic failures, partial output and cancellation cannot replay a generation. Read a completed JSON response when an endpoint ignores the streaming request, without resending it. Deliver final text through an existing callback once and honor cancellation before and after callbacks. - Move an available agent Update action into the detail header beside Refresh, with localized accessibility text and mobile visibility/pending states. - Add Capability API 1.384's optional gallery-image animation integration. Resolve an actual saved Global Gallery image, validate its contained file, convert supported reference formats, and reuse existing saved video connections, credentials, admission, fallback and prompt logging. A loop requests matching first/last frames where supported. - Document the inactivity semantics in the environment template and English configuration guide; mirror the configuration description in all ten downloadable language packs via #8250. ## Validation Completed local checks: - `pnpm check`, localization/version checks, and `git diff --check`. - Seven browser shell smoke cases; six before/after agent-control cases covering dark/light desktop Chromium, mobile Chromium and mobile WebKit. - Fifteen inactivity cases, including concurrent Anthropic/OpenAI-compatible streams continuing beyond a 10-second test budget while an independent silent connection times out. - Real local HTTP provider fixtures for quiet tool rounds, buffered-only fallback, streaming callbacks, known Pro/ChatGPT constraints, partial failures, cancellation, retry limits and usage/tool results; existing provider compatibility/completion/caching regressions. - Normal-agent, SDK/subprocess, raw-response activity and focused gallery integration regressions; 25 capability-package regression files passed. Replayed all 24 previously failing Node regression files locally after correcting JSON-response handling; fixed two fixtures so their SSE finish reasons retain the same negative cases as their buffered responses. Final callback cancellation guards pass focused HTTP fixtures, strict TypeScript and the full Engine check. - Local CodeRabbit review and independent source review. Fixed substantive findings and reran review. Dismissed the cancellation-result-schema finding after comparing parent/current code: the executor/pipeline's `success:false` conversion already exists and is outside this timeout change. Details are recorded in local review proof; this is not a claim of zero findings or a cancellation-presentation fix. The validation checklist remains a human to-do list: - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked light/dark, mobile, empty and error states manually - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - [ ] Manually retry chapter forging with the reported official Opus connection, including preforging the full chapter. - [ ] Manually verify Update beside Refresh on desktop/mobile and after an available update completes. - [ ] Manually verify the selected real video provider's reference input and loop quality. - [ ] Verify physical Android/iOS behavior. Browser emulation is the current device proof boundary. No paid live model or video calls were made. The existing output budgets were retained; this change addresses the reproduced deadline path rather than asserting every malformed-chapter failure has the same cause. ## Docs and release impact English timeout documentation is included; translated packs are in #8250. Root app version remains 2.5.1; the capability API gains minor 384. Package release 1.15.0 is maintained in Marinara-Agents. Engine must land before the package's animation feature can be used. - [ ] Manually inspect the English and translated configuration descriptions - [ ] Verify package install/update with the matching Engine capability API ## UI evidence [Downloadable browser screenshot evidence](https://gist.github.com/SpicyMarinara/10409fdf866cc2855dc72bcbe03bf237). Download the standalone HTML and open it locally to view 14 untouched PNGs. It includes actual Update before/after captures, final banner Sources/playback/fallback captures, and separately labeled archived Home Music UI captures. It records runtime hashes and browser emulation limits; the downloaded image bytes were verified against the originals. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:45:33 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8562
No description provided.