feat(agent): add standalone agent runtime
This commit is contained in:
parent
b25ccdc6b2
commit
01728c9a72
1 changed files with 5 additions and 0 deletions
|
|
@ -106,6 +106,11 @@ export const createControllerSession = (ws: WebSocket): ControllerSession => {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onMessage: (data) => {
|
onMessage: (data) => {
|
||||||
|
if (typeof data !== "string") {
|
||||||
|
logger.warn("Agent received a non-text message");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void Effect.runPromise(offerInbound(data as ControllerWireMessage)).catch((error) => {
|
void Effect.runPromise(offerInbound(data as ControllerWireMessage)).catch((error) => {
|
||||||
logger.error(`Failed to queue inbound message: ${toMessage(error)}`);
|
logger.error(`Failed to queue inbound message: ${toMessage(error)}`);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue