Skip to main content

Composer state

threadHasPendingMcpAuth(state) is the standalone predicate behind the "mcp" case.

Server capabilities

Returns the resolved value from your server’s getCapabilities(), or null while it is still loading or if the call failed. Use it to gate your own chrome the same way the SDK gates its sandbox, skill, and settings affordances. See Server contract.

MCP auth

MCP_AUTH_POPUP_CHANNEL is "truefoundry-mcp-auth-popup" — the BroadcastChannel name used to signal completion back to the opener. Types: McpAuthCallback, McpAuthPopupMessage, UseMCPAuthOptions. See MCP OAuth.

assistant-ui state

useAui, useAuiState, and the AssistantState type come from @assistant-ui/react, which the SDK bundles as a dependency and also declares as an optional peer. They are re-exported from the package root and from a dedicated subpath:

Runtime hooks

Import these from @truefoundry/trueforge-ui like everything else: Types: DraftAgentConfig, NamedAgentConfig, TrueForgeAgentConfig, UseTrueForgeAgentRuntimeOptions.

Utilities

Splits message parts into the steps shown inline versus those collapsed into the steps card. Both AgentStepPart and AgentStepsSplitResult are exported.