style: apply prettier formatting to touched files
Pre-commit hook reflowed imports on files changed in the previous commit. Unrelated format drift on other files intentionally left unstaged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,13 +39,7 @@ import path from 'path';
|
|||||||
|
|
||||||
import { DATA_DIR } from '../config.js';
|
import { DATA_DIR } from '../config.js';
|
||||||
import { log } from '../log.js';
|
import { log } from '../log.js';
|
||||||
import type {
|
import type { ChannelAdapter, ChannelSetup, DeliveryAddress, InboundEvent, OutboundMessage } from './adapter.js';
|
||||||
ChannelAdapter,
|
|
||||||
ChannelSetup,
|
|
||||||
DeliveryAddress,
|
|
||||||
InboundEvent,
|
|
||||||
OutboundMessage,
|
|
||||||
} from './adapter.js';
|
|
||||||
import { registerChannelAdapter } from './channel-registry.js';
|
import { registerChannelAdapter } from './channel-registry.js';
|
||||||
|
|
||||||
const PLATFORM_ID = 'local';
|
const PLATFORM_ID = 'local';
|
||||||
@@ -184,11 +178,7 @@ function createAdapter(): ChannelAdapter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleLine(
|
async function handleLine(line: string, config: ChannelSetup, claimChatSlot: () => void): Promise<void> {
|
||||||
line: string,
|
|
||||||
config: ChannelSetup,
|
|
||||||
claimChatSlot: () => void,
|
|
||||||
): Promise<void> {
|
|
||||||
let payload: {
|
let payload: {
|
||||||
text?: unknown;
|
text?: unknown;
|
||||||
to?: unknown;
|
to?: unknown;
|
||||||
@@ -260,8 +250,8 @@ function createAdapter(): ChannelAdapter {
|
|||||||
obj.threadId === null || obj.threadId === undefined
|
obj.threadId === null || obj.threadId === undefined
|
||||||
? null
|
? null
|
||||||
: typeof obj.threadId === 'string'
|
: typeof obj.threadId === 'string'
|
||||||
? obj.threadId
|
? obj.threadId
|
||||||
: null;
|
: null;
|
||||||
return {
|
return {
|
||||||
channelType: obj.channelType,
|
channelType: obj.channelType,
|
||||||
platformId: obj.platformId,
|
platformId: obj.platformId,
|
||||||
|
|||||||
@@ -6,7 +6,11 @@
|
|||||||
import { beforeEach, afterEach, describe, expect, it } from 'vitest';
|
import { beforeEach, afterEach, describe, expect, it } from 'vitest';
|
||||||
|
|
||||||
import type { ChannelAdapter, OutboundMessage } from '../../channels/adapter.js';
|
import type { ChannelAdapter, OutboundMessage } from '../../channels/adapter.js';
|
||||||
import { initChannelAdapters, registerChannelAdapter, teardownChannelAdapters } from '../../channels/channel-registry.js';
|
import {
|
||||||
|
initChannelAdapters,
|
||||||
|
registerChannelAdapter,
|
||||||
|
teardownChannelAdapters,
|
||||||
|
} from '../../channels/channel-registry.js';
|
||||||
import { closeDb, createAgentGroup, initTestDb, runMigrations } from '../../db/index.js';
|
import { closeDb, createAgentGroup, initTestDb, runMigrations } from '../../db/index.js';
|
||||||
import { createUser } from '../permissions/db/users.js';
|
import { createUser } from '../permissions/db/users.js';
|
||||||
import { grantRole } from '../permissions/db/user-roles.js';
|
import { grantRole } from '../permissions/db/user-roles.js';
|
||||||
|
|||||||
@@ -16,10 +16,7 @@
|
|||||||
* access gate is not registered and core defaults to allow-all.
|
* access gate is not registered and core defaults to allow-all.
|
||||||
*/
|
*/
|
||||||
import { recordDroppedMessage } from '../../db/dropped-messages.js';
|
import { recordDroppedMessage } from '../../db/dropped-messages.js';
|
||||||
import {
|
import { createMessagingGroupAgent, setMessagingGroupDeniedAt } from '../../db/messaging-groups.js';
|
||||||
createMessagingGroupAgent,
|
|
||||||
setMessagingGroupDeniedAt,
|
|
||||||
} from '../../db/messaging-groups.js';
|
|
||||||
import {
|
import {
|
||||||
routeInbound,
|
routeInbound,
|
||||||
setAccessGate,
|
setAccessGate,
|
||||||
@@ -35,10 +32,7 @@ import type { MessagingGroup, MessagingGroupAgent } from '../../types.js';
|
|||||||
import { canAccessAgentGroup } from './access.js';
|
import { canAccessAgentGroup } from './access.js';
|
||||||
import { requestChannelApproval } from './channel-approval.js';
|
import { requestChannelApproval } from './channel-approval.js';
|
||||||
import { addMember } from './db/agent-group-members.js';
|
import { addMember } from './db/agent-group-members.js';
|
||||||
import {
|
import { deletePendingChannelApproval, getPendingChannelApproval } from './db/pending-channel-approvals.js';
|
||||||
deletePendingChannelApproval,
|
|
||||||
getPendingChannelApproval,
|
|
||||||
} from './db/pending-channel-approvals.js';
|
|
||||||
import { deletePendingSenderApproval, getPendingSenderApproval } from './db/pending-sender-approvals.js';
|
import { deletePendingSenderApproval, getPendingSenderApproval } from './db/pending-sender-approvals.js';
|
||||||
import { hasAdminPrivilege } from './db/user-roles.js';
|
import { hasAdminPrivilege } from './db/user-roles.js';
|
||||||
import { getUser, upsertUser } from './db/users.js';
|
import { getUser, upsertUser } from './db/users.js';
|
||||||
|
|||||||
@@ -6,7 +6,11 @@
|
|||||||
import { beforeEach, afterEach, describe, expect, it } from 'vitest';
|
import { beforeEach, afterEach, describe, expect, it } from 'vitest';
|
||||||
|
|
||||||
import type { ChannelAdapter, OutboundMessage } from '../../channels/adapter.js';
|
import type { ChannelAdapter, OutboundMessage } from '../../channels/adapter.js';
|
||||||
import { initChannelAdapters, registerChannelAdapter, teardownChannelAdapters } from '../../channels/channel-registry.js';
|
import {
|
||||||
|
initChannelAdapters,
|
||||||
|
registerChannelAdapter,
|
||||||
|
teardownChannelAdapters,
|
||||||
|
} from '../../channels/channel-registry.js';
|
||||||
import { closeDb, createAgentGroup, createMessagingGroup, initTestDb, runMigrations } from '../../db/index.js';
|
import { closeDb, createAgentGroup, createMessagingGroup, initTestDb, runMigrations } from '../../db/index.js';
|
||||||
import { canAccessAgentGroup } from './access.js';
|
import { canAccessAgentGroup } from './access.js';
|
||||||
import { addMember, isMember } from './db/agent-group-members.js';
|
import { addMember, isMember } from './db/agent-group-members.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user