1057
},
1058
async execute(_stateManager: AgentHostStateManager, sessionUri: ProtocolURI, toolName: string, rawArgs: unknown): Promise<string> {
1060
throw new Error(`Session server tool "${toolName}" cannot run: the group was built without a session accessor.`);
1061
}
1063
>
case listSessionsToolName:
1064
return serializeSessions(filterSessions(await accessor.listSessions(), getListSessionsArgs(rawArgs)));
1066
return serializeCurrentSession(currentSessionUri(sessionUri), await accessor.listSessions());
1068
if (createdSessionCount >= maxCreatedSessions) {
1069
throw new Error(`Refusing to create more than ${maxCreatedSessions} sessions from server tools in this process.`);