openmeld 0.3.133 → 0.3.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { $ as runWithHeldLock, $t as formatLocalMachineIssueMessage, At as normalizeAccountKey, B as toSpaceRemoveMembersUrl, C as updateConfiguredDeviceRuntimeState, Ct as accountProfileWorkspacePath, D as normalizeBaseUrl, Dt as deviceOpenClawProfileWorkspaceDir, Et as deviceOpenClawProfileDir, Ft as openMeldManagedVersionBinaryPath, Gt as resolveOpenMeldEnvPreset, H as toSpaceUpdatesUrl, Ht as resolveDefaultOpenMeldHomeDirname, I as toSpaceLeaveUrl, It as openMeldManagedVersionDir, Jt as runtimeDir, K as isOpenMeldLockError, Kt as resolveOpenMeldPresetOwnedPathInput, L as toSpaceMembersUrl, Lt as openMeldRootDir, M as toSpaceCursorUrl, Mt as openMeldBackupsDir, N as toSpaceDeleteUrl, Nt as openMeldBinDir, O as toDaemonRouteObservationUrl, Ot as isPublishedOpenMeldHome, Pt as openMeldManagedBinaryPath, Q as resolveOpenMeldOrphanedLockIssue, Qt as systemDir, R as toSpaceMetaUrl, Rt as openMeldVersionsDir, S as setConfiguredSkillsConfig, St as accountProfileViewPath, T as updateConfiguredSkillsConfig, Tt as deviceOpenClawProfileBootstrapPath, U as toSpaceWsUrl, Ut as resolveExplicitOpenMeldEnvPreset, W as acquireLock, Xt as skillsDir, Yt as runtimeLogsDir, _ as getConfiguredViewCustomization, _n as normalizeKnownBuiltinAgentControllerId, _t as CURRENT_PROCESS_START_IDENTITY, a as resolveBaseUrl, an as runtimeTransportModeSchema, at as resolveCliContext, bt as accountProfileLocalMetaPath, c as resolveExplicitGatewayUrlOrThrow, cn as conversationPolicySchema, d as createDefaultRuntimeAgentControllerSettings, dn as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, dt as assessLocalMachineFailure, f as getConfiguredDaemonDispatchLimits, g as getConfiguredSkillsConfig, gn as normalizeBuiltinAgentControllerId, h as getConfiguredOpenMeldToolsMaintenance, hn as canonicalizeBuiltinAgentControllerRef, i as normalizeGatewayBaseUrlOrNull, in as runtimeStreamingModeSchema, it as readCliContextState, j as toSpaceCreateUrl, jt as normalizeOpenMeldProfileId, kt as legacyAccountProfileSpacesDir, l as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, ln as resolveBuiltinAgentControllerConversationKind, lt as resolveOpenMeldLaneDescriptor, mn as canonicalizeAgentControllerRef, nn as runtimeAgentControllerLaunchContractSchema, o as resolveBaseUrlOrNull, ot as resolveCliContextId, p as getConfiguredDeviceRuntimeState, pn as buildAgentControllerRoutingKey, pt as createBackgroundExecutionBlockedIssue, q as isOpenMeldOrphanedLockError, qt as resolveOpenMeldRootDir, r as normalizeGatewayBaseUrl, rt as listCliContextStates, s as resolveDefaultGatewayBaseUrl, sn as buildAgentControllerConversationRef, st as writeCliContextState, tn as runtimeAgentControllerConversationIdMappingSpecSchema, un as HOSTED_CENTER_AGENT_CONTROLLER_REF, v as getRuntimeConfigReadHealth, vn as parseAgentControllerRef$1, vt as isProcessIdentityAlive, wt as accountsDir, x as setConfiguredOpenMeldToolsMaintenance, xt as accountProfileSpaceCacheDir, y as resolveRuntimeSkillsCustomTargetId, yt as OPENMELD_HOME_ENV_KEY, z as toSpacePasswordUrl } from "./base-url-BtqW4aLS.js";
4
- import { A as MAX_TEXT_LENGTH, At as createCenterAgentRoutineResponseSchema, B as sleep, C as createSpaceApi, D as toStructuredApiClientFailure, Dt as organizationComputersResponseSchema, E as resolveProfileSpaceHistoryGatewayHost, Et as profileErrorResponseSchema, F as OPENMELD_HEADER_PROFILE_ID, Ft as resumeCenterAgentRoutineResponseSchema, Gt as localProjectControlDaemonFrameSchema, H as getSpaceUpdatesResponseSchema, It as updateCenterAgentRoutineResponseSchema, Jt as postSpaceMembersResponseSchema, Kt as localProjectControlDiscoverProjectsResponseSchema, L as OPENMELD_HEADER_REQUEST_ID, M as parseIncoming$1, Mt as listCenterAgentRoutineRunsResponseSchema, N as parseServerErrorFrame$1, Nt as listCenterAgentRoutinesResponseSchema, O as DAEMON_STREAM_KEEPALIVE_PING, Ot as submitFeedbackIssueRequestSchema, P as resolveCustomMentionAliasOverride, Pt as pauseCenterAgentRoutineResponseSchema, Q as submitAgentControllerTaskLifecycleEventItemSchema, Rt as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, S as createRuntimeReportingApi, St as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, T as resolveAccountSpaceIndexGatewayHost, Tt as profileCapabilitiesResponseSchema, U as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Ut as agentActivitySnapshotResponseSchema, V as toErrorMessage$43, Wt as localProjectControlConnectionSchema, Xt as spaceMemberDirectoryEntrySchema, Yt as removeSpaceMembersResponseSchema, Zt as spaceMemberDirectorySchema, _n as agentControllerPermissionModeSchema, _t as organizationSkillReleaseSummarySchema, a as buildSpaceAttachmentDownloadPath, an as createProjectResponseSchema, at as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, bt as organizationDirectoryResponseSchema, c as createAgentProfileBindingApi, cn as updateProjectResponseSchema, ct as computerFileAccessPolicyInputSchema, d as createCurrentDeviceApi, dt as organizationSpaceDirectoryWithMemberCountsResponseSchema, ft as spaceCreatorSchema, g as createOrganizationApi, h as createOpenMeldApiClient, ht as listOrganizationSkillsResponseSchema, i as buildProfileSpaceHistoryUpsertPath, in as archiveProjectResponseSchema, it as gatewayErrorEnvelopeSchema, j as parseEnvelope$1, jt as deleteCenterAgentRoutineResponseSchema, kt as submitFeedbackIssueResponseSchema, ln as centerAgentToolSpeakerSchema, lt as computerFileAccessPolicySchema, m as createLocalRuntimeExpectedRoutesApi, mt as getOrganizationSkillResponseSchema, n as OpenMeldApiClientInvalidResponseError, o as createAccountSpaceIndexApi, on as listProjectsResponseSchema, ot as OPENMELD_RUNTIME_CAPABILITIES_HEADER, p as createFetchTransport, pt as spaceMetaSchema, qt as leaveSpaceResponseSchema, r as buildProfileSpaceHistoryStatusPath, rn as observedLocalAgentSessionSchema, s as createAgentActivityApi, sn as projectSchema, st as computerFileAccessDaemonFrameSchema, t as OpenMeldApiClientHttpError, tn as agentActivitySessionInventoryResponseSchema, un as openCodePermissionConfigSchema, ut as modelCatalogSchema, vn as agentControllerCollaborationModeSchema, vt as organizationSkillSummarySchema, wt as authProfileManagedRoleSchema, xt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, y as createProfileSpaceHistoryApi, yn as toLegacySpaceAddressingWireValue, z as toErrorMessage$44, zt as agentActivityEventSchema } from "./dist-xeL9hjwh.js";
5
- import { $r as openMeldRuntimeProfileIdSchema, A as runtimeTransportRegisterSessionResponseSchema, B as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Bn as formatLocalComponentsSummaryLabel, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Cn as getSpaceMessageAddressingRelationSupportForTargetKind, D as runtimeTransportOpenMeldToolsControlFramePayloadSchema, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, En as resolveMessageEnvelopeTargetField, Ft as SPACE_FILE_MAX_SIZE_BYTES, G as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, Hn as formatLocalSetupActionLabel, I as runtimeTransportSubmitTaskResultRequestSchema, In as agentInteractionRequestSchema, Ir as normalizeSpacePasswordText, J as localFolderPickerHelperResultSchema, Jn as localServiceComponentUpdateProjectionSchema, K as localFolderPickerDaemonFrameSchema, Ln as agentInteractionResolutionSchema, M as runtimeTransportResumeControllerConversationFramePayloadSchema, Mr as runtimeCoordinatorExecutionTokenEnvelopeSchema, N as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Nr as runtimeTransportDeliveryExecutionIdentitySchema, O as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, Or as parseOptionalClientMessageId, P as runtimeTransportRouteCatalogChangedFramePayloadSchema, Pn as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, Qn as openMeldToolsUpdateOperationPhaseSchema, Qr as normalizeOptionalWorkingDirectory, R as openMeldDaemonProviderAccessEvidenceSchema, Rr as resolveSingleSpaceMentionLabels, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Sn as formatCanonicalMentionLiteral, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Tn as normalizeMessageEnvelope, U as openMeldSpaceEgressActionSchema, Un as installedLocalComponentsSnapshotSchema, Ut as resolveSpaceFileMimeType, V as openMeldDaemonTaskResultPayloadSchema, Vn as formatLocalSetupActionDescription, W as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, Wn as localCliComponentUpdateProjectionSchema, Xr as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, Yr as openMeldRequestContextSchema, Zn as openMeldToolsUpdateAttemptSchema, Zr as agentProfileIdSchema, _ as runtimeTransportHeartbeatRequestSchema, _t as SPACE_MENTION_REJECT_NOTICE_PURPOSE, a as runtimeTransportCapabilitiesSchema, an as conversationExecutionStateSchema, b as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, bn as MESSAGE_MENTION_TYPE_VALUES, c as runtimeTransportDispatchInteractionRequestSchema, ci as trimmedStringFromUnknown, cr as enumFactory, d as runtimeTransportDispatchPreviewEndRequestSchema, di as resolveMappedPublicAgentFailureReason, dr as literal, dt as CONVERSATION_CONTINUITY_WARNING_PURPOSE, en as openMeldDaemonControlPlaneRequestSchema, f as runtimeTransportDispatchPreviewRequestSchema, fi as resolvePublicAgentAvailabilityCopy, g as runtimeTransportForkAgentSessionResultSchema, gt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, h as runtimeTransportErrorCodeSchema, hi as shouldPreferMappedPublicAgentFailureReason, ht as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, i as localWakeRouteReportSchema, in as providerDispatchRuntimeContextSchema, ir as boolean, j as runtimeTransportRejectedProfileRegistrationSchema, k as runtimeTransportRegisterSessionRequestSchema, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, li as MAX_TEXT_LENGTH$1, m as runtimeTransportDispatchToolActivityRequestSchema, mi as sanitizeDispatchErrorSummary, n as daemonExecutionCompatibilitySchema, o as runtimeTransportDeliverDispatchRequestSchema, or as discriminatedUnion, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pi as resolvePublicAgentFailureRecovery, q as localFolderPickerHelperProtocolResultSchema, qt as spaceFileNameSchema, r as daemonStreamFrameSchema, ri as profileWorkspaceModeSchema, rn as skippedDaemonProfileSchema, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, tn as openMeldDaemonControlPlaneResponseSchema, tr as openMeldToolsUpdateRequestSourceSchema, u as runtimeTransportDispatchLifecycleRequestSchema, ui as resolveDetailedPublicAgentFailureReason$1, ur as iso, v as runtimeTransportHeartbeatResponseSchema, vr as strictObject, w as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, wr as url, x as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, xn as collectCanonicalMentionTextFragments, y as runtimeTransportLocalAgentControlCancelFramePayloadSchema, yi as resolveCommandAgentWorkActivity, yr as string, yt as sanitizeSignalTextPreview, z as openMeldDaemonTaskResultEnvelopeWriteSchema, zn as formatLocalComponentsSummaryDescription, zr as resolveSpaceMentionLabels } from "./runtime-transport-C_9yu9UB.js";
4
+ import { A as MAX_TEXT_LENGTH, At as createCenterAgentRoutineResponseSchema, B as sleep, C as createSpaceApi, D as toStructuredApiClientFailure, Dt as organizationComputersResponseSchema, E as resolveProfileSpaceHistoryGatewayHost, Et as profileErrorResponseSchema, F as OPENMELD_HEADER_PROFILE_ID, Ft as resumeCenterAgentRoutineResponseSchema, Gt as localProjectControlDaemonFrameSchema, H as getSpaceUpdatesResponseSchema, It as updateCenterAgentRoutineResponseSchema, Jt as postSpaceMembersResponseSchema, Kt as localProjectControlDiscoverProjectsResponseSchema, L as OPENMELD_HEADER_REQUEST_ID, M as parseIncoming$1, Mt as listCenterAgentRoutineRunsResponseSchema, N as parseServerErrorFrame$1, Nt as listCenterAgentRoutinesResponseSchema, O as DAEMON_STREAM_KEEPALIVE_PING, Ot as submitFeedbackIssueRequestSchema, P as resolveCustomMentionAliasOverride, Pt as pauseCenterAgentRoutineResponseSchema, Q as submitAgentControllerTaskLifecycleEventItemSchema, Rt as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, S as createRuntimeReportingApi, St as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, T as resolveAccountSpaceIndexGatewayHost, Tt as profileCapabilitiesResponseSchema, U as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Ut as agentActivitySnapshotResponseSchema, V as toErrorMessage$43, Wt as localProjectControlConnectionSchema, Xt as spaceMemberDirectoryEntrySchema, Yt as removeSpaceMembersResponseSchema, Zt as spaceMemberDirectorySchema, _n as agentControllerPermissionModeSchema, _t as organizationSkillReleaseSummarySchema, a as buildSpaceAttachmentDownloadPath, an as createProjectResponseSchema, at as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, bt as organizationDirectoryResponseSchema, c as createAgentProfileBindingApi, cn as updateProjectResponseSchema, ct as computerFileAccessPolicyInputSchema, d as createCurrentDeviceApi, dt as organizationSpaceDirectoryWithMemberCountsResponseSchema, ft as spaceCreatorSchema, g as createOrganizationApi, h as createOpenMeldApiClient, ht as listOrganizationSkillsResponseSchema, i as buildProfileSpaceHistoryUpsertPath, in as archiveProjectResponseSchema, it as gatewayErrorEnvelopeSchema, j as parseEnvelope$1, jt as deleteCenterAgentRoutineResponseSchema, kt as submitFeedbackIssueResponseSchema, ln as centerAgentToolSpeakerSchema, lt as computerFileAccessPolicySchema, m as createLocalRuntimeExpectedRoutesApi, mt as getOrganizationSkillResponseSchema, n as OpenMeldApiClientInvalidResponseError, o as createAccountSpaceIndexApi, on as listProjectsResponseSchema, ot as OPENMELD_RUNTIME_CAPABILITIES_HEADER, p as createFetchTransport, pt as spaceMetaSchema, qt as leaveSpaceResponseSchema, r as buildProfileSpaceHistoryStatusPath, rn as observedLocalAgentSessionSchema, s as createAgentActivityApi, sn as projectSchema, st as computerFileAccessDaemonFrameSchema, t as OpenMeldApiClientHttpError, tn as agentActivitySessionInventoryResponseSchema, un as openCodePermissionConfigSchema, ut as modelCatalogSchema, vn as agentControllerCollaborationModeSchema, vt as organizationSkillSummarySchema, wt as authProfileManagedRoleSchema, xt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, y as createProfileSpaceHistoryApi, yn as toLegacySpaceAddressingWireValue, z as toErrorMessage$44, zt as agentActivityEventSchema } from "./dist-DoFr77hZ.js";
5
+ import { $r as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, A as runtimeTransportRegisterSessionResponseSchema, Bn as agentInteractionResolutionSchema, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Cn as MESSAGE_MENTION_TYPE_VALUES, D as runtimeTransportOpenMeldToolsControlFramePayloadSchema, Dr as url, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, En as getSpaceMessageAddressingRelationSupportForTargetKind, Fr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Gn as formatLocalSetupActionLabel, H as openMeldDaemonTaskResultEnvelopeWriteSchema, Hn as formatLocalComponentsSummaryDescription, Hr as resolveSpaceMentionLabels, I as runtimeTransportSubmitTaskResultRequestSchema, Ir as runtimeTransportDeliveryExecutionIdentitySchema, J as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, K as openMeldSpaceEgressActionSchema, Kn as installedLocalComponentsSnapshotSchema, Kt as resolveSpaceFileMimeType, L as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, Ln as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, M as runtimeTransportResumeControllerConversationFramePayloadSchema, N as runtimeTransportResumeControllerConversationResultFramePayloadSchema, O as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, On as normalizeMessageEnvelope, P as runtimeTransportRouteCatalogChangedFramePayloadSchema, Qr as openMeldRequestContextSchema, R as isOriginalErrorSafeForMessageDetails, Rt as SPACE_FILE_MAX_SIZE_BYTES, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Sr as string, St as sanitizeSignalTextPreview, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Tn as formatCanonicalMentionLiteral, U as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Un as formatLocalComponentsSummaryLabel, V as openMeldDaemonProviderAccessEvidenceSchema, Vr as resolveSingleSpaceMentionLabels, W as openMeldDaemonTaskResultPayloadSchema, Wn as formatLocalSetupActionDescription, X as localFolderPickerHelperProtocolResultSchema, Xt as spaceFileNameSchema, Y as localFolderPickerDaemonFrameSchema, Z as localFolderPickerHelperResultSchema, Zn as localServiceComponentUpdateProjectionSchema, _ as runtimeTransportHeartbeatRequestSchema, _i as shouldPreferMappedPublicAgentFailureReason, a as runtimeTransportCapabilitiesSchema, b as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, bt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, c as runtimeTransportDispatchInteractionRequestSchema, cn as conversationExecutionStateSchema, d as runtimeTransportDispatchPreviewEndRequestSchema, di as trimmedStringFromUnknown, dr as enumFactory, ei as agentProfileIdSchema, er as openMeldToolsUpdateAttemptSchema, f as runtimeTransportDispatchPreviewRequestSchema, fi as MAX_TEXT_LENGTH$1, g as runtimeTransportForkAgentSessionResultSchema, gi as sanitizeDispatchErrorSummary, h as runtimeTransportErrorCodeSchema, hi as resolvePublicAgentFailureRecovery, i as localWakeRouteReportSchema, in as openMeldDaemonControlPlaneResponseSchema, ir as openMeldToolsUpdateRequestSourceSchema, j as runtimeTransportRejectedProfileRegistrationSchema, jr as parseOptionalClientMessageId, k as runtimeTransportRegisterSessionRequestSchema, kn as resolveMessageEnvelopeTargetField, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, lr as discriminatedUnion, m as runtimeTransportDispatchToolActivityRequestSchema, mi as resolvePublicAgentAvailabilityCopy, mr as literal, mt as CONVERSATION_CONTINUITY_WARNING_PURPOSE, n as daemonExecutionCompatibilitySchema, ni as openMeldRuntimeProfileIdSchema, o as runtimeTransportDeliverDispatchRequestSchema, oi as profileWorkspaceModeSchema, on as skippedDaemonProfileSchema, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pi as resolveMappedPublicAgentFailureReason, pr as iso, q as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, qn as localCliComponentUpdateProjectionSchema, r as daemonStreamFrameSchema, rn as openMeldDaemonControlPlaneRequestSchema, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, sn as providerDispatchRuntimeContextSchema, sr as boolean, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, ti as normalizeOptionalWorkingDirectory, tr as openMeldToolsUpdateOperationPhaseSchema, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportHeartbeatResponseSchema, vt as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, w as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, wn as collectCanonicalMentionTextFragments, x as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, xi as resolveCommandAgentWorkActivity, xr as strictObject, y as runtimeTransportLocalAgentControlCancelFramePayloadSchema, yt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, zn as agentInteractionRequestSchema, zr as normalizeSpacePasswordText } from "./runtime-transport-Ciax1_jb.js";
6
6
  import { r as daemonServiceLaneSchema, t as daemonServiceContractSchema } from "./service-contract-CRyDcIIf.js";
7
7
  import { A as getDaemonRuntimeStatus, B as resolveDaemonServiceRuntimeMetadata, C as daemonServiceRepairJournalPath, D as daemonServiceUpdateWorkerBinaryExecutablePath, E as daemonServiceStableLauncherPath, F as readDaemonServiceLifecycleLockMeta, G as withDaemonServiceReconcileLock, H as rotateDaemonControlPlaneTokenIfExpired, I as readDaemonServiceLifecycleLockMetaWithCleanup, J as withDaemonServiceStopLock, K as withDaemonServiceRegistrationMutationLock, L as readDaemonServiceRuntimeSnapshot, M as installDaemon, N as isDaemonServiceRuntimeHeartbeatStale, O as daemonStatePath, P as readDaemonControlPlaneToken, R as releaseDaemonServiceLifecycleLock, S as daemonServiceRecognizedExecutablePaths$1, T as daemonServiceStableExecutableWrapperPath, U as setDaemonServiceRuntimeState, V as restoreDaemonInstallStateSnapshot, W as uninstallDaemon, X as writeDaemonLocalStateFile, Y as readDaemonLocalStateFile, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceExecutableWrapperPaths$1, c as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, d as clearDaemonServiceRuntimeState, f as daemonDispatchJournalPath, g as daemonRuntimeRootPath, h as daemonRuntimeDataPath, i as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, j as getDaemonStatus, k as ensureDaemonControlPlaneToken, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, q as withDaemonServiceRunLock, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableBinaryExecutablePath, x as daemonServiceLegacyExecutableWrapperPath, y as daemonServiceActiveBundleStatePath, z as resolveDaemonControlPlaneEndpoint } from "./daemon-runtime-lease-D82uDZ5s.js";
8
- import { A as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, B as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, C as DAEMON_RUNTIME_CONTRACT_EPOCH$1, D as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, E as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, F as OPENCLAW_CLI_TIMEOUT_MS$1, H as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, I as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, L as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, N as MIN_HEARTBEAT_INTERVAL_MS$2, O as DEFAULT_HEARTBEAT_INTERVAL_MS$1, R as REGISTER_RESPONSE_TIMEOUT_MS$1, S as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, T as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, V as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, a as beginAuthSessionTransition, h as setAuthSession, j as MAX_HEARTBEAT_INTERVAL_MS$2, l as getAuthSessionState, o as clearAuthSession, r as assertAuthSessionMutationAvailable, v as isBinaryDistribution, w as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, x as CATALOG_SYNC_RETRY_INTERVAL_MS$1, y as resolveOpenMeldDistribution } from "./auth-session-JRLGSU3U.js";
9
- import { a as AuthRequestCredentialError, c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as buildRequestAuthHeaders, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileIdentityRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldProfileRequestHeadersWithAuth, u as canAttachAuthTokenToRequest } from "./api-client-foundation-DAqpgdEd.js";
8
+ import { A as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, B as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, C as DAEMON_RUNTIME_CONTRACT_EPOCH$1, D as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, E as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, F as OPENCLAW_CLI_TIMEOUT_MS$1, H as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, I as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, L as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, N as MIN_HEARTBEAT_INTERVAL_MS$2, O as DEFAULT_HEARTBEAT_INTERVAL_MS$1, R as REGISTER_RESPONSE_TIMEOUT_MS$1, S as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, T as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, V as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, a as beginAuthSessionTransition, h as setAuthSession, j as MAX_HEARTBEAT_INTERVAL_MS$2, l as getAuthSessionState, o as clearAuthSession, r as assertAuthSessionMutationAvailable, v as isBinaryDistribution, w as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, x as CATALOG_SYNC_RETRY_INTERVAL_MS$1, y as resolveOpenMeldDistribution } from "./auth-session-CNmIonA7.js";
9
+ import { a as AuthRequestCredentialError, c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as buildRequestAuthHeaders, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileIdentityRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldProfileRequestHeadersWithAuth, u as canAttachAuthTokenToRequest } from "./api-client-foundation--Nr2FS4d.js";
10
10
  import { createRequire } from "node:module";
11
11
  import { homedir, tmpdir, userInfo } from "node:os";
12
12
  import * as z$1 from "zod/v4";
@@ -3921,6 +3921,14 @@ function text$2(value) {
3921
3921
  return typeof value === "string" && value.trim() ? value.trim() : null;
3922
3922
  }
3923
3923
  //#endregion
3924
+ //#region ../../runtime/adapters/core/dist/provider-original-error.js
3925
+ function createProviderOriginalError(value) {
3926
+ if (typeof value !== "string") return null;
3927
+ const normalized = value.trim();
3928
+ if (normalized.length === 0 || !isOriginalErrorSafeForMessageDetails(normalized)) return null;
3929
+ return normalized.slice(0, OPENMELD_ORIGINAL_ERROR_MAX_LENGTH);
3930
+ }
3931
+ //#endregion
3924
3932
  //#region ../../runtime/adapters/core/dist/agent-controller-process.js
3925
3933
  const PROCESS_TABLE_COLUMN_SEPARATOR = /\s+/u;
3926
3934
  const PROCESS_TABLE_LINE_SEPARATOR = /\r?\n/u;
@@ -6491,17 +6499,23 @@ const toAdapterDispatchFailure = (error, defaultErrorType = "adapter") => {
6491
6499
  const errorType = extractErrorType(error) ?? defaultErrorType;
6492
6500
  const diagnostics = extractDispatchDiagnostics(error);
6493
6501
  const providerAccessEvidence = extractProviderAccessEvidence(error);
6502
+ const originalError = extractProviderOriginalError(error);
6494
6503
  const telemetry = extractDispatchTelemetry(error);
6495
6504
  return {
6496
6505
  ...diagnostics ? { diagnostics } : {},
6497
6506
  ...errorCode ? { errorCode } : {},
6498
6507
  errorMessage: error instanceof Error ? error.message : "adapter dispatch failed",
6499
6508
  errorType,
6509
+ ...originalError ? { originalError } : {},
6500
6510
  ...providerAccessEvidence ? { providerAccessEvidence } : {},
6501
6511
  status: "failed",
6502
6512
  ...telemetry ? { telemetry } : {}
6503
6513
  };
6504
6514
  };
6515
+ const extractProviderOriginalError = (error) => {
6516
+ if (!(error && typeof error === "object")) return null;
6517
+ return createProviderOriginalError(error.originalError);
6518
+ };
6505
6519
  const extractDispatchTelemetry = (error) => {
6506
6520
  if (!error || typeof error !== "object") return null;
6507
6521
  const telemetry = toUnknownRecord(error.telemetry);
@@ -7490,6 +7504,7 @@ const countVisibleLines$1 = (value) => {
7490
7504
  var ClaudeCliTransportError = class extends Error {
7491
7505
  code;
7492
7506
  errorType;
7507
+ originalError;
7493
7508
  providerAccessEvidence;
7494
7509
  telemetry;
7495
7510
  constructor(input) {
@@ -7497,6 +7512,7 @@ var ClaudeCliTransportError = class extends Error {
7497
7512
  this.name = "ClaudeCliTransportError";
7498
7513
  this.code = input.code;
7499
7514
  this.errorType = input.errorType;
7515
+ if (input.originalError) this.originalError = input.originalError;
7500
7516
  if (input.providerAccessEvidence) this.providerAccessEvidence = input.providerAccessEvidence;
7501
7517
  if (input.telemetry) this.telemetry = input.telemetry;
7502
7518
  }
@@ -7526,6 +7542,7 @@ async function invokeClaudeCliTransport(input) {
7526
7542
  let latestResultIsError = false;
7527
7543
  let resolvedSessionId = normalizeOptionalText$64(input.sessionId);
7528
7544
  const providerErrorMessages = [];
7545
+ const providerOriginalErrorMessages = [];
7529
7546
  let firstStdoutAtMs = null;
7530
7547
  let firstOutputAtMs = null;
7531
7548
  const previewEmitter = createClaudePreviewEmitter({
@@ -7554,6 +7571,7 @@ async function invokeClaudeCliTransport(input) {
7554
7571
  latestResultIsError,
7555
7572
  previewEmitter,
7556
7573
  providerErrorMessages,
7574
+ providerOriginalErrorMessages,
7557
7575
  resolvedSessionId
7558
7576
  });
7559
7577
  firstOutputAtMs = nextState.firstOutputAtMs;
@@ -7585,6 +7603,7 @@ async function invokeClaudeCliTransport(input) {
7585
7603
  const classifiedFailure = classifyClaudeFailure({
7586
7604
  exitSignal: driverResult.signal,
7587
7605
  providerErrorMessages,
7606
+ providerOriginalErrorMessages,
7588
7607
  stderrText: driverResult.stderrText,
7589
7608
  stdoutText: driverResult.stdoutText
7590
7609
  });
@@ -7592,6 +7611,7 @@ async function invokeClaudeCliTransport(input) {
7592
7611
  code: classifiedFailure.code,
7593
7612
  errorType: classifiedFailure.errorType,
7594
7613
  message: classifiedFailure.message,
7614
+ ...classifiedFailure.originalError ? { originalError: classifiedFailure.originalError } : {},
7595
7615
  ...classifiedFailure.providerAccessEvidence ? { providerAccessEvidence: classifiedFailure.providerAccessEvidence } : {},
7596
7616
  telemetry
7597
7617
  });
@@ -7706,7 +7726,10 @@ const handleClaudeStdoutLine = (input) => {
7706
7726
  latestOutput = parsedLine.resultText;
7707
7727
  if (firstOutputAtMs === null) firstOutputAtMs = Date.now();
7708
7728
  }
7709
- if (parsedLine.errorMessage) input.providerErrorMessages.push(parsedLine.errorMessage);
7729
+ if (parsedLine.errorMessage) {
7730
+ input.providerErrorMessages.push(parsedLine.errorMessage);
7731
+ input.providerOriginalErrorMessages.push(parsedLine.errorMessage);
7732
+ }
7710
7733
  if (parsedLine.isErrorResult === true) latestResultIsError = true;
7711
7734
  else {
7712
7735
  latestResultIsError = false;
@@ -7745,6 +7768,7 @@ const toClaudeCliTransportError = (error, timeoutMs) => {
7745
7768
  code: classifiedFailure.code,
7746
7769
  errorType: classifiedFailure.errorType,
7747
7770
  message: classifiedFailure.message,
7771
+ ...classifiedFailure.originalError ? { originalError: classifiedFailure.originalError } : {},
7748
7772
  ...classifiedFailure.providerAccessEvidence ? { providerAccessEvidence: classifiedFailure.providerAccessEvidence } : {}
7749
7773
  });
7750
7774
  }
@@ -7756,9 +7780,10 @@ const toClaudeCliTransportError = (error, timeoutMs) => {
7756
7780
  });
7757
7781
  };
7758
7782
  const classifyClaudeFailure = (input) => {
7783
+ const trustedProviderMessages = /* @__PURE__ */ new Set([...input.providerOriginalErrorMessages ?? [], ...extractErrorMessagesFromStdout$2(input.stdoutText)]);
7759
7784
  const providerMessage = resolveProviderFailureMessage$3(input);
7760
7785
  if (providerMessage) {
7761
- const classified = classifyProviderMessageFailure(providerMessage);
7786
+ const classified = classifyProviderMessageFailure(providerMessage, trustedProviderMessages.has(providerMessage));
7762
7787
  if (classified) return classified;
7763
7788
  }
7764
7789
  if (input.exitSignal) return {
@@ -7774,50 +7799,55 @@ const classifyClaudeFailure = (input) => {
7774
7799
  };
7775
7800
  return { ...buildProviderExitError({ providerLabel: "claude" }) };
7776
7801
  };
7777
- const classifyProviderMessageFailure = (providerMessage) => {
7802
+ const classifyProviderMessageFailure = (providerMessage, includeOriginalError) => {
7778
7803
  const lowered = providerMessage.toLowerCase();
7804
+ const originalError = includeOriginalError ? createProviderOriginalError(providerMessage) : null;
7805
+ const withOriginalError = (value) => ({
7806
+ ...value,
7807
+ ...originalError ? { originalError } : {}
7808
+ });
7779
7809
  const providerAccessEvidence = buildClaudeCodeProviderAccessEvidence(lowered);
7780
7810
  const permissionDenial = classifyRuntimePermissionDenialMessage({
7781
7811
  message: providerMessage,
7782
7812
  source: "claude-code"
7783
7813
  });
7784
- if (permissionDenial) return {
7814
+ if (permissionDenial) return withOriginalError({
7785
7815
  code: permissionDenial.code,
7786
7816
  errorType: permissionDenial.errorType,
7787
7817
  message: permissionDenial.message
7788
- };
7789
- if (isAuthFailure$1(lowered)) return {
7818
+ });
7819
+ if (isAuthFailure$1(lowered)) return withOriginalError({
7790
7820
  code: "auth.required",
7791
7821
  errorType: "auth",
7792
7822
  message: providerMessage,
7793
7823
  ...providerAccessEvidence ? { providerAccessEvidence } : {}
7794
- };
7795
- if (isQuotaFailure$1(lowered)) return {
7824
+ });
7825
+ if (isQuotaFailure$1(lowered)) return withOriginalError({
7796
7826
  code: "quota.exceeded",
7797
7827
  errorType: "adapter",
7798
7828
  message: providerMessage,
7799
7829
  ...providerAccessEvidence ? { providerAccessEvidence } : {}
7800
- };
7801
- if (isRateLimitFailure$1(lowered)) return {
7830
+ });
7831
+ if (isRateLimitFailure$1(lowered)) return withOriginalError({
7802
7832
  code: "rate_limited",
7803
7833
  errorType: "adapter",
7804
7834
  message: providerMessage
7805
- };
7806
- if (isProviderOverloadedFailure(lowered)) return {
7835
+ });
7836
+ if (isProviderOverloadedFailure(lowered)) return withOriginalError({
7807
7837
  code: "provider.unavailable",
7808
7838
  errorType: "adapter",
7809
7839
  message: providerMessage
7810
- };
7811
- if (isModelConfigFailure(lowered)) return {
7840
+ });
7841
+ if (isModelConfigFailure(lowered)) return withOriginalError({
7812
7842
  code: "config.invalid",
7813
7843
  errorType: "config",
7814
7844
  message: toConfigInvalidMessage$1(providerMessage)
7815
- };
7816
- if (isLikelyClaudeContextLostError(providerMessage)) return {
7845
+ });
7846
+ if (isLikelyClaudeContextLostError(providerMessage)) return withOriginalError({
7817
7847
  code: "context.lost",
7818
7848
  errorType: "adapter",
7819
7849
  message: providerMessage
7820
- };
7850
+ });
7821
7851
  return null;
7822
7852
  };
7823
7853
  const resolveProviderFailureMessage$3 = (input) => {
@@ -7900,6 +7930,7 @@ function normalizeOptionalText$64(value) {
7900
7930
  var ClaudeAgentSdkTransportError = class extends Error {
7901
7931
  code;
7902
7932
  errorType;
7933
+ originalError;
7903
7934
  providerAccessEvidence;
7904
7935
  telemetry;
7905
7936
  constructor(input) {
@@ -7907,6 +7938,7 @@ var ClaudeAgentSdkTransportError = class extends Error {
7907
7938
  this.name = "ClaudeAgentSdkTransportError";
7908
7939
  this.code = input.code;
7909
7940
  this.errorType = input.errorType;
7941
+ if (input.originalError) this.originalError = input.originalError;
7910
7942
  if (input.providerAccessEvidence) this.providerAccessEvidence = input.providerAccessEvidence;
7911
7943
  if (input.telemetry) this.telemetry = input.telemetry;
7912
7944
  }
@@ -8050,12 +8082,14 @@ async function invokeClaudeAgentSdkTransport(input) {
8050
8082
  });
8051
8083
  const classifiedFailure = classifyClaudeFailure({
8052
8084
  providerErrorMessages,
8085
+ providerOriginalErrorMessages: providerErrorMessages,
8053
8086
  stderrText: stderrChunks.join("")
8054
8087
  });
8055
8088
  throw new ClaudeAgentSdkTransportError({
8056
8089
  code: classifiedFailure.code,
8057
8090
  errorType: classifiedFailure.errorType,
8058
8091
  message: classifiedFailure.message,
8092
+ ...projectClaudeOriginalError(classifiedFailure),
8059
8093
  ...classifiedFailure.providerAccessEvidence ? { providerAccessEvidence: classifiedFailure.providerAccessEvidence } : {},
8060
8094
  telemetry
8061
8095
  });
@@ -8072,12 +8106,14 @@ async function invokeClaudeAgentSdkTransport(input) {
8072
8106
  });
8073
8107
  const classifiedFailure = classifyClaudeFailure({
8074
8108
  providerErrorMessages,
8109
+ providerOriginalErrorMessages: providerErrorMessages,
8075
8110
  stderrText: stderrChunks.join("")
8076
8111
  });
8077
8112
  throw new ClaudeAgentSdkTransportError({
8078
8113
  code: classifiedFailure.code,
8079
8114
  errorType: classifiedFailure.errorType,
8080
8115
  message: classifiedFailure.message,
8116
+ ...projectClaudeOriginalError(classifiedFailure),
8081
8117
  ...classifiedFailure.providerAccessEvidence ? { providerAccessEvidence: classifiedFailure.providerAccessEvidence } : {},
8082
8118
  telemetry
8083
8119
  });
@@ -8402,13 +8438,15 @@ function toClaudeAgentSdkTransportError(input) {
8402
8438
  }
8403
8439
  const fallbackMessage = input.error instanceof Error ? input.error.message : String(input.error);
8404
8440
  const classifiedFailure = classifyClaudeFailure({
8405
- providerErrorMessages: [...input.providerErrorMessages, normalizeOptionalText$63(fallbackMessage) ?? ""],
8406
- stderrText: input.stderrText
8441
+ providerErrorMessages: input.providerErrorMessages,
8442
+ providerOriginalErrorMessages: input.providerErrorMessages,
8443
+ stderrText: [fallbackMessage, input.stderrText].map(normalizeOptionalText$63).filter((value) => value !== null).join("\n")
8407
8444
  });
8408
8445
  return new ClaudeAgentSdkTransportError({
8409
8446
  code: classifiedFailure.code,
8410
8447
  errorType: classifiedFailure.errorType,
8411
8448
  message: classifiedFailure.message,
8449
+ ...projectClaudeOriginalError(classifiedFailure),
8412
8450
  ...classifiedFailure.providerAccessEvidence ? { providerAccessEvidence: classifiedFailure.providerAccessEvidence } : {},
8413
8451
  telemetry: buildClaudeAgentSdkTelemetry({
8414
8452
  firstOutputAtMs: input.firstOutputAtMs,
@@ -8421,6 +8459,9 @@ function toClaudeAgentSdkTransportError(input) {
8421
8459
  })
8422
8460
  });
8423
8461
  }
8462
+ function projectClaudeOriginalError(input) {
8463
+ return input.originalError ? { originalError: input.originalError } : {};
8464
+ }
8424
8465
  function buildPosixWrapperScript(input) {
8425
8466
  return [
8426
8467
  "#!/bin/sh",
@@ -8458,6 +8499,7 @@ function normalizeOptionalText$63(value) {
8458
8499
  var ClaudeRuntimeError = class extends Error {
8459
8500
  code;
8460
8501
  errorType;
8502
+ originalError;
8461
8503
  providerAccessEvidence;
8462
8504
  telemetry;
8463
8505
  constructor(input) {
@@ -8465,6 +8507,7 @@ var ClaudeRuntimeError = class extends Error {
8465
8507
  this.name = "ClaudeRuntimeError";
8466
8508
  this.code = input.code;
8467
8509
  this.errorType = input.errorType;
8510
+ if (input.originalError) this.originalError = input.originalError;
8468
8511
  if (input.providerAccessEvidence) this.providerAccessEvidence = input.providerAccessEvidence;
8469
8512
  if (input.telemetry) this.telemetry = input.telemetry;
8470
8513
  }
@@ -8475,11 +8518,13 @@ async function invokeClaudeWithSingleContextHeal(input) {
8475
8518
  contextLossPolicy: input.executionMode === "repair" ? "fail" : "rebuild",
8476
8519
  createRebuildFailedError: (error) => {
8477
8520
  const providerAccessEvidence = getClaudeProviderAccessEvidence(error);
8521
+ const originalError = getClaudeOriginalError(error);
8478
8522
  const telemetry = getClaudeTelemetry(error);
8479
8523
  return new ClaudeRuntimeError({
8480
8524
  code: "context.rebuild_failed",
8481
8525
  errorType: "adapter",
8482
8526
  message: `context.rebuild_failed: ${toErrorMessage$40(error)}`,
8527
+ ...originalError ? { originalError } : {},
8483
8528
  ...providerAccessEvidence ? { providerAccessEvidence } : {},
8484
8529
  ...telemetry ? { telemetry } : {}
8485
8530
  });
@@ -8527,11 +8572,13 @@ async function invokeClaudeOnce(input) {
8527
8572
  if (error instanceof ClaudeRuntimeError) throw error;
8528
8573
  if (error && typeof error === "object" && "code" in error && typeof error.code === "string" && "errorType" in error && typeof error.errorType === "string" && error instanceof Error) {
8529
8574
  const providerAccessEvidence = getClaudeProviderAccessEvidence(error);
8575
+ const originalError = getClaudeOriginalError(error);
8530
8576
  const telemetry = getClaudeTelemetry(error);
8531
8577
  throw new ClaudeRuntimeError({
8532
8578
  code: error.code,
8533
8579
  errorType: error.errorType,
8534
8580
  message: error.message,
8581
+ ...originalError ? { originalError } : {},
8535
8582
  ...providerAccessEvidence ? { providerAccessEvidence } : {},
8536
8583
  ...telemetry ? { telemetry } : {}
8537
8584
  });
@@ -8587,6 +8634,11 @@ function getClaudeProviderAccessEvidence(error) {
8587
8634
  if (!evidence || typeof evidence !== "object") return null;
8588
8635
  return evidence;
8589
8636
  }
8637
+ function getClaudeOriginalError(error) {
8638
+ if (!(error && typeof error === "object")) return null;
8639
+ const originalError = error.originalError;
8640
+ return typeof originalError === "string" ? originalError : null;
8641
+ }
8590
8642
  function getClaudeTelemetry(error) {
8591
8643
  if (!(error && typeof error === "object" && "telemetry" in error)) return null;
8592
8644
  const telemetry = error.telemetry;
@@ -8764,7 +8816,7 @@ const normalizeOptionalText$62 = (value) => {
8764
8816
  //#region ../../runtime/adapters/codex/dist/output/codex-provider-failure.js
8765
8817
  /**
8766
8818
  * Codex provider-account failure classification shared by the CLI and
8767
- * app-server transports so both surface the same `quota.exceeded` /
8819
+ * app-server transports so both surface the same `usage_exhausted` /
8768
8820
  * `rate_limited` / `auth.required` codes for the same provider failure.
8769
8821
  *
8770
8822
  * Wording covers both the ChatGPT-subscription Codex ("You've hit your usage
@@ -8773,12 +8825,9 @@ const normalizeOptionalText$62 = (value) => {
8773
8825
  * - app-server turn.error: `{ message: "You've hit your usage limit. …", codexErrorInfo: "usageLimitExceeded" }`
8774
8826
  * - exec turn.failed: `{ error: { message: "You've hit your usage limit. …" } }`
8775
8827
  */
8776
- function isCodexQuotaFailure(value) {
8828
+ function isCodexUsageExhaustedFailure(value) {
8777
8829
  return value.includes("usage limit") || value.includes("purchase more credits") || value.includes("insufficient_quota") || value.includes("insufficient balance") || value.includes("insufficient_balance") || value.includes("quota exceeded") || value.includes("exceeded your current quota") || value.includes("not enough credits") || value.includes("out of credits") || value.includes("credits exhausted") || value.includes("balance is too low") || value.includes("payment required") || value.includes("billing");
8778
8830
  }
8779
- function isDefinitiveCodexCapacityFailure(value) {
8780
- return value.includes("purchase more credits") || value.includes("insufficient_quota") || value.includes("insufficient balance") || value.includes("insufficient_balance") || value.includes("quota exceeded") || value.includes("exceeded your current quota") || value.includes("not enough credits") || value.includes("out of credits") || value.includes("credits exhausted") || value.includes("balance is too low") || value.includes("payment required");
8781
- }
8782
8831
  function isCodexRateLimitFailure(value) {
8783
8832
  return value.includes("429") || value.includes("rate limit") || value.includes("too many requests");
8784
8833
  }
@@ -8797,36 +8846,35 @@ function isCodexSubscriptionAccessFailure(value) {
8797
8846
  */
8798
8847
  function classifyCodexProviderAccountFailure(input) {
8799
8848
  if (normalizeOptionalText$61(input.codexErrorInfo)?.toLowerCase() === "usagelimitexceeded") return buildHardProviderFailure({
8800
- code: "quota.exceeded",
8801
- reasonCode: "provider_account.capacity_exhausted"
8849
+ code: "usage_exhausted",
8850
+ originalError: createProviderOriginalError(input.message),
8851
+ reasonCode: "usage_exhausted"
8802
8852
  });
8803
8853
  const lowered = input.message.toLowerCase();
8804
- if (isDefinitiveCodexCapacityFailure(lowered)) return buildHardProviderFailure({
8805
- code: "quota.exceeded",
8806
- reasonCode: "provider_account.capacity_exhausted"
8807
- });
8808
- if (isCodexRateLimitFailure(lowered)) return {
8854
+ if (isCodexRateLimitFailure(lowered)) return withOriginalError({
8809
8855
  code: "rate_limited",
8810
8856
  errorType: "adapter"
8811
- };
8857
+ }, input.message);
8812
8858
  if (isCodexSubscriptionAccessFailure(lowered)) return buildHardProviderFailure({
8813
8859
  code: "provider.subscription_access_unavailable",
8860
+ originalError: createProviderOriginalError(input.message),
8814
8861
  reasonCode: "provider_account.subscription_access_unavailable"
8815
8862
  });
8816
- if (isCodexQuotaFailure(lowered)) return buildHardProviderFailure({
8817
- code: "quota.exceeded",
8818
- reasonCode: "provider_account.capacity_exhausted"
8819
- });
8820
- if (isCodexAuthFailure(lowered)) return {
8863
+ if (isCodexUsageExhaustedFailure(lowered)) return withOriginalError({
8864
+ code: "usage_exhausted",
8865
+ errorType: "adapter"
8866
+ }, input.message);
8867
+ if (isCodexAuthFailure(lowered)) return withOriginalError({
8821
8868
  code: "auth.required",
8822
8869
  errorType: "auth"
8823
- };
8870
+ }, input.message);
8824
8871
  return null;
8825
8872
  }
8826
8873
  function buildHardProviderFailure(input) {
8827
8874
  return {
8828
8875
  code: input.code,
8829
8876
  errorType: "adapter",
8877
+ ...input.originalError ? { originalError: input.originalError } : {},
8830
8878
  providerAccessEvidence: {
8831
8879
  observedAtMs: Date.now(),
8832
8880
  provider: "codex",
@@ -8835,6 +8883,13 @@ function buildHardProviderFailure(input) {
8835
8883
  }
8836
8884
  };
8837
8885
  }
8886
+ function withOriginalError(classification, message) {
8887
+ const originalError = createProviderOriginalError(message);
8888
+ return {
8889
+ ...classification,
8890
+ ...originalError ? { originalError } : {}
8891
+ };
8892
+ }
8838
8893
  function normalizeOptionalText$61(value) {
8839
8894
  const normalized = String(value ?? "").trim();
8840
8895
  return normalized.length > 0 ? normalized : null;
@@ -9196,12 +9251,14 @@ const DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS = 15e3;
9196
9251
  var CodexAppServerTransportError = class extends Error {
9197
9252
  code;
9198
9253
  errorType;
9254
+ originalError;
9199
9255
  providerAccessEvidence;
9200
9256
  constructor(input) {
9201
9257
  super(input.message);
9202
9258
  this.name = "CodexAppServerTransportError";
9203
9259
  this.code = input.code;
9204
9260
  this.errorType = input.errorType;
9261
+ this.originalError = input.originalError;
9205
9262
  this.providerAccessEvidence = input.providerAccessEvidence;
9206
9263
  }
9207
9264
  };
@@ -9347,6 +9404,7 @@ function requireSuccessfulCodexTurn(turn) {
9347
9404
  code: providerFailure.code,
9348
9405
  errorType: providerFailure.errorType,
9349
9406
  message: failureMessage,
9407
+ originalError: providerFailure.originalError,
9350
9408
  providerAccessEvidence: providerFailure.providerAccessEvidence
9351
9409
  });
9352
9410
  throw new CodexAppServerTransportError({
@@ -10669,6 +10727,7 @@ function toJsonRpcTransportError$1(error) {
10669
10727
  code: providerFailure.code,
10670
10728
  errorType: providerFailure.errorType,
10671
10729
  message,
10730
+ originalError: providerFailure.originalError,
10672
10731
  providerAccessEvidence: providerFailure.providerAccessEvidence
10673
10732
  });
10674
10733
  const lowered = message.toLowerCase();
@@ -10993,12 +11052,14 @@ function normalizeOptionalText$57(value) {
10993
11052
  var CodexCliTransportError = class extends Error {
10994
11053
  code;
10995
11054
  errorType;
11055
+ originalError;
10996
11056
  providerAccessEvidence;
10997
11057
  constructor(input) {
10998
11058
  super(input.message);
10999
11059
  this.name = "CodexCliTransportError";
11000
11060
  this.code = input.code;
11001
11061
  this.errorType = input.errorType;
11062
+ this.originalError = input.originalError;
11002
11063
  this.providerAccessEvidence = input.providerAccessEvidence;
11003
11064
  }
11004
11065
  };
@@ -11092,6 +11153,7 @@ async function invokeCodexCliTransport(input) {
11092
11153
  code: classifiedFailure.code,
11093
11154
  errorType: classifiedFailure.errorType,
11094
11155
  message: classifiedFailure.message,
11156
+ originalError: classifiedFailure.originalError,
11095
11157
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
11096
11158
  });
11097
11159
  }
@@ -11107,6 +11169,7 @@ async function invokeCodexCliTransport(input) {
11107
11169
  code: classifiedFailure.code,
11108
11170
  errorType: classifiedFailure.errorType,
11109
11171
  message: classifiedFailure.message,
11172
+ originalError: classifiedFailure.originalError,
11110
11173
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
11111
11174
  });
11112
11175
  }
@@ -11314,6 +11377,7 @@ const toCodexCliTransportError = (error, timeoutMs) => {
11314
11377
  code: classifiedFailure.code,
11315
11378
  errorType: classifiedFailure.errorType,
11316
11379
  message: classifiedFailure.message,
11380
+ originalError: classifiedFailure.originalError,
11317
11381
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
11318
11382
  });
11319
11383
  }
@@ -11419,12 +11483,14 @@ function normalizeOptionalText$56(value) {
11419
11483
  var CodexRuntimeError = class extends Error {
11420
11484
  code;
11421
11485
  errorType;
11486
+ originalError;
11422
11487
  providerAccessEvidence;
11423
11488
  constructor(input) {
11424
11489
  super(input.message);
11425
11490
  this.name = "CodexRuntimeError";
11426
11491
  this.code = input.code;
11427
11492
  this.errorType = input.errorType;
11493
+ this.originalError = input.originalError;
11428
11494
  this.providerAccessEvidence = input.providerAccessEvidence;
11429
11495
  }
11430
11496
  };
@@ -11534,6 +11600,7 @@ function toCodexRuntimeError(error) {
11534
11600
  code: error.code,
11535
11601
  errorType: error.errorType,
11536
11602
  message: error.message,
11603
+ originalError: error.originalError,
11537
11604
  providerAccessEvidence: error.providerAccessEvidence
11538
11605
  });
11539
11606
  return new CodexRuntimeError({
@@ -12254,12 +12321,14 @@ var GrokBuildAcpTransportError = class extends Error {
12254
12321
  code;
12255
12322
  diagnostics;
12256
12323
  errorType;
12324
+ originalError;
12257
12325
  constructor(input) {
12258
12326
  super(input.message, input.cause === void 0 ? void 0 : { cause: input.cause });
12259
12327
  this.name = "GrokBuildAcpTransportError";
12260
12328
  this.code = input.code;
12261
12329
  this.diagnostics = input.diagnostics;
12262
12330
  this.errorType = input.errorType;
12331
+ this.originalError = input.originalError;
12263
12332
  }
12264
12333
  };
12265
12334
  async function probeGrokBuildAcpInterface(input) {
@@ -12367,7 +12436,8 @@ function upgradePromptProtocolFailureWithExhaustedUsage(classified, usageLimits)
12367
12436
  cause: classified,
12368
12437
  code: PROVIDER_USAGE_EXHAUSTED_ERROR_CODE,
12369
12438
  errorType: "auth",
12370
- message: "grok-build.quota_or_entitlement: the provider account has used all of its included credits for this period"
12439
+ message: "grok-build.quota_or_entitlement: the provider account has used all of its included credits for this period",
12440
+ ...classified.originalError ? { originalError: classified.originalError } : {}
12371
12441
  });
12372
12442
  }
12373
12443
  async function toPromptWakeFailureError(error, session) {
@@ -12403,6 +12473,7 @@ var GrokBuildAcpSession = class {
12403
12473
  GROK_DISABLE_AUTOUPDATER: "1"
12404
12474
  },
12405
12475
  launchContract: input.launchContract,
12476
+ mapJsonRpcError: toGrokBuildJsonRpcTransportError,
12406
12477
  onClientRequest: (request) => this.#handleClientRequest(request),
12407
12478
  onLifecycleEvent: (event) => this.#emitRuntimeEvent(event),
12408
12479
  onNotification: (notification) => this.#handleNotification(notification),
@@ -12491,7 +12562,8 @@ var GrokBuildAcpSession = class {
12491
12562
  cause: error,
12492
12563
  code: "context_not_found",
12493
12564
  errorType: "adapter",
12494
- message: "context_not_found: Grok Build could not resume the persisted conversation"
12565
+ message: "context_not_found: Grok Build could not resume the persisted conversation",
12566
+ ...error instanceof GrokBuildAcpTransportError && error.originalError ? { originalError: error.originalError } : {}
12495
12567
  });
12496
12568
  throw error;
12497
12569
  }
@@ -12542,7 +12614,8 @@ var GrokBuildAcpSession = class {
12542
12614
  code: "model.unavailable",
12543
12615
  diagnostics: { modelNegotiation: input.descriptor.diagnostics },
12544
12616
  errorType: "config",
12545
- message: `model.unavailable: Grok Build rejected model '${modelId}' or its reasoning effort for this session`
12617
+ message: `model.unavailable: Grok Build rejected model '${modelId}' or its reasoning effort for this session`,
12618
+ ...error.originalError ? { originalError: error.originalError } : {}
12546
12619
  });
12547
12620
  throw error;
12548
12621
  }
@@ -12835,20 +12908,25 @@ async function emitFinalPreviewIfRequested$1(input) {
12835
12908
  }
12836
12909
  function toGrokBuildTransportError(error, stderr, diagnostics) {
12837
12910
  const combined = [toErrorMessage$35(error), normalizeOptionalText$53(stderr)].filter((value) => value !== null).join("\n");
12838
- const providerFailure = !(error instanceof GrokBuildAcpTransportError) || error.code.startsWith("protocol.") ? classifyGrokBuildProviderFailure(combined) : null;
12911
+ const providerFailure = !(error instanceof GrokBuildAcpTransportError) || error.code.startsWith("protocol.") ? classifyGrokBuildProviderFailure({
12912
+ message: combined,
12913
+ originalError: error instanceof GrokBuildAcpTransportError ? error.originalError : void 0
12914
+ }) : null;
12839
12915
  if (providerFailure) return diagnostics ? new GrokBuildAcpTransportError({
12840
12916
  cause: error,
12841
12917
  code: providerFailure.code,
12842
12918
  diagnostics,
12843
12919
  errorType: providerFailure.errorType,
12844
- message: providerFailure.message
12920
+ message: providerFailure.message,
12921
+ ...providerFailure.originalError ? { originalError: providerFailure.originalError } : {}
12845
12922
  }) : providerFailure;
12846
12923
  if (error instanceof GrokBuildAcpTransportError) return error.diagnostics || !diagnostics ? error : new GrokBuildAcpTransportError({
12847
12924
  cause: error,
12848
12925
  code: error.code,
12849
12926
  diagnostics,
12850
12927
  errorType: error.errorType,
12851
- message: error.message
12928
+ message: error.message,
12929
+ ...error.originalError ? { originalError: error.originalError } : {}
12852
12930
  });
12853
12931
  const classified = new GrokBuildAcpTransportError({
12854
12932
  code: "upstream_unreachable",
@@ -12863,12 +12941,30 @@ function toGrokBuildTransportError(error, stderr, diagnostics) {
12863
12941
  message: classified.message
12864
12942
  }) : classified;
12865
12943
  }
12866
- function classifyGrokBuildProviderFailure(message) {
12867
- const normalized = normalizeOptionalText$53(message) ?? "Grok Build ACP error";
12944
+ function toGrokBuildJsonRpcTransportError(error) {
12945
+ let code = "protocol.request_failed";
12946
+ let errorType = "adapter";
12947
+ if (error.code === -32601) code = "protocol.method_not_found";
12948
+ else if (error.code === -32602) {
12949
+ code = "protocol.invalid_params";
12950
+ errorType = "config";
12951
+ }
12952
+ const message = normalizeOptionalText$53(error.message) ?? "ACP request failed";
12953
+ const originalError = createProviderOriginalError(message);
12954
+ return new GrokBuildAcpTransportError({
12955
+ code,
12956
+ errorType,
12957
+ message: `${code}: ${message}`,
12958
+ ...originalError ? { originalError } : {}
12959
+ });
12960
+ }
12961
+ function classifyGrokBuildProviderFailure(input) {
12962
+ const normalized = normalizeOptionalText$53(input.message) ?? "Grok Build ACP error";
12868
12963
  if (AUTH_FAILURE_RE.test(normalized)) return new GrokBuildAcpTransportError({
12869
12964
  code: "auth.failed",
12870
12965
  errorType: "auth",
12871
- message: `auth.failed: ${normalized}`
12966
+ message: `auth.failed: ${normalized}`,
12967
+ ...input.originalError ? { originalError: input.originalError } : {}
12872
12968
  });
12873
12969
  return null;
12874
12970
  }
@@ -12970,6 +13066,7 @@ function createDefaultGrokBuildInvoke(input) {
12970
13066
  cause: error,
12971
13067
  code: "context.rebuild_failed",
12972
13068
  ...error instanceof GrokBuildAcpTransportError && error.diagnostics ? { diagnostics: error.diagnostics } : {},
13069
+ ...error instanceof GrokBuildAcpTransportError && error.originalError ? { originalError: error.originalError } : {},
12973
13070
  errorType: "adapter",
12974
13071
  message: `context.rebuild_failed: ${toErrorMessage$34(error)}`
12975
13072
  }),
@@ -13328,65 +13425,70 @@ function normalizeScalarText(value) {
13328
13425
  function classifyOpenCodeFailureMessage(input) {
13329
13426
  const normalized = input.message.trim();
13330
13427
  const lowered = normalized.toLowerCase();
13428
+ const originalError = input.includeOriginalError ? createProviderOriginalError(normalized) : null;
13429
+ const withOriginalError = (value) => ({
13430
+ ...value,
13431
+ ...originalError ? { originalError } : {}
13432
+ });
13331
13433
  const permissionDenial = classifyRuntimePermissionDenialMessage({
13332
13434
  message: normalized,
13333
13435
  source: "opencode"
13334
13436
  });
13335
- if (permissionDenial) return permissionDenial;
13336
- if (input.isContextLost(normalized)) return {
13437
+ if (permissionDenial) return withOriginalError(permissionDenial);
13438
+ if (input.isContextLost(normalized)) return withOriginalError({
13337
13439
  code: "context.lost",
13338
13440
  errorType: "adapter",
13339
13441
  message: `context.lost: ${normalized}`
13340
- };
13341
- if (lowered.includes("not logged in") || lowered.includes("unauthorized") || lowered.includes("authentication") || lowered.includes("credentials")) return {
13442
+ });
13443
+ if (lowered.includes("not logged in") || lowered.includes("unauthorized") || lowered.includes("authentication") || lowered.includes("credentials")) return withOriginalError({
13342
13444
  code: "auth.required",
13343
13445
  errorType: "auth",
13344
13446
  message: `auth.required: ${normalized}`
13345
- };
13346
- if (lowered.includes("unsupported model") || lowered.includes("model is not supported") || lowered.includes("invalid model") || lowered.includes("model not found")) return {
13447
+ });
13448
+ if (lowered.includes("unsupported model") || lowered.includes("model is not supported") || lowered.includes("invalid model") || lowered.includes("model not found")) return withOriginalError({
13347
13449
  code: "model.unsupported",
13348
13450
  errorType: "config",
13349
13451
  message: `model.unsupported: ${normalized}`
13350
- };
13351
- if (isInsufficientBalanceFailure(lowered)) return {
13452
+ });
13453
+ if (isInsufficientBalanceFailure(lowered)) return withOriginalError({
13352
13454
  code: "provider.insufficient_balance",
13353
13455
  errorType: "adapter",
13354
13456
  message: `provider.insufficient_balance: ${normalized}`,
13355
13457
  providerAccessEvidence: buildProviderAccessEvidence("provider_account.capacity_exhausted")
13356
- };
13357
- if (isDefinitiveHardQuotaFailure(lowered)) return {
13458
+ });
13459
+ if (isDefinitiveHardQuotaFailure(lowered)) return withOriginalError({
13358
13460
  code: "quota.exceeded",
13359
13461
  errorType: "adapter",
13360
13462
  message: `quota.exceeded: ${normalized}`,
13361
13463
  providerAccessEvidence: buildProviderAccessEvidence("provider_account.capacity_exhausted")
13362
- };
13363
- if (isTransientRateLimitFailure(lowered)) return {
13464
+ });
13465
+ if (isTransientRateLimitFailure(lowered)) return withOriginalError({
13364
13466
  code: "provider.rate_limited",
13365
13467
  errorType: "network",
13366
13468
  message: `provider.rate_limited: ${normalized}`
13367
- };
13368
- if (isSubscriptionAccessFailure(lowered)) return {
13469
+ });
13470
+ if (isSubscriptionAccessFailure(lowered)) return withOriginalError({
13369
13471
  code: "provider.subscription_access_unavailable",
13370
13472
  errorType: "adapter",
13371
13473
  message: `provider.subscription_access_unavailable: ${normalized}`,
13372
13474
  providerAccessEvidence: buildProviderAccessEvidence("provider_account.subscription_access_unavailable")
13373
- };
13374
- if (isProviderUnavailableFailure(lowered)) return {
13475
+ });
13476
+ if (isProviderUnavailableFailure(lowered)) return withOriginalError({
13375
13477
  code: "provider.unavailable",
13376
13478
  errorType: "network",
13377
13479
  message: `provider.unavailable: ${normalized}`
13378
- };
13379
- if (isHardQuotaFailure(lowered)) return {
13480
+ });
13481
+ if (isHardQuotaFailure(lowered)) return withOriginalError({
13380
13482
  code: "quota.exceeded",
13381
13483
  errorType: "adapter",
13382
13484
  message: `quota.exceeded: ${normalized}`,
13383
13485
  providerAccessEvidence: buildProviderAccessEvidence("provider_account.capacity_exhausted")
13384
- };
13385
- return {
13486
+ });
13487
+ return withOriginalError({
13386
13488
  code: "upstream_unreachable",
13387
13489
  errorType: "adapter",
13388
13490
  message: `upstream_unreachable: ${normalized}`
13389
- };
13491
+ });
13390
13492
  }
13391
13493
  function buildProviderAccessEvidence(reasonCode) {
13392
13494
  return {
@@ -13419,12 +13521,14 @@ function isProviderUnavailableFailure(value) {
13419
13521
  var OpenCodeCliTransportError = class extends Error {
13420
13522
  code;
13421
13523
  errorType;
13524
+ originalError;
13422
13525
  providerAccessEvidence;
13423
13526
  constructor(input) {
13424
13527
  super(input.message);
13425
13528
  this.name = "OpenCodeCliTransportError";
13426
13529
  this.code = input.code;
13427
13530
  this.errorType = input.errorType;
13531
+ this.originalError = input.originalError;
13428
13532
  this.providerAccessEvidence = input.providerAccessEvidence;
13429
13533
  }
13430
13534
  };
@@ -13514,6 +13618,7 @@ async function invokeOpenCodeCliTransport(input) {
13514
13618
  code: classifiedFailure.code,
13515
13619
  errorType: classifiedFailure.errorType,
13516
13620
  message: classifiedFailure.message,
13621
+ originalError: classifiedFailure.originalError,
13517
13622
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
13518
13623
  });
13519
13624
  }
@@ -13527,6 +13632,7 @@ async function invokeOpenCodeCliTransport(input) {
13527
13632
  code: classifiedFailure.code,
13528
13633
  errorType: classifiedFailure.errorType,
13529
13634
  message: classifiedFailure.message,
13635
+ originalError: classifiedFailure.originalError,
13530
13636
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
13531
13637
  });
13532
13638
  }
@@ -13545,6 +13651,7 @@ async function invokeOpenCodeCliTransport(input) {
13545
13651
  code: classifiedFailure.code,
13546
13652
  errorType: classifiedFailure.errorType,
13547
13653
  message: classifiedFailure.message,
13654
+ originalError: classifiedFailure.originalError,
13548
13655
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
13549
13656
  });
13550
13657
  }
@@ -13561,6 +13668,7 @@ async function invokeOpenCodeCliTransport(input) {
13561
13668
  code: classifiedFailure.code,
13562
13669
  errorType: classifiedFailure.errorType,
13563
13670
  message: classifiedFailure.message,
13671
+ originalError: classifiedFailure.originalError,
13564
13672
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
13565
13673
  });
13566
13674
  }
@@ -13636,6 +13744,7 @@ const toOpenCodeCliTransportError = (error, timeoutMs) => {
13636
13744
  code: classifiedFailure.code,
13637
13745
  errorType: classifiedFailure.errorType,
13638
13746
  message: classifiedFailure.message,
13747
+ originalError: classifiedFailure.originalError,
13639
13748
  providerAccessEvidence: classifiedFailure.providerAccessEvidence
13640
13749
  });
13641
13750
  }
@@ -13647,8 +13756,10 @@ const toOpenCodeCliTransportError = (error, timeoutMs) => {
13647
13756
  });
13648
13757
  };
13649
13758
  const classifyOpenCodeFailure = (input) => {
13759
+ const hasProviderOwnedMessage = input.providerErrorMessages.length > 0 || extractErrorMessagesFromStdout$1(input.stdoutText).length > 0;
13650
13760
  const providerMessage = resolveProviderFailureMessage$1(input);
13651
13761
  if (providerMessage) return classifyOpenCodeFailureMessage({
13762
+ includeOriginalError: hasProviderOwnedMessage,
13652
13763
  isContextLost: isLikelyOpenCodeContextLostError,
13653
13764
  message: providerMessage
13654
13765
  });
@@ -13889,12 +14000,14 @@ const SERVER_READY_LINE_PATTERN = /^opencode server listening on (https?:\/\/[^\
13889
14000
  var OpenCodeServerTransportError = class extends Error {
13890
14001
  code;
13891
14002
  errorType;
14003
+ originalError;
13892
14004
  providerAccessEvidence;
13893
14005
  constructor(input) {
13894
14006
  super(input.message);
13895
14007
  this.name = "OpenCodeServerTransportError";
13896
14008
  this.code = input.code;
13897
14009
  this.errorType = input.errorType;
14010
+ this.originalError = input.originalError;
13898
14011
  this.providerAccessEvidence = input.providerAccessEvidence;
13899
14012
  }
13900
14013
  };
@@ -14292,7 +14405,11 @@ function dispatchOpenCodeEvent(input, event) {
14292
14405
  observeOpenCodeTurnLifecycle(input.turnState, event.type, properties);
14293
14406
  const eventFailure = readOpenCodeTurnEventFailure(input.turnState, event.type, properties);
14294
14407
  if (eventFailure) {
14295
- input.eventFailure.reject(new Error(eventFailure));
14408
+ input.eventFailure.reject(new OpenCodeServerTransportError(classifyOpenCodeFailureMessage({
14409
+ includeOriginalError: true,
14410
+ isContextLost: isLikelyOpenCodeContextLostError,
14411
+ message: eventFailure
14412
+ })));
14296
14413
  return;
14297
14414
  }
14298
14415
  if (event.type === "permission.asked" || event.type === "permission.v2.asked") {
@@ -14845,12 +14962,14 @@ function formatStderrSuffix(stderr) {
14845
14962
  var OpenCodeRuntimeError = class extends Error {
14846
14963
  code;
14847
14964
  errorType;
14965
+ originalError;
14848
14966
  providerAccessEvidence;
14849
14967
  constructor(input) {
14850
14968
  super(input.message);
14851
14969
  this.name = "OpenCodeRuntimeError";
14852
14970
  this.code = input.code;
14853
14971
  this.errorType = input.errorType;
14972
+ this.originalError = input.originalError;
14854
14973
  this.providerAccessEvidence = input.providerAccessEvidence;
14855
14974
  }
14856
14975
  };
@@ -14928,6 +15047,7 @@ async function invokeOpenCodeOnce(input) {
14928
15047
  code: error.code,
14929
15048
  errorType: error.errorType,
14930
15049
  message: error.message,
15050
+ originalError: error.originalError,
14931
15051
  providerAccessEvidence: error.providerAccessEvidence
14932
15052
  });
14933
15053
  throw new OpenCodeRuntimeError({
@@ -18047,7 +18167,7 @@ function resolveOpenMeldAccountContext(input) {
18047
18167
  };
18048
18168
  }
18049
18169
  async function resolveCurrentOpenMeldAccountContext() {
18050
- const { getAuthSessionMetadata } = await import("./auth-session-JRLGSU3U.js").then((n) => n.i);
18170
+ const { getAuthSessionMetadata } = await import("./auth-session-CNmIonA7.js").then((n) => n.i);
18051
18171
  return resolveOpenMeldAccountContext({ session: await getAuthSessionMetadata().catch(() => null) });
18052
18172
  }
18053
18173
  function resolveHostKey(baseUrl) {
@@ -19588,8 +19708,8 @@ function splitSentences(message) {
19588
19708
  var package_default = {
19589
19709
  $schema: "https://www.schemastore.org/package.json",
19590
19710
  name: "openmeld",
19591
- version: "0.3.133",
19592
- openMeldReleaseDate: "2026-08-29",
19711
+ version: "0.3.135",
19712
+ openMeldReleaseDate: "2026-08-30",
19593
19713
  description: "OpenMeld CLI - https://openmeld.ai",
19594
19714
  license: "MIT",
19595
19715
  type: "module",
@@ -21619,12 +21739,30 @@ async function resolveDaemonDependencyPackageRoot(input) {
21619
21739
  }
21620
21740
  async function resolveDaemonDependencyPackageRootFromManifest(input) {
21621
21741
  try {
21622
- return dirname(await realpath(input.resolver.resolve(`${input.dependencyName}/package.json`)));
21742
+ return await findDaemonDependencyPackageRootFromManifestPath({
21743
+ dependencyManifestPath: await realpath(input.resolver.resolve(`${input.dependencyName}/package.json`)),
21744
+ dependencyName: input.dependencyName
21745
+ });
21623
21746
  } catch (error) {
21624
21747
  if (isPackageEntryResolutionError(error)) return null;
21625
21748
  throw error;
21626
21749
  }
21627
21750
  }
21751
+ async function findDaemonDependencyPackageRootFromManifestPath(input) {
21752
+ let currentPath = dirname(input.dependencyManifestPath);
21753
+ while (true) {
21754
+ const packageManifestRaw = await readFile(join(currentPath, "package.json"), "utf8").catch((error) => {
21755
+ if (getErrorCode$3(error) === "ENOENT") return null;
21756
+ throw error;
21757
+ });
21758
+ if (packageManifestRaw !== null) {
21759
+ if (JSON.parse(packageManifestRaw).name === input.dependencyName) return currentPath;
21760
+ }
21761
+ const parentPath = dirname(currentPath);
21762
+ if (parentPath === currentPath) return null;
21763
+ currentPath = parentPath;
21764
+ }
21765
+ }
21628
21766
  async function findDaemonDependencyPackageRootFromResolutionPaths(input) {
21629
21767
  const resolutionPaths = input.resolver.resolve.paths(input.dependencyName);
21630
21768
  if (!resolutionPaths) return null;
@@ -25655,12 +25793,14 @@ var CursorAcpTransportError = class extends Error {
25655
25793
  code;
25656
25794
  diagnostics;
25657
25795
  errorType;
25796
+ originalError;
25658
25797
  constructor(input) {
25659
25798
  super(input.message, input.cause === void 0 ? void 0 : { cause: input.cause });
25660
25799
  this.name = "CursorAcpTransportError";
25661
25800
  this.code = input.code;
25662
25801
  this.diagnostics = input.diagnostics;
25663
25802
  this.errorType = input.errorType;
25803
+ this.originalError = input.originalError;
25664
25804
  }
25665
25805
  };
25666
25806
  async function invokeCursorAcpTransport(input) {
@@ -25832,7 +25972,8 @@ async function applyCursorSessionModel(input) {
25832
25972
  code: "model.unavailable",
25833
25973
  diagnostics: { modelNegotiation: input.diagnostics },
25834
25974
  errorType: "config",
25835
- message: `model.unavailable: Cursor ACP rejected model '${model}' for this session`
25975
+ message: `model.unavailable: Cursor ACP rejected model '${model}' for this session`,
25976
+ ...error.originalError ? { originalError: error.originalError } : {}
25836
25977
  });
25837
25978
  throw error;
25838
25979
  }
@@ -25848,7 +25989,8 @@ async function applyLegacyCursorSessionModel(input) {
25848
25989
  code: "model.unavailable",
25849
25990
  diagnostics: { modelNegotiation: input.diagnostics },
25850
25991
  errorType: "config",
25851
- message: `model.unavailable: Cursor ACP rejected model '${input.model}' for this session`
25992
+ message: `model.unavailable: Cursor ACP rejected model '${input.model}' for this session`,
25993
+ ...error.originalError ? { originalError: error.originalError } : {}
25852
25994
  });
25853
25995
  throw error;
25854
25996
  }
@@ -25946,7 +26088,8 @@ var CursorAcpSession = class {
25946
26088
  cause: error,
25947
26089
  code: "context_not_found",
25948
26090
  errorType: "adapter",
25949
- message: "context_not_found: Cursor ACP could not load the persisted conversation"
26091
+ message: "context_not_found: Cursor ACP could not load the persisted conversation",
26092
+ ...error.originalError ? { originalError: error.originalError } : {}
25950
26093
  });
25951
26094
  throw error;
25952
26095
  }
@@ -26242,24 +26385,28 @@ async function emitFinalPreviewIfRequested(input) {
26242
26385
  }
26243
26386
  function toJsonRpcTransportError(error) {
26244
26387
  const message = normalizeOptionalText$42(error.message) ?? "Cursor ACP error";
26388
+ const originalError = createProviderOriginalError(message);
26245
26389
  if (error.code === -32601) return new CursorAcpTransportError({
26246
26390
  code: "protocol.method_not_found",
26247
26391
  errorType: "adapter",
26248
- message
26392
+ message,
26393
+ ...originalError ? { originalError } : {}
26249
26394
  });
26250
26395
  if (error.code === -32602) return new CursorAcpTransportError({
26251
26396
  code: "protocol.invalid_params",
26252
26397
  errorType: "config",
26253
- message
26398
+ message,
26399
+ ...originalError ? { originalError } : {}
26254
26400
  });
26255
- return classifyCursorFailure(message);
26401
+ return classifyCursorFailure(message, originalError);
26256
26402
  }
26257
26403
  function toCursorAcpTransportError(error, stderr, diagnostics) {
26258
26404
  if (error instanceof CursorAcpTransportError) return error.diagnostics || !diagnostics ? error : new CursorAcpTransportError({
26259
26405
  code: error.code,
26260
26406
  diagnostics,
26261
26407
  errorType: error.errorType,
26262
- message: error.message
26408
+ message: error.message,
26409
+ ...error.originalError ? { originalError: error.originalError } : {}
26263
26410
  });
26264
26411
  const classified = classifyCursorFailure([toErrorMessage$30(error), normalizeOptionalText$42(stderr)].filter((value) => value !== null).join("\n"));
26265
26412
  return diagnostics ? new CursorAcpTransportError({
@@ -26269,33 +26416,38 @@ function toCursorAcpTransportError(error, stderr, diagnostics) {
26269
26416
  message: classified.message
26270
26417
  }) : classified;
26271
26418
  }
26272
- function classifyCursorFailure(message) {
26419
+ function classifyCursorFailure(message, originalError = null) {
26273
26420
  const normalized = normalizeOptionalText$42(message) ?? "Cursor ACP error";
26274
26421
  const lowered = normalized.toLowerCase();
26275
26422
  if (isCursorPlanUpgradeRequired(normalized)) return new CursorAcpTransportError({
26276
26423
  code: "cursor.plan_upgrade_required",
26277
26424
  errorType: "adapter",
26278
- message: normalized
26425
+ message: normalized,
26426
+ ...originalError ? { originalError } : {}
26279
26427
  });
26280
26428
  if (lowered.includes("network") || lowered.includes("fetch failed") || lowered.includes("connection") || lowered.includes("econn") || lowered.includes("dns")) return new CursorAcpTransportError({
26281
26429
  code: "network.unavailable",
26282
26430
  errorType: "network",
26283
- message: normalized
26431
+ message: normalized,
26432
+ ...originalError ? { originalError } : {}
26284
26433
  });
26285
26434
  if (lowered.includes("not logged in") || lowered.includes("unauthorized") || lowered.includes("authentication") || lowered.includes("invalid api key") || lowered.includes("401")) return new CursorAcpTransportError({
26286
26435
  code: "auth.required",
26287
26436
  errorType: "auth",
26288
- message: normalized
26437
+ message: normalized,
26438
+ ...originalError ? { originalError } : {}
26289
26439
  });
26290
26440
  if (lowered.includes("session not found") || lowered.includes("unknown session")) return new CursorAcpTransportError({
26291
26441
  code: "context_not_found",
26292
26442
  errorType: "config",
26293
- message: normalized
26443
+ message: normalized,
26444
+ ...originalError ? { originalError } : {}
26294
26445
  });
26295
26446
  return new CursorAcpTransportError({
26296
26447
  code: "upstream_unreachable",
26297
26448
  errorType: "adapter",
26298
- message: normalized
26449
+ message: normalized,
26450
+ ...originalError ? { originalError } : {}
26299
26451
  });
26300
26452
  }
26301
26453
  function normalizeOutputText(value) {
@@ -26408,6 +26560,7 @@ function createDefaultCursorInvoke(input) {
26408
26560
  cause: error,
26409
26561
  code: "context.rebuild_failed",
26410
26562
  ...error instanceof CursorAcpTransportError && error.diagnostics ? { diagnostics: error.diagnostics } : {},
26563
+ ...error instanceof CursorAcpTransportError && error.originalError ? { originalError: error.originalError } : {},
26411
26564
  errorType: "adapter",
26412
26565
  message: `context.rebuild_failed: ${toErrorMessage$29(error)}`
26413
26566
  }),
@@ -26830,46 +26983,51 @@ const HTTP_429_TOKEN_RE = /\b429\b/;
26830
26983
  function classifyOpenClawFailureMessage(input) {
26831
26984
  const normalizedMessage = normalizeOpenClawFailureMessage(input.message) ?? "openclaw command failed";
26832
26985
  const lowered = normalizedMessage.toLowerCase();
26986
+ const originalError = input.includeOriginalError ? createProviderOriginalError(normalizedMessage) : null;
26987
+ const withOriginalError = (value) => ({
26988
+ ...value,
26989
+ ...originalError ? { originalError } : {}
26990
+ });
26833
26991
  const permissionDenial = classifyRuntimePermissionDenialMessage({
26834
26992
  message: normalizedMessage,
26835
26993
  source: "openclaw"
26836
26994
  });
26837
- if (permissionDenial) return permissionDenial;
26838
- if (isUnsupportedModelFailure(lowered)) return {
26995
+ if (permissionDenial) return withOriginalError(permissionDenial);
26996
+ if (isUnsupportedModelFailure(lowered)) return withOriginalError({
26839
26997
  code: "model.unsupported",
26840
26998
  errorType: "config",
26841
26999
  message: normalizedMessage
26842
- };
26843
- if (isAuthFailure(lowered)) return {
27000
+ });
27001
+ if (isAuthFailure(lowered)) return withOriginalError({
26844
27002
  code: "auth.required",
26845
27003
  errorType: "auth",
26846
27004
  message: normalizedMessage
26847
- };
26848
- if (isQuotaFailure(lowered)) return {
27005
+ });
27006
+ if (isQuotaFailure(lowered)) return withOriginalError({
26849
27007
  code: "quota.exceeded",
26850
27008
  errorType: "adapter",
26851
27009
  message: normalizedMessage
26852
- };
26853
- if (isRateLimitFailure(lowered)) return {
27010
+ });
27011
+ if (isRateLimitFailure(lowered)) return withOriginalError({
26854
27012
  code: "rate_limited",
26855
27013
  errorType: "adapter",
26856
27014
  message: normalizedMessage
26857
- };
26858
- if (input.isContextLost?.(normalizedMessage)) return {
27015
+ });
27016
+ if (input.isContextLost?.(normalizedMessage)) return withOriginalError({
26859
27017
  code: "context.lost",
26860
27018
  errorType: "adapter",
26861
27019
  message: normalizedMessage
26862
- };
26863
- if (isInputSelectorFailure(lowered)) return {
27020
+ });
27021
+ if (isInputSelectorFailure(lowered)) return withOriginalError({
26864
27022
  code: "schema.invalid",
26865
27023
  errorType: "config",
26866
27024
  message: normalizedMessage
26867
- };
26868
- return {
27025
+ });
27026
+ return withOriginalError({
26869
27027
  code: "upstream_unreachable",
26870
27028
  errorType: "adapter",
26871
27029
  message: normalizedMessage
26872
- };
27030
+ });
26873
27031
  }
26874
27032
  function normalizeOpenClawFailureMessage(value) {
26875
27033
  const normalized = normalizeOptionalText$38(value);
@@ -26910,11 +27068,13 @@ function normalizeOptionalText$38(value) {
26910
27068
  var OpenClawCliTransportError = class extends Error {
26911
27069
  code;
26912
27070
  errorType;
27071
+ originalError;
26913
27072
  constructor(input) {
26914
27073
  super(input.message);
26915
27074
  this.name = "OpenClawCliTransportError";
26916
27075
  this.code = input.code;
26917
27076
  this.errorType = input.errorType;
27077
+ this.originalError = input.originalError;
26918
27078
  }
26919
27079
  };
26920
27080
  async function invokeOpenClawCliTransport(input) {
@@ -26937,6 +27097,7 @@ async function invokeOpenClawCliTransport(input) {
26937
27097
  let latestResultIsError = false;
26938
27098
  let resolvedSessionId = initialSessionId;
26939
27099
  const providerErrorMessages = [];
27100
+ const providerOriginalErrorMessages = [];
26940
27101
  const invokedAtMs = Date.now();
26941
27102
  let firstStdoutAtMs = null;
26942
27103
  let firstStderrAtMs = null;
@@ -26962,7 +27123,10 @@ async function invokeOpenClawCliTransport(input) {
26962
27123
  return;
26963
27124
  }
26964
27125
  if (parsedLine.resultText) latestOutput = parsedLine.resultText;
26965
- if (parsedLine.errorMessage) providerErrorMessages.push(parsedLine.errorMessage);
27126
+ if (parsedLine.errorMessage) {
27127
+ providerErrorMessages.push(parsedLine.errorMessage);
27128
+ providerOriginalErrorMessages.push(parsedLine.errorMessage);
27129
+ }
26966
27130
  if (parsedLine.isErrorResult === true) {
26967
27131
  latestResultIsError = true;
26968
27132
  return;
@@ -26979,52 +27143,37 @@ async function invokeOpenClawCliTransport(input) {
26979
27143
  } catch (error) {
26980
27144
  throw toOpenClawCliTransportError(error, input.openClawTimeoutMs);
26981
27145
  }
26982
- if (driverResult.exitCode !== 0 || latestResultIsError) {
26983
- const classifiedFailure = classifyOpenClawFailure({
26984
- providerErrorMessages,
26985
- stderrText: driverResult.stderrText,
26986
- stdoutText: driverResult.stdoutText
26987
- });
26988
- throw new OpenClawCliTransportError({
26989
- code: classifiedFailure.code,
26990
- errorType: classifiedFailure.errorType,
26991
- message: classifiedFailure.message
26992
- });
26993
- }
27146
+ if (driverResult.exitCode !== 0 || latestResultIsError) throw new OpenClawCliTransportError(classifyOpenClawFailure({
27147
+ providerErrorMessages,
27148
+ providerOriginalErrorMessages,
27149
+ stderrText: driverResult.stderrText,
27150
+ stdoutText: driverResult.stdoutText
27151
+ }));
26994
27152
  const documentParsed = parseOpenClawOutputDocument(driverResult.stdoutText);
26995
27153
  if (documentParsed) {
26996
27154
  if (documentParsed.outputText) latestOutput = documentParsed.outputText;
26997
27155
  if (documentParsed.sessionId) resolvedSessionId = documentParsed.sessionId;
26998
- if (documentParsed.errorMessage) providerErrorMessages.push(documentParsed.errorMessage);
26999
- if (documentParsed.isErrorResult === true) {
27000
- const classifiedFailure = classifyOpenClawFailure({
27001
- providerErrorMessages,
27002
- stderrText: driverResult.stderrText,
27003
- stdoutText: driverResult.stdoutText
27004
- });
27005
- throw new OpenClawCliTransportError({
27006
- code: classifiedFailure.code,
27007
- errorType: classifiedFailure.errorType,
27008
- message: classifiedFailure.message
27009
- });
27156
+ if (documentParsed.errorMessage) {
27157
+ providerErrorMessages.push(documentParsed.errorMessage);
27158
+ providerOriginalErrorMessages.push(documentParsed.errorMessage);
27010
27159
  }
27160
+ if (documentParsed.isErrorResult === true) throw new OpenClawCliTransportError(classifyOpenClawFailure({
27161
+ providerErrorMessages,
27162
+ providerOriginalErrorMessages,
27163
+ stderrText: driverResult.stderrText,
27164
+ stdoutText: driverResult.stdoutText
27165
+ }));
27011
27166
  }
27012
27167
  const output = normalizeOptionalText$37(latestOutput);
27013
27168
  if (!output) {
27014
27169
  const fallbackOutput = resolveSuccessFallbackOutput(driverResult.stdoutText);
27015
27170
  if (!fallbackOutput) {
27016
- if (providerErrorMessages.length > 0) {
27017
- const classifiedFailure = classifyOpenClawFailure({
27018
- providerErrorMessages,
27019
- stderrText: driverResult.stderrText,
27020
- stdoutText: driverResult.stdoutText
27021
- });
27022
- throw new OpenClawCliTransportError({
27023
- code: classifiedFailure.code,
27024
- errorType: classifiedFailure.errorType,
27025
- message: classifiedFailure.message
27026
- });
27027
- }
27171
+ if (providerErrorMessages.length > 0) throw new OpenClawCliTransportError(classifyOpenClawFailure({
27172
+ providerErrorMessages,
27173
+ providerOriginalErrorMessages,
27174
+ stderrText: driverResult.stderrText,
27175
+ stdoutText: driverResult.stdoutText
27176
+ }));
27028
27177
  throw new OpenClawCliTransportError({
27029
27178
  code: "runtime.output.empty",
27030
27179
  errorType: "adapter",
@@ -27097,18 +27246,12 @@ const toOpenClawCliTransportError = (error, timeoutMs) => {
27097
27246
  errorType: "adapter",
27098
27247
  message: `upstream_unreachable: failed to spawn openclaw (${error.message})`
27099
27248
  });
27100
- if (error.code === "process.non_zero_exit") {
27101
- const classifiedFailure = classifyOpenClawFailure({
27102
- providerErrorMessages: [],
27103
- stderrText: error.stderrText,
27104
- stdoutText: error.stdoutText
27105
- });
27106
- return new OpenClawCliTransportError({
27107
- code: classifiedFailure.code,
27108
- errorType: classifiedFailure.errorType,
27109
- message: classifiedFailure.message
27110
- });
27111
- }
27249
+ if (error.code === "process.non_zero_exit") return new OpenClawCliTransportError(classifyOpenClawFailure({
27250
+ providerErrorMessages: [],
27251
+ providerOriginalErrorMessages: [],
27252
+ stderrText: error.stderrText,
27253
+ stdoutText: error.stdoutText
27254
+ }));
27112
27255
  }
27113
27256
  return new OpenClawCliTransportError({
27114
27257
  code: "upstream_unreachable",
@@ -27117,8 +27260,10 @@ const toOpenClawCliTransportError = (error, timeoutMs) => {
27117
27260
  });
27118
27261
  };
27119
27262
  const classifyOpenClawFailure = (input) => {
27263
+ const trustedProviderMessages = /* @__PURE__ */ new Set([...input.providerOriginalErrorMessages ?? [], ...extractErrorMessagesFromStdout(input.stdoutText)]);
27120
27264
  const providerMessage = resolveProviderFailureMessage(input);
27121
27265
  if (providerMessage) return classifyOpenClawFailureMessage({
27266
+ includeOriginalError: trustedProviderMessages.has(providerMessage),
27122
27267
  isContextLost: isLikelyOpenClawContextLostError,
27123
27268
  message: providerMessage
27124
27269
  });
@@ -27186,11 +27331,13 @@ function normalizeOptionalText$37(value) {
27186
27331
  var OpenClawRuntimeError = class extends Error {
27187
27332
  code;
27188
27333
  errorType;
27334
+ originalError;
27189
27335
  constructor(input) {
27190
27336
  super(input.message);
27191
27337
  this.name = "OpenClawRuntimeError";
27192
27338
  this.code = input.code;
27193
27339
  this.errorType = input.errorType;
27340
+ this.originalError = input.originalError;
27194
27341
  }
27195
27342
  };
27196
27343
  async function invokeOpenClawWithSingleContextHeal(input) {
@@ -27246,7 +27393,8 @@ async function invokeOpenClawOnce(input) {
27246
27393
  if (error && typeof error === "object" && "code" in error && typeof error.code === "string" && "errorType" in error && typeof error.errorType === "string" && error instanceof Error) throw new OpenClawRuntimeError({
27247
27394
  code: error.code,
27248
27395
  errorType: error.errorType,
27249
- message: error.message
27396
+ message: error.message,
27397
+ ..."originalError" in error && typeof error.originalError === "string" ? { originalError: error.originalError } : {}
27250
27398
  });
27251
27399
  throw new OpenClawRuntimeError({
27252
27400
  code: "upstream_unreachable",
@@ -27371,10 +27519,12 @@ const OPENCLAW_GATEWAY_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
27371
27519
  var OpenClawGatewayTransportError = class extends Error {
27372
27520
  code;
27373
27521
  errorType;
27522
+ originalError;
27374
27523
  constructor(input) {
27375
27524
  super(input.message);
27376
27525
  this.code = input.code;
27377
27526
  this.errorType = input.errorType;
27527
+ this.originalError = input.originalError;
27378
27528
  this.name = "OpenClawGatewayTransportError";
27379
27529
  }
27380
27530
  };
@@ -27456,7 +27606,10 @@ async function promoteGatewayFailureFromSessionStore(input) {
27456
27606
  sessionKey: input.sessionKey
27457
27607
  });
27458
27608
  if (!sessionErrorMessage) return fallbackError;
27459
- const classified = classifyOpenClawFailureMessage({ message: sessionErrorMessage });
27609
+ const classified = classifyOpenClawFailureMessage({
27610
+ includeOriginalError: true,
27611
+ message: sessionErrorMessage
27612
+ });
27460
27613
  const normalizedFallbackMessage = normalizeOpenClawFailureMessage(fallbackError.message) ?? fallbackError.message.trim();
27461
27614
  const normalizedClassifiedMessage = normalizeOpenClawFailureMessage(classified.message) ?? classified.message.trim();
27462
27615
  if (classified.code === fallbackError.code && normalizedClassifiedMessage === normalizedFallbackMessage) return fallbackError;
@@ -27492,7 +27645,7 @@ function normalizeOpenClawGatewayAgentResult(result, expectedSessionKey) {
27492
27645
  const record = result;
27493
27646
  const status = normalizeOptionalText$35(record.status);
27494
27647
  if (!status || status === "ok") return extractSuccessfulAgentResult(record.result, expectedSessionKey);
27495
- throw classifyGatewayFailure(normalizeOptionalText$35(record.summary) ?? normalizeOptionalText$35(record.error) ?? `openclaw gateway agent returned status '${status}'`);
27648
+ throw classifyGatewayFailure(normalizeOptionalText$35(record.summary) ?? normalizeOptionalText$35(record.error) ?? `openclaw gateway agent returned status '${status}'`, true);
27496
27649
  }
27497
27650
  function extractSuccessfulAgentResult(result, expectedSessionKey) {
27498
27651
  if (!result || typeof result !== "object") throw new OpenClawGatewayTransportError({
@@ -27547,10 +27700,13 @@ function toOpenClawGatewayTransportError(error) {
27547
27700
  });
27548
27701
  const stderr = normalizeOptionalText$35(error?.stderr);
27549
27702
  const stdout = normalizeOptionalText$35(error?.stdout);
27550
- return classifyGatewayFailure(stderr ?? stdout ?? toErrorMessage$27(error));
27703
+ return classifyGatewayFailure(stderr ?? stdout ?? toErrorMessage$27(error), false);
27551
27704
  }
27552
- function classifyGatewayFailure(message) {
27553
- return new OpenClawGatewayTransportError(classifyOpenClawFailureMessage({ message }));
27705
+ function classifyGatewayFailure(message, includeOriginalError) {
27706
+ return new OpenClawGatewayTransportError(classifyOpenClawFailureMessage({
27707
+ includeOriginalError,
27708
+ message
27709
+ }));
27554
27710
  }
27555
27711
  function normalizeOptionalText$35(value) {
27556
27712
  const normalized = String(value ?? "").trim();
@@ -28591,6 +28747,7 @@ function isAgentControllerPermissionModeControllerId(value) {
28591
28747
  }
28592
28748
  const DUPLICATE_REPLY_CONVERSATION_REASON = "This agent shares a reply conversation with another Agent Profile.";
28593
28749
  function resolveAgentExecutionStatus(input) {
28750
+ const executionFamily = input.executionFamily ?? "workstation";
28594
28751
  const profile = resolveProfileFact(input.profile);
28595
28752
  const binding = resolveBindingFact({
28596
28753
  agentProfileId: input.agentProfileId,
@@ -28607,6 +28764,7 @@ function resolveAgentExecutionStatus(input) {
28607
28764
  });
28608
28765
  const service = resolveServiceFact(input.service);
28609
28766
  const runtime = resolveRuntimeFact({
28767
+ executionFamily,
28610
28768
  runtimeReadiness: input.runtimeReadiness,
28611
28769
  service
28612
28770
  });
@@ -28626,6 +28784,7 @@ function resolveAgentExecutionStatus(input) {
28626
28784
  bindingBlocked: binding.source === "blocked",
28627
28785
  bindingRoutable: binding.routable,
28628
28786
  claimBlocked: claim.executionBlocked,
28787
+ executionFamily,
28629
28788
  localServiceReachable: localService.reachable,
28630
28789
  profile,
28631
28790
  providerAccountBlocked: providerAccount.blocked,
@@ -28653,6 +28812,7 @@ function resolveAgentExecutionStatus(input) {
28653
28812
  binding,
28654
28813
  claim,
28655
28814
  displayState,
28815
+ executionFamily,
28656
28816
  localService,
28657
28817
  profile,
28658
28818
  providerAccount,
@@ -28821,16 +28981,23 @@ function isUnavailableBindingEvidence(binding) {
28821
28981
  return "status" in binding && binding.status === "unavailable";
28822
28982
  }
28823
28983
  function resolveRuntimeFact(input) {
28824
- const { runtimeReadiness, service } = input;
28825
- if (!runtimeReadiness) return {
28826
- ready: false,
28827
- reasonCodes: ["runtime.projection_missing"],
28828
- source: "missing"
28829
- };
28984
+ const { executionFamily, runtimeReadiness, service } = input;
28985
+ if (!runtimeReadiness) {
28986
+ if (executionFamily === "native") return {
28987
+ ready: false,
28988
+ reasonCodes: [],
28989
+ source: "not_checked"
28990
+ };
28991
+ return {
28992
+ ready: false,
28993
+ reasonCodes: ["runtime.projection_missing"],
28994
+ source: "missing"
28995
+ };
28996
+ }
28830
28997
  return {
28831
- ready: runtimeReadiness.ready || service.executionCompatible && hasOnlyAdvisoryServiceDriftReason(runtimeReadiness.reasonCodes),
28998
+ ready: executionFamily === "native" ? runtimeReadiness.ready : runtimeReadiness.ready || service.executionCompatible && hasOnlyAdvisoryServiceDriftReason(runtimeReadiness.reasonCodes),
28832
28999
  reasonCodes: runtimeReadiness.reasonCodes,
28833
- source: "prepare_readiness"
29000
+ source: executionFamily === "native" ? "native_runtime" : "prepare_readiness"
28834
29001
  };
28835
29002
  }
28836
29003
  function resolveClaimFact(claimDiagnostics) {
@@ -28869,7 +29036,7 @@ function resolveRouteFact(route) {
28869
29036
  observedAt: route.observedAt?.trim() || null,
28870
29037
  online: true,
28871
29038
  reasonCodes: route.reasonCodes ?? [],
28872
- source: "daemon_route"
29039
+ source: route.source ?? "daemon_route"
28873
29040
  };
28874
29041
  return {
28875
29042
  deviceId: route.deviceId?.trim() || null,
@@ -28877,7 +29044,7 @@ function resolveRouteFact(route) {
28877
29044
  observedAt: route.observedAt?.trim() || null,
28878
29045
  online: false,
28879
29046
  reasonCodes: route.reasonCodes,
28880
- source: "daemon_route"
29047
+ source: route.source ?? "daemon_route"
28881
29048
  };
28882
29049
  }
28883
29050
  function resolveDisplayState(input) {
@@ -28888,13 +29055,14 @@ function resolveDisplayState(input) {
28888
29055
  if (input.claimBlocked) return "blocked";
28889
29056
  if (input.providerAccountBlocked) return "blocked";
28890
29057
  if (input.readinessImpactBlocked) return "blocked";
28891
- if (input.bindingRoutable && input.localServiceReachable && input.serviceExecutionCompatible && input.runtimeReady && input.routeOnline) return "ready";
29058
+ if (input.bindingRoutable && (input.executionFamily === "native" || input.localServiceReachable) && input.serviceExecutionCompatible && input.runtimeReady && input.routeOnline) return "ready";
28892
29059
  return "not_ready";
28893
29060
  }
28894
29061
  function resolvePrimaryAction(input) {
28895
29062
  if (input.displayState === "ready") return "none";
28896
29063
  if (!input.profile.active || input.profile.source === "unavailable") return "check_status";
28897
29064
  if (!input.binding.routable) return input.binding.source === "unavailable" || input.binding.source === "not_checked" ? "check_status" : "reconnect_binding";
29065
+ if (input.executionFamily === "native") return "check_status";
28898
29066
  const serviceAction = resolveServicePrimaryAction(input);
28899
29067
  if (serviceAction) return serviceAction;
28900
29068
  return resolveRuntimeRoutePrimaryAction(input);
@@ -28970,6 +29138,7 @@ function uniqueReasonCodes$2(reasonCodes) {
28970
29138
  return [...new Set(reasonCodes.filter((reasonCode) => reasonCode.trim()))];
28971
29139
  }
28972
29140
  function createAgentExecutionStatusDisplayRows(projection) {
29141
+ const isNativeRuntime = isNativeRuntimeProjection(projection);
28973
29142
  return [
28974
29143
  {
28975
29144
  label: "Reply status",
@@ -28977,10 +29146,10 @@ function createAgentExecutionStatusDisplayRows(projection) {
28977
29146
  },
28978
29147
  {
28979
29148
  label: "Connection",
28980
- value: formatBindingEvidence(projection)
29149
+ value: formatBindingEvidence(projection, isNativeRuntime)
28981
29150
  },
28982
29151
  {
28983
- label: "Local agent capability",
29152
+ label: isNativeRuntime ? "Hosted runtime" : "Local agent capability",
28984
29153
  value: formatRuntimeEvidence(projection)
28985
29154
  },
28986
29155
  {
@@ -28988,7 +29157,7 @@ function createAgentExecutionStatusDisplayRows(projection) {
28988
29157
  value: formatLocalServiceEvidence(projection)
28989
29158
  },
28990
29159
  {
28991
- label: "Reply route",
29160
+ label: isNativeRuntime ? "Hosted reply route" : "Reply route",
28992
29161
  value: formatRouteEvidence(projection)
28993
29162
  },
28994
29163
  {
@@ -28999,7 +29168,7 @@ function createAgentExecutionStatusDisplayRows(projection) {
28999
29168
  }
29000
29169
  function formatAgentExecutionStatus(projection) {
29001
29170
  switch (projection.displayState) {
29002
- case "ready": return "Available for Wake · This agent can reply from this computer.";
29171
+ case "ready": return isNativeRuntimeProjection(projection) ? "Available for Wake · Center Agent can answer now." : "Available for Wake · This agent can reply from this computer.";
29003
29172
  case "blocked": return `Blocked · ${formatBlockingReason(projection)}`;
29004
29173
  case "not_ready": return `Unavailable · ${formatNotReadyReason(projection)}`;
29005
29174
  case "unknown": return "Unknown";
@@ -29015,8 +29184,8 @@ function formatBlockingReason(projection) {
29015
29184
  if (projection.facts.readinessImpact.blocked) return formatPrimaryReason(projection.facts.readinessImpact.reasonCodes);
29016
29185
  return formatPrimaryReason(projection.reasonCodes);
29017
29186
  }
29018
- function formatBindingEvidence(projection) {
29019
- if (projection.facts.binding.routable) return "Local agent connection is set.";
29187
+ function formatBindingEvidence(projection, isNativeRuntime) {
29188
+ if (projection.facts.binding.routable) return isNativeRuntime ? "Hosted agent connection is set." : "Local agent connection is set.";
29020
29189
  if (projection.facts.binding.source === "missing") return "Choose a local agent for this profile.";
29021
29190
  if (projection.facts.binding.source === "not_checked") return "Local agent connection has not been checked for this profile.";
29022
29191
  if (projection.facts.binding.source === "unavailable") return formatPrimaryReason(projection.facts.binding.reasonCodes);
@@ -29029,17 +29198,24 @@ function formatLocalServiceEvidence(projection) {
29029
29198
  return formatPrimaryReason(projection.facts.localService.reasonCodes);
29030
29199
  }
29031
29200
  function formatRuntimeEvidence(projection) {
29201
+ if (projection.facts.runtime.source === "native_runtime") return projection.facts.runtime.ready ? "Hosted runtime is available." : formatPrimaryReason(projection.facts.runtime.reasonCodes);
29202
+ if (projection.facts.runtime.source === "not_checked") return "Hosted runtime has not been checked yet.";
29032
29203
  if (projection.facts.runtime.ready) return "Local agent capability is current.";
29033
29204
  if (projection.facts.runtime.source === "missing") return "OpenMeld needs a current setup check from this computer.";
29034
29205
  if (projection.facts.runtime.reasonCodes.includes("prepare_readiness.read_failed")) return formatPrimaryReason(projection.facts.runtime.reasonCodes);
29035
29206
  return formatPrimaryReason(projection.facts.runtime.reasonCodes);
29036
29207
  }
29037
29208
  function formatRouteEvidence(projection) {
29209
+ if (projection.facts.route.source === "hosted_route") return projection.facts.route.online ? "Hosted reply route is available." : formatPrimaryReason(projection.facts.route.reasonCodes);
29210
+ if (projection.facts.route.source === "not_checked") return "Hosted reply route has not been checked yet.";
29038
29211
  if (!projection.facts.service.executionCompatible) return "Update OpenMeld Service before checking this agent's local reply route.";
29039
29212
  if (projection.facts.route.online) return "OpenMeld Service is online for replies.";
29040
29213
  if (projection.facts.route.source === "missing") return REPLY_ROUTE_RECONNECTING_REASON;
29041
29214
  return formatPrimaryReason(projection.facts.route.reasonCodes);
29042
29215
  }
29216
+ function isNativeRuntimeProjection(projection) {
29217
+ return projection.facts.runtime.source === "native_runtime" || projection.facts.runtime.source === "not_checked" || projection.facts.route.source === "hosted_route" || projection.facts.route.source === "not_checked";
29218
+ }
29043
29219
  function formatClaimEvidence(projection) {
29044
29220
  if (projection.facts.claim.source === "not_checked") return "Wake has not been checked yet.";
29045
29221
  if (projection.facts.claim.executionBlocked) return formatPrimaryReason(projection.facts.claim.reasonCodes);
@@ -29468,6 +29644,16 @@ function buildServiceCompatibilityChannel(input) {
29468
29644
  });
29469
29645
  }
29470
29646
  function buildRuntimeRegistrationChannel(input) {
29647
+ if (input.fact.source === "not_checked") return createChannel({
29648
+ generatedAt: input.generatedAt,
29649
+ id: "runtime_registration",
29650
+ label: "Runtime registration",
29651
+ reasonCodes: [],
29652
+ role: "wake_path_evidence",
29653
+ source: input.fact.source,
29654
+ status: "not_checked",
29655
+ summary: "Runtime registration was not checked in this diagnostic read."
29656
+ });
29471
29657
  if (input.fact.ready) return createChannel({
29472
29658
  generatedAt: input.generatedAt,
29473
29659
  id: "runtime_registration",
@@ -29491,6 +29677,16 @@ function buildRuntimeRegistrationChannel(input) {
29491
29677
  });
29492
29678
  }
29493
29679
  function buildRouteCatalogSyncChannel(input) {
29680
+ if (input.fact.source === "not_checked") return createChannel({
29681
+ generatedAt: input.generatedAt,
29682
+ id: "route_catalog_sync",
29683
+ label: "Route catalog sync",
29684
+ reasonCodes: [],
29685
+ role: "wake_path_evidence",
29686
+ source: input.fact.source,
29687
+ status: "not_checked",
29688
+ summary: "Reply route was not checked in this diagnostic read."
29689
+ });
29494
29690
  if (input.fact.online) return createChannel({
29495
29691
  generatedAt: input.generatedAt,
29496
29692
  id: "route_catalog_sync",
@@ -32213,7 +32409,8 @@ function buildTaskResultCommonFields(input) {
32213
32409
  function buildTaskResultErrorFields(input) {
32214
32410
  return {
32215
32411
  ...input.errorCode ? { errorCode: input.errorCode } : {},
32216
- ...input.errorMessage ? { errorMessage: input.errorMessage } : {}
32412
+ ...input.errorMessage ? { errorMessage: input.errorMessage } : {},
32413
+ ...input.originalError ? { originalError: input.originalError } : {}
32217
32414
  };
32218
32415
  }
32219
32416
  //#endregion
@@ -32436,6 +32633,7 @@ const resolveTaskOutcome = (input) => {
32436
32633
  ...input.dispatchResult.adapterResult.errorCode ? { errorCode: input.dispatchResult.adapterResult.errorCode } : {},
32437
32634
  errorMessage: input.dispatchResult.adapterResult.errorMessage,
32438
32635
  errorType: mapAdapterErrorType(input.dispatchResult.adapterResult.errorType),
32636
+ ...input.dispatchResult.adapterResult.originalError ? { originalError: input.dispatchResult.adapterResult.originalError } : {},
32439
32637
  ...input.dispatchResult.adapterResult.providerAccessEvidence ? { providerAccessEvidence: input.dispatchResult.adapterResult.providerAccessEvidence } : {},
32440
32638
  ...input.dispatchResult.adapterResult.telemetry ? { telemetry: input.dispatchResult.adapterResult.telemetry } : {}
32441
32639
  };
@@ -32692,6 +32890,7 @@ const resolveRuntimeTaskOutcomeResult = (input) => {
32692
32890
  ...outcome.errorMessage ? { errorMessage: outcome.errorMessage } : {},
32693
32891
  ...outcome.errorType ? { errorType: outcome.errorType } : {},
32694
32892
  ...outcome.output ? { output: outcome.output } : {},
32893
+ ...outcome.originalError ? { originalError: outcome.originalError } : {},
32695
32894
  ...outcome.providerAccessEvidence ? { providerAccessEvidence: outcome.providerAccessEvidence } : {},
32696
32895
  ...outcome.telemetry ? { telemetry: outcome.telemetry } : {},
32697
32896
  sourceEventId: input.sourceEventId,
@@ -38775,9 +38974,9 @@ function createModelCatalogReadSession(input) {
38775
38974
  async function readModelCatalogOnce(baseUrl) {
38776
38975
  try {
38777
38976
  const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
38778
- import("./dist-xeL9hjwh.js").then((n) => n.w),
38977
+ import("./dist-DoFr77hZ.js").then((n) => n.w),
38779
38978
  import("./base-url-BtqW4aLS.js").then((n) => n.n),
38780
- import("./api-client-foundation-DAqpgdEd.js").then((n) => n.t)
38979
+ import("./api-client-foundation--Nr2FS4d.js").then((n) => n.t)
38781
38980
  ]);
38782
38981
  if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
38783
38982
  const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
@@ -41739,7 +41938,8 @@ async function resolveAgentReplyReadinessStatus(input) {
41739
41938
  const localAgentId = executionTarget?.localAgentId ?? null;
41740
41939
  const deviceReasonCodes = resolveAgentDeviceReasonCodes({
41741
41940
  coreWakeRouteOnline: input.coreWakeRouteOnline === true,
41742
- deviceReasonCodes: deviceReplyReadiness.reasonCodes
41941
+ deviceReasonCodes: deviceReplyReadiness.reasonCodes,
41942
+ serviceWakeability: deviceReplyReadiness.serviceWakeability
41743
41943
  });
41744
41944
  const reasonCodes = collectAgentReplyReadinessReasonCodes({
41745
41945
  bindingReady: executionTarget?.bindingState === "enabled_primary" && executionTarget.routable,
@@ -41794,7 +41994,11 @@ async function resolveAgentReplyReadinessStatus(input) {
41794
41994
  }
41795
41995
  function resolveAgentDeviceReasonCodes(input) {
41796
41996
  if (!input.coreWakeRouteOnline) return [...input.deviceReasonCodes];
41797
- return input.deviceReasonCodes.filter((reasonCode) => reasonCode !== "service.not_running" && reasonCode !== "route.offline" && reasonCode !== "route.not_registered");
41997
+ return input.deviceReasonCodes.filter((reasonCode) => reasonCode !== "service.not_running" && reasonCode !== "route.offline" && reasonCode !== "route.not_registered" && !(reasonCode === "service.drifted" && isConditionalServiceDrift(input.serviceWakeability)));
41998
+ }
41999
+ function isConditionalServiceDrift(serviceWakeability) {
42000
+ if (!serviceWakeability || serviceWakeability.blockingCodes.length === 0) return false;
42001
+ return serviceWakeability.blockingCodes.every((code) => DAEMON_SERVICE_WAKEABILITY_CONDITIONAL_ANOMALIES.has(code));
41798
42002
  }
41799
42003
  async function resolveAgentPrimaryRuntimeContext(input) {
41800
42004
  const executionTarget = input.primaryAgentControllerReport !== void 0 ? input.primaryAgentControllerReport : await resolveAgentProfilePrimaryAgentControllerReport({
@@ -41980,6 +42184,7 @@ async function resolveReplyReadinessRuntimeProjection() {
41980
42184
  return await syncDeviceRuntimeStateProjection({ mode: "check" }).catch(() => null);
41981
42185
  }
41982
42186
  async function resolveDeviceReplyReadinessFromServiceState(input) {
42187
+ const wakeability = classifyDaemonServiceWakeability({ inventory: input.inventory });
41983
42188
  const effectiveRuntimeStatus = await resolveEffectiveRuntimeStatus({
41984
42189
  inventory: input.inventory,
41985
42190
  runtimeStatus: input.runtimeStatus,
@@ -41997,17 +42202,15 @@ async function resolveDeviceReplyReadinessFromServiceState(input) {
41997
42202
  replyReadiness: effectiveRuntimeStatus === "unknown" ? "unknown" : "blocked",
41998
42203
  wakeableRouteCount: input.localDemand?.localExecutionRouteCount ?? 0
41999
42204
  });
42000
- if (hasServiceDrift(input.inventory)) return createDeviceReplyReadinessStatus({
42205
+ if (wakeability.blocksWake) return createDeviceReplyReadinessStatus({
42001
42206
  reasonCode: "service.drifted",
42002
42207
  reasonText: resolveReplyReadinessAvailabilityReasonCopy("service.drifted"),
42003
42208
  replyReadiness: "blocked",
42209
+ serviceWakeability: wakeability,
42004
42210
  wakeableRouteCount: input.localDemand?.localExecutionRouteCount ?? 0
42005
42211
  });
42006
42212
  return null;
42007
42213
  }
42008
- function hasServiceDrift(inventory) {
42009
- return classifyDaemonServiceWakeability({ inventory }).blocksWake;
42010
- }
42011
42214
  function resolveDeviceReplyReadinessFromRuntimeProjection(runtimeProjection) {
42012
42215
  if (runtimeProjection?.status !== "degraded") return null;
42013
42216
  if (runtimeProjection.missingControllerIds.length > 0) return createDeviceReplyReadinessStatus({
@@ -42054,6 +42257,7 @@ function createDeviceReplyReadinessStatus(input) {
42054
42257
  reasonCodes: sortReplyReadinessReasonCodes(input.reasonCode ? [input.reasonCode] : []),
42055
42258
  reasonText: input.reasonText,
42056
42259
  replyReadiness: input.replyReadiness,
42260
+ ...input.serviceWakeability ? { serviceWakeability: input.serviceWakeability } : {},
42057
42261
  updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
42058
42262
  wakeableRouteCount: input.wakeableRouteCount
42059
42263
  };
@@ -46092,15 +46296,10 @@ function normalize$1(value) {
46092
46296
  function resolvePublicAgentFailureReason(input) {
46093
46297
  const errorCode = normalizeOptionalText$3$2(input.errorCode)?.toLowerCase();
46094
46298
  const mappedReason = resolveMappedPublicAgentFailureReason(input.errorCode, input.targetLabel);
46095
- const detailedReason = resolveDetailedPublicAgentFailureReason(input.errorMessage);
46096
46299
  if (shouldPreferMappedPublicAgentFailureReason(errorCode, input.errorMessage)) return mappedReason ?? normalizeOptionalText$3$2(input.defaultReason);
46097
- if (detailedReason) return detailedReason;
46098
46300
  if (!errorCode) return normalizeOptionalText$3$2(input.defaultReason);
46099
46301
  return mappedReason ?? normalizeOptionalText$3$2(input.defaultReason);
46100
46302
  }
46101
- function resolveDetailedPublicAgentFailureReason(errorMessage) {
46102
- return resolveDetailedPublicAgentFailureReason$1(errorMessage);
46103
- }
46104
46303
  function normalizeOptionalText$3$2(value) {
46105
46304
  const normalized = typeof value === "string" ? value.trim() : "";
46106
46305
  return normalized.length > 0 ? normalized : null;
@@ -110238,4 +110437,4 @@ function isHumanInteractiveSpaceRuntime(runtime) {
110238
110437
  //#endregion
110239
110438
  export { runAgentsManage as $, LocalProjectConnectionError as $a, resetCurrentCommandCheckState as $i, isCliUpdateCheckApplicable as $n, cliJsonOutputEnvelopeSchema as $o, resolveServiceReadinessFromServiceStatus as $r, ensureLocalSkills as $t, parseEnvelope as A, resolveViewProfileKey as Aa, getAgentControllerPermissionModeFieldLabel as Ai, submitProfileRuntimeAgentControllerReport as An, enqueueAgentActivityHookEvent as Ao, registerSpaceMemberSelectionOptions as Ar, createDelayedSpinner as At, resolveHumanControllerDisplayName as B, updateOpenMeldProfile as Ba, buildOnboardingPlan as Bi, buildDispatchResultMessageReadProjection as Bn, setDefaultProjectConnection as Bo, buildDualViewGuideMessage as Br, toStructuredGatewayFailure as Bt, toSpaceMetaUpsertInput as C, buildHumanErrorCopy as Ca, reconcileNewRunnableBuiltinAgentsForSetup as Ci, resolveCreateProfileName as Cn, upsertDaemonServiceContract as Co, createSpaceTargetGuideError as Cr, runDaemonStop as Ct, formatHumanReadTargetList as D, formatMessage as Da, buildAgentControllerRef as Di, resolveServiceParticipationReadiness as Dn, resolveObservedAgentActivityBinding as Do, createUpgradeConfirmationGuideError as Dr, buildProfileWorkspaceRows as Dt, buildHumanReplyContextSummary as E, createPresenter as Ea, resolveLocalRegistryAgentIdFromAgentControllerRef as Ei, formatServiceParticipationReadinessLabel as En, buildAgentActivityEvent as Eo, createStartAuthenticationGuideError as Er, buildProfileWorkspacePresentation as Et, resolveOpenMeldProfileForSpaceCommand as F, createOpenMeldHumanProfile as Fa, resolveAgentProfileEditCapabilities as Fi, resolveLocalAgentControllerLaunchability as Fn, listProjectBindings as Fo, registerAuthLoginRequestOptions as Fr, createCliSpaceApi as Ft, runAgentsCustomAdd as G, buildAgentAuthenticationGuide as Ga, classifyDaemonServiceWakeability as Gi, buildUpdatesReplyWorkflowProjection as Gn, renderInfoCard as Go, buildAgentFacingPublicationModeGuideLines as Gr, runDaemonServiceParticipationGate as Gt, resolveAgentProfileSetup as H, clearSelectedOpenMeldProfileId as Ha, buildDaemonServiceTargetSpec as Hi, buildSignalIndex as Hn, canonicalizeLocalProjectPath as Ho, OPENMELD_AGENT_MENTAL_MODEL_LINES as Hr, resolveLocalComponentsStatus as Ht, emitSpaceAgentOverview as I, deleteOpenMeldProfile as Ia, resolveEvidenceSyncHealth as Ii, resolveLocalAgentControllerReportDecision as In, listProjectConnectionsWithStatus as Io, registerBuiltinAgentSelectionOptions as Ir, fetchSpaceMeta as It, runAgentsCustomUpdate as J, resolveAuthenticationGuidance as Ja, resolveOpenMeldEnvironmentTarget as Ji, promptSearchMultiselect as Jn, emitCliJsonEnvelope as Jo, runPendingDaemonServiceUpdate as Jr, runSkillsCheck as Jt, runAgentsCustomList as K, buildHumanAuthenticationCard as Ka, resolveServiceUpdateUrgency as Ki, createSpaceMemberIdentityIndex as Kn, renderTextInfoCard as Ko, canonicalizeAllowedActions as Kr, runDaemonStartDecisionPrompt as Kt, emitSpaceCliAgentOverview as L, listOpenMeldProfiles as La, resolveNativeAgentControllerPermissionModeForController as Li, inspectSpaceCacheFile as Ln, migrateProjectBindingStore as Lo, buildAgentOverviewFromContract as Lr, updateSpaceMeta as Lt, assertFullSignalIdArgument as M, requireOpenMeldProfile as Ma, parseAgentControllerRef as Mi, submitRuntimeAgentControllerReports as Mn, readAgentActivityOutboxHealth as Mo, registerSkillsTargetSelectionOptions as Mr, runDaemonStartupPreflight as Mt, assertValidSpaceIdTarget as N, resolveOpenMeldProfileOrNull as Na, resolveAgentControllerPermissionModeForController as Ni, collectLocalAgentControllerInventory as Nn, removeProjectOutbox as No, getCliVersionInfo as Nr, readDaemonStartFailureLogTailLines as Nt, resolveLinkAccessLabel as O, parseCliViewMode as Oa, createAgentExecutionStatusDisplayRows as Oi, assessActionParticipationCandidate as On, normalizeSharedSessionTitle as Oo, getCommandEntryContract as Or, reconcileCliVersionView as Ot, prepareAuthenticatedSpaceCommandContext as P, createOpenMeldAgentProfile as Pa, resolveAgentExecutionStatus as Pi, resolveLocalAgentControllerBlockerReasonCodes as Pn, bindProject as Po, registerDaemonControlTargetOptions as Pr, fetchSpaceUpdates as Pt, runAgentsList as Q, setProfileDefaultView as Qa, isCurrentCommandCheckScopeActive as Qi, assessCliUpdate as Qn, cliBinaryDeltaPatchSchema as Qo, formatDaemonFailureContextText as Qr, runSkillsUpdate as Qt, prepareLocalAgentReadiness as R, primeOpenMeldProfilesSessionCache as Ra, PREPARE_SESSION_RECONNECT_GRACE_MS as Ri, upsertSpaceConfig as Rn, removeProjectConnection as Ro, DualViewGuideError as Rr, readGatewayJsonResponse as Rt, loadSpaceSignalIndexOrNull as S, OPENMELD_VERSION as Sa, listAgentTargetStates as Si, resolveCreateProfileKind as Sn, readDaemonServiceContract as So, createSpaceSubcommandTargetGuideError as Sr, runDaemonStatusFlow as St, buildFormalSignalReadPayload as T, renderHumanTextErrorCard as Ta, notifyDaemonRouteCatalogChanged as Ti, ensureAgentProfileRuntimeBinding as Tn, removeAgentActivityContextCache as To, createStartAgentIdentityGuideError as Tr, runDaemonUninstall as Tt, runAgents as U, getSelectedOpenMeldProfileId as Ua, resolveDaemonServiceAlignmentDecision as Ui, buildSignalMessageReadProjection as Un, enqueueControllerTaskLifecycleEventWhileLocked as Uo, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Ur, writeInstalledLocalComponentsSnapshot as Ut, persistAgentTransportSelection as V, alignSelectedOpenMeldProfileStorage as Va, getSetupFlowCopy as Vi, buildDispatchResultReplyWorkflowProjection as Vn, unbindProject as Vo, formatAgentOverviewPayload as Vr, parseJsonResponse$1 as Vt, runAgentsConfig as W, setSelectedOpenMeldProfileId as Wa, classifyDaemonServiceRunStartability as Wi, buildSpaceRoundReadProjection as Wn, readControllerTaskLifecycleOutboxHealth as Wo, areAllowedActionsEquivalent as Wr, resolveDaemonServiceParticipationStatus as Wt, runAgentsDisable as X, resolveAuthenticationGuidanceFromMessage as Xa, finishCurrentCommandCheckScope as Xi, isReturnKeypress as Xn, outJsonLine as Xo, ensureDaemonRuntimePaths as Xr, runSkillsInstall as Xt, runAgentsDetect as Y, resolveAuthenticationGuidanceFromError as Ya, resolveAuthBaseUrl as Yi, promptSearchSelect as Yn, errLine as Yo, scheduleDaemonServiceUpdate as Yr, runSkillsEnsure as Yt, runAgentsEnable as Z, getProfileDefaultView as Za, getCurrentCommandCheckState as Zi, runInteractivePrompt as Zn, outLine as Zo, resolveDaemonDeviceId as Zr, runSkillsUninstall as Zt, runSpaceWriteWithPasswordRetry as _, readVersionState as _a, validateCustomProfileWorkspacePath as _i, requestDeviceToken as _n, formatOpenMeldCliTextBlock as _o, createSpaceLeaveGuideError as _r, runDaemonInstall as _t, runSpaceDelete as a, getDaemonSystemServiceLogPath as aa, mapAgentReplyReadinessToLegacyAutoReply as ai, ensureCommandAuthenticationOrCancel as an, resolveAgentActivityRouteForPath as ao, resolveElapsedTimeMs as ar, revokeOrganizationJoinLinkResponseSchema as as, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, toStartBackgroundHelperExecutionCompatibility as ba, createPrimaryBindingReadSession as bi, revokeAuthAccessToken as bn, resolveUserFacingCliEntryCommand as bo, createSpaceRemoveMembersGuideError as br, runDaemonRunAfterEntryChecks as bt, runSpaceLeave as c, resolveDaemonServiceManager as ca, syncProfileWorkspaceState as ci, runAuthLogout as cn, defaultManagedIntegrationPaths as co, canUseInteractivePrompts as cr, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, performManagedInstall as da, ensureOpenMeldManagedProfileWorkspace as di, exchangeOneTimeTokenAuthSession as dn, resolveAgentActivityDispatcherCommand as do, createProfileCreateGuideError as dr, resolveSpaceSendText as dt, startCurrentCommandCheckScope as ea, resolveDaemonServiceFreshnessWarning as ei, readBundledOpenMeldCliSkillDocumentByPath as en, validateLocalProjectConnectionPath as eo, assertDispatchOwnedRuntimePublicWriteAllowed as er, cliJsonSkillsListEnvelopeSchema as es, runAgentsRepair as et, runSpaceSend as f, buildNextVersionState as fa, normalizeCustomProfileWorkspacePath as fi, buildAuthStatusRows as fn, uninstallAgentActivityIntegrations as fo, createProfileMenuGuideError as fr, bestEffortStopCurrentLaneDaemonService as ft, runSpaceReadWithPasswordRetry as g, fetchLatestPackageInfo as ga, setOpenMeldManagedProfileWorkspace as gi, fetchAuthUserSnapshot as gn, formatOpenMeldCliLine as go, createSpaceContractSetGuideError as gr, runDaemonCancel as gt, uploadPreparedSpaceFiles as h, fetchLatestCliBinaryRelease as ha, setCustomProfileWorkspace as hi, extractAuthApiErrorMessage as hn, formatOpenMeldCliCommands as ho, createSpaceAliasTargetGuideError as hr, runDaemonBackgroundStartForDecision as ht, runSpaceCreate as i, readCurrentObservedDaemonRuntimeStatus as ia, formatHumanReplyReadinessReason as ii, buildCommandAuthenticationPromptMessage as in, registerAgentActivityRoute as io, formatElapsedTime as ir, organizationJoinLinkErrorResponseSchema as is, colorizeDisplayProfileLabel as it, isSpaceCommandOutputHandledError as j, isSelectedOpenMeldProfileRequiredError as ja, listAgentControllerPermissionModeOptions as ji, submitRuntimeAgentControllerReport as jn, removeProjectInbox as jo, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as jr, shouldEmitAgentOverview as jt, resolveOrganizationVisibilityLabel as k, resolveRuntimeContext as ka, getAgentControllerPermissionModeDisplayMetadata as ki, computeRetryDelayMs as kn, readCodexSessionTitles as ko, getCommandHintsFromContract as kr, emitDaemonAgentOverview as kt, runSpaceList as l, readRecentDaemonLifecycleEvents as la, createModelCatalogReadSession as li, runAuthMenu as ln, installAgentActivityIntegrations as lo, createDoctorFailedGuideError as lr, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, ensureVersionStateReady as ma, resolveConfiguredProfileWorkspacePath as mi, formatActiveOrganizationLabel as mn, formatOpenMeldCliCommand as mo, createSpaceAddMembersGuideError as mr, runDaemonAutostart as mt, promptAndConfirmSpacePassword as n, resolveVersionChangeDirection as na, formatAgentReplyReadinessLabel as ni, readRecentDaemonDispatchJournalEvents as nn, requestLocalAgentActivitySync as no, readDispatchSpaceActionContextFromEnv as nr, cliJsonSkillsShowEnvelopeSchema as ns, formatTransportModeDisplay as nt, runSpaceHistory as o, isDaemonServiceJobNeverSpawned as oa, resolveGatewayChainReadiness as oi, evaluateCommandAuthentication as on, unregisterAgentActivityRoute as oo, formatDaemonServiceDowngradeBlockedRecommendation as or, compareAgentControllerRefsForDisplay as os, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, compareSemver as pa, readProfileWorkspaceConfig as pi, buildAuthStatusSnapshot as pn, formatInlineOpenMeldCliCommands as po, createResetConfirmationGuideError as pr, runDaemon as pt, runAgentsCustomRemove as q, createAuthenticationError as qa, assessServerRequiredVersion as qi, formatRemovedCcRelationMessage as qn, sanitizeTerminalDisplayText as qo, readOpenMeldToolsUpdateContextFromEnv as qr, collectSkillsReadinessSnapshot as qt, runSpaceAddMembers as r, readCurrentDaemonRuntimeContext as ra, formatDeviceReplyReadinessLabel as ri, connectWebSocket as rn, isAgentActivityRouteRegistered as ro, writeDispatchSpaceActionRecord as rr, getOrganizationJoinLinkResponseSchema as rs, colorizeAgentLabel as rt, runSpaceJoin as s, readDaemonServiceJobCrashExitCode as sa, resolveOpenClawLocalDiagnosticsValue as si, runAuthLogin as sn, AGENT_ACTIVITY_INTEGRATION_OWNER as so, formatDaemonServiceMissingRecommendation as sr, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, inspectDaemonServiceInventory as ta, resolveCurrentReplyReadinessSnapshot as ti, readRuntimeReportingHealthState as tn, LocalDaemonControlPlaneClientError as to, readDispatchOwnedRuntimeGuard as tr, cliJsonSkillsLoadEnvelopeSchema as ts, runAgentsShow as tt, runSpacePassword as u, buildInstallSelfJsonPayload as ua, resolveProfileWorkspaceRuntime as ui, runAuthStatus as un, readAgentActivityIntegrationStatus as uo, createProfileActionGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, writeVersionState as va, describeProfileWorkspacePathValidationFailure as vi, resolveDeviceAuthClientId as vn, formatProfileAwareOpenMeldCliCommands as vo, createSpaceMenuGuideError as vr, runDaemonInterrupt as vt, buildFormalDispatchResultReadPayload as w, renderHumanErrorCard as wa, listBuiltinAgentsRegistryEntries as wi, promptTextEntry as wn, readAgentActivityContextForPath as wo, createSpaceUpdatesGuideError as wr, runDaemonTeardownStrict as wt, loadSpaceIdentityDirectoryOrNull as x, resolveCurrentDaemonExpectedVersion as xa, resolveAgentProfilePrimaryAgentControllerReport as xi, createProfileByKind as xn, syncLocalAgentActivity as xo, createSpaceResultGuideError as xr, runDaemonSnapshot as xt, emitHumanReadSignalsTextProjection as y, resolveDaemonRuntimeContractCompatibility as ya, syncDeviceRuntimeStateProjection as yi, resolveDeviceTokenExpiresAt as yn, resolveSetupFollowUpCliEntryCommand as yo, createSpacePublicationSetGuideError as yr, runDaemonReinstall as yt, buildReplyReadinessGuidance as z, resolveOpenMeldProfile as za, buildDaemonRouteObservationPresentation as zi, assertNoRemovedCcSpaceAddressingSyntax as zn, runIfAgentActivityBindingGenerationIsCurrent as zo, formatDualViewGuideForDisplay as zr, readGatewayTextResponse as zt };
110240
110439
 
110241
- //# sourceMappingURL=command-DaGkOPI0.js.map
110440
+ //# sourceMappingURL=command-wO4TFiYh.js.map