import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './client-Cq8onk2D.js';
export { bn as APIError, A as AccessTokenProvider, y as Assignment, z as AssignmentListResponse, X as Build, Z as BuildListResponse, B as BuildPolicy, Q as BuildStatus, C as ConnectOptions, ar as ConversationAppendResult, aq as ConversationMessageInput, ap as ConversationMessageShowRefs, q as ConversationSessionInfo, J as CreateEnvironmentData, w as CreatePermissionProfileData, s as CreateSandboxData, p as CreateSessionOptions, aN as DefineRelationshipOptions, bo as DeleteResponse, D as DomainState, ae as EffectHandler, ab as EffectInfo, a5 as EffectInvocationMetadata, a4 as EffectInvocationMode, a6 as EffectSchema, a9 as EffectVersionSelector, a7 as EffectWithHandler, ad as EffectsChangedEvent, e as Environment, H as EnvironmentData, am as EnvironmentFeedbackRecord, b0 as EnvironmentImporter, a$ as EnvironmentImporterImportOptions, K as EnvironmentListResponse, aX as EnvironmentRecordImportSummary, f as EnvironmentSession, aZ as EnvironmentSetupLifecycleStatus, a_ as EnvironmentSetupSummary, aY as EnvironmentSetupTriggerReason, G as Granular, l as GranularAuth, k as GranularOptions, bm as GraphQLResult, af as InstanceEffectHandler, I as InstanceToolHandler, ao as Job, ak as JobFeedbackInput, aj as JobFeedbackMetadata, al as JobFeedbackRecord, ah as JobFeedbackSentiment, ai as JobFeedbackToolCall, ag as JobStatus, an as JobSubmitResult, L as Manifest, bc as ManifestApprovalRequiredSpec, bl as ManifestContent, ba as ManifestDryRunSpec, bf as ManifestEffectDeclaration, be as ManifestEffectSchema, b3 as ManifestEnumRuleSpec, bh as ManifestEventStreamDef, bg as ManifestEventTypeDef, b4 as ManifestFilterBySpec, bj as ManifestImport, N as ManifestListResponse, bi as ManifestOperation, b9 as ManifestPostConditionSpec, b1 as ManifestPropertySpec, bd as ManifestRelationshipDef, bb as ManifestReverseSpec, b8 as ManifestStateMachineSpec, b6 as ManifestStateMachineStateSpec, b7 as ManifestStateMachineTransitionSpec, b2 as ManifestValidationOperator, b5 as ManifestValidationRuleSpec, bk as ManifestVolume, aL as ModelRef, O as OntologyHandle, o as OpenEnvironmentOptions, v as PermissionProfile, x as PermissionProfileListResponse, u as PermissionRules, a8 as PublishEffectsResult, i as PublishToolsResult, aF as RPCRequest, aI as RPCRequestFromServer, aG as RPCResponse, aW as RecordImport, aV as RecordImportItem, aT as RecordImportItemStatus, aU as RecordImportStats, aS as RecordImportStatus, aO as RecordObjectOptions, aP as RecordObjectResult, aQ as RecordObjectsChunkInfo, aR as RecordObjectsOptions, m as RecordUserOptions, aM as RelationshipInfo, a3 as ResolvedEffectApprovalRequired, a1 as ResolvedEffectDryRun, a0 as ResolvedEffectPostCondition, a2 as ResolvedEffectReverse, r as Sandbox, t as SandboxListResponse, $ as SemanticVersionDiff, _ as SemanticVersionDiffEntry, g as Session, az as SessionCollectionListOptions, aB as SessionCollectionListResult, as as SessionConversationMessage, ay as SessionDocumentResult, av as SessionHeapFieldType, aw as SessionHeapFieldValue, ax as SessionHeapVariable, aA as SessionJobListOptions, au as SessionJobRecord, at as SessionTimelineEvent, bp as StreamEvent, br as StreamStats, bq as StreamSubscription, n as Subject, aH as SyncMessage, j as ToolHandler, aa as ToolInfo, aJ as ToolInvokeParams, aK as ToolResultParams, h as ToolSchema, ac as ToolsChangedEvent, U as User, Y as Version, F as VersionTag, V as VersionTracking, W as WSClient, aE as WSClientOptions, aC as WSDisconnectInfo, aD as WSReconnectErrorInfo } from './client-Cq8onk2D.js';
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode } from './agent-harness.js';
import '@automerge/automerge';
import '@automerge/automerge/slim';

declare function isLocalApiUrl(url: string): boolean;
/**
 * Local dev + `sk_*` (WorkOS org key in env): map to the local gn_sk e2e key by default so every
 * request (HTTP + WebSocket) uses the same tenant as the v2 UI on localhost (`default`). Without
 * this, the SDK passes `sk_*` through → gateway resolves org_… while the UI still uses gn_sk →
 * you only see old default-tenant sandboxes and new ingest data looks “missing”.
 *
 * - `GRANULAR_LOCAL_API_KEY` — explicit key to use instead (e.g. another gn_sk).
 * - `GRANULAR_DISABLE_LOCAL_API_KEY_FALLBACK=1` — do not swap; send the real `sk_*` (org tenant +
 *   WorkOS validation on the gateway). Use when the UI is also on that org (e.g. session auth +
 *   NEXT_PUBLIC_DISABLE_LOCAL_API_KEY_FALLBACK on the app).
 */
declare function resolveAuthTokenForApiUrl(authToken: string, apiUrl: string): string;
declare function resolveApiUrl(explicitApiUrl?: string, mode?: EndpointMode): string;

type EffectRuntimeRequest = {
    effectKey: string;
    effectName: string;
    input: unknown;
    context?: EffectHandlerContext;
};
declare function normalizeEffectBehaviors(value?: ManifestEffectMetamodelSpec | ResolvedEffectBehaviors | null): ResolvedEffectBehaviors;
declare function invokeRegisteredEffect(effectMap: Map<string, ToolWithHandler>, request: EffectRuntimeRequest): Promise<unknown>;

interface JobPresentation {
    responseText: string | null;
    entries: SessionHeapEntry[];
    lists: SessionHeapList[];
    changedEntries: SessionHeapEntry[];
    changedLists: SessionHeapList[];
    hasExplicitArtifacts: boolean;
}
declare function resolveJobPresentation({ jobId, result, stdout, sessionHeap, allowExplicitArtifacts, }: {
    jobId: string;
    result: unknown;
    stdout?: string[];
    sessionHeap: SessionHeapSnapshot;
    allowExplicitArtifacts?: boolean;
}): JobPresentation;

declare function normalizePromptText(value: string): string;
declare function extractPromptTokens(value: string): string[];
declare function scorePromptChoiceMatch(answer: string, answerTokens: string[], option: string | {
    value?: string;
    label?: string;
    description?: string;
}): {
    score: number;
    resolvedValue: string | null;
};
declare function normalizePromptType(raw: Record<string, unknown> | null | undefined): Prompt["type"];
declare function normalizePrompt(rawValue: unknown): Prompt | null;
declare function resolvePromptAnswer(prompt: Prompt | undefined, answer: unknown): unknown;

declare function buildSessionTranscript(input: {
    liveDoc?: Record<string, unknown> | null;
    sessionHeap?: SessionHeapSnapshot;
}): SessionTranscriptEntry[];

export { EffectHandlerContext, EndpointMode, type JobPresentation, ManifestEffectMetamodelSpec, Prompt, ResolvedEffectBehaviors, SessionHeapEntry, SessionHeapList, SessionHeapSnapshot, SessionTranscriptEntry, ToolWithHandler, buildSessionTranscript, extractPromptTokens, invokeRegisteredEffect, isLocalApiUrl, normalizeEffectBehaviors, normalizePrompt, normalizePromptText, normalizePromptType, resolveApiUrl, resolveAuthTokenForApiUrl, resolveJobPresentation, resolvePromptAnswer, scorePromptChoiceMatch };
