# All files / src/trpc router.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67

    11x

     /**
     * tRPC Router — Merge Point
     *
     * Combines all domain routers into a single application router.
     * Each domain file exports a builder function that returns procedure records.
     */

    import { router, publicProcedure } from './trpc.js';
    import { systemProcedures } from './routers/system.js';
    import { agentProcedures } from './routers/agent.js';
    import { taskProcedures } from './routers/task.js';
    import { messageProcedures } from './routers/message.js';
    import { dispatchProcedures } from './routers/dispatch.js';
    import { coordinationProcedures } from './routers/coordination.js';
    import { initiativeProcedures } from './routers/initiative.js';
    import { phaseProcedures } from './routers/phase.js';
    import { phaseDispatchProcedures } from './routers/phase-dispatch.js';
    import { architectProcedures } from './routers/architect.js';
    import { projectProcedures } from './routers/project.js';
    import { pageProcedures } from './routers/page.js';
    import { accountProcedures } from './routers/account.js';
    import { changeSetProcedures } from './routers/change-set.js';
    import { subscriptionProcedures } from './routers/subscription.js';
    import { previewProcedures } from './routers/preview.js';
    import { conversationProcedures } from './routers/conversation.js';

    // Re-export tRPC primitives (preserves existing import paths)
    export { router, publicProcedure, middleware, createCallerFactory } from './trpc.js';

    // Re-export schemas and types from domain routers
    export {
      healthResponseSchema,
      processInfoSchema,
      statusResponseSchema,
    } from './routers/system.js';
    export type { HealthResponse, StatusResponse, ProcessInfo } from './routers/system.js';

    export {
      spawnAgentInputSchema,
      agentIdentifierSchema,
      resumeAgentInputSchema,
    } from './routers/agent.js';
    export type { SpawnAgentInput, AgentIdentifier, ResumeAgentInput } from './routers/agent.js';

    // Application router
    export const appRouter = router({
      ...systemProcedures(publicProcedure),
      ...agentProcedures(publicProcedure),
      ...taskProcedures(publicProcedure),
      ...messageProcedures(publicProcedure),
      ...dispatchProcedures(publicProcedure),
      ...coordinationProcedures(publicProcedure),
      ...initiativeProcedures(publicProcedure),
      ...phaseProcedures(publicProcedure),
      ...phaseDispatchProcedures(publicProcedure),
      ...architectProcedures(publicProcedure),
      ...projectProcedures(publicProcedure),
      ...pageProcedures(publicProcedure),
      ...accountProcedures(publicProcedure),
      ...changeSetProcedures(publicProcedure),
      ...subscriptionProcedures(publicProcedure),
      ...previewProcedures(publicProcedure),
      ...conversationProcedures(publicProcedure),
    });

    export type AppRouter = typeof appRouter;