UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

14 lines 18.4 kB
import { $ as acquireSessionWriteLock, $i as AgentHarnessSupportContext, $t as prepareAgentRuntimeAuth, A as LlmBoundaryTokenPressure, Aa as AbortAndDrainEmbeddedAgentRunResult, Ai as AgentHarnessAttemptParamsV2, An as deliverAgentHarnessUserInputPrompt, As as AgentToolResultMiddlewareResult, At as isAgentToolReplaySafe, B as bootstrapHarnessContextEngine, Ba as EmbeddedContextFile, Bi as AgentHarnessRegistrationOptions, Bn as resolveSandboxContext, Bt as filterToolResultMediaUrls, C as runAgentHarnessAgentEndHook, Cn as claimPendingAgentQuestionAnswer, Co as resolveModelAuthMode, Cs as CodexAppServerExtensionRuntime, Ct as normalizeQuestionTimeoutSeconds, D as runAgentHarnessAfterToolCallHook, Dn as AgentHarnessUserInputPromptOptions, Ds as AgentToolResultMiddlewareContext, Dt as SKILL_WORKSHOP_TOOL_NAME, E as runAgentHarnessLlmOutputHook, En as AgentHarnessUserInputOption, Es as AgentToolResultMiddleware, Et as resolveMainSessionDelegationMode, F as shouldPreemptivelyCompactBeforePrompt, Fa as resolveActiveEmbeddedRunSessionId, Fi as AgentHarnessDeliveryDefaults, Fn as CodexBundleMcpThreadConfig, Ft as resolveToolExecutionErrorKind, G as runHarnessContextEngineMaintenance, Ga as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, Gi as AgentHarnessSessionForkFailureCode, Gt as formatToolAggregate, H as buildHarnessContextEngineRuntimeContextFromUsage, Hi as AgentHarnessResultClassification, Ht as extractMessagingToolSendResult, I as compactContextEngineWithSafetyTimeout, Ia as CompactEmbeddedAgentSessionParams, Ii as AgentHarnessModelCatalogParams, In as LoadCodexBundleMcpThreadConfigParams, It as resolveToolResultFailureKind, J as resolveAgentHarnessBeforePromptBuildResult, Ja as FastModeAutoProgressState, Ji as AgentHarnessSettledTurnFinalizationResult, Jt as selectDefaultNodeFromList, K as createAgentToolResultMiddlewareRunner, Ka as assertContextEngineHostSupport, Ki as AgentHarnessSessionForkParams, Kt as listNodes, L as compactWithSafetyTimeout, La as buildBootstrapContextForFiles, Lc as attachModelProviderRequestTransport, Li as AgentHarnessNativeCompaction, Lt as extractToolErrorMessage, M as PreemptiveCompactionDecision, Ma as abortEmbeddedAgentRun, Mi as AgentHarnessAuthBindingFingerprintParams, Mn as formatAgentHarnessUserInputPrompt, Ms as OpenClawAgentToolResult, Mt as ToolResultFailureKind, N as estimateRenderedLlmBoundaryTokenPressure, Na as clearActiveEmbeddedRun, Ni as AgentHarnessCompactParams, Nn as normalizeAgentHarnessUserInputAnswer, Nt as formatToolExecutionErrorMessage, O as runAgentHarnessBeforeMessageWriteHook, Oi as AgentHarness, On as AgentHarnessUserInputQuestion, Os as AgentToolResultMiddlewareEvent, Ot as buildSkillWorkshopPromptSection, P as formatPrePromptPrecheckLog, Pa as setActiveEmbeddedRun, Pi as AgentHarnessCompactResult, Pn as AgentHarnessQuestionGatewayCall, Pt as isToolResultError, Q as SessionWriteLockAcquireTimeoutConfig, Qi as AgentHarnessSupport, Qt as classifyEmbeddedAgentRunResultForModelFallback, R as resolveCompactionTimeoutMs, Ra as resolveBootstrapContextForRun, Rc as getModelProviderRequestTransport, Ri as AgentHarnessNativeCompactionParams, Rn as getPluginToolMeta, Rt as sanitizeToolResult, S as getAgentHarnessHookRunner, Sa as ContextEngineProjection, Sn as cancelPendingAgentQuestionForSession, Ss as CodexAppServerExtensionFactory, St as buildCredentialSafetyPrompt, T as runAgentHarnessLlmInputHook, Tn as AgentHarnessUserInputAnswers, Ts as CodexAppServerToolResultHandlerResult, Tt as buildDelegationGuidanceSection, U as finalizeHarnessContextEngineTurn, Ua as EmbeddedForegroundPromptContext, Ui as AgentHarnessSessionDeletionMutation, Ut as isMessagingTool, V as buildHarnessContextEngineRuntimeContext, Va as restorePreparedUserTurnOperationalMetaForRuntime, Vi as AgentHarnessResetParams, Vt as extractMessagingToolSend, W as isActiveHarnessContextEngine, Wa as AgentHarnessRuntimeArtifactBinding, Wi as AgentHarnessSessionDeletionParams, Wn as fingerprintResolvedAuthProfileCredential, Wt as isMessagingToolSendAction, X as runAgentHarnessBeforeCompactionHook, Xi as AgentHarnessSideQuestionParamsV2, Y as runAgentHarnessAfterCompactionHook, Ya as formatFastModeAutoProgressText, Yi as AgentHarnessSideQuestionParams, Yt as hasGatewayToolRoutingContext, Z as isReplaySafeToolCall, Zi as AgentHarnessSideQuestionResult, _ as queueAgentHarnessMessage, _a as BeforeToolCallPolicyDiagnosticState, _d as HeartbeatToolResponse, _n as projectSettledTurnFinalizationAttemptResult, _t as applyEmbeddedAttemptToolsAllow, a as TOOL_PROGRESS_OUTPUT_MAX_CHARS, aa as getBeforeToolCallFailureDisposition, an as buildAgentHookContextChannelFields, ao as normalizeUsage, at as assignSafeServerNames, b as runAgentEndSideEffects, ba as ContextEngineHostCapability, bn as isDeliveredMessageToolOnlySourceReplyResult, bt as resolveAttemptSpawnWorkspaceDir, c as agentHarnessStructuredInput, ca as hasBeforeToolCallPolicy, cd as AgentApprovalEventData, cn as registerNativeHookRelay, co as SessionMcpRuntime, ct as normalizeAgentRuntimeTools, d as detectAndLoadAgentHarnessPromptImages, da as finalizeToolTerminalPresentation, dd as onAgentEvent, dn as resolveNativeHookRelayDeferredToolApproval, do as ExecAutoReviewDecision, dt as RuntimeToolSchemaDiagnostic, ea as AgentHarnessV2, en as buildAgentRuntimePlan, eo as resolveFastModeForElapsed, et as resolveSessionWriteLockAcquireTimeoutMs, f as formatToolProgressOutput, fa as isToolWrappedWithBeforeToolCallHook, fd as resetAgentEventsForTest, fn as NativeHookRelayEvent, fo as ExecAutoReviewInput, ft as filterProviderNormalizableTools, g as prepareHarnessNativeMcpAppPreview, ga as BeforeToolCallFailureDisposition, gd as HEARTBEAT_RESPONSE_TOOL_NAME, gn as projectAgentHarnessTranscriptMessageForDisplay, gt as finalizeAgentToolAvailability, h as materializeRequesterScopedMcpToolsForHarnessRun, ha as consumePreExecutionBlockedToolCall, hn as NativeHookRelayRegistrationHandle, ht as disposeRegisteredAgentHarnesses, i as EmbeddedRunAttemptParamsV2, ia as SandboxWorkspaceAccess, in as runAgentCleanupStep, io as NormalizedUsage, it as resolveWritableSandboxBindHostRoots, j as PREEMPTIVE_OVERFLOW_ERROR_TEXT, ja as abortAndDrainEmbeddedAgentRun, ji as AgentHarnessAttemptResult, jn as emptyAgentHarnessUserInputAnswers, js as AgentToolResultMiddlewareRuntime, jt as supportsModelTools, k as resolveContextEngineOwnerPluginId, ki as AgentHarnessAttemptParams, kn as buildAgentHarnessUserInputAnswers, ks as AgentToolResultMiddlewareOptions, kt as getChannelAgentToolMeta, l as buildWatchedSessionsHarnessContext, la as runBeforeToolCallHook, ld as AgentEventPayload, ln as testing, lo as MessagingToolSend, lt as RuntimeToolInputSchemaJson, m as loadCodexBundleMcpThreadConfig, ma as consumeAdjustedParamsForToolCall, mn as NativeHookRelayProvider, mt as projectRuntimeToolInputSchema, n as AgentHarnessTerminalOutcomeInput, na as SandboxContext, nn as isHostScopedAgentToolActive, no as callGatewayTool, nt as hasSandboxBindContainerPathAliases, o as ToolProgressDetailMode, oa as wrapToolWithBeforeToolCallHook, on as hasNativeHookRelayInvocation, ot as normalizeProviderToolSchemas, p as inferToolMetaFromArgs, pa as setBeforeToolCallDiagnosticsEnabled, pn as NativeHookRelayProcessResponse, po as ExecAutoReviewer, pt as inspectRuntimeToolInputSchemas, q as createCodexAppServerToolResultExtensionRunner, qi as AgentHarnessSessionForkResult, qt as resolveNodeIdFromList, r as EmbeddedRunAttemptParams, rn as resolveAgentRunAbortLifecycleFields, ro as EmbeddedAgentCompactResult, rt as hasSandboxBindReadonlyHostShadows, s as agentHarnessAttemptTerminal, sa as getBeforeToolCallPolicyDiagnosticState, sn as invokeNativeHookRelay, so as McpToolCatalog, st as logAgentRuntimeToolDiagnostics, t as AgentHarnessTerminalOutcomeClassification, ta as EmbeddedRunAttemptResult, tn as log, tt as resolveSessionWriteLockOptions, u as classifyAgentHarnessTerminalOutcome, ua as requestDeferredPluginToolApproval, ud as emitAgentEvent, un as buildNativeHookRelayCommand, uo as MessagingToolSourceReplyPayload, ut as RuntimeToolInputSchemaProjection, v as buildEmbeddedForegroundPromptContext, va as DeferredPluginToolApproval, vd as normalizeHeartbeatToolResponse, vn as AgentHarnessPreflightError, vt as resolveEmbeddedAttemptToolConstructionPlan, w as runAgentHarnessBeforeAgentFinalizeHook, wn as runAgentHarnessGatewayQuestion, ws as CodexAppServerToolResultEvent, wt as buildHarnessVisibleReplyGuidance, x as awaitAgentHarnessAgentEndHook, xa as ContextEngineOperation, xn as isDeliveredMessagingToolResult, xs as CodexAppServerExtensionContext, xt as resolveAttemptFsWorkspaceOnly, y as awaitAgentEndSideEffects, ya as ContextEngine, yn as AgentHarnessSessionSupersededError, yt as buildEmbeddedAttemptToolRunContext, z as assembleHarnessContextEngine, za as resolveBootstrapFilesForRun, zc as VERSION, zi as AgentHarnessNativeCompactionRequest, zn as getPluginToolSideEffectOwnerKey, zt as extractToolResultMediaArtifact } from "../agent-harness-runtime-CZIVRpx-.js"; import { t as AgentMessage } from "../types-DMarHODc.js"; import { t as FAST_MODE_AUTO_PROGRESS_KIND } from "../reply-payload-BE6d057B.js"; import { mt as ExecApprovalDecision } from "../approval-types-ClyNB7BE.js"; import { u as isSubagentSessionKey } from "../session-key-FaOvM3FT.js"; import { c as resolveUserPath } from "../home-dir-4pOw9r_P.js"; import { n as AnyAgentTool } from "../common-DCfE5qvT.js"; import { i as resolveAgentDir, o as resolveDefaultAgentDir } from "../agent-scope-config-C1Nx0bsu.js"; import { t as formatErrorMessage } from "../errors-D-udqO7F.js"; import { t as buildTemporalContextText } from "../date-time-VcU4Scm1.js"; import { t as formatApprovalDisplayPath } from "../approval-display-paths-Hb4BQ_zR.js"; import { t as NodeListNode } from "../node-list-types-ZOGoEIdm.js"; import { n as resolveSessionAgentIdsCompatibility } from "../agent-scope-runtime-CavIeqs-.js"; export { type AbortAndDrainEmbeddedAgentRunResult as AbortAndDrainAgentHarnessRunResult, type AgentApprovalEventData, type AgentEventPayload, type AgentHarness, type AgentHarnessAttemptParams, type AgentHarnessAttemptParamsV2, type AgentHarnessAttemptResult, type AgentHarnessAuthBindingFingerprintParams, type AgentHarnessCompactParams, type AgentHarnessCompactResult, type AgentHarnessDeliveryDefaults, type AgentHarnessModelCatalogParams, type AgentHarnessNativeCompaction, type AgentHarnessNativeCompactionParams, type AgentHarnessNativeCompactionRequest, AgentHarnessPreflightError, type AgentHarnessQuestionGatewayCall, type AgentHarnessRegistrationOptions, type AgentHarnessResetParams, type AgentHarnessResultClassification, type AgentHarnessRuntimeArtifactBinding, type AgentHarnessSessionDeletionMutation, type AgentHarnessSessionDeletionParams, type AgentHarnessSessionForkFailureCode, type AgentHarnessSessionForkParams, type AgentHarnessSessionForkResult, AgentHarnessSessionSupersededError, type AgentHarnessSettledTurnFinalizationResult, type AgentHarnessSideQuestionParams, type AgentHarnessSideQuestionParamsV2, type AgentHarnessSideQuestionResult, type AgentHarnessSupport, type AgentHarnessSupportContext, AgentHarnessTerminalOutcomeClassification, AgentHarnessTerminalOutcomeInput, type AgentHarnessUserInputAnswers, type AgentHarnessUserInputOption, type AgentHarnessUserInputPromptOptions, type AgentHarnessUserInputQuestion, type AgentHarnessV2, type AgentMessage, type AgentToolResultMiddleware, type AgentToolResultMiddlewareContext, type AgentToolResultMiddlewareEvent, type AgentToolResultMiddlewareOptions, type AgentToolResultMiddlewareResult, type AgentToolResultMiddlewareRuntime, type AnyAgentTool, type BeforeToolCallFailureDisposition, type BeforeToolCallPolicyDiagnosticState, CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, type CodexAppServerExtensionContext, type CodexAppServerExtensionFactory, type CodexAppServerExtensionRuntime, type CodexAppServerToolResultEvent, type CodexAppServerToolResultHandlerResult, type CodexBundleMcpThreadConfig, type CompactEmbeddedAgentSessionParams, type ContextEngineHostCapability, type ContextEngineOperation, type ContextEngineProjection, type DeferredPluginToolApproval, type EmbeddedAgentCompactResult, type EmbeddedContextFile, type EmbeddedForegroundPromptContext, EmbeddedRunAttemptParams, EmbeddedRunAttemptParamsV2, type EmbeddedRunAttemptResult, type ExecApprovalDecision, type ExecAutoReviewDecision, type ExecAutoReviewInput, type ExecAutoReviewer, FAST_MODE_AUTO_PROGRESS_KIND, type FastModeAutoProgressState, HEARTBEAT_RESPONSE_TOOL_NAME, type ContextEngine as HarnessContextEngine, type HeartbeatToolResponse, type LlmBoundaryTokenPressure, type LoadCodexBundleMcpThreadConfigParams, type McpToolCatalog, type MessagingToolSend, type MessagingToolSourceReplyPayload, type NativeHookRelayEvent, type NativeHookRelayProcessResponse, type NativeHookRelayProvider, type NativeHookRelayRegistrationHandle, type NodeListNode, type NormalizedUsage, VERSION as OPENCLAW_VERSION, type OpenClawAgentToolResult, PREEMPTIVE_OVERFLOW_ERROR_TEXT, type PreemptiveCompactionDecision, type RuntimeToolInputSchemaJson, type RuntimeToolInputSchemaProjection, type RuntimeToolSchemaDiagnostic, SKILL_WORKSHOP_TOOL_NAME, type SandboxContext, type SandboxWorkspaceAccess, type SessionMcpRuntime, type SessionWriteLockAcquireTimeoutConfig, TOOL_PROGRESS_OUTPUT_MAX_CHARS, ToolProgressDetailMode, type ToolResultFailureKind, abortEmbeddedAgentRun as abortAgentHarnessRun, abortAndDrainEmbeddedAgentRun as abortAndDrainAgentHarnessRun, acquireSessionWriteLock, agentHarnessAttemptTerminal, agentHarnessStructuredInput, applyEmbeddedAttemptToolsAllow, assembleHarnessContextEngine, assertContextEngineHostSupport, assignSafeServerNames as assignMcpCatalogSafeServerNames, attachModelProviderRequestTransport, awaitAgentEndSideEffects, awaitAgentHarnessAgentEndHook, bootstrapHarnessContextEngine, buildAgentHarnessUserInputAnswers, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildBootstrapContextForFiles, buildCredentialSafetyPrompt, buildDelegationGuidanceSection, buildEmbeddedAttemptToolRunContext, buildEmbeddedForegroundPromptContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildHarnessVisibleReplyGuidance, buildNativeHookRelayCommand, buildSkillWorkshopPromptSection, buildTemporalContextText, buildWatchedSessionsHarnessContext, callGatewayTool, cancelPendingAgentQuestionForSession, claimPendingAgentQuestionAnswer, classifyAgentHarnessTerminalOutcome, classifyEmbeddedAgentRunResultForModelFallback, clearActiveEmbeddedRun, compactContextEngineWithSafetyTimeout, compactWithSafetyTimeout, consumeAdjustedParamsForToolCall, consumePreExecutionBlockedToolCall, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, deliverAgentHarnessUserInputPrompt, detectAndLoadAgentHarnessPromptImages, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emptyAgentHarnessUserInputAnswers, estimateRenderedLlmBoundaryTokenPressure, extractMessagingToolSend, extractMessagingToolSendResult, extractToolErrorMessage, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeAgentToolAvailability, finalizeHarnessContextEngineTurn, finalizeToolTerminalPresentation, fingerprintResolvedAuthProfileCredential, formatAgentHarnessUserInputPrompt, formatApprovalDisplayPath, formatErrorMessage, formatFastModeAutoProgressText, formatPrePromptPrecheckLog, formatToolAggregate, formatToolExecutionErrorMessage, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallFailureDisposition, getBeforeToolCallPolicyDiagnosticState, getChannelAgentToolMeta, getModelProviderRequestTransport, getPluginToolMeta, getPluginToolSideEffectOwnerKey, hasBeforeToolCallPolicy, hasGatewayToolRoutingContext, hasNativeHookRelayInvocation, hasSandboxBindContainerPathAliases, hasSandboxBindReadonlyHostShadows, inferToolMetaFromArgs, inspectRuntimeToolInputSchemas, invokeNativeHookRelay, isActiveHarnessContextEngine, isAgentToolReplaySafe, isDeliveredMessageToolOnlySourceReplyResult, isDeliveredMessagingToolResult, isHostScopedAgentToolActive, isMessagingTool, isMessagingToolSendAction, isReplaySafeToolCall, isSubagentSessionKey, isToolResultError, isToolWrappedWithBeforeToolCallHook, listNodes, loadCodexBundleMcpThreadConfig, logAgentRuntimeToolDiagnostics, materializeRequesterScopedMcpToolsForHarnessRun, testing as nativeHookRelayTesting, normalizeAgentHarnessUserInputAnswer, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, normalizeProviderToolSchemas, normalizeQuestionTimeoutSeconds, normalizeUsage, onAgentEvent, prepareAgentRuntimeAuth, prepareHarnessNativeMcpAppPreview, projectAgentHarnessTranscriptMessageForDisplay, projectRuntimeToolInputSchema, projectSettledTurnFinalizationAttemptResult, queueAgentHarnessMessage, registerNativeHookRelay, requestDeferredPluginToolApproval, resetAgentEventsForTest, resolveActiveEmbeddedRunSessionId, resolveAgentDir, resolveAgentHarnessBeforePromptBuildResult, resolveAgentRunAbortLifecycleFields, resolveAttemptFsWorkspaceOnly, resolveAttemptSpawnWorkspaceDir, resolveBootstrapContextForRun, resolveBootstrapFilesForRun, resolveCompactionTimeoutMs, resolveContextEngineOwnerPluginId, resolveDefaultAgentDir, resolveEmbeddedAttemptToolConstructionPlan, resolveFastModeForElapsed, resolveMainSessionDelegationMode, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, resolveNodeIdFromList, resolveSandboxContext, resolveSessionAgentIdsCompatibility as resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveToolExecutionErrorKind, resolveToolResultFailureKind, resolveUserPath, resolveWritableSandboxBindHostRoots, restorePreparedUserTurnOperationalMetaForRuntime, runAgentCleanupStep, runAgentEndSideEffects, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessGatewayQuestion, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, sanitizeToolResult, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, shouldPreemptivelyCompactBeforePrompt, supportsModelTools, wrapToolWithBeforeToolCallHook };