import { type Database } from "./database.js"; /** Shared physical-attempt fence. Does not mutate goal/execution snapshots. */ export declare function getLiveSessionAttemptTurn(db: Database, workspaceId: string, sessionId: string, attemptId: string): Promise<{ id: string; accountId: string; workspaceId: string; sessionId: string; triggerEventId: string; temporalWorkflowId: string; status: string; source: string; surface: string | null; billingOrigin: string | null; promptRouting: string | null; position: number; prompt: string; promptCodecVersion: number | null; annotations: { id: string; source: { kind: "assistant_message" | "tool_output" | "user_message"; eventId: string; eventType: "agent.message.completed" | "agent.toolCall.output" | "user.message"; sequence: number; turnId: string | null; startOffset: number; endOffset: number; contextBefore: string; contextAfter: string; label?: string | undefined; }; quote: string; note: string; ordinal: number; }[]; modelContext: string | null; resources: unknown[]; tools: unknown[]; toolsProvided: boolean; model: string; reasoningEffort: string; latencyMode: string; sandboxBackend: string; sandboxOs: string | null; metadata: Record; version: number; executionGeneration: number; activeAttemptId: string | null; lineage: Record; initiatorKind: string; initiatorSubjectId: string; initiatorContext: Record; initiatingHumanSubjectId: string | null; executionContextTurnId: string | null; goalSnapshot: { state: "none"; capturedAt: string; } | { state: "active" | "completed" | "paused"; goalId: string; objectiveRevision: number; text: string; successCriteria: string | null; rootConstraints: string[]; reportRequirements?: { id: string; title: string; }[] | undefined; mutationPolicy: "autonomous_adaptation" | "preserve_intent" | "review_changes"; capturedAt: string; } | null; personalConnectionDelegations: { serverId: string; canonicalServerId?: string | undefined; connectionId: string; originWorkspaceId?: string | undefined; ownerSubjectId: string; providerDomain: string; kind?: "api_key" | "app_install" | "delegated" | "oauth2" | undefined; connectionType?: "atlassian" | "github_personal" | "mcp" | "social" | undefined; userDelegation?: { authorityId: string; grantId: string; organizationId: string; workspaceId: string; sessionId: string | null; action: string; mode: "always" | "once" | "session"; context: "user_private" | "workspace_shared"; authorityEpoch: number | null; authorityGeneration: number; grantGeneration: number; resourceVersionId?: string | null | undefined; } | undefined; personalGitHubRepositorySelection?: { credentialBindingId: string; connectionAuthorityGeneration: number; selectionGeneration: number; allRepositoriesAccess?: "read" | "write" | undefined; repositories: { repositoryId: string; fullName: string; canonicalUrl: string; ref: string; access: "read" | "write"; selectionGeneration: number; }[]; } | undefined; outputDestination?: { folderId: string; folderName: string; driveId: string | null; location: "my_drive" | "shared_drive"; selectedAt: string; } | undefined; }[]; mcpAccountBindings: { serverId: string; canonicalServerId: string; connectionId: string; originWorkspaceId: string; subjectScope: "subject" | "workspace"; ownerSubjectId: string | null; accountLabel: string; providerDomain: string; kind: "api_key" | "app_install" | "delegated" | "oauth2"; connectionRef: { connectionId?: string | undefined; accountSelection?: "all_eligible" | undefined; authoritySource?: "host" | undefined; hostBinding?: { bindingId: string; generation: number; } | { selection: "accepted_turn"; } | undefined; provider?: string | undefined; providerDomain: string; kind?: "api_key" | "app_install" | "delegated" | "oauth2" | undefined; scopes?: string[] | undefined; resource?: string | undefined; selectedResources?: { id: string; kind: "repository"; }[] | undefined; subjectScope?: "subject" | "workspace" | undefined; }; connectionAuthorityGeneration?: number | undefined; }[] | null; connectionAccountIntent: { version: 1; principal: { kind: "subject"; subjectId: string; } | { kind: "none"; }; selections: { serverId: string; connectionId: string; }[]; } | null; personalResourceAttachmentSummary: { mode: "always" | "once" | "session"; context: "user_private" | "workspace_shared"; resourceCount: number; resourceKinds: ("connected_machine" | "rig" | "variable_set")[]; sharedOutputWarningVersion: 1; } | null; personalResourceProtocolVersion: number; scheduledTaskRunId: string | null; xaiProviderAccountAuthoritySnapshot: { version: 1; scope: "organization"; } | { version: 1; scope: "workspace"; } | { version: 1; scope: "user"; authorityGeneration: number; }; claudeProviderAccountAuthoritySnapshot: { version: 1; scope: "organization"; } | { version: 1; scope: "workspace"; } | { version: 1; scope: "user"; authorityGeneration: number; }; subscriptionAuthority: { version: 2; personal: { provider: "claude" | "codex" | "xai"; ownerMembershipId: string; authorityGeneration: number; sharedSessionChoice?: { sessionId: string; connectionId: string; } | undefined; }[]; } | null; cancelledBy: string | null; cancelReason: string | null; codemodeCallCount: number; startedAt: Date | null; finishedAt: Date | null; createdAt: Date; updatedAt: Date; } | null>;