Implements persistent external chat relays in CrestApps.Core 2.0, bridging AI chat sessions to live-agent platforms via IExternalChatRelay and its manager, including event and notification routing.
Ships in crestapps-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
IExternalChatRelay is the contract for a persistent, bidirectional connection to a live-agent or other external chat platform. An implementation supplies connection, prompt, signal, disconnect, and async-disposal behavior; the transport is application-defined.
The core packages ship no IExternalChatRelay implementation, only the manager: ExternalChatRelayConnectionManager is registered by AddCoreAIOrchestration() as the singleton IExternalChatRelayManager and tracks relay instances by session ID. Its members are GetOrCreateAsync(sessionId, context, factory, cancellationToken), Get(sessionId) and CloseAsync(sessionId, cancellationToken).
Create the relay in the factory passed to the manager. The manager connects it, disposes a failed connection attempt, and disposes an extra instance if a concurrent caller won the same session ID.
var relay = await relayManager.GetOrCreateAsync(
sessionId,
new ExternalChatRelayContext
{
SessionId = sessionId,
ChatType = ChatContextType.AIChatSession,
},
() => new MyExternalChatRelay(),
cancellationToken);
await relay.SendPromptAsync(prompt, cancellationToken);
await relayManager.CloseAsync(sessionId, cancellationToken);
MyExternalChatRelay must implement IExternalChatRelay. The manager does not construct relays or choose a platform.
The current packages ship no default IExternalChatRelayEventHandler, IExternalChatRelayNotificationHandler, or IExternalChatRelayNotificationBuilder implementation. Consequently, registering a relay alone does not route incoming external events into chat messages or notifications.
An integration that needs event routing must implement and register its own IExternalChatRelayEventHandler (HandleEventAsync) and IExternalChatRelayNotificationHandler (HandleAsync). IExternalChatRelayNotificationBuilder exposes NotificationType and Build(relayEvent, notification, result, T); nothing in the core packages resolves builders, so your notification handler decides how to pick one, for example by matching NotificationType to ExternalChatRelayEvent.EventType. ExternalChatRelayEventTypes supplies constants such as agent-typing, agent-stopped-typing, agent-connected, agent-disconnected, agent-reconnecting and connection-lost; integrations may add custom strings. ExternalChatRelayEvent carries EventType, Content, AgentName and Metadata.
Keep platform credentials and reconnection policy inside the relay implementation. Call CloseAsync when the corresponding session ends so the manager disconnects and disposes the relay.
crestapps-core-response-handlers for the IChatResponseHandler contract that a deferred relay-backed handler typically pairs with.orchardcore-ai-response-handlers for the Orchard Core module wrapper that consumes this relay contract in chat sessions and chat interactions.ExternalChatRelayContext still carries only SessionId and ChatType; keep platform credentials in the relay implementation.Handled/Transferred results from the response handler do not match the current contracts.What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-core:crestapps-core-external-relaysfrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-core51 skills in this plugin
/crestapps-core-a2aSkill for Agent-to-Agent (A2A) protocol support in CrestApps.Core on the A2A 1.0 SDK. Covers AddA2AClient and AddCoreAIA2AClient with Entity Framework Core or YesSql connection stores, A2AConnection and A2AConnectionMetadata authentication, AIProfileA2AMetadata, the agent card cache and A2AToolRegistryProvider, the listAvailableAgents, findAgentForTask and findToolsForTask tools, building an A2A host with IAgentHandler, A2AServer, ITaskStore and MapA2A, A2A 1.0 agent cards with supportedInterfaces published at /.well-known/agent-card.json, A2AHostOptions authentication and ExposeAgentsAsSkill, system agents exposed through the host, and upgrading from the 0.3 SDK./crestapps-core-ag-uiSkill for running the CrestApps.Core 2.0 AI chat as an AG-UI agent. Covers the CrestApps.Core.AI.AGUI package (AGUIRunEventWriter, AGUIRunRequest, AGUIJson), AIChatHubCore.RunAgent over SignalR and MapAGUIChat with Server-Sent Events, the RunAgentInput members and streamed events, tool approvals with RequireApproval or an approval tool kind, ApprovalRequiredAIFunction, interrupts and resume, approvals inside agents, page context with crestAppsAGUI.registerContextProvider, shared state with registerStateProvider and update_shared_state, frontend tools, stored tool calls (ChatTurnToolActivity), runs that continue on the next page, AGUIChatOptions.DisconnectedRunTimeout, the protocol and sendPageContext chat options, and the AICompletionContextKeys and ChatResponseHandlerContext members. Use it when showing tool calls in the chat, asking a person before a tool runs, sharing page state with the agent, connecting CopilotKit or another AG-UI client, or troubleshooting approvals and continued runs.Other plugins' skills for the same job