/**
 * SDK Worker Runtime
 *
 * Runs inside a worker_threads Worker, replacing the HTTP-based server runtime.
 * Communicates with the parent (API process) via postMessage().
 *
 * Message protocol:
 *   Parent -> Worker:  { type: 'manifest' }
 *   Worker -> Parent:  { type: 'manifest', workflows: [...], agents: [...],
 *                         organizationModel?: {...}, triggers?: [...], integrations?: [...],
 *                         humanCheckpoints?: [...], relationships?: {...} }
 *
 *   Parent -> Worker:  { type: 'execute', resourceId, executionId, input, organizationId?, organizationName?,
 *                         sessionId?, sessionTurnNumber?, parentExecutionId?, executionDepth }
 *   Worker -> Parent:  { type: 'result', status, output?, error?, logs, metrics: { durationMs } }
 *
 *   Parent -> Worker:  { type: 'abort' }                               (graceful abort before terminate)
 *
 *   Worker -> Parent:  { type: 'log', entry: { level, message, timestamp, executionId } }
 *
 *   Worker -> Parent:  { type: 'tool-call', id, tool, method, params, credential? }
 *   Parent -> Worker:  { type: 'tool-result', id, result?, error?, code? }
 *
 *   Worker -> Parent:  { type: 'message-event', executionId, event }    (agent lifecycle events)
 *
 *   Worker -> Parent:  { type: 'credential-request', id, name }
 *   Parent -> Worker:  { type: 'credential-result', id, provider?, credentials?, error?, code? }
 */
import type { DeploymentSpec, WorkflowDefinition } from '../index.js';
export { platform, PlatformToolError } from './platform.js';
export type { PlatformCredential } from './platform.js';
export { classifyPlatformToolError, generateHmacToken } from './utils.js';
export type { ClassifyPlatformToolErrorOptions, PlatformToolErrorClassification } from './utils.js';
export * from './adapters/index.js';
export { listBuilderWorkflow, ListBuilderResultSchema, ListBuilderResultsSchema, type ListBuilderBatch, type ListBuilderEnvelope, type ListBuilderRecord, type ListBuilderResult, type ListBuilderWorkflowDefinition, type ListBuilderWorkflowOptions } from './list-builder-workflow.js';
export interface LogEntry {
    level: 'debug' | 'info' | 'warn' | 'error';
    message: string;
    timestamp: string;
    context?: Record<string, unknown>;
}
export declare function executeWorkflow(workflow: WorkflowDefinition, input: unknown, context: {
    executionId: string;
    organizationId: string;
    organizationName: string;
    sessionId?: string;
    sessionTurnNumber?: number;
    parentExecutionId?: string;
    executionDepth: number;
    adapters?: Record<string, unknown>;
    signal?: AbortSignal;
}): Promise<{
    output: unknown;
    logs: LogEntry[];
}>;
export declare function startWorker(org: DeploymentSpec): void;
