import { At as BuildAndReviewOptions, Ct as FollowDelivery, Dn as ExecuteAgentStep, Dt as DescribeDelivery, Fn as ModelRequest, Gt as RunAgentFn, H as HaltForHumanDependencies, Hn as AskJevOptions, Ht as AgentSession, In as RunAgentOptions, Jn as JevQuestions, Kt as bindAgentSession, Ln as AgentResult, Mt as BuildDelivery, Nn as AskAgentOptions, Nt as BuildResult, O as TicketSnapshot, Ot as DescribeOptions, Pn as AskModelOptions, R as PostTicketNote, Rt as DeliverySteps, St as PublishOptions, Tt as FollowResult, U as HaltForHumanFn, Ut as AgentSessionOptions, Wn as ExecuteJevStep, Wt as AgentSessionTurn, X as LinearAgentConversationSteps, Yn as JevResult, Yt as commentOnPullRequest, Z as linearAgentConversation, a as waitForSlackReply, dn as FetchPrState, f as PostPullRequestNoteOptions, hn as RepositoryRef, i as SlackReplySteps, kt as Described, mn as PullRequestRef, p as postPullRequestNote, pn as PullRequestReadOptions, q as TicketClaim, sn as PullRequestSnapshot, wt as FollowOptions, xt as PublishDelivery, z as TicketNote, zn as ModelResult } from "./index-DJ6CHaMc.js"; import { d as CommittedWorkOptions, f as GitSteps, m as bindGitSteps, p as ReadBranchState, u as BranchState } from "./change-DqLNW9Dp.js"; import { n as fetchTicketSnapshot, t as resolveLinearIssue } from "./resolve-CiVTHbqA.js"; //#region src/workflow/agents/ask-model.d.ts /** * The factory's `"use step"` wrapper around `executeModel`. * * @group Factory plumbing */ type ExecuteModelStep = (wire: ModelRequest) => Promise; //#endregion //#region src/workflow/agents/bind.d.ts /** * The raw durable wrappers a factory supplies, one per execution role. * * @group Factory plumbing */ interface AgentSteps { executeAgent: ExecuteAgentStep; executeModel: ExecuteModelStep; executeJev: ExecuteJevStep; } /** * Connect agent calls to durable steps without requiring a ticket integration. * * @group Factory plumbing */ declare function bindAgentSteps(steps: AgentSteps): { runAgent: (config: RunAgentOptions) => Promise>; askAgent: (config: AskAgentOptions) => Promise>; askModel: (config: AskModelOptions) => Promise>; askJev: (config: AskJevOptions) => Promise>; }; //#endregion //#region src/workflow/delivery/bind.d.ts /** * Connect the pull request delivery routines to the factory's durable steps. * * @group Factory plumbing */ declare function bindDeliverySteps(steps: DeliverySteps): { buildAndReview: (delivery: BuildDelivery, options: BuildAndReviewOptions) => Promise; describePullRequest: (delivery: DescribeDelivery, options?: DescribeOptions) => Promise; publishPullRequest: (delivery: PublishDelivery, options: PublishOptions) => Promise; followPullRequestToOutcome: (delivery: FollowDelivery, pr: PullRequestRef, options: FollowOptions) => Promise; }; //#endregion //#region src/workflow/linear/bind.d.ts /** * Durable wrappers a factory supplies for Linear operations. * * @group Factory plumbing */ interface LinearSteps extends HaltForHumanDependencies { postTicketNote: PostTicketNote; } /** * Connect Linear clarification and notes to the factory's durable steps. * * @group Factory plumbing */ declare function bindLinearSteps(steps: LinearSteps): { haltForHuman: HaltForHumanFn; noteOnTicket: (claim: TicketClaim, note: TicketNote) => Promise; }; //#endregion //#region src/workflow/linear/prelude.d.ts /** * Durable ticket and session operations required before a workflow starts protected work. * * @group Factory plumbing */ interface AcquireTicketSteps extends Pick { resolveLinearIssue: typeof resolveLinearIssue; fetchTicketSnapshot: typeof fetchTicketSnapshot; openLinearAgentSession(request: { installationName: string; issueId: string; }): Promise<{ sessionId: string; }>; } /** * Resolve a ticket reference in the Linear installation `installationName` names, claim it, take * a Linear agent session on it, and read its current requirements. Provisioning and all other * protected work deliberately happen after this routine. * * @remarks * Pass `session` when a Linear agent session started the run, and the run talks in that one; * otherwise it opens its own. Either way the session links the run and says the run is working, * and the run holds it until it ends, so its questions and notes all land there. */ declare function acquireTicket({ installationName, reference, session }: { installationName: string; reference: string; session?: string | undefined; }, steps: AcquireTicketSteps): Promise<{ claim: TicketClaim; snapshot: TicketSnapshot; }>; //#endregion //#region src/workflow/pull-requests/bind.d.ts /** * The factory's `"use step"` wrappers the pull request routines run. * * @group Factory plumbing */ interface PullRequestSteps { fetchPullRequestState: FetchPrState; commentOnPullRequest: typeof commentOnPullRequest; } type StepFields = keyof PullRequestSteps; /** * Connect the pull request routines to the factory's durable steps. * * @group Factory plumbing */ declare function bindPullRequestSteps(steps: PullRequestSteps): { watchPullRequest: (pr: PullRequestRef, options?: PullRequestReadOptions) => AsyncGenerator; postPullRequestNote: (options: Omit) => Promise; }; //#endregion export { type AcquireTicketSteps, type AgentSession, type AgentSessionOptions, type AgentSessionTurn, type AgentSteps, type BranchState, type CommittedWorkOptions, type DeliverySteps, type GitSteps, type LinearAgentConversationSteps, type LinearSteps, type PostPullRequestNoteOptions, type PullRequestSteps, type ReadBranchState, type RunAgentFn, type SlackReplySteps, acquireTicket, bindAgentSession, bindAgentSteps, bindDeliverySteps, bindGitSteps, bindLinearSteps, bindPullRequestSteps, linearAgentConversation, postPullRequestNote, waitForSlackReply };