LibreChat/api/server/services
Marco Beretta ea938f6054 🚦 feat: Show Exit Status and Stderr for Attached Workspace Commands (#16556)
* feat: Show Exit Status for Attached Workspace Commands

Parse the exit trailer the attached-workspace bash_tool writes so the card
fails a non-zero exit, a signal or a timeout, names the reason beside the
failure suffix, and renders stderr distinctly. The group outcome reads the
same parser so its failed count matches the card. Sandbox output without the
trailer keeps the existing heuristics.

* fix: Parse Exit Status Only for Attached Workspace Calls

The sandbox and attached-workspace tools are both named bash_tool, and the
sandbox output is trimmed, so a sandbox command that printed
"[exit code: 1]" last was read as a failed attached-workspace run by the
card and the group outcome.

The execute handler now records a run step when the resolved tool instance
is the one createAttachedWorkspaceBashTool built (tracked by object
identity), and the step-completed handler stamps executor:
'attached_workspace' on the streamed tool call and the aggregated part.
Redis replay and the client SSE merge carry the field through. BashCall
and outcome.ts parse the trailer only when the marker is set.

* fix: Count Styled Terminal Lines Like Plain Ones When Output Ends in a Newline

(cherry picked from commit abc9285523)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16556
2026-10-01 03:46:19 +00:00
..
__tests__ 🎒 feat: Carry Project Context Across Conversations (#15684) 2026-10-01 03:46:19 +00:00
Agents 🪞 feat: Expand Agent Cards Into Their Detail Dialog (#15798) 2026-10-01 03:46:16 +00:00
Artifacts
Config 🥢 fix: Fit MCP App Snapshots Within Message Documents (#16299) 2026-10-01 03:46:17 +00:00
Endpoints 🚦 feat: Show Exit Status and Stderr for Attached Workspace Commands (#16556) 2026-10-01 03:46:19 +00:00
Files 🎯 feat: Tolerant Workspace Edits with Host-Rendered Conflict Diagnostics (#16520) 2026-09-29 16:55:32 -04:00
MCP
Runs
Schedules 📴 fix: Surface Missing Scheduled OBO Authorization (#16416) 2026-09-27 20:50:55 -04:00
Skills
start 🧫 chore: Keep Jest Specs Out of Tool Discovery (#15766) 2026-09-08 23:58:04 -04:00
Threads 🎒 feat: Carry Project Context Across Conversations (#15684) 2026-10-01 03:46:19 +00:00
Tools 🧩 feat: MCP Apps support (#13831) 2026-10-01 03:46:16 +00:00
ActionService.js
ActionService.spec.js
AssistantService.js
AuthService.js 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
AuthService.spec.js 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
cleanup.js
createRunBody.js
createRunBody.spec.js
GraphApiService.js
GraphApiService.spec.js
GraphTokenService.js
initializeMCPs.js 🫗 fix: Bound MCP App Responses and In-Flight Work (#16300) 2026-10-01 03:46:17 +00:00
initializeMCPs.plugins.spec.js 🧩 feat: MCP Apps support (#13831) 2026-10-01 03:46:16 +00:00
initializeMCPs.spec.js 🫸 fix: Gate MCP App Views and Actions on User Intent (#16297) 2026-10-01 03:46:17 +00:00
initializeOAuthReconnectManager.js 🛂 fix: Back Off MCP OAuth Discovery (#15783) 2026-09-09 22:21:34 -04:00
initializeOAuthReconnectManager.spec.js 🛂 fix: Back Off MCP OAuth Discovery (#15783) 2026-09-09 22:21:34 -04:00
MCP.js 🫗 fix: Bound MCP App Responses and In-Flight Work (#16300) 2026-10-01 03:46:17 +00:00
MCP.spec.js 🧩 feat: MCP Apps support (#13831) 2026-10-01 03:46:16 +00:00
MCPAuthorizationFenceRetry.js 🛂 fix: Back Off MCP OAuth Discovery (#15783) 2026-09-09 22:21:34 -04:00
MCPAuthorizationFenceRetry.spec.js 🛂 fix: Back Off MCP OAuth Discovery (#15783) 2026-09-09 22:21:34 -04:00
MCPRequestContext.js
OboPolicyService.js
OboTokenService.js
OboTokenService.spec.js
OpenIDRefreshFlight.js
OpenIDRefreshFlight.spec.js
OpenIDRefreshRecovery.js
OpenIDSessionRefresh.js
OpenIDSessionRefresh.spec.js
PermissionService.js 🧲 fix: Match Directory Users to Existing Principals (#15855) 2026-09-12 07:36:22 -04:00
PermissionService.spec.js 🚥 fix: Preserve Insights With Guarded ACL Role Updates (#16170) 2026-09-21 23:40:52 -04:00
PluginService.js
PluginService.spec.js
RefreshTokenBridge.js
RefreshTokenBridge.spec.js
systemGrant.spec.js
ToolService.js 🫗 fix: Bound MCP App Responses and In-Flight Work (#16300) 2026-10-01 03:46:17 +00:00
twoFactorService.js
twoFactorService.spec.js