1250
}
1251
}
1253
>
// Spin up the backing chat in the harness first, then register
1254
>
// the chat in the catalog so a `session/chatAdded` only reaches
1255
>
// subscribers once the chat can actually receive messages. The agent
1256
>
// returns the opaque `providerData` blob the orchestrator persists for
1257
>
// restore (it never parses it); single-chat-only agents return `void`.
1258
>
const createResult = await this._createChat(provider, chat, createOptions);
1259
const providerData = createResult?.providerData;
1260
this._stateManager.addChat(sessionKey, chat.toString(), {