import { n as FragnoClientMutatorData, o as NonGetHTTPMethod, s as FragnoPublicClientConfig, t as FragnoClientHookData } from "./client-Bk-J98pf.js"; import * as _fragno_dev_core0 from "@fragno-dev/core"; import { FragnoRouteConfig, InstantiatedFragmentFromDefinition } from "@fragno-dev/core"; import * as zod from "zod"; import { z } from "zod"; import { AgentEvent, AgentMessage, AgentOptions, AgentTool, StreamFn, ThinkingLevel } from "@mariozechner/pi-agent-core"; import { Api, Model } from "@mariozechner/pi-ai"; import * as _fragno_dev_workflows0 from "@fragno-dev/workflows"; import { InstanceStatus, WorkflowsHistoryStep, workflowsFragmentDefinition } from "@fragno-dev/workflows"; import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema"; import * as zod_v4_core0 from "zod/v4/core"; import * as _standard_schema_spec0 from "@standard-schema/spec"; import * as _fragno_dev_db0 from "@fragno-dev/db"; import { FragnoPublicConfigWithDatabase, TxResult } from "@fragno-dev/db"; import * as _fragno_dev_db_fragment_definition_builder0 from "@fragno-dev/db/fragment-definition-builder"; //#region src/pi/clients.d.ts declare function createPiFragmentClients(fragnoConfig: FragnoPublicClientConfig): { useSessions: FragnoClientHookData<"GET", "/sessions", zod.ZodArray; status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: zod.ZodString; workflowInstanceId: zod.ZodNullable; steeringMode: zod.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: zod.ZodNullable; tags: zod.ZodArray; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>, string, "limit">; useSession: FragnoClientHookData<"GET", "/sessions/:sessionId", zod.ZodObject<{ id: zod.ZodString; name: zod.ZodNullable; status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: zod.ZodString; workflowInstanceId: zod.ZodNullable; steeringMode: zod.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: zod.ZodNullable; tags: zod.ZodArray; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; workflow: zod.ZodObject<{ status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; error: zod.ZodOptional>; output: zod.ZodOptional; }, zod_v4_core0.$strip>; messages: zod.ZodArray; content: zod.ZodUnion; text: zod.ZodString; textSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"thinking">; thinking: zod.ZodString; thinkingSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"image">; data: zod.ZodString; mimeType: zod.ZodString; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"toolCall">; id: zod.ZodString; name: zod.ZodString; arguments: zod.ZodRecord; thoughtSignature: zod.ZodOptional; }, zod_v4_core0.$strip>]>>]>; timestamp: zod.ZodNumber; }, zod_v4_core0.$strip>, zod.ZodObject<{ role: zod.ZodLiteral<"assistant">; content: zod.ZodArray; text: zod.ZodString; textSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"thinking">; thinking: zod.ZodString; thinkingSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"image">; data: zod.ZodString; mimeType: zod.ZodString; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"toolCall">; id: zod.ZodString; name: zod.ZodString; arguments: zod.ZodRecord; thoughtSignature: zod.ZodOptional; }, zod_v4_core0.$strip>]>>; api: zod.ZodString; provider: zod.ZodString; model: zod.ZodString; usage: zod.ZodObject<{ input: zod.ZodNumber; output: zod.ZodNumber; cacheRead: zod.ZodNumber; cacheWrite: zod.ZodNumber; totalTokens: zod.ZodNumber; cost: zod.ZodObject<{ input: zod.ZodNumber; output: zod.ZodNumber; cacheRead: zod.ZodNumber; cacheWrite: zod.ZodNumber; total: zod.ZodNumber; }, zod_v4_core0.$strip>; }, zod_v4_core0.$strip>; stopReason: zod.ZodString; errorMessage: zod.ZodOptional; timestamp: zod.ZodNumber; }, zod_v4_core0.$strip>, zod.ZodObject<{ role: zod.ZodLiteral<"toolResult">; toolCallId: zod.ZodString; toolName: zod.ZodString; content: zod.ZodArray; text: zod.ZodString; textSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"thinking">; thinking: zod.ZodString; thinkingSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"image">; data: zod.ZodString; mimeType: zod.ZodString; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"toolCall">; id: zod.ZodString; name: zod.ZodString; arguments: zod.ZodRecord; thoughtSignature: zod.ZodOptional; }, zod_v4_core0.$strip>]>>; details: zod.ZodOptional; isError: zod.ZodBoolean; timestamp: zod.ZodNumber; }, zod_v4_core0.$strip>]>>; trace: zod.ZodArray; }, zod_v4_core0.$strip>>; summaries: zod.ZodArray; summary: zod.ZodNullable; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, "WORKFLOWS_REQUIRED" | "SESSION_NOT_FOUND" | "WORKFLOW_INSTANCE_MISSING", string>; useCreateSession: FragnoClientMutatorData | zod.ZodObject<{ agent: zod.ZodString; name: zod.ZodOptional; metadata: zod.ZodOptional; tags: zod.ZodOptional>; steeringMode: zod.ZodOptional>; }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{ id: zod.ZodString; name: zod.ZodNullable; status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: zod.ZodString; workflowInstanceId: zod.ZodNullable; steeringMode: zod.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: zod.ZodNullable; tags: zod.ZodArray; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip> | zod.ZodArray; status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: zod.ZodString; workflowInstanceId: zod.ZodNullable; steeringMode: zod.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: zod.ZodNullable; tags: zod.ZodArray; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>> | undefined, string, string>; useSendMessage: FragnoClientMutatorData; steeringMode: zod.ZodOptional>; }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{ status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; }, zod_v4_core0.$strip> | undefined, "WORKFLOWS_REQUIRED" | "SESSION_NOT_FOUND" | "WORKFLOW_INSTANCE_MISSING", string>; }; //#endregion //#region src/pi/constants.d.ts declare const SESSION_STATUSES: readonly ["active", "paused", "errored", "terminated", "complete", "waiting"]; declare const STEERING_MODES: readonly ["all", "one-at-a-time"]; declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh"]; type PiSessionStatus = (typeof SESSION_STATUSES)[number]; type PiSteeringMode = (typeof STEERING_MODES)[number]; //#endregion //#region src/pi/types.d.ts type WorkflowsService = InstantiatedFragmentFromDefinition["services"]; type PiSession = { id: string; name: string | null; status: PiSessionStatus; agent: string; workflowInstanceId: string | null; steeringMode: PiSteeringMode; metadata: unknown; tags: string[]; createdAt: Date; updatedAt: Date; }; type PiTurnSummary = { turn: number; assistant: AgentMessage | null; summary: string | null; }; type PiWorkflowsInstanceStatus = InstanceStatus; type PiWorkflowHistoryStep = WorkflowsHistoryStep; type PiWorkflowsService = Pick & { getInstanceStatusBatch?: (workflowName: string, instanceIds: string[]) => TxResult; }; type PiAgentDefinition = { name: string; systemPrompt: string; model: Model; thinkingLevel?: ThinkingLevel; tools?: string[]; toolConfig?: unknown; maxTraceEvents?: number; streamFn?: StreamFn; convertToLlm?: AgentOptions["convertToLlm"]; transformContext?: AgentOptions["transformContext"]; getApiKey?: AgentOptions["getApiKey"]; thinkingBudgets?: AgentOptions["thinkingBudgets"]; maxRetryDelayMs?: AgentOptions["maxRetryDelayMs"]; onEvent?: (event: AgentEvent, ctx: { sessionId: string; turnId: string; }) => void; }; type PiAgentRegistry = Record; type PiToolFactoryContext = { session: PiSession; turnId: string; toolConfig: unknown; messages: AgentMessage[]; }; type PiToolFactory = AgentTool | ((ctx: PiToolFactoryContext) => AgentTool | Promise); type PiToolRegistry = Record; interface PiFragmentConfig { agents: PiAgentRegistry; tools: PiToolRegistry; defaultSteeringMode?: PiSteeringMode; } //#endregion //#region src/pi/workflow.d.ts declare const PI_WORKFLOW_NAME = "agent-loop-workflow"; type PiAgentLoopParams = { sessionId: string; agentName: string; systemPrompt?: string; initialMessages?: AgentMessage[]; }; type PiWorkflowsOptions = { agents: PiAgentRegistry; tools: PiToolRegistry; }; declare const agentLoopWorkflow: (options: PiWorkflowsOptions) => _fragno_dev_workflows0.WorkflowDefinition>, undefined>; type PiWorkflowsRegistry = { agentLoop: ReturnType; }; declare const createPiWorkflows: (options: PiWorkflowsOptions) => { agentLoop: _fragno_dev_workflows0.WorkflowDefinition>, undefined>; }; //#endregion //#region src/pi/dsl.d.ts type PiAgentDefinitionInput = Omit & { name?: string; }; type PiRuntime = { config: PiFragmentConfig; workflows: PiWorkflowsRegistry; }; declare const defineAgent: (name: string, definition: PiAgentDefinitionInput) => PiAgentDefinition; declare const createPi: () => { agent(definition: PiAgentDefinition): /*elided*/any; agents(registry: PiAgentRegistry): /*elided*/any; tool(name: string, tool: PiToolFactory): /*elided*/any; tools(registry: PiToolRegistry): /*elided*/any; defaultSteeringMode(mode: PiSteeringMode): /*elided*/any; build(): PiRuntime; }; //#endregion //#region src/pi/definition.d.ts declare const piFragmentDefinition: _fragno_dev_core0.FragmentDefinition & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"name", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"agent", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"workflowInstanceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"steeringMode", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"metadata", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"tags", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>>, Record, Record> & Record<"idx_session_status", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_session_created", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["createdAt"]>>>>>>, {}, {}, { workflows: PiWorkflowsService; }, {}, _fragno_dev_db0.DatabaseServiceContext<_fragno_dev_db0.HooksMap>, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, []>; //#endregion //#region src/pi/factory.d.ts type PiFragmentServices = { workflows: PiWorkflowsService; }; declare function createPiFragment(config: PiFragmentConfig, options: FragnoPublicConfigWithDatabase, services: PiFragmentServices): _fragno_dev_core0.FragnoInstantiatedFragment; metadata: zod.ZodOptional; tags: zod.ZodOptional>; steeringMode: zod.ZodOptional>; }, zod_v4_core0.$strip>, zod.ZodObject<{ id: zod.ZodString; name: zod.ZodNullable; status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: zod.ZodString; workflowInstanceId: zod.ZodNullable; steeringMode: zod.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: zod.ZodNullable; tags: zod.ZodArray; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>, "AGENT_NOT_FOUND" | "WORKFLOWS_REQUIRED" | "WORKFLOW_CREATE_FAILED", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/sessions", _standard_schema_spec0.StandardSchemaV1 | undefined, zod.ZodArray; status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: zod.ZodString; workflowInstanceId: zod.ZodNullable; steeringMode: zod.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: zod.ZodNullable; tags: zod.ZodArray; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>, string, "limit", _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/sessions/:sessionId", _standard_schema_spec0.StandardSchemaV1 | undefined, zod.ZodObject<{ id: zod.ZodString; name: zod.ZodNullable; status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: zod.ZodString; workflowInstanceId: zod.ZodNullable; steeringMode: zod.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: zod.ZodNullable; tags: zod.ZodArray; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; workflow: zod.ZodObject<{ status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; error: zod.ZodOptional>; output: zod.ZodOptional; }, zod_v4_core0.$strip>; messages: zod.ZodArray; content: zod.ZodUnion; text: zod.ZodString; textSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"thinking">; thinking: zod.ZodString; thinkingSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"image">; data: zod.ZodString; mimeType: zod.ZodString; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"toolCall">; id: zod.ZodString; name: zod.ZodString; arguments: zod.ZodRecord; thoughtSignature: zod.ZodOptional; }, zod_v4_core0.$strip>]>>]>; timestamp: zod.ZodNumber; }, zod_v4_core0.$strip>, zod.ZodObject<{ role: zod.ZodLiteral<"assistant">; content: zod.ZodArray; text: zod.ZodString; textSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"thinking">; thinking: zod.ZodString; thinkingSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"image">; data: zod.ZodString; mimeType: zod.ZodString; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"toolCall">; id: zod.ZodString; name: zod.ZodString; arguments: zod.ZodRecord; thoughtSignature: zod.ZodOptional; }, zod_v4_core0.$strip>]>>; api: zod.ZodString; provider: zod.ZodString; model: zod.ZodString; usage: zod.ZodObject<{ input: zod.ZodNumber; output: zod.ZodNumber; cacheRead: zod.ZodNumber; cacheWrite: zod.ZodNumber; totalTokens: zod.ZodNumber; cost: zod.ZodObject<{ input: zod.ZodNumber; output: zod.ZodNumber; cacheRead: zod.ZodNumber; cacheWrite: zod.ZodNumber; total: zod.ZodNumber; }, zod_v4_core0.$strip>; }, zod_v4_core0.$strip>; stopReason: zod.ZodString; errorMessage: zod.ZodOptional; timestamp: zod.ZodNumber; }, zod_v4_core0.$strip>, zod.ZodObject<{ role: zod.ZodLiteral<"toolResult">; toolCallId: zod.ZodString; toolName: zod.ZodString; content: zod.ZodArray; text: zod.ZodString; textSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"thinking">; thinking: zod.ZodString; thinkingSignature: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"image">; data: zod.ZodString; mimeType: zod.ZodString; }, zod_v4_core0.$strip>, zod.ZodObject<{ type: zod.ZodLiteral<"toolCall">; id: zod.ZodString; name: zod.ZodString; arguments: zod.ZodRecord; thoughtSignature: zod.ZodOptional; }, zod_v4_core0.$strip>]>>; details: zod.ZodOptional; isError: zod.ZodBoolean; timestamp: zod.ZodNumber; }, zod_v4_core0.$strip>]>>; trace: zod.ZodArray; }, zod_v4_core0.$strip>>; summaries: zod.ZodArray; summary: zod.ZodNullable; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, "WORKFLOWS_REQUIRED" | "SESSION_NOT_FOUND" | "WORKFLOW_INSTANCE_MISSING", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/sessions/:sessionId/messages", zod.ZodObject<{ text: zod.ZodString; done: zod.ZodOptional; steeringMode: zod.ZodOptional>; }, zod_v4_core0.$strip>, zod.ZodObject<{ status: zod.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; }, zod_v4_core0.$strip>, "WORKFLOWS_REQUIRED" | "SESSION_NOT_FOUND" | "WORKFLOW_INSTANCE_MISSING", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>], _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"name", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"agent", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"workflowInstanceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"steeringMode", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"metadata", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"tags", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>>, Record, Record> & Record<"idx_session_status", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_session_created", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["createdAt"]>>>>>>, _fragno_dev_core0.BoundServices<{}>, _fragno_dev_db0.DatabaseServiceContext<_fragno_dev_db0.HooksMap>, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, FragnoPublicConfigWithDatabase>; //#endregion //#region src/routes.d.ts declare const piRoutesFactory: _fragno_dev_core0.RouteFactory & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"name", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"agent", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"workflowInstanceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"steeringMode", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"metadata", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"tags", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>>, Record, Record> & Record<"idx_session_status", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_session_created", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["createdAt"]>>>>>>, _fragno_dev_core0.BoundServices<{}>, { workflows: PiWorkflowsService; }, readonly [_fragno_dev_core0.FragnoRouteConfig<"POST", "/sessions", z.ZodObject<{ agent: z.ZodString; name: z.ZodOptional; metadata: z.ZodOptional; tags: z.ZodOptional>; steeringMode: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; name: z.ZodNullable; status: z.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: z.ZodString; workflowInstanceId: z.ZodNullable; steeringMode: z.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: z.ZodNullable; tags: z.ZodArray; createdAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>, "AGENT_NOT_FOUND" | "WORKFLOWS_REQUIRED" | "WORKFLOW_CREATE_FAILED", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/sessions", _standard_schema_spec0.StandardSchemaV1 | undefined, z.ZodArray; status: z.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: z.ZodString; workflowInstanceId: z.ZodNullable; steeringMode: z.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: z.ZodNullable; tags: z.ZodArray; createdAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>>, string, "limit", _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/sessions/:sessionId", _standard_schema_spec0.StandardSchemaV1 | undefined, z.ZodObject<{ id: z.ZodString; name: z.ZodNullable; status: z.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; agent: z.ZodString; workflowInstanceId: z.ZodNullable; steeringMode: z.ZodEnum<{ all: "all"; "one-at-a-time": "one-at-a-time"; }>; metadata: z.ZodNullable; tags: z.ZodArray; createdAt: z.ZodDate; updatedAt: z.ZodDate; workflow: z.ZodObject<{ status: z.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; error: z.ZodOptional>; output: z.ZodOptional; }, z.core.$strip>; messages: z.ZodArray; content: z.ZodUnion; text: z.ZodString; textSignature: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"thinking">; thinking: z.ZodString; thinkingSignature: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; data: z.ZodString; mimeType: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"toolCall">; id: z.ZodString; name: z.ZodString; arguments: z.ZodRecord; thoughtSignature: z.ZodOptional; }, z.core.$strip>]>>]>; timestamp: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; textSignature: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"thinking">; thinking: z.ZodString; thinkingSignature: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; data: z.ZodString; mimeType: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"toolCall">; id: z.ZodString; name: z.ZodString; arguments: z.ZodRecord; thoughtSignature: z.ZodOptional; }, z.core.$strip>]>>; api: z.ZodString; provider: z.ZodString; model: z.ZodString; usage: z.ZodObject<{ input: z.ZodNumber; output: z.ZodNumber; cacheRead: z.ZodNumber; cacheWrite: z.ZodNumber; totalTokens: z.ZodNumber; cost: z.ZodObject<{ input: z.ZodNumber; output: z.ZodNumber; cacheRead: z.ZodNumber; cacheWrite: z.ZodNumber; total: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; stopReason: z.ZodString; errorMessage: z.ZodOptional; timestamp: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"toolResult">; toolCallId: z.ZodString; toolName: z.ZodString; content: z.ZodArray; text: z.ZodString; textSignature: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"thinking">; thinking: z.ZodString; thinkingSignature: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; data: z.ZodString; mimeType: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"toolCall">; id: z.ZodString; name: z.ZodString; arguments: z.ZodRecord; thoughtSignature: z.ZodOptional; }, z.core.$strip>]>>; details: z.ZodOptional; isError: z.ZodBoolean; timestamp: z.ZodNumber; }, z.core.$strip>]>>; trace: z.ZodArray; }, z.core.$strip>>; summaries: z.ZodArray; summary: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>, "WORKFLOWS_REQUIRED" | "SESSION_NOT_FOUND" | "WORKFLOW_INSTANCE_MISSING", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/sessions/:sessionId/messages", z.ZodObject<{ text: z.ZodString; done: z.ZodOptional; steeringMode: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ status: z.ZodEnum<{ active: "active"; paused: "paused"; errored: "errored"; terminated: "terminated"; complete: "complete"; waiting: "waiting"; }>; }, z.core.$strip>, "WORKFLOWS_REQUIRED" | "SESSION_NOT_FOUND" | "WORKFLOW_INSTANCE_MISSING", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>]>; //#endregion export { type FragnoRouteConfig, PI_WORKFLOW_NAME, type PiAgentDefinition, type PiAgentDefinitionInput, type PiAgentRegistry, type PiFragmentConfig, type PiRuntime, type PiSession, type PiSessionStatus, type PiSteeringMode, type PiToolFactory, type PiToolFactoryContext, type PiToolRegistry, type PiTurnSummary, type PiWorkflowHistoryStep, type PiWorkflowsInstanceStatus, type PiWorkflowsRegistry, type PiWorkflowsService, SESSION_STATUSES, STEERING_MODES, THINKING_LEVELS, createPi, createPiFragment, createPiFragmentClients, createPiWorkflows, defineAgent, piFragmentDefinition, piRoutesFactory }; //# sourceMappingURL=index.d.ts.map