style: prettier formatting fixes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,7 +54,11 @@ function createMockAdapter(
|
|||||||
return setupConfig !== null;
|
return setupConfig !== null;
|
||||||
},
|
},
|
||||||
|
|
||||||
async deliver(_platformId: string, _threadId: string | null, message: OutboundMessage): Promise<string | undefined> {
|
async deliver(
|
||||||
|
_platformId: string,
|
||||||
|
_threadId: string | null,
|
||||||
|
message: OutboundMessage,
|
||||||
|
): Promise<string | undefined> {
|
||||||
delivered.push(message);
|
delivered.push(message);
|
||||||
return undefined;
|
return undefined;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,11 +12,25 @@ import fs from 'fs';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { GROUPS_DIR } from './config.js';
|
import { GROUPS_DIR } from './config.js';
|
||||||
import { getRunningSessions, getActiveSessions, createPendingQuestion, getSession, createPendingApproval } from './db/sessions.js';
|
import {
|
||||||
|
getRunningSessions,
|
||||||
|
getActiveSessions,
|
||||||
|
createPendingQuestion,
|
||||||
|
getSession,
|
||||||
|
createPendingApproval,
|
||||||
|
} from './db/sessions.js';
|
||||||
import { getAgentGroup, getAdminAgentGroup, createAgentGroup, updateAgentGroup } from './db/agent-groups.js';
|
import { getAgentGroup, getAdminAgentGroup, createAgentGroup, updateAgentGroup } from './db/agent-groups.js';
|
||||||
import { getMessagingGroupsByAgentGroup } from './db/messaging-groups.js';
|
import { getMessagingGroupsByAgentGroup } from './db/messaging-groups.js';
|
||||||
import { log } from './log.js';
|
import { log } from './log.js';
|
||||||
import { openInboundDb, openOutboundDb, sessionDir, inboundDbPath, resolveSession, writeSessionMessage, writeSystemResponse } from './session-manager.js';
|
import {
|
||||||
|
openInboundDb,
|
||||||
|
openOutboundDb,
|
||||||
|
sessionDir,
|
||||||
|
inboundDbPath,
|
||||||
|
resolveSession,
|
||||||
|
writeSessionMessage,
|
||||||
|
writeSystemResponse,
|
||||||
|
} from './session-manager.js';
|
||||||
import { resetContainerIdleTimer, wakeContainer } from './container-runner.js';
|
import { resetContainerIdleTimer, wakeContainer } from './container-runner.js';
|
||||||
import type { OutboundFile } from './channels/adapter.js';
|
import type { OutboundFile } from './channels/adapter.js';
|
||||||
import type { Session } from './types.js';
|
import type { Session } from './types.js';
|
||||||
@@ -321,7 +335,11 @@ async function routeAgentMessage(
|
|||||||
content: enrichedContent,
|
content: enrichedContent,
|
||||||
});
|
});
|
||||||
|
|
||||||
log.info('Agent message routed', { from: sourceSession.agent_group_id, to: targetAgentGroupId, targetSession: targetSession.id });
|
log.info('Agent message routed', {
|
||||||
|
from: sourceSession.agent_group_id,
|
||||||
|
to: targetAgentGroupId,
|
||||||
|
targetSession: targetSession.id,
|
||||||
|
});
|
||||||
|
|
||||||
const freshSession = getSession(targetSession.id);
|
const freshSession = getSession(targetSession.id);
|
||||||
if (freshSession) {
|
if (freshSession) {
|
||||||
@@ -419,7 +437,11 @@ async function handleSystemAction(
|
|||||||
const requestId = content.requestId as string;
|
const requestId = content.requestId as string;
|
||||||
const name = content.name as string;
|
const name = content.name as string;
|
||||||
let folder =
|
let folder =
|
||||||
(content.folder as string) || name.toLowerCase().replace(/[^a-z0-9_-]/g, '_').replace(/_+/g, '_');
|
(content.folder as string) ||
|
||||||
|
name
|
||||||
|
.toLowerCase()
|
||||||
|
.replace(/[^a-z0-9_-]/g, '_')
|
||||||
|
.replace(/_+/g, '_');
|
||||||
const instructions = content.instructions as string | null;
|
const instructions = content.instructions as string | null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -14,7 +14,13 @@ import { ensureContainerRuntimeRunning, cleanupOrphans } from './container-runti
|
|||||||
import { startActiveDeliveryPoll, startSweepDeliveryPoll, setDeliveryAdapter, stopDeliveryPolls } from './delivery.js';
|
import { startActiveDeliveryPoll, startSweepDeliveryPoll, setDeliveryAdapter, stopDeliveryPolls } from './delivery.js';
|
||||||
import { startHostSweep, stopHostSweep } from './host-sweep.js';
|
import { startHostSweep, stopHostSweep } from './host-sweep.js';
|
||||||
import { routeInbound } from './router.js';
|
import { routeInbound } from './router.js';
|
||||||
import { getPendingQuestion, deletePendingQuestion, getPendingApproval, deletePendingApproval, getSession } from './db/sessions.js';
|
import {
|
||||||
|
getPendingQuestion,
|
||||||
|
deletePendingQuestion,
|
||||||
|
getPendingApproval,
|
||||||
|
deletePendingApproval,
|
||||||
|
getSession,
|
||||||
|
} from './db/sessions.js';
|
||||||
import { getAgentGroup, updateAgentGroup } from './db/agent-groups.js';
|
import { getAgentGroup, updateAgentGroup } from './db/agent-groups.js';
|
||||||
import { writeSessionMessage, writeSystemResponse } from './session-manager.js';
|
import { writeSessionMessage, writeSystemResponse } from './session-manager.js';
|
||||||
import { wakeContainer, buildAgentGroupImage } from './container-runner.js';
|
import { wakeContainer, buildAgentGroupImage } from './container-runner.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user