Skip to content

@persistent-ai/fireflow-executor / server / executionRouter

Variable: executionRouter

const executionRouter: BuiltRouter<{ ctx: ExecutorContext; errorShape: { code: TRPC_ERROR_CODE_NUMBER; data: { code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string; stack?: string; zodError: typeToFlattenedError<any, string> | null; }; message: string; }; meta: object; transformer: true; }, DecorateCreateRouterOptions<{ batchGetDirectChildren: QueryProcedure<{ input: { parentIds: string[]; }; meta: object; output: ChildFeedItem[]; }>; create: MutationProcedure<{ input: { events?: object[]; integration?: objectInputType<{ agui: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; createdBy: ZodOptional<ZodString>; external: ZodOptional<ZodRecord<..., ...>>; miniapp: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; persistentai: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; wallet: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; }, ZodAny, "strip">; locator: { flowId?: string; path?: string; ref?: string; workspaceId: string; }; options?: { breakpoints?: string[]; debug?: boolean; execution?: { flowTimeoutMs?: ... | ...; maxConcurrency?: ... | ...; nodeTimeoutMs?: ... | ...; }; }; }; meta: object; output: { executionId: string; }; }>; executeMiniApp: MutationProcedure<{ input: { appId: string; searchParams?: Record<string, string>; }; meta: object; output: { appName: string; executionId: string; flowId: any; renderStreamKey: string; renderTimeout: number; }; }>; getChildExecutionFeed: QueryProcedure<{ input: { cursor?: string; limit?: number; rootExecutionId: string; }; meta: object; output: { items: ChildFeedItem[]; nextCursor: string | null; }; }>; getDirectChildFeed: QueryProcedure<{ input: { cursor?: string; limit?: number; parentExecutionId: string; }; meta: object; output: { items: ChildFeedItem[]; nextCursor: string | null; }; }>; getEvent: QueryProcedure<{ input: { appId?: string; flowId?: string; key: string; path?: string; ref?: string; timeoutSeconds?: number; workflowId: string; workspaceId?: string; }; meta: object; output: { found: boolean; value: unknown; }; }>; getExecutionDetails: QueryProcedure<{ input: { executionId: string; }; meta: object; output: { commitHash: string; completedAt: Date | null; createdAt: Date; errorMessage: string | null; errorNodeId: string | null; executionDepth: number; externalEvents: object[] | null; failureCount: number; flowId: string; id: string; integration: object & object | null; lastFailureAt: Date | null; lastFailureReason: string | null; options: { breakpoints?: string[]; debug?: boolean; execution?: { flowTimeoutMs?: ... | ...; maxConcurrency?: ... | ...; nodeTimeoutMs?: ... | ...; }; } | null; ownerId: string; parentExecutionId: string | null; path: string; processingStartedAt: Date | null; processingWorkerId: string | null; ref: string; rootExecutionId: string | null; startedAt: Date | null; status: ExecutionStatus; updatedAt: Date; workspaceId: string; }; }>; getExecutionMessages: QueryProcedure<{ input: { executionId: string; }; meta: object; output: DbosExecutionMessage[]; }>; getExecutionStats: QueryProcedure<{ input: { rootExecutionId: string; }; meta: object; output: ExecutionStats; }>; getExecutionSteps: QueryProcedure<{ input: { executionId: string; }; meta: object; output: DbosExecutionStep[]; }>; getExecutionsTree: QueryProcedure<{ input: { executionId: string; }; meta: object; output: { nodes: ExecutionTreeNode[]; truncated: boolean; }; }>; getExecutionSystemMeta: QueryProcedure<{ input: { executionId: string; }; meta: object; output: DbosExecutionSystemMeta; }>; getRootExecutions: QueryProcedure<{ input: { after?: Date; createdFrom?: Date; createdTo?: Date; limit?: number; path: string; ref?: string; status?: Idle | Creating | Created | Running | Paused | Completed | Failed | Stopped; workspaceId: string; }; meta: object; output: RootExecution[]; }>; getWorkflowStatus: QueryProcedure<{ input: { appId?: string; flowId?: string; path?: string; ref?: string; workflowId: string; workspaceId?: string; }; meta: object; output: WorkflowStatus; }>; listExecutionStreams: QueryProcedure<{ input: { executionId: string; }; meta: object; output: object[]; }>; openExecutionStream: SubscriptionProcedure<{ input: { batchSize?: number; batchTimeoutMs?: number; executionId: string; fromOffset?: number; key: string; }; meta: object; output: AsyncIterable<string[]>; }>; pause: MutationProcedure<{ input: { executionId: string; reason?: string; }; meta: object; output: { success: boolean; }; }>; resume: MutationProcedure<{ input: { executionId: string; }; meta: object; output: { success: boolean; }; }>; sendMessage: MutationProcedure<{ input: { appId?: string; flowId?: string; idempotencyKey?: string; message?: any; path?: string; ref?: string; topic?: string; workflowId: string; workspaceId?: string; }; meta: object; output: { success: boolean; }; }>; sqlite: BuiltRouter<{ ctx: ExecutorContext; errorShape: { code: TRPC_ERROR_CODE_NUMBER; data: { code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string; stack?: string; zodError: typeToFlattenedError<any, string> | null; }; message: string; }; meta: object; transformer: true; }, DecorateCreateRouterOptions<{ query: MutationProcedure<{ input: { commitMessage?: string; path: string; ref: string; sql: string; timeoutMs?: number; workspaceId: string; writable?: boolean; }; meta: object; output: SqliteQueryResult; }>; schema: QueryProcedure<{ input: { path: string; ref: string; workspaceId: string; }; meta: object; output: { elapsedMs: number; error: string | null; schema: SqliteSchema; }; }>; }>>; start: MutationProcedure<{ input: { executionId: string; }; meta: object; output: { success: boolean; }; }>; stop: MutationProcedure<{ input: { executionId: string; reason?: string; }; meta: object; output: { success: boolean; }; }>; subscribeToExecutionEvents: SubscriptionProcedure<{ input: { batchSize?: number; batchTimeoutMs?: number; eventTypes?: string[]; executionId: string; fromIndex?: number; }; meta: object; output: AsyncIterable<ExecutionEventImpl<ExecutionEventEnum>[]>; }>; subscribeToPortStream: SubscriptionProcedure<{ input: { batchSize?: number; batchTimeoutMs?: number; executionId: string; fromOffset?: number; streamKey: string; workflowId: string; }; meta: object; output: AsyncIterable<string[]>; }>; subscribeToStream: SubscriptionProcedure<{ input: { appId?: string; batchSize?: number; batchTimeoutMs?: number; flowId?: string; fromOffset?: number; path?: string; ref?: string; streamKey: string; workflowId: string; workspaceId?: string; }; meta: object; output: AsyncIterable<unknown[]>; }>; terminal: BuiltRouter<{ ctx: ExecutorContext; errorShape: { code: TRPC_ERROR_CODE_NUMBER; data: { code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string; stack?: string; zodError: typeToFlattenedError<any, string> | null; }; message: string; }; meta: object; transformer: true; }, DecorateCreateRouterOptions<{ cancel: MutationProcedure<{ input: { runId: string; sessionId: string; }; meta: object; output: { requested: true; }; }>; create: MutationProcedure<{ input: { ref: string; title?: string; workspaceId: string; }; meta: object; output: { createdAt: Date; id: string; lastActivityAt: Date; lastRunId: string | null; ref: string; runCount: number; sandboxSummary: string; title: string | null; workspaceId: string; }; }>; exec: MutationProcedure<{ input: { command: string; expectedLastRunId?: string | null; sessionId: string; }; meta: object; output: { runId: string; seq: number; }; }>; get: QueryProcedure<{ input: { sessionId: string; }; meta: object; output: { createdAt: Date; id: string; lastActivityAt: Date; lastRunId: string | null; ref: string; runCount: number; sandboxSummary: string; title: string | null; workspaceId: string; }; }>; history: QueryProcedure<{ input: { after?: string; before?: string; sessionId: string; }; meta: object; output: TranscriptPage; }>; list: QueryProcedure<{ input: { workspaceId?: ... | ...; } | undefined; meta: object; output: object[]; }>; purge: MutationProcedure<{ input: { sessionId: string; }; meta: object; output: { ok: true; }; }>; rename: MutationProcedure<{ input: { sessionId: string; title: string; }; meta: object; output: { ok: boolean; }; }>; subscribe: SubscriptionProcedure<{ input: { after?: string; sessionId: string; }; meta: object; output: AsyncIterable<ConsoleEntry>; }>; }>>; version: QueryProcedure<{ input: void; meta: object; output: { service: "executor"; version: string; }; }>; }>>

Defined in: packages/fireflow-executor/server/trpc/router.ts:433

Licensed under BUSL-1.1