openmeld 0.3.42 → 0.3.49
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.
- package/dist/{add-me-membership-B9sBeKPr.js → add-me-membership-DV7la2Ly.js} +2 -2
- package/dist/{add-me-membership-B9sBeKPr.js.map → add-me-membership-DV7la2Ly.js.map} +1 -1
- package/dist/{api-client-foundation-BnsgZrnh.js → api-client-foundation-BsyR-U-n.js} +4 -4
- package/dist/{api-client-foundation-BnsgZrnh.js.map → api-client-foundation-BsyR-U-n.js.map} +1 -1
- package/dist/{auth-session-_ideKYyk.js → auth-session-BcPKfqFN.js} +3 -3
- package/dist/{auth-session-_ideKYyk.js.map → auth-session-BcPKfqFN.js.map} +1 -1
- package/dist/{base-url-Bdqmyw0D.js → base-url-DXnn41nz.js} +3 -2
- package/dist/base-url-DXnn41nz.js.map +1 -0
- package/dist/{command-DAwIiSbe.js → command-CS1VO--o.js} +484 -91
- package/dist/{command-DAwIiSbe.js.map → command-CS1VO--o.js.map} +1 -1
- package/dist/{daemon-runtime-lease-B9LdD-he.js → daemon-runtime-lease-VcZQQozG.js} +2 -2
- package/dist/{daemon-runtime-lease-B9LdD-he.js.map → daemon-runtime-lease-VcZQQozG.js.map} +1 -1
- package/dist/{dist-BvAAI13G.js → dist-CftWiExS.js} +33 -7
- package/dist/dist-CftWiExS.js.map +1 -0
- package/dist/openmeld-dev.js +1 -1
- package/dist/openmeld.js +159 -30
- package/dist/openmeld.js.map +1 -1
- package/dist/{runtime-transport-rv43yBPB.js → runtime-transport-C-SSBt9i.js} +2 -2
- package/dist/{runtime-transport-rv43yBPB.js.map → runtime-transport-C-SSBt9i.js.map} +1 -1
- package/package.json +2 -2
- package/dist/base-url-Bdqmyw0D.js.map +0 -1
- package/dist/dist-BvAAI13G.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { A as toSpaceCursorUrl, At as openMeldManagedBinaryPath, B as toSpaceUpdatesUrl, C as updateConfiguredSkillsConfig, Ct as deviceOpenClawProfileWorkspaceDir, Dt as normalizeOpenMeldProfileId, E as toDaemonRouteObservationUrl, Et as normalizeAccountKey, F as toSpaceMembersUrl, G as isOpenMeldOrphanedLockError, Gt as runtimeLogsDir, H as acquireLock, Ht as resolveOpenMeldPresetOwnedPathInput, I as toSpaceMetaUrl, Jt as systemDir, Kt as skillsDir, L as toSpacePasswordUrl, Mt as openMeldManagedVersionDir, Nt as openMeldRootDir, Ot as openMeldBackupsDir, P as toSpaceLeaveUrl, Pt as openMeldVersionsDir, Qt as runtimeAgentControllerLaunchContractSchema, R as toSpaceRemoveMembersUrl, Rt as resolveDefaultOpenMeldHomeDirname, St as deviceOpenClawProfileDir, T as normalizeBaseUrl, Tt as legacyAccountProfileSpacesDir, Ut as resolveOpenMeldRootDir, V as toSpaceWsUrl, Vt as resolveOpenMeldEnvPreset, W as isOpenMeldLockError, Wt as runtimeDir, X as resolveOpenMeldOrphanedLockIssue, Yt as formatLocalMachineIssueMessage, Z as runWithHeldLock, Zt as runtimeAgentControllerConversationIdMappingSpecSchema, _ as getRuntimeConfigReadHealth, _t as accountProfileSpaceCacheDir, a as resolveBaseUrl, an as resolveBuiltinAgentControllerConversationKind, at as writeCliContextState, b as setConfiguredSkillsConfig, bt as accountsDir, c as resolveExplicitGatewayUrlOrThrow, d as createDefaultRuntimeAgentControllerSettings, dn as canonicalizeBuiltinAgentControllerRef, dt as createBackgroundExecutionBlockedIssue, en as runtimeStreamingModeSchema, f as getConfiguredDaemonDispatchLimits, fn as normalizeBuiltinAgentControllerId, g as getConfiguredViewCustomization, gt as accountProfileLocalMetaPath, h as getConfiguredSkillsConfig, ht as OPENMELD_HOME_ENV_KEY, i as normalizeGatewayBaseUrlOrNull, in as conversationPolicySchema, it as resolveCliContextId, j as toSpaceDeleteUrl, jt as openMeldManagedVersionBinaryPath, k as toSpaceCreateUrl, kt as openMeldBinDir, l as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, ln as buildAgentControllerRoutingKey, lt as assessLocalMachineFailure, mn as parseAgentControllerRef$1, nt as readCliContextState, o as resolveBaseUrlOrNull, on as HOSTED_CENTER_AGENT_CONTROLLER_REF, p as getConfiguredDeviceRuntimeState, pn as normalizeKnownBuiltinAgentControllerId, r as normalizeGatewayBaseUrl, rn as buildAgentControllerConversationRef, rt as resolveCliContext, s as resolveDefaultGatewayBaseUrl, sn as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, st as resolveOpenMeldLaneDescriptor, tn as runtimeTransportModeSchema, tt as listCliContextStates, un as canonicalizeAgentControllerRef, v as resolveRuntimeSkillsCustomTargetId, vt as accountProfileViewPath, wt as isPublishedOpenMeldHome, x as updateConfiguredDeviceRuntimeState, xt as deviceOpenClawProfileBootstrapPath, yt as accountProfileWorkspacePath, zt as resolveExplicitOpenMeldEnvPreset } from "./base-url-
|
|
4
|
-
import { $ as OPENMELD_RUNTIME_CAPABILITIES_HEADER, A as parseEnvelope$1, At as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, B as toErrorMessage$37, Bt as archiveProjectResponseSchema, Ct as deleteCenterAgentRoutineResponseSchema, D as DAEMON_STREAM_KEEPALIVE_PING, Dt as resumeCenterAgentRoutineResponseSchema, E as toStructuredApiClientFailure, Et as pauseCenterAgentRoutineResponseSchema, Ft as agentActivitySnapshotResponseSchema, Gt as leaveSpaceResponseSchema, H as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Ht as listProjectsResponseSchema, I as OPENMELD_HEADER_REQUEST_ID, It as centerAgentToolSpeakerSchema, Jt as spaceMemberDirectoryEntrySchema, Kt as postSpaceMembersResponseSchema, Lt as localProjectControlConnectionSchema, M as parseServerErrorFrame$1, N as resolveCustomMentionAliasOverride, Ot as updateCenterAgentRoutineResponseSchema, P as OPENMELD_HEADER_PROFILE_ID, Q as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, R as toErrorMessage$38, Rt as localProjectControlDaemonFrameSchema, S as createSpaceApi, St as createCenterAgentRoutineResponseSchema, T as resolveProfileSpaceHistoryGatewayHost, Tt as listCenterAgentRoutinesResponseSchema, Ut as projectSchema, V as getSpaceUpdatesResponseSchema, Vt as createProjectResponseSchema, Wt as updateProjectResponseSchema, X as submitAgentControllerTaskLifecycleEventItemSchema, Xt as openCodePermissionConfigSchema, Yt as spaceMemberDirectorySchema, Z as gatewayErrorEnvelopeSchema, _t as authProfileManagedRoleSchema, a as buildSpaceAttachmentDownloadPath, an as toLegacySpaceAddressingWireValue, at as spaceCreatorSchema, bt as submitFeedbackIssueRequestSchema, c as createAgentProfileBindingApi, ct as listOrganizationSkillsResponseSchema, dt as organizationSkillSummarySchema, et as computerFileAccessDaemonFrameSchema, f as createFetchTransport, h as createOrganizationApi, ht as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, i as buildProfileSpaceHistoryUpsertPath, in as agentControllerCollaborationModeSchema, it as organizationSpaceDirectoryWithMemberCountsResponseSchema, j as parseIncoming$1, jt as agentActivityEventSchema, k as MAX_TEXT_LENGTH, m as createOpenMeldApiClient, mt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, n as OpenMeldApiClientInvalidResponseError, nt as computerFileAccessPolicySchema, o as createAccountSpaceIndexApi, ot as spaceMetaSchema, p as createLocalRuntimeExpectedRoutesApi, pt as organizationDirectoryResponseSchema, qt as removeSpaceMembersResponseSchema, r as buildProfileSpaceHistoryStatusPath, rn as agentControllerPermissionModeSchema, rt as modelCatalogSchema, s as createAgentActivityApi, st as getOrganizationSkillResponseSchema, t as OpenMeldApiClientHttpError, tt as computerFileAccessPolicyInputSchema, u as createCurrentDeviceApi, ut as organizationSkillReleaseSummarySchema, v as createProfileSpaceHistoryApi, vt as profileCapabilitiesResponseSchema, w as resolveAccountSpaceIndexGatewayHost, wt as listCenterAgentRoutineRunsResponseSchema, x as createRuntimeReportingApi, xt as submitFeedbackIssueResponseSchema, yt as profileErrorResponseSchema, z as sleep, zt as localProjectControlDiscoverProjectsResponseSchema } from "./dist-
|
|
5
|
-
import { Bt as openMeldDaemonControlPlaneResponseSchema, C as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, Cn as formatLocalComponentsSummaryLabel, Cr as resolveCommandAgentWorkActivity, D as runtimeTransportResumeControllerConversationFramePayloadSchema, Dn as localCliComponentUpdateProjectionSchema, Dt as detectSpaceAttachmentMimeType, E as runtimeTransportRejectedProfileRegistrationSchema, En as installedLocalComponentsSnapshotSchema, Et as SPACE_ATTACHMENT_MAX_SIZE_BYTES, G as openMeldSpaceEgressActionSchema, H as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Ht as skippedDaemonProfileSchema, J as localFolderPickerDaemonFrameSchema, K as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, Ln as runtimeCoordinatorExecutionTokenEnvelopeSchema, Nn as parseOptionalClientMessageId, O as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Ot as projectSpaceMessageAttachment, Rn as runtimeTransportDeliveryExecutionIdentitySchema, S as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Sn as formatLocalComponentsSummaryDescription, T as runtimeTransportRegisterSessionResponseSchema, Tn as formatLocalSetupActionLabel, U as openMeldDaemonTaskResultPayloadSchema, Un as resolveSingleSpaceMentionLabels, Ut as providerDispatchRuntimeContextSchema, V as openMeldDaemonTaskResultEnvelopeWriteSchema, Vn as normalizeSpacePasswordText, Wn as resolveSpaceMentionLabels, Wt as conversationExecutionStateSchema, X as localFolderPickerHelperResultSchema, Y as localFolderPickerHelperProtocolResultSchema, _ as runtimeTransportHeartbeatResponseSchema, _n as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, _r as resolvePublicAgentAvailabilityCopy, _t as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, a as runtimeTransportCapabilitiesSchema, an as formatCanonicalMentionLiteral, b as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, bn as agentInteractionResolutionSchema, c as runtimeTransportDispatchInteractionRequestSchema, cn as normalizeMessageEnvelope, cr as profileWorkspaceModeSchema, d as runtimeTransportDispatchPreviewEndRequestSchema, er as openMeldRequestContextSchema, f as runtimeTransportDispatchPreviewRequestSchema, g as runtimeTransportHeartbeatRequestSchema, gr as resolveMappedPublicAgentFailureReason, h as runtimeTransportErrorCodeSchema, hr as resolveDetailedPublicAgentFailureReason$1, i as localWakeRouteReportSchema, in as collectCanonicalMentionTextFragments, ir as openMeldRuntimeProfileIdSchema, jt as spaceAttachmentFileNameSchema, k as runtimeTransportRouteCatalogChangedFramePayloadSchema, kn as localServiceComponentUpdateProjectionSchema, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, ln as resolveMessageEnvelopeTargetField, m as runtimeTransportDispatchToolActivityRequestSchema, mr as MAX_TEXT_LENGTH$1, n as daemonExecutionCompatibilitySchema, nr as agentProfileIdSchema, o as runtimeTransportDeliverDispatchRequestSchema, on as getSpaceMessageAddressingRelationSupportForTargetKind, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pr as trimmedStringFromUnknown, pt as CONVERSATION_CONTINUITY_WARNING_PURPOSE, q as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, r as daemonStreamFrameSchema, rn as MESSAGE_MENTION_TYPE_VALUES, rr as normalizeOptionalWorkingDirectory, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, tr as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportLocalAgentControlCancelFramePayloadSchema, vr as resolvePublicAgentFailureRecovery, vt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, w as runtimeTransportRegisterSessionRequestSchema, wn as formatLocalSetupActionDescription, x as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, xt as sanitizeSignalTextPreview, y as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, yn as agentInteractionRequestSchema, yr as shouldPreferMappedPublicAgentFailureReason, yt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, z as runtimeTransportSubmitTaskResultRequestSchema, zt as openMeldDaemonControlPlaneRequestSchema } from "./runtime-transport-
|
|
3
|
+
import { A as toSpaceCursorUrl, At as openMeldManagedBinaryPath, B as toSpaceUpdatesUrl, C as updateConfiguredSkillsConfig, Ct as deviceOpenClawProfileWorkspaceDir, Dt as normalizeOpenMeldProfileId, E as toDaemonRouteObservationUrl, Et as normalizeAccountKey, F as toSpaceMembersUrl, G as isOpenMeldOrphanedLockError, Gt as runtimeLogsDir, H as acquireLock, Ht as resolveOpenMeldPresetOwnedPathInput, I as toSpaceMetaUrl, Jt as systemDir, Kt as skillsDir, L as toSpacePasswordUrl, Mt as openMeldManagedVersionDir, Nt as openMeldRootDir, Ot as openMeldBackupsDir, P as toSpaceLeaveUrl, Pt as openMeldVersionsDir, Qt as runtimeAgentControllerLaunchContractSchema, R as toSpaceRemoveMembersUrl, Rt as resolveDefaultOpenMeldHomeDirname, St as deviceOpenClawProfileDir, T as normalizeBaseUrl, Tt as legacyAccountProfileSpacesDir, Ut as resolveOpenMeldRootDir, V as toSpaceWsUrl, Vt as resolveOpenMeldEnvPreset, W as isOpenMeldLockError, Wt as runtimeDir, X as resolveOpenMeldOrphanedLockIssue, Yt as formatLocalMachineIssueMessage, Z as runWithHeldLock, Zt as runtimeAgentControllerConversationIdMappingSpecSchema, _ as getRuntimeConfigReadHealth, _t as accountProfileSpaceCacheDir, a as resolveBaseUrl, an as resolveBuiltinAgentControllerConversationKind, at as writeCliContextState, b as setConfiguredSkillsConfig, bt as accountsDir, c as resolveExplicitGatewayUrlOrThrow, d as createDefaultRuntimeAgentControllerSettings, dn as canonicalizeBuiltinAgentControllerRef, dt as createBackgroundExecutionBlockedIssue, en as runtimeStreamingModeSchema, f as getConfiguredDaemonDispatchLimits, fn as normalizeBuiltinAgentControllerId, g as getConfiguredViewCustomization, gt as accountProfileLocalMetaPath, h as getConfiguredSkillsConfig, ht as OPENMELD_HOME_ENV_KEY, i as normalizeGatewayBaseUrlOrNull, in as conversationPolicySchema, it as resolveCliContextId, j as toSpaceDeleteUrl, jt as openMeldManagedVersionBinaryPath, k as toSpaceCreateUrl, kt as openMeldBinDir, l as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, ln as buildAgentControllerRoutingKey, lt as assessLocalMachineFailure, mn as parseAgentControllerRef$1, nt as readCliContextState, o as resolveBaseUrlOrNull, on as HOSTED_CENTER_AGENT_CONTROLLER_REF, p as getConfiguredDeviceRuntimeState, pn as normalizeKnownBuiltinAgentControllerId, r as normalizeGatewayBaseUrl, rn as buildAgentControllerConversationRef, rt as resolveCliContext, s as resolveDefaultGatewayBaseUrl, sn as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, st as resolveOpenMeldLaneDescriptor, tn as runtimeTransportModeSchema, tt as listCliContextStates, un as canonicalizeAgentControllerRef, v as resolveRuntimeSkillsCustomTargetId, vt as accountProfileViewPath, wt as isPublishedOpenMeldHome, x as updateConfiguredDeviceRuntimeState, xt as deviceOpenClawProfileBootstrapPath, yt as accountProfileWorkspacePath, zt as resolveExplicitOpenMeldEnvPreset } from "./base-url-DXnn41nz.js";
|
|
4
|
+
import { $ as OPENMELD_RUNTIME_CAPABILITIES_HEADER, A as parseEnvelope$1, At as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, B as toErrorMessage$37, Bt as archiveProjectResponseSchema, Ct as deleteCenterAgentRoutineResponseSchema, D as DAEMON_STREAM_KEEPALIVE_PING, Dt as resumeCenterAgentRoutineResponseSchema, E as toStructuredApiClientFailure, Et as pauseCenterAgentRoutineResponseSchema, Ft as agentActivitySnapshotResponseSchema, Gt as leaveSpaceResponseSchema, H as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Ht as listProjectsResponseSchema, I as OPENMELD_HEADER_REQUEST_ID, It as centerAgentToolSpeakerSchema, Jt as spaceMemberDirectoryEntrySchema, Kt as postSpaceMembersResponseSchema, Lt as localProjectControlConnectionSchema, M as parseServerErrorFrame$1, N as resolveCustomMentionAliasOverride, Ot as updateCenterAgentRoutineResponseSchema, P as OPENMELD_HEADER_PROFILE_ID, Q as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, R as toErrorMessage$38, Rt as localProjectControlDaemonFrameSchema, S as createSpaceApi, St as createCenterAgentRoutineResponseSchema, T as resolveProfileSpaceHistoryGatewayHost, Tt as listCenterAgentRoutinesResponseSchema, Ut as projectSchema, V as getSpaceUpdatesResponseSchema, Vt as createProjectResponseSchema, Wt as updateProjectResponseSchema, X as submitAgentControllerTaskLifecycleEventItemSchema, Xt as openCodePermissionConfigSchema, Yt as spaceMemberDirectorySchema, Z as gatewayErrorEnvelopeSchema, _t as authProfileManagedRoleSchema, a as buildSpaceAttachmentDownloadPath, an as toLegacySpaceAddressingWireValue, at as spaceCreatorSchema, bt as submitFeedbackIssueRequestSchema, c as createAgentProfileBindingApi, ct as listOrganizationSkillsResponseSchema, dt as organizationSkillSummarySchema, et as computerFileAccessDaemonFrameSchema, f as createFetchTransport, h as createOrganizationApi, ht as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, i as buildProfileSpaceHistoryUpsertPath, in as agentControllerCollaborationModeSchema, it as organizationSpaceDirectoryWithMemberCountsResponseSchema, j as parseIncoming$1, jt as agentActivityEventSchema, k as MAX_TEXT_LENGTH, m as createOpenMeldApiClient, mt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, n as OpenMeldApiClientInvalidResponseError, nt as computerFileAccessPolicySchema, o as createAccountSpaceIndexApi, ot as spaceMetaSchema, p as createLocalRuntimeExpectedRoutesApi, pt as organizationDirectoryResponseSchema, qt as removeSpaceMembersResponseSchema, r as buildProfileSpaceHistoryStatusPath, rn as agentControllerPermissionModeSchema, rt as modelCatalogSchema, s as createAgentActivityApi, st as getOrganizationSkillResponseSchema, t as OpenMeldApiClientHttpError, tt as computerFileAccessPolicyInputSchema, u as createCurrentDeviceApi, ut as organizationSkillReleaseSummarySchema, v as createProfileSpaceHistoryApi, vt as profileCapabilitiesResponseSchema, w as resolveAccountSpaceIndexGatewayHost, wt as listCenterAgentRoutineRunsResponseSchema, x as createRuntimeReportingApi, xt as submitFeedbackIssueResponseSchema, yt as profileErrorResponseSchema, z as sleep, zt as localProjectControlDiscoverProjectsResponseSchema } from "./dist-CftWiExS.js";
|
|
5
|
+
import { Bt as openMeldDaemonControlPlaneResponseSchema, C as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, Cn as formatLocalComponentsSummaryLabel, Cr as resolveCommandAgentWorkActivity, D as runtimeTransportResumeControllerConversationFramePayloadSchema, Dn as localCliComponentUpdateProjectionSchema, Dt as detectSpaceAttachmentMimeType, E as runtimeTransportRejectedProfileRegistrationSchema, En as installedLocalComponentsSnapshotSchema, Et as SPACE_ATTACHMENT_MAX_SIZE_BYTES, G as openMeldSpaceEgressActionSchema, H as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Ht as skippedDaemonProfileSchema, J as localFolderPickerDaemonFrameSchema, K as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, Ln as runtimeCoordinatorExecutionTokenEnvelopeSchema, Nn as parseOptionalClientMessageId, O as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Ot as projectSpaceMessageAttachment, Rn as runtimeTransportDeliveryExecutionIdentitySchema, S as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Sn as formatLocalComponentsSummaryDescription, T as runtimeTransportRegisterSessionResponseSchema, Tn as formatLocalSetupActionLabel, U as openMeldDaemonTaskResultPayloadSchema, Un as resolveSingleSpaceMentionLabels, Ut as providerDispatchRuntimeContextSchema, V as openMeldDaemonTaskResultEnvelopeWriteSchema, Vn as normalizeSpacePasswordText, Wn as resolveSpaceMentionLabels, Wt as conversationExecutionStateSchema, X as localFolderPickerHelperResultSchema, Y as localFolderPickerHelperProtocolResultSchema, _ as runtimeTransportHeartbeatResponseSchema, _n as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, _r as resolvePublicAgentAvailabilityCopy, _t as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, a as runtimeTransportCapabilitiesSchema, an as formatCanonicalMentionLiteral, b as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, bn as agentInteractionResolutionSchema, c as runtimeTransportDispatchInteractionRequestSchema, cn as normalizeMessageEnvelope, cr as profileWorkspaceModeSchema, d as runtimeTransportDispatchPreviewEndRequestSchema, er as openMeldRequestContextSchema, f as runtimeTransportDispatchPreviewRequestSchema, g as runtimeTransportHeartbeatRequestSchema, gr as resolveMappedPublicAgentFailureReason, h as runtimeTransportErrorCodeSchema, hr as resolveDetailedPublicAgentFailureReason$1, i as localWakeRouteReportSchema, in as collectCanonicalMentionTextFragments, ir as openMeldRuntimeProfileIdSchema, jt as spaceAttachmentFileNameSchema, k as runtimeTransportRouteCatalogChangedFramePayloadSchema, kn as localServiceComponentUpdateProjectionSchema, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, ln as resolveMessageEnvelopeTargetField, m as runtimeTransportDispatchToolActivityRequestSchema, mr as MAX_TEXT_LENGTH$1, n as daemonExecutionCompatibilitySchema, nr as agentProfileIdSchema, o as runtimeTransportDeliverDispatchRequestSchema, on as getSpaceMessageAddressingRelationSupportForTargetKind, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pr as trimmedStringFromUnknown, pt as CONVERSATION_CONTINUITY_WARNING_PURPOSE, q as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, r as daemonStreamFrameSchema, rn as MESSAGE_MENTION_TYPE_VALUES, rr as normalizeOptionalWorkingDirectory, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, tr as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportLocalAgentControlCancelFramePayloadSchema, vr as resolvePublicAgentFailureRecovery, vt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, w as runtimeTransportRegisterSessionRequestSchema, wn as formatLocalSetupActionDescription, x as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, xt as sanitizeSignalTextPreview, y as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, yn as agentInteractionRequestSchema, yr as shouldPreferMappedPublicAgentFailureReason, yt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, z as runtimeTransportSubmitTaskResultRequestSchema, zt as openMeldDaemonControlPlaneRequestSchema } from "./runtime-transport-C-SSBt9i.js";
|
|
6
6
|
import { r as daemonServiceLaneSchema, t as daemonServiceContractSchema } from "./service-contract-DZWQdPz5.js";
|
|
7
|
-
import { A as isDaemonServiceRuntimeHeartbeatStale, B as uninstallDaemon, C as daemonServiceStableExecutableWrapperPath, D as getDaemonRuntimeStatus, E as ensureDaemonControlPlaneToken, F as releaseDaemonServiceLifecycleLock, G as readDaemonLocalStateFile, H as withDaemonServiceRegistrationMutationLock, I as resolveDaemonControlPlaneEndpoint, K as writeDaemonLocalStateFile, L as resolveDaemonServiceRuntimeMetadata, M as readDaemonServiceLifecycleLockMeta, N as readDaemonServiceLifecycleLockMetaWithCleanup, O as getDaemonStatus, P as readDaemonServiceRuntimeSnapshot, R as restoreDaemonInstallStateSnapshot, S as daemonServiceRepairJournalPath, T as daemonStatePath, U as withDaemonServiceRunLock, V as withDaemonServiceReconcileLock, W as withDaemonServiceStopLock, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceLegacyExecutableWrapperPath, 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 readDaemonControlPlaneToken, k as installDaemon, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableLauncherPath, x as daemonServiceRecognizedExecutableWrapperPaths, y as daemonServiceActiveBundleStatePath, z as setDaemonServiceRuntimeState } from "./daemon-runtime-lease-
|
|
8
|
-
import { A as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, D as REGISTER_RESPONSE_TIMEOUT_MS$1, E as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, S as MIN_HEARTBEAT_INTERVAL_MS$2, T as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, _ as DEFAULT_HEARTBEAT_INTERVAL_MS$1, a as getAuthSessionState, b as MAX_HEARTBEAT_INTERVAL_MS$2, c as setAuthSession, d as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, f as DAEMON_RUNTIME_CONTRACT_EPOCH$1, g as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, h as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, j as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, k as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, m as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, n as clearAuthSession, p as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, r as getAuthSession, u as CATALOG_SYNC_RETRY_INTERVAL_MS$1, w as OPENCLAW_CLI_TIMEOUT_MS$1, y as HEARTBEAT_RESPONSE_TIMEOUT_MS$1 } from "./auth-session-
|
|
9
|
-
import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as canAttachAuthTokenToRequest, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, u as resolveAuthTokenAttachment } from "./api-client-foundation-
|
|
7
|
+
import { A as isDaemonServiceRuntimeHeartbeatStale, B as uninstallDaemon, C as daemonServiceStableExecutableWrapperPath, D as getDaemonRuntimeStatus, E as ensureDaemonControlPlaneToken, F as releaseDaemonServiceLifecycleLock, G as readDaemonLocalStateFile, H as withDaemonServiceRegistrationMutationLock, I as resolveDaemonControlPlaneEndpoint, K as writeDaemonLocalStateFile, L as resolveDaemonServiceRuntimeMetadata, M as readDaemonServiceLifecycleLockMeta, N as readDaemonServiceLifecycleLockMetaWithCleanup, O as getDaemonStatus, P as readDaemonServiceRuntimeSnapshot, R as restoreDaemonInstallStateSnapshot, S as daemonServiceRepairJournalPath, T as daemonStatePath, U as withDaemonServiceRunLock, V as withDaemonServiceReconcileLock, W as withDaemonServiceStopLock, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceLegacyExecutableWrapperPath, 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 readDaemonControlPlaneToken, k as installDaemon, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableLauncherPath, x as daemonServiceRecognizedExecutableWrapperPaths, y as daemonServiceActiveBundleStatePath, z as setDaemonServiceRuntimeState } from "./daemon-runtime-lease-VcZQQozG.js";
|
|
8
|
+
import { A as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, D as REGISTER_RESPONSE_TIMEOUT_MS$1, E as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, S as MIN_HEARTBEAT_INTERVAL_MS$2, T as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, _ as DEFAULT_HEARTBEAT_INTERVAL_MS$1, a as getAuthSessionState, b as MAX_HEARTBEAT_INTERVAL_MS$2, c as setAuthSession, d as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, f as DAEMON_RUNTIME_CONTRACT_EPOCH$1, g as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, h as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, j as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, k as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, m as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, n as clearAuthSession, p as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, r as getAuthSession, u as CATALOG_SYNC_RETRY_INTERVAL_MS$1, w as OPENCLAW_CLI_TIMEOUT_MS$1, y as HEARTBEAT_RESPONSE_TIMEOUT_MS$1 } from "./auth-session-BcPKfqFN.js";
|
|
9
|
+
import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as canAttachAuthTokenToRequest, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, u as resolveAuthTokenAttachment } from "./api-client-foundation-BsyR-U-n.js";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { homedir, tmpdir, userInfo } from "node:os";
|
|
12
12
|
import { z } from "zod/v4";
|
|
13
|
-
import path, { basename, delimiter, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
|
|
13
|
+
import path, { basename, delimiter, dirname, extname, isAbsolute, join, normalize, parse, relative, resolve, sep } from "node:path";
|
|
14
14
|
import process$1 from "node:process";
|
|
15
15
|
import pc from "picocolors";
|
|
16
16
|
import stringWidth from "string-width";
|
|
@@ -34,8 +34,8 @@ import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybi
|
|
|
34
34
|
var package_default = {
|
|
35
35
|
$schema: "https://www.schemastore.org/package.json",
|
|
36
36
|
name: "openmeld",
|
|
37
|
-
version: "0.3.
|
|
38
|
-
openMeldReleaseDate: "2026-08-
|
|
37
|
+
version: "0.3.49",
|
|
38
|
+
openMeldReleaseDate: "2026-08-12",
|
|
39
39
|
description: "OpenMeld CLI - https://openmeld.ai",
|
|
40
40
|
license: "MIT",
|
|
41
41
|
type: "module",
|
|
@@ -5393,7 +5393,7 @@ function resolveOpenMeldAccountContext(input) {
|
|
|
5393
5393
|
};
|
|
5394
5394
|
}
|
|
5395
5395
|
async function resolveCurrentOpenMeldAccountContext() {
|
|
5396
|
-
const { getAuthSessionMetadata } = await import("./auth-session-
|
|
5396
|
+
const { getAuthSessionMetadata } = await import("./auth-session-BcPKfqFN.js").then((n) => n.t);
|
|
5397
5397
|
return resolveOpenMeldAccountContext({ session: await getAuthSessionMetadata().catch(() => null) });
|
|
5398
5398
|
}
|
|
5399
5399
|
function resolveHostKey(baseUrl) {
|
|
@@ -15255,6 +15255,146 @@ function toRecord$9(value) {
|
|
|
15255
15255
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
15256
15256
|
}
|
|
15257
15257
|
//#endregion
|
|
15258
|
+
//#region ../../runtime/adapters/codex/dist/transport/codex-app-server-admission.js
|
|
15259
|
+
const FAST_METADATA_ADMISSION_TIMEOUT_MS = 15e3;
|
|
15260
|
+
const COLD_CONTROLLER_ADMISSION_TIMEOUT_MS = 9e4;
|
|
15261
|
+
const CONTROL_REQUEST_TIMEOUT_MS_BY_OPERATION = {
|
|
15262
|
+
"collaborationMode/list": FAST_METADATA_ADMISSION_TIMEOUT_MS,
|
|
15263
|
+
"thread/resume": FAST_METADATA_ADMISSION_TIMEOUT_MS,
|
|
15264
|
+
"thread/start": COLD_CONTROLLER_ADMISSION_TIMEOUT_MS,
|
|
15265
|
+
"turn/start": COLD_CONTROLLER_ADMISSION_TIMEOUT_MS
|
|
15266
|
+
};
|
|
15267
|
+
function resolveCodexAppServerControlRequestTimeoutMs(input) {
|
|
15268
|
+
return input.overrideMs ?? CONTROL_REQUEST_TIMEOUT_MS_BY_OPERATION[input.operation];
|
|
15269
|
+
}
|
|
15270
|
+
//#endregion
|
|
15271
|
+
//#region ../../runtime/adapters/codex/dist/transport/codex-app-server-launch.js
|
|
15272
|
+
const CODEX_PLATFORM_LAYOUTS = {
|
|
15273
|
+
"darwin-arm64": {
|
|
15274
|
+
packageName: "@openai/codex-darwin-arm64",
|
|
15275
|
+
targetTriple: "aarch64-apple-darwin"
|
|
15276
|
+
},
|
|
15277
|
+
"darwin-x64": {
|
|
15278
|
+
packageName: "@openai/codex-darwin-x64",
|
|
15279
|
+
targetTriple: "x86_64-apple-darwin"
|
|
15280
|
+
},
|
|
15281
|
+
"linux-arm64": {
|
|
15282
|
+
packageName: "@openai/codex-linux-arm64",
|
|
15283
|
+
targetTriple: "aarch64-unknown-linux-musl"
|
|
15284
|
+
},
|
|
15285
|
+
"linux-x64": {
|
|
15286
|
+
packageName: "@openai/codex-linux-x64",
|
|
15287
|
+
targetTriple: "x86_64-unknown-linux-musl"
|
|
15288
|
+
},
|
|
15289
|
+
"win32-arm64": {
|
|
15290
|
+
packageName: "@openai/codex-win32-arm64",
|
|
15291
|
+
targetTriple: "aarch64-pc-windows-msvc"
|
|
15292
|
+
},
|
|
15293
|
+
"win32-x64": {
|
|
15294
|
+
packageName: "@openai/codex-win32-x64",
|
|
15295
|
+
targetTriple: "x86_64-pc-windows-msvc"
|
|
15296
|
+
}
|
|
15297
|
+
};
|
|
15298
|
+
const BUN_USER_AGENT_RE = /\bbun\//;
|
|
15299
|
+
const CODEX_MANAGED_ENV_NAMES = /* @__PURE__ */ new Set([
|
|
15300
|
+
"CODEX_MANAGED_BY_BUN",
|
|
15301
|
+
"CODEX_MANAGED_BY_NPM",
|
|
15302
|
+
"CODEX_MANAGED_BY_PNPM"
|
|
15303
|
+
]);
|
|
15304
|
+
function buildCodexAppServerLaunch(input) {
|
|
15305
|
+
const nativeRuntime = resolveOfficialCodexNativeRuntime(input.launchContract);
|
|
15306
|
+
if (!nativeRuntime || input.launchContract.kind !== "node_script") return {
|
|
15307
|
+
...buildCliLaunchInvocation({
|
|
15308
|
+
args: input.args,
|
|
15309
|
+
launchContract: input.launchContract
|
|
15310
|
+
}),
|
|
15311
|
+
env: input.env,
|
|
15312
|
+
processLaunchKind: "package_entrypoint"
|
|
15313
|
+
};
|
|
15314
|
+
return {
|
|
15315
|
+
args: [...input.launchContract.argsPrefix ?? [], ...input.args],
|
|
15316
|
+
bin: nativeRuntime.executablePath,
|
|
15317
|
+
env: buildOfficialCodexRuntimeEnv({
|
|
15318
|
+
env: input.env,
|
|
15319
|
+
packageRoot: nativeRuntime.packageRoot,
|
|
15320
|
+
scriptPath: input.launchContract.scriptPath
|
|
15321
|
+
}),
|
|
15322
|
+
processLaunchKind: "native_binary"
|
|
15323
|
+
};
|
|
15324
|
+
}
|
|
15325
|
+
function resolveOfficialCodexNativeRuntime(launchContract) {
|
|
15326
|
+
if (launchContract.kind !== "node_script") return null;
|
|
15327
|
+
const layout = CODEX_PLATFORM_LAYOUTS[`${process.platform}-${process.arch}`];
|
|
15328
|
+
if (!layout) return null;
|
|
15329
|
+
try {
|
|
15330
|
+
const scriptPath = realpathSync(launchContract.scriptPath);
|
|
15331
|
+
const packageRoot = findOfficialCodexPackageRoot(scriptPath);
|
|
15332
|
+
if (!packageRoot) return null;
|
|
15333
|
+
const require = createRequire(scriptPath);
|
|
15334
|
+
const platformPackageRoot = resolvePlatformPackageRoot({
|
|
15335
|
+
packageName: layout.packageName,
|
|
15336
|
+
require
|
|
15337
|
+
});
|
|
15338
|
+
const executablePath = join(platformPackageRoot ? join(platformPackageRoot, "vendor") : join(packageRoot, "vendor"), layout.targetTriple, "bin", process.platform === "win32" ? "codex.exe" : "codex");
|
|
15339
|
+
accessSync(executablePath, constants.F_OK);
|
|
15340
|
+
accessSync(executablePath, constants.X_OK);
|
|
15341
|
+
return {
|
|
15342
|
+
executablePath: realpathSync(executablePath),
|
|
15343
|
+
packageRoot
|
|
15344
|
+
};
|
|
15345
|
+
} catch {
|
|
15346
|
+
return null;
|
|
15347
|
+
}
|
|
15348
|
+
}
|
|
15349
|
+
function findOfficialCodexPackageRoot(scriptPath) {
|
|
15350
|
+
let current = dirname(scriptPath);
|
|
15351
|
+
const filesystemRoot = parse(current).root;
|
|
15352
|
+
for (let depth = 0; depth < 4 && current !== filesystemRoot; depth += 1) {
|
|
15353
|
+
const packageJsonPath = join(current, "package.json");
|
|
15354
|
+
if (existsSync(packageJsonPath)) {
|
|
15355
|
+
const packageJson = readPackageJson(packageJsonPath);
|
|
15356
|
+
const binPath = readCodexBinPath(packageJson);
|
|
15357
|
+
if (packageJson.name === "@openai/codex" && binPath && realpathSync(resolve(current, binPath)) === scriptPath) return realpathSync(current);
|
|
15358
|
+
}
|
|
15359
|
+
current = dirname(current);
|
|
15360
|
+
}
|
|
15361
|
+
return null;
|
|
15362
|
+
}
|
|
15363
|
+
function resolvePlatformPackageRoot(input) {
|
|
15364
|
+
try {
|
|
15365
|
+
const packageJsonPath = input.require.resolve(`${input.packageName}/package.json`);
|
|
15366
|
+
const packageJson = readPackageJson(packageJsonPath);
|
|
15367
|
+
return packageJson.name === "@openai/codex" || packageJson.name === input.packageName ? realpathSync(dirname(packageJsonPath)) : null;
|
|
15368
|
+
} catch {
|
|
15369
|
+
return null;
|
|
15370
|
+
}
|
|
15371
|
+
}
|
|
15372
|
+
function readPackageJson(packageJsonPath) {
|
|
15373
|
+
return JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
15374
|
+
}
|
|
15375
|
+
function readCodexBinPath(packageJson) {
|
|
15376
|
+
if (typeof packageJson.bin === "string") return packageJson.bin;
|
|
15377
|
+
const binPath = packageJson.bin?.codex;
|
|
15378
|
+
return typeof binPath === "string" ? binPath : null;
|
|
15379
|
+
}
|
|
15380
|
+
function buildOfficialCodexRuntimeEnv(input) {
|
|
15381
|
+
const env = {
|
|
15382
|
+
...Object.fromEntries(Object.entries(input.env).filter(([name]) => !CODEX_MANAGED_ENV_NAMES.has(name))),
|
|
15383
|
+
CODEX_MANAGED_PACKAGE_ROOT: input.packageRoot
|
|
15384
|
+
};
|
|
15385
|
+
env[resolveManagedByEnvName({
|
|
15386
|
+
env,
|
|
15387
|
+
packageRoot: input.packageRoot,
|
|
15388
|
+
scriptPath: input.scriptPath
|
|
15389
|
+
})] = "1";
|
|
15390
|
+
return env;
|
|
15391
|
+
}
|
|
15392
|
+
function resolveManagedByEnvName(input) {
|
|
15393
|
+
if (input.packageRoot.includes(".bun/install/global") || input.packageRoot.includes(".bun\\install\\global") || BUN_USER_AGENT_RE.test(input.env.npm_config_user_agent ?? "") || (input.env.npm_execpath ?? "").includes("bun")) return "CODEX_MANAGED_BY_BUN";
|
|
15394
|
+
if (input.packageRoot.includes(`${join("node_modules", ".pnpm")}`) || input.scriptPath.includes(`${join("node_modules", ".pnpm")}`)) return "CODEX_MANAGED_BY_PNPM";
|
|
15395
|
+
return "CODEX_MANAGED_BY_NPM";
|
|
15396
|
+
}
|
|
15397
|
+
//#endregion
|
|
15258
15398
|
//#region ../../runtime/adapters/codex/dist/transport/codex-file-access-boundary.js
|
|
15259
15399
|
const PROFILE_NAME = "openmeld_computer_boundary";
|
|
15260
15400
|
const TRAILING_PATH_SEPARATORS_PATTERN = /[\\/]+$/u;
|
|
@@ -15354,6 +15494,7 @@ function tomlString(value) {
|
|
|
15354
15494
|
//#endregion
|
|
15355
15495
|
//#region ../../runtime/adapters/codex/dist/transport/codex-app-server-transport.js
|
|
15356
15496
|
const APP_SERVER_PROCESS_KILL_GRACE_MS = 1e3;
|
|
15497
|
+
const DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS = 15e3;
|
|
15357
15498
|
var CodexAppServerTransportError = class extends Error {
|
|
15358
15499
|
code;
|
|
15359
15500
|
errorType;
|
|
@@ -15377,6 +15518,7 @@ async function invokeCodexAppServerTransport(input) {
|
|
|
15377
15518
|
return await withCodexAppServerSession({
|
|
15378
15519
|
codexTimeoutMs: input.codexTimeoutMs,
|
|
15379
15520
|
codexWorkdir: input.codexWorkdir,
|
|
15521
|
+
controlRequestTimeoutMs: input.controlRequestTimeoutMs,
|
|
15380
15522
|
computerFileAccessBoundary: input.computerFileAccessBoundary,
|
|
15381
15523
|
env: input.env,
|
|
15382
15524
|
executionMode: input.executionMode,
|
|
@@ -15384,7 +15526,8 @@ async function invokeCodexAppServerTransport(input) {
|
|
|
15384
15526
|
permissionMode: input.agentControllerPermissionMode,
|
|
15385
15527
|
onInteractionRequest: input.onInteractionRequest,
|
|
15386
15528
|
onProcessControlEvent: input.onProcessControlEvent,
|
|
15387
|
-
onRuntimeEvent: input.onRuntimeEvent
|
|
15529
|
+
onRuntimeEvent: input.onRuntimeEvent,
|
|
15530
|
+
startupTimeoutMs: input.startupTimeoutMs
|
|
15388
15531
|
}, async (session) => {
|
|
15389
15532
|
const threadContext = await resolveDispatchThreadContext({
|
|
15390
15533
|
conversationPolicyParams,
|
|
@@ -15407,7 +15550,7 @@ async function invokeCodexAppServerTransport(input) {
|
|
|
15407
15550
|
threadSource: threadContext.threadSource
|
|
15408
15551
|
});
|
|
15409
15552
|
session.emitProviderConversationObserved(threadId);
|
|
15410
|
-
const turn = readTurnStartResponse(await session.
|
|
15553
|
+
const turn = readTurnStartResponse(await session.requestControl("turn/start", {
|
|
15411
15554
|
...permissionModeParams.turn,
|
|
15412
15555
|
...collaborationMode ? { collaborationMode } : {},
|
|
15413
15556
|
cwd: input.codexWorkdir,
|
|
@@ -15418,6 +15561,9 @@ async function invokeCodexAppServerTransport(input) {
|
|
|
15418
15561
|
type: "text"
|
|
15419
15562
|
}],
|
|
15420
15563
|
threadId
|
|
15564
|
+
}, {
|
|
15565
|
+
code: "runtime.turn_start_timeout",
|
|
15566
|
+
operation: "turn/start"
|
|
15421
15567
|
}));
|
|
15422
15568
|
const turnId = readRequiredText(turn.id, "turn/start response turn.id");
|
|
15423
15569
|
const unregisterActiveTurn = session.registerActiveTurn({
|
|
@@ -15501,22 +15647,30 @@ async function verifyCodexAppServerThread(input) {
|
|
|
15501
15647
|
env: input.env,
|
|
15502
15648
|
launchContract: input.launchContract
|
|
15503
15649
|
}, async (session) => {
|
|
15504
|
-
return { threadId: readThreadIdFromResponse(await session.
|
|
15650
|
+
return { threadId: readThreadIdFromResponse(await session.requestControl("thread/resume", {
|
|
15505
15651
|
approvalPolicy: "untrusted",
|
|
15506
15652
|
cwd: input.codexWorkdir,
|
|
15653
|
+
excludeTurns: true,
|
|
15507
15654
|
threadId
|
|
15655
|
+
}, {
|
|
15656
|
+
code: "context.resume_timeout",
|
|
15657
|
+
operation: "thread/resume"
|
|
15508
15658
|
})) };
|
|
15509
15659
|
});
|
|
15510
15660
|
}
|
|
15511
15661
|
async function resolveDispatchThreadContext(input) {
|
|
15512
15662
|
const existingThreadId = normalizeOptionalText$52(input.threadId);
|
|
15513
|
-
if (existingThreadId) return readThreadContextFromResponse(await input.session.
|
|
15663
|
+
if (existingThreadId) return readThreadContextFromResponse(await input.session.requestControl("thread/resume", {
|
|
15514
15664
|
...input.conversationPolicyParams.model ? { model: input.conversationPolicyParams.model } : {},
|
|
15515
15665
|
...input.permissionModeParams,
|
|
15516
15666
|
cwd: input.codexWorkdir,
|
|
15667
|
+
excludeTurns: true,
|
|
15517
15668
|
threadId: existingThreadId
|
|
15669
|
+
}, {
|
|
15670
|
+
code: "context.resume_timeout",
|
|
15671
|
+
operation: "thread/resume"
|
|
15518
15672
|
}));
|
|
15519
|
-
return readThreadContextFromResponse(await input.session.
|
|
15673
|
+
return readThreadContextFromResponse(await input.session.requestControl("thread/start", {
|
|
15520
15674
|
...input.conversationPolicyParams.model ? { model: input.conversationPolicyParams.model } : {},
|
|
15521
15675
|
...input.permissionModeParams,
|
|
15522
15676
|
cwd: input.codexWorkdir,
|
|
@@ -15524,6 +15678,9 @@ async function resolveDispatchThreadContext(input) {
|
|
|
15524
15678
|
developerInstructions: input.instructionPrompt.developerInstructions,
|
|
15525
15679
|
threadSource: buildOpenMeldCodexThreadSource(input.instructionPrompt.instructionEpoch)
|
|
15526
15680
|
} : { threadSource: "user" }
|
|
15681
|
+
}, {
|
|
15682
|
+
code: "runtime.thread_start_timeout",
|
|
15683
|
+
operation: "thread/start"
|
|
15527
15684
|
}));
|
|
15528
15685
|
}
|
|
15529
15686
|
function resolveCodexTurnPrompt(input) {
|
|
@@ -15542,7 +15699,10 @@ async function resolveCodexAppServerCollaborationMode(input) {
|
|
|
15542
15699
|
errorType: "adapter",
|
|
15543
15700
|
message: "protocol.invalid: Codex Plan collaboration mode requires a resolved model"
|
|
15544
15701
|
});
|
|
15545
|
-
const response = toRecord$8(await input.session.
|
|
15702
|
+
const response = toRecord$8(await input.session.requestControl("collaborationMode/list", {}, {
|
|
15703
|
+
code: "runtime.control_timeout",
|
|
15704
|
+
operation: "collaborationMode/list"
|
|
15705
|
+
}));
|
|
15546
15706
|
const preset = (Array.isArray(response?.data) ? response.data : []).map(readCodexAppServerCollaborationModePreset).find((candidate) => candidate?.mode === "plan");
|
|
15547
15707
|
if (!preset) throw new CodexAppServerTransportError({
|
|
15548
15708
|
code: "protocol.invalid",
|
|
@@ -15648,6 +15808,7 @@ async function withCodexAppServerSession(input, callback) {
|
|
|
15648
15808
|
var CodexAppServerSession = class {
|
|
15649
15809
|
#codexTimeoutMs;
|
|
15650
15810
|
#codexWorkdir;
|
|
15811
|
+
#controlRequestTimeoutMs;
|
|
15651
15812
|
#computerFileAccessBoundary;
|
|
15652
15813
|
#env;
|
|
15653
15814
|
#launchContract;
|
|
@@ -15669,6 +15830,8 @@ var CodexAppServerSession = class {
|
|
|
15669
15830
|
#latestTokenUsage = null;
|
|
15670
15831
|
#nextRequestId = 1;
|
|
15671
15832
|
#processTimeout = null;
|
|
15833
|
+
#startupTimeoutMs;
|
|
15834
|
+
#startupTimeout = null;
|
|
15672
15835
|
#settledFailure = null;
|
|
15673
15836
|
#waiters = /* @__PURE__ */ new Set();
|
|
15674
15837
|
#lifecycle = {
|
|
@@ -15685,6 +15848,7 @@ var CodexAppServerSession = class {
|
|
|
15685
15848
|
constructor(input) {
|
|
15686
15849
|
this.#codexTimeoutMs = input.codexTimeoutMs;
|
|
15687
15850
|
this.#codexWorkdir = input.codexWorkdir;
|
|
15851
|
+
this.#controlRequestTimeoutMs = input.controlRequestTimeoutMs;
|
|
15688
15852
|
this.#computerFileAccessBoundary = input.computerFileAccessBoundary;
|
|
15689
15853
|
this.#env = input.env;
|
|
15690
15854
|
this.#executionMode = input.executionMode;
|
|
@@ -15693,9 +15857,10 @@ var CodexAppServerSession = class {
|
|
|
15693
15857
|
this.#onProcessControlEvent = input.onProcessControlEvent;
|
|
15694
15858
|
this.#onRuntimeEvent = input.onRuntimeEvent;
|
|
15695
15859
|
this.#permissionMode = input.permissionMode;
|
|
15860
|
+
this.#startupTimeoutMs = input.startupTimeoutMs ?? DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS;
|
|
15696
15861
|
}
|
|
15697
15862
|
async start() {
|
|
15698
|
-
const
|
|
15863
|
+
const launch = buildCodexAppServerLaunch({
|
|
15699
15864
|
args: [
|
|
15700
15865
|
...this.#computerFileAccessBoundary ? buildCodexFileAccessBoundaryGlobalArgs({
|
|
15701
15866
|
boundary: this.#computerFileAccessBoundary,
|
|
@@ -15706,17 +15871,18 @@ var CodexAppServerSession = class {
|
|
|
15706
15871
|
"--listen",
|
|
15707
15872
|
"stdio://"
|
|
15708
15873
|
],
|
|
15709
|
-
launchContract: this.#launchContract
|
|
15710
|
-
});
|
|
15711
|
-
const runtimeProcess = spawnAgentControllerProcess({
|
|
15712
|
-
args: invocation.args,
|
|
15713
|
-
bin: invocation.bin,
|
|
15714
|
-
cwd: this.#codexWorkdir,
|
|
15715
15874
|
env: {
|
|
15716
15875
|
...process.env,
|
|
15717
15876
|
...this.#env ?? {}
|
|
15718
15877
|
},
|
|
15719
|
-
|
|
15878
|
+
launchContract: this.#launchContract
|
|
15879
|
+
});
|
|
15880
|
+
const runtimeProcess = spawnAgentControllerProcess({
|
|
15881
|
+
args: launch.args,
|
|
15882
|
+
bin: launch.bin,
|
|
15883
|
+
cwd: tmpdir(),
|
|
15884
|
+
env: launch.env,
|
|
15885
|
+
shell: launch.shell ?? false
|
|
15720
15886
|
});
|
|
15721
15887
|
const { child, processId, signalTarget } = runtimeProcess;
|
|
15722
15888
|
this.#child = child;
|
|
@@ -15726,7 +15892,9 @@ var CodexAppServerSession = class {
|
|
|
15726
15892
|
this.#lifecycle.processSpawnedAtMs = processSpawnedAtMs;
|
|
15727
15893
|
this.#emitRuntimeEvent({
|
|
15728
15894
|
phase: "process_spawned",
|
|
15895
|
+
processLaunchKind: launch.processLaunchKind,
|
|
15729
15896
|
processId,
|
|
15897
|
+
processWorkingDirectoryKind: "runtime_host",
|
|
15730
15898
|
signalTarget,
|
|
15731
15899
|
tsMs: processSpawnedAtMs
|
|
15732
15900
|
});
|
|
@@ -15810,13 +15978,35 @@ var CodexAppServerSession = class {
|
|
|
15810
15978
|
}));
|
|
15811
15979
|
this.#requestProcessTermination();
|
|
15812
15980
|
}, this.#codexTimeoutMs);
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15981
|
+
this.#startupTimeout = setTimeout(() => {
|
|
15982
|
+
const timeoutTriggeredAtMs = Date.now();
|
|
15983
|
+
this.#lifecycle.timeoutTriggeredAtMs = timeoutTriggeredAtMs;
|
|
15984
|
+
this.#emitRuntimeEvent({
|
|
15985
|
+
phase: "timeout_triggered",
|
|
15986
|
+
processId,
|
|
15987
|
+
tsMs: timeoutTriggeredAtMs
|
|
15988
|
+
});
|
|
15989
|
+
this.#failAll(new CodexAppServerTransportError({
|
|
15990
|
+
code: "runtime.startup_timeout",
|
|
15991
|
+
errorType: "timeout",
|
|
15992
|
+
message: `runtime.startup_timeout: codex app-server did not initialize within ${this.#startupTimeoutMs}ms`
|
|
15993
|
+
}));
|
|
15994
|
+
this.#requestProcessTermination();
|
|
15995
|
+
}, this.#startupTimeoutMs);
|
|
15996
|
+
try {
|
|
15997
|
+
await this.request("initialize", {
|
|
15998
|
+
capabilities: { experimentalApi: true },
|
|
15999
|
+
clientInfo: {
|
|
16000
|
+
name: "openmeld",
|
|
16001
|
+
version: "0.0.0"
|
|
16002
|
+
}
|
|
16003
|
+
});
|
|
16004
|
+
} finally {
|
|
16005
|
+
if (this.#startupTimeout !== null) {
|
|
16006
|
+
clearTimeout(this.#startupTimeout);
|
|
16007
|
+
this.#startupTimeout = null;
|
|
15818
16008
|
}
|
|
15819
|
-
}
|
|
16009
|
+
}
|
|
15820
16010
|
this.notify("initialized", {});
|
|
15821
16011
|
}
|
|
15822
16012
|
async close() {
|
|
@@ -15844,16 +16034,40 @@ var CodexAppServerSession = class {
|
|
|
15844
16034
|
});
|
|
15845
16035
|
});
|
|
15846
16036
|
}
|
|
15847
|
-
async request(method, params) {
|
|
16037
|
+
async request(method, params, timeout) {
|
|
15848
16038
|
if (this.#settledFailure) throw this.#settledFailure;
|
|
15849
16039
|
const id = this.#nextRequestId;
|
|
15850
16040
|
this.#nextRequestId += 1;
|
|
15851
16041
|
const requestPromise = new Promise((resolve, reject) => {
|
|
15852
16042
|
this.#pending.set(id, {
|
|
15853
16043
|
reject,
|
|
15854
|
-
resolve
|
|
16044
|
+
resolve,
|
|
16045
|
+
timeout: null
|
|
15855
16046
|
});
|
|
15856
16047
|
});
|
|
16048
|
+
if (timeout) {
|
|
16049
|
+
const pending = this.#pending.get(id);
|
|
16050
|
+
if (pending) {
|
|
16051
|
+
pending.timeout = setTimeout(() => {
|
|
16052
|
+
if (!this.#pending.has(id)) return;
|
|
16053
|
+
const timeoutTriggeredAtMs = Date.now();
|
|
16054
|
+
this.#lifecycle.timeoutTriggeredAtMs = timeoutTriggeredAtMs;
|
|
16055
|
+
this.#emitRuntimeEvent({
|
|
16056
|
+
phase: "timeout_triggered",
|
|
16057
|
+
processId: this.#lifecycle.processId,
|
|
16058
|
+
tsMs: timeoutTriggeredAtMs
|
|
16059
|
+
});
|
|
16060
|
+
const error = new CodexAppServerTransportError({
|
|
16061
|
+
code: timeout.code,
|
|
16062
|
+
errorType: "timeout",
|
|
16063
|
+
message: `${timeout.code}: codex app-server did not acknowledge ${timeout.operation} within ${timeout.timeoutMs}ms`
|
|
16064
|
+
});
|
|
16065
|
+
this.#failAll(error);
|
|
16066
|
+
this.#requestProcessTermination();
|
|
16067
|
+
}, timeout.timeoutMs);
|
|
16068
|
+
pending.timeout.unref?.();
|
|
16069
|
+
}
|
|
16070
|
+
}
|
|
15857
16071
|
this.#write({
|
|
15858
16072
|
id,
|
|
15859
16073
|
jsonrpc: "2.0",
|
|
@@ -15862,6 +16076,15 @@ var CodexAppServerSession = class {
|
|
|
15862
16076
|
});
|
|
15863
16077
|
return await requestPromise;
|
|
15864
16078
|
}
|
|
16079
|
+
async requestControl(method, params, timeout) {
|
|
16080
|
+
return await this.request(method, params, {
|
|
16081
|
+
...timeout,
|
|
16082
|
+
timeoutMs: resolveCodexAppServerControlRequestTimeoutMs({
|
|
16083
|
+
operation: timeout.operation,
|
|
16084
|
+
...this.#controlRequestTimeoutMs === void 0 ? {} : { overrideMs: this.#controlRequestTimeoutMs }
|
|
16085
|
+
})
|
|
16086
|
+
});
|
|
16087
|
+
}
|
|
15865
16088
|
notify(method, params) {
|
|
15866
16089
|
this.#write({
|
|
15867
16090
|
jsonrpc: "2.0",
|
|
@@ -15967,6 +16190,7 @@ var CodexAppServerSession = class {
|
|
|
15967
16190
|
const pending = this.#pending.get(id);
|
|
15968
16191
|
if (!pending) return;
|
|
15969
16192
|
this.#pending.delete(id);
|
|
16193
|
+
if (pending.timeout !== null) clearTimeout(pending.timeout);
|
|
15970
16194
|
if (message.error) {
|
|
15971
16195
|
pending.reject(toJsonRpcTransportError$1(message.error));
|
|
15972
16196
|
return;
|
|
@@ -16078,7 +16302,10 @@ var CodexAppServerSession = class {
|
|
|
16078
16302
|
}
|
|
16079
16303
|
#failAll(error) {
|
|
16080
16304
|
if (!this.#settledFailure) this.#settledFailure = error;
|
|
16081
|
-
for (const pending of this.#pending.values())
|
|
16305
|
+
for (const pending of this.#pending.values()) {
|
|
16306
|
+
if (pending.timeout !== null) clearTimeout(pending.timeout);
|
|
16307
|
+
pending.reject(error);
|
|
16308
|
+
}
|
|
16082
16309
|
this.#pending.clear();
|
|
16083
16310
|
for (const waiter of this.#waiters) waiter.reject(error);
|
|
16084
16311
|
this.#waiters.clear();
|
|
@@ -16101,6 +16328,10 @@ var CodexAppServerSession = class {
|
|
|
16101
16328
|
clearTimeout(this.#forceKillTimeout);
|
|
16102
16329
|
this.#forceKillTimeout = null;
|
|
16103
16330
|
}
|
|
16331
|
+
if (this.#startupTimeout !== null) {
|
|
16332
|
+
clearTimeout(this.#startupTimeout);
|
|
16333
|
+
this.#startupTimeout = null;
|
|
16334
|
+
}
|
|
16104
16335
|
}
|
|
16105
16336
|
readInteractionFailure() {
|
|
16106
16337
|
return this.#interactionFailure;
|
|
@@ -17284,41 +17515,78 @@ async function invokeCodexWithSingleContextHeal(input) {
|
|
|
17284
17515
|
};
|
|
17285
17516
|
}
|
|
17286
17517
|
async function invokeCodexAppServer(input) {
|
|
17287
|
-
|
|
17288
|
-
|
|
17289
|
-
|
|
17290
|
-
|
|
17291
|
-
codexTimeoutMs: input.codexTimeoutMs,
|
|
17292
|
-
codexWorkdir: input.codexWorkdir,
|
|
17293
|
-
conversationPolicy: input.conversationPolicy,
|
|
17294
|
-
computerFileAccessBoundary: input.computerFileAccessBoundary,
|
|
17295
|
-
env: input.env,
|
|
17296
|
-
executionMode: input.executionMode,
|
|
17297
|
-
instructionPrompt: input.instructionPrompt,
|
|
17298
|
-
...input.onProcessControlEvent ? { onProcessControlEvent: input.onProcessControlEvent } : {},
|
|
17299
|
-
...input.onActiveTurn ? { onActiveTurn: input.onActiveTurn } : {},
|
|
17300
|
-
...input.onInteractionRequest ? { onInteractionRequest: input.onInteractionRequest } : {},
|
|
17301
|
-
...input.onPreview ? { onPreview: input.onPreview } : {},
|
|
17302
|
-
...input.onRuntimeEvent ? { onRuntimeEvent: input.onRuntimeEvent } : {},
|
|
17303
|
-
prompt: input.prompt,
|
|
17304
|
-
streamingMode: input.streamingMode,
|
|
17305
|
-
taskId: input.taskId,
|
|
17306
|
-
threadId: input.threadId
|
|
17307
|
-
});
|
|
17308
|
-
} catch (error) {
|
|
17309
|
-
if (error instanceof CodexRuntimeError) throw error;
|
|
17310
|
-
if (error && typeof error === "object" && "code" in error && typeof error.code === "string" && "errorType" in error && typeof error.errorType === "string" && error instanceof Error) throw new CodexRuntimeError({
|
|
17311
|
-
code: error.code,
|
|
17312
|
-
errorType: error.errorType,
|
|
17313
|
-
message: error.message
|
|
17314
|
-
});
|
|
17315
|
-
throw new CodexRuntimeError({
|
|
17316
|
-
code: "upstream_unreachable",
|
|
17518
|
+
const result = await invokeWithSingleContextHeal({
|
|
17519
|
+
contextId: input.threadId,
|
|
17520
|
+
createRebuildFailedError: (error) => new CodexRuntimeError({
|
|
17521
|
+
code: "context.rebuild_failed",
|
|
17317
17522
|
errorType: "adapter",
|
|
17318
|
-
message: `
|
|
17319
|
-
})
|
|
17523
|
+
message: `context.rebuild_failed: ${toErrorMessage$31(error)}`
|
|
17524
|
+
}),
|
|
17525
|
+
invokeOnce: (threadId) => invokeCodexAppServerOnceWithAdmissionRetry({
|
|
17526
|
+
...input,
|
|
17527
|
+
threadId
|
|
17528
|
+
}).then((value) => ({
|
|
17529
|
+
contextId: value.threadId,
|
|
17530
|
+
output: value.output,
|
|
17531
|
+
telemetry: value.telemetry
|
|
17532
|
+
})),
|
|
17533
|
+
isContextLostError: isCodexAppServerContextLostError
|
|
17534
|
+
});
|
|
17535
|
+
return {
|
|
17536
|
+
contextHealed: result.contextHealed,
|
|
17537
|
+
output: result.output,
|
|
17538
|
+
...result.telemetry ? { telemetry: result.telemetry } : {},
|
|
17539
|
+
threadId: result.contextId
|
|
17540
|
+
};
|
|
17541
|
+
}
|
|
17542
|
+
async function invokeCodexAppServerOnceWithAdmissionRetry(input) {
|
|
17543
|
+
let startupRetried = false;
|
|
17544
|
+
let freshThreadAdmissionRetried = false;
|
|
17545
|
+
while (true) try {
|
|
17546
|
+
return await invokeCodexAppServerTransport(input);
|
|
17547
|
+
} catch (error) {
|
|
17548
|
+
if (error instanceof CodexAppServerTransportError && error.code === "runtime.startup_timeout") {
|
|
17549
|
+
if (!startupRetried) {
|
|
17550
|
+
startupRetried = true;
|
|
17551
|
+
continue;
|
|
17552
|
+
}
|
|
17553
|
+
throw new CodexRuntimeError({
|
|
17554
|
+
code: error.code,
|
|
17555
|
+
errorType: error.errorType,
|
|
17556
|
+
message: `${error.message} after one automatic retry`
|
|
17557
|
+
});
|
|
17558
|
+
}
|
|
17559
|
+
if (input.threadId === null && error instanceof CodexAppServerTransportError && error.code === "runtime.thread_start_timeout") {
|
|
17560
|
+
if (!freshThreadAdmissionRetried) {
|
|
17561
|
+
freshThreadAdmissionRetried = true;
|
|
17562
|
+
continue;
|
|
17563
|
+
}
|
|
17564
|
+
throw new CodexRuntimeError({
|
|
17565
|
+
code: error.code,
|
|
17566
|
+
errorType: error.errorType,
|
|
17567
|
+
message: `${error.message} after one automatic fresh-thread admission retry`
|
|
17568
|
+
});
|
|
17569
|
+
}
|
|
17570
|
+
throw toCodexRuntimeError(error);
|
|
17320
17571
|
}
|
|
17321
17572
|
}
|
|
17573
|
+
function isCodexAppServerContextLostError(error) {
|
|
17574
|
+
if (error && typeof error === "object" && "code" in error && error.code === "context.resume_timeout") return true;
|
|
17575
|
+
return isLikelyContextLostError(error instanceof Error ? error.message : String(error));
|
|
17576
|
+
}
|
|
17577
|
+
function toCodexRuntimeError(error) {
|
|
17578
|
+
if (error instanceof CodexRuntimeError) return error;
|
|
17579
|
+
if (error && typeof error === "object" && "code" in error && typeof error.code === "string" && "errorType" in error && typeof error.errorType === "string" && error instanceof Error) return new CodexRuntimeError({
|
|
17580
|
+
code: error.code,
|
|
17581
|
+
errorType: error.errorType,
|
|
17582
|
+
message: error.message
|
|
17583
|
+
});
|
|
17584
|
+
return new CodexRuntimeError({
|
|
17585
|
+
code: "upstream_unreachable",
|
|
17586
|
+
errorType: "adapter",
|
|
17587
|
+
message: `upstream_unreachable: ${toErrorMessage$31(error)}`
|
|
17588
|
+
});
|
|
17589
|
+
}
|
|
17322
17590
|
async function invokeCodexOnce(input) {
|
|
17323
17591
|
try {
|
|
17324
17592
|
return await invokeCodexCliTransport({
|
|
@@ -17584,6 +17852,7 @@ const resolveDefaultCodexAppServerInvoke = (input) => {
|
|
|
17584
17852
|
return {
|
|
17585
17853
|
contextDelta: {
|
|
17586
17854
|
agentControllerConversationId: result.threadId,
|
|
17855
|
+
...result.contextHealed ? { refreshed: true } : {},
|
|
17587
17856
|
...agentControllerConversation ? { agentControllerConversation } : {}
|
|
17588
17857
|
},
|
|
17589
17858
|
output: result.output,
|
|
@@ -33545,9 +33814,9 @@ function createModelCatalogReadSession(input) {
|
|
|
33545
33814
|
async function readModelCatalogOnce(baseUrl) {
|
|
33546
33815
|
try {
|
|
33547
33816
|
const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
|
|
33548
|
-
import("./dist-
|
|
33549
|
-
import("./base-url-
|
|
33550
|
-
import("./api-client-foundation-
|
|
33817
|
+
import("./dist-CftWiExS.js").then((n) => n.C),
|
|
33818
|
+
import("./base-url-DXnn41nz.js").then((n) => n.n),
|
|
33819
|
+
import("./api-client-foundation-BsyR-U-n.js").then((n) => n.t)
|
|
33551
33820
|
]);
|
|
33552
33821
|
if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
|
|
33553
33822
|
const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
|
|
@@ -38868,6 +39137,7 @@ async function runDaemonServiceLifecycle(input) {
|
|
|
38868
39137
|
failureStage: state.failureStage,
|
|
38869
39138
|
evidencePath: state.evidencePath,
|
|
38870
39139
|
recoveryStatus: "failed_before_safe_state",
|
|
39140
|
+
errorCode: resolveLifecycleFailureErrorCode(error),
|
|
38871
39141
|
errorMessage: toErrorMessage$37(error)
|
|
38872
39142
|
};
|
|
38873
39143
|
} finally {
|
|
@@ -39043,6 +39313,7 @@ async function executeDaemonServiceLifecycle(input) {
|
|
|
39043
39313
|
}
|
|
39044
39314
|
async function recoverLifecycleFailure(input) {
|
|
39045
39315
|
const originalErrorMessage = toErrorMessage$37(input.error);
|
|
39316
|
+
const originalErrorCode = resolveLifecycleFailureErrorCode(input.error);
|
|
39046
39317
|
const originalFailureStage = resolveLifecycleFailureStage(input.error, input.state.failureStage);
|
|
39047
39318
|
const originalReasonCodes = resolveLifecycleFailureReasonCodes(input.error);
|
|
39048
39319
|
const restartedCurrentVersion = await recoverBackgroundLifecycleVerificationFailure({
|
|
@@ -39085,6 +39356,7 @@ async function recoverLifecycleFailure(input) {
|
|
|
39085
39356
|
failureStage: originalFailureStage,
|
|
39086
39357
|
evidencePath: input.state.evidencePath,
|
|
39087
39358
|
recoveryStatus: "restored_verified_previous_state",
|
|
39359
|
+
errorCode: originalErrorCode,
|
|
39088
39360
|
errorMessage: originalErrorMessage
|
|
39089
39361
|
};
|
|
39090
39362
|
}
|
|
@@ -39114,6 +39386,7 @@ async function recoverLifecycleFailure(input) {
|
|
|
39114
39386
|
failureStage: originalFailureStage,
|
|
39115
39387
|
evidencePath: input.state.evidencePath,
|
|
39116
39388
|
recoveryStatus: "failed_before_safe_state",
|
|
39389
|
+
errorCode: originalErrorCode,
|
|
39117
39390
|
errorMessage: originalErrorMessage
|
|
39118
39391
|
};
|
|
39119
39392
|
}
|
|
@@ -39826,6 +40099,20 @@ function resolveLifecycleFailureReasonCodes(error) {
|
|
|
39826
40099
|
if (error instanceof DaemonServiceLifecycleStageError) return error.reasonCodes;
|
|
39827
40100
|
return [];
|
|
39828
40101
|
}
|
|
40102
|
+
function resolveLifecycleFailureErrorCode(error) {
|
|
40103
|
+
const visited = /* @__PURE__ */ new Set();
|
|
40104
|
+
let current = error;
|
|
40105
|
+
while (current && !visited.has(current)) {
|
|
40106
|
+
visited.add(current);
|
|
40107
|
+
if (current instanceof LocalDaemonControlPlaneClientError) return current.code;
|
|
40108
|
+
if (current instanceof Error && current.cause) {
|
|
40109
|
+
current = current.cause;
|
|
40110
|
+
continue;
|
|
40111
|
+
}
|
|
40112
|
+
break;
|
|
40113
|
+
}
|
|
40114
|
+
return null;
|
|
40115
|
+
}
|
|
39829
40116
|
function isPidAlive$3(pid) {
|
|
39830
40117
|
try {
|
|
39831
40118
|
process$1.kill(pid, 0);
|
|
@@ -39917,6 +40204,7 @@ async function runDaemonServiceFullAlignment(input) {
|
|
|
39917
40204
|
backupDataPath: null,
|
|
39918
40205
|
failureStage: null,
|
|
39919
40206
|
evidencePath: null,
|
|
40207
|
+
errorCode: null,
|
|
39920
40208
|
errorMessage: buildDaemonServiceAlignmentFailureMessage(error)
|
|
39921
40209
|
};
|
|
39922
40210
|
}
|
|
@@ -39999,6 +40287,7 @@ function mapLifecycleResultToAlignmentResult(input) {
|
|
|
39999
40287
|
backupDataPath: input.lifecycleResult.backupDataPath,
|
|
40000
40288
|
failureStage: input.lifecycleResult.failureStage,
|
|
40001
40289
|
evidencePath: input.lifecycleResult.evidencePath,
|
|
40290
|
+
errorCode: input.lifecycleResult.errorCode,
|
|
40002
40291
|
errorMessage: input.lifecycleResult.errorMessage
|
|
40003
40292
|
};
|
|
40004
40293
|
default: {
|
|
@@ -53531,11 +53820,13 @@ const computerFileAccessStoreUpdateTails = /* @__PURE__ */ new Map();
|
|
|
53531
53820
|
function resolveComputerFileAccessStorePath(dataRootPath) {
|
|
53532
53821
|
return join(dataRootPath, "computer-file-access-v1.json");
|
|
53533
53822
|
}
|
|
53534
|
-
var ComputerFileAccessStoreError = class extends
|
|
53823
|
+
var ComputerFileAccessStoreError = class extends DaemonServiceRunError {
|
|
53535
53824
|
#localDiagnosticContext;
|
|
53536
|
-
code;
|
|
53537
53825
|
constructor(code, message, options) {
|
|
53538
|
-
super(
|
|
53826
|
+
super({
|
|
53827
|
+
code,
|
|
53828
|
+
message
|
|
53829
|
+
});
|
|
53539
53830
|
this.#localDiagnosticContext = options?.localDiagnosticContext;
|
|
53540
53831
|
this.code = code;
|
|
53541
53832
|
this.name = "ComputerFileAccessStoreError";
|
|
@@ -53631,11 +53922,25 @@ async function canonicalizeFolder(folder) {
|
|
|
53631
53922
|
canonicalPath = await realpath(folder);
|
|
53632
53923
|
} catch (error) {
|
|
53633
53924
|
if (error.code === "ENOENT") throw new ComputerFileAccessStoreError("computer.file_access.path_not_found", "OpenMeld couldn’t find that folder on this computer. Check the path and try again.");
|
|
53634
|
-
throw
|
|
53925
|
+
throw computerFileAccessIoError({
|
|
53926
|
+
error,
|
|
53927
|
+
operation: "canonicalize_folder",
|
|
53928
|
+
path: folder
|
|
53929
|
+
});
|
|
53635
53930
|
}
|
|
53636
|
-
if (!(await stat(canonicalPath)
|
|
53637
|
-
|
|
53638
|
-
|
|
53931
|
+
if (!(await stat(canonicalPath).catch((error) => {
|
|
53932
|
+
throw computerFileAccessIoError({
|
|
53933
|
+
error,
|
|
53934
|
+
operation: "inspect_folder",
|
|
53935
|
+
path: canonicalPath
|
|
53936
|
+
});
|
|
53937
|
+
})).isDirectory()) throw new ComputerFileAccessStoreError("computer.file_access.path_not_directory", "That path is not a folder. Enter a folder path.");
|
|
53938
|
+
await access(canonicalPath, constants.R_OK).catch((error) => {
|
|
53939
|
+
throw new ComputerFileAccessStoreError("computer.file_access.path_unreadable", "OpenMeld can’t read that folder. Check its permissions and try again.", { localDiagnosticContext: buildIoDiagnosticContext({
|
|
53940
|
+
error,
|
|
53941
|
+
operation: "verify_folder_access",
|
|
53942
|
+
path: canonicalPath
|
|
53943
|
+
}) });
|
|
53639
53944
|
});
|
|
53640
53945
|
return canonicalPath;
|
|
53641
53946
|
}
|
|
@@ -53662,7 +53967,11 @@ async function readStore(storePath) {
|
|
|
53662
53967
|
idempotencyHistory: [],
|
|
53663
53968
|
policy: DEFAULT_COMPUTER_FILE_ACCESS_POLICY
|
|
53664
53969
|
};
|
|
53665
|
-
throw
|
|
53970
|
+
throw computerFileAccessIoError({
|
|
53971
|
+
error,
|
|
53972
|
+
operation: "read_store",
|
|
53973
|
+
path: storePath
|
|
53974
|
+
});
|
|
53666
53975
|
}
|
|
53667
53976
|
let value;
|
|
53668
53977
|
try {
|
|
@@ -53686,17 +53995,45 @@ function incompatibleStoreError(storePath, reason) {
|
|
|
53686
53995
|
} });
|
|
53687
53996
|
}
|
|
53688
53997
|
async function writeStore(storePath, value) {
|
|
53689
|
-
|
|
53998
|
+
const storeDirectory = dirname(storePath);
|
|
53999
|
+
await mkdir(storeDirectory, { recursive: true }).catch((error) => {
|
|
54000
|
+
throw computerFileAccessIoError({
|
|
54001
|
+
error,
|
|
54002
|
+
operation: "create_store_directory",
|
|
54003
|
+
path: storeDirectory
|
|
54004
|
+
});
|
|
54005
|
+
});
|
|
53690
54006
|
const tempPath = `${storePath}.tmp-${process.pid}-${Date.now()}`;
|
|
53691
54007
|
await writeFile(tempPath, `${JSON.stringify(value, null, 2)}\n`, {
|
|
53692
54008
|
encoding: "utf8",
|
|
53693
54009
|
mode: 384
|
|
54010
|
+
}).catch((error) => {
|
|
54011
|
+
throw computerFileAccessIoError({
|
|
54012
|
+
error,
|
|
54013
|
+
operation: "write_store",
|
|
54014
|
+
path: tempPath
|
|
54015
|
+
});
|
|
53694
54016
|
});
|
|
53695
54017
|
await rename(tempPath, storePath).catch(async (error) => {
|
|
53696
54018
|
await unlink(tempPath).catch(() => void 0);
|
|
53697
|
-
throw
|
|
54019
|
+
throw computerFileAccessIoError({
|
|
54020
|
+
error,
|
|
54021
|
+
operation: "rename_store",
|
|
54022
|
+
path: storePath
|
|
54023
|
+
});
|
|
53698
54024
|
});
|
|
53699
54025
|
}
|
|
54026
|
+
function computerFileAccessIoError(input) {
|
|
54027
|
+
return new ComputerFileAccessStoreError("computer.file_access.internal_error", "OpenMeld couldn’t access the Computer file access store. Try again or check OpenMeld Service diagnostics.", { localDiagnosticContext: buildIoDiagnosticContext(input) });
|
|
54028
|
+
}
|
|
54029
|
+
function buildIoDiagnosticContext(input) {
|
|
54030
|
+
return {
|
|
54031
|
+
errorCode: typeof input.error === "object" && input.error !== null && "code" in input.error && typeof input.error.code === "string" ? input.error.code : null,
|
|
54032
|
+
operation: input.operation,
|
|
54033
|
+
path: input.path,
|
|
54034
|
+
reason: "io_error"
|
|
54035
|
+
};
|
|
54036
|
+
}
|
|
53700
54037
|
//#endregion
|
|
53701
54038
|
//#region src/local-service/folder-picker/local-folder-picker-helper-process.ts
|
|
53702
54039
|
const LOCAL_FOLDER_PICKER_TIMEOUT_MS = 59e4;
|
|
@@ -59737,6 +60074,7 @@ async function resumeExactControllerConversation(input) {
|
|
|
59737
60074
|
const fileAccess = await resolveRecoveryComputerFileAccess({
|
|
59738
60075
|
computerFileAccessStorePath: input.computerFileAccessStorePath,
|
|
59739
60076
|
request: input.request,
|
|
60077
|
+
routeConfig: input.routeConfig ?? null,
|
|
59740
60078
|
support
|
|
59741
60079
|
});
|
|
59742
60080
|
if (fileAccess.status === "rejected") return fileAccess.result;
|
|
@@ -59811,11 +60149,32 @@ async function resolveRecoveryComputerFileAccess(input) {
|
|
|
59811
60149
|
status: "rejected"
|
|
59812
60150
|
};
|
|
59813
60151
|
}
|
|
60152
|
+
const routeConfig = input.routeConfig;
|
|
60153
|
+
const verifyBoundary = input.support.localAdapterEntry.adapter.verifyComputerFileAccessBoundary;
|
|
60154
|
+
if (!(verifyBoundary && routeConfig) || routeConfig.profileId !== input.request.identity.targetProfileId || routeConfig.agentControllerRef !== input.request.identity.agentControllerRef || routeConfig.transportMode !== input.request.transportMode) return unverifiedComputerFileAccess(input.request);
|
|
60155
|
+
try {
|
|
60156
|
+
if (!(await verifyBoundary({
|
|
60157
|
+
agentControllerPermissionMode: routeConfig.agentControllerPermissionMode,
|
|
60158
|
+
boundary: policy,
|
|
60159
|
+
executionMode: "repair",
|
|
60160
|
+
launchContract: routeConfig.launchContract ?? null,
|
|
60161
|
+
transportMode: input.request.transportMode,
|
|
60162
|
+
workingDirectory: input.request.providerRuntimeWorkingDirectory
|
|
60163
|
+
})).supported) return unverifiedComputerFileAccess(input.request);
|
|
60164
|
+
} catch {
|
|
60165
|
+
return unverifiedComputerFileAccess(input.request);
|
|
60166
|
+
}
|
|
59814
60167
|
return {
|
|
59815
60168
|
boundary: policy,
|
|
59816
60169
|
status: "ready"
|
|
59817
60170
|
};
|
|
59818
60171
|
}
|
|
60172
|
+
function unverifiedComputerFileAccess(request) {
|
|
60173
|
+
return {
|
|
60174
|
+
result: rejected$2(request, "execution_recovery.computer_file_access_unverified", "OpenMeld could not verify this Computer’s file access boundary for execution recovery."),
|
|
60175
|
+
status: "rejected"
|
|
60176
|
+
};
|
|
60177
|
+
}
|
|
59819
60178
|
function rejected$2(request, reasonCode, message = reasonCode) {
|
|
59820
60179
|
return {
|
|
59821
60180
|
destination: request.destination,
|
|
@@ -61899,7 +62258,9 @@ function emitProviderRuntimePhaseLine(input) {
|
|
|
61899
62258
|
agentControllerRef: input.agentControllerRef,
|
|
61900
62259
|
dispatchId: input.dispatchId,
|
|
61901
62260
|
phase: input.event.phase,
|
|
62261
|
+
...input.event.phase === "process_spawned" && input.event.processLaunchKind ? { processLaunchKind: input.event.processLaunchKind } : {},
|
|
61902
62262
|
processId: "processId" in input.event ? input.event.processId : null,
|
|
62263
|
+
...input.event.phase === "process_spawned" && input.event.processWorkingDirectoryKind ? { processWorkingDirectoryKind: input.event.processWorkingDirectoryKind } : {},
|
|
61903
62264
|
sinceRuntimeStartedMs,
|
|
61904
62265
|
targetProfileId: input.targetProfileId,
|
|
61905
62266
|
taskId: input.taskId
|
|
@@ -63317,17 +63678,11 @@ async function handleDispatchDeliverFrame(input) {
|
|
|
63317
63678
|
});
|
|
63318
63679
|
if (event.phase === "process_spawned" || event.phase === "process_exit") emitDispatchLocalPhaseJournalEvent({
|
|
63319
63680
|
deliverRequest: input.deliverRequest,
|
|
63320
|
-
metadata: {
|
|
63681
|
+
metadata: buildProviderProcessJournalMetadata({
|
|
63321
63682
|
agentControllerRef: parsedTask.agentControllerRef,
|
|
63322
|
-
|
|
63323
|
-
|
|
63324
|
-
|
|
63325
|
-
} : {},
|
|
63326
|
-
phaseTsMs: event.tsMs,
|
|
63327
|
-
processId: event.processId,
|
|
63328
|
-
signalTarget: event.signalTarget,
|
|
63329
|
-
sinceRuntimeStartedMs: Math.max(0, event.tsMs - runtimeStartedAtMs)
|
|
63330
|
-
},
|
|
63683
|
+
event,
|
|
63684
|
+
runtimeStartedAtMs
|
|
63685
|
+
}),
|
|
63331
63686
|
parsedTask,
|
|
63332
63687
|
phase: event.phase,
|
|
63333
63688
|
result: event.phase === "process_exit" ? "exited" : "spawned"
|
|
@@ -63608,6 +63963,23 @@ async function handleDispatchDeliverFrame(input) {
|
|
|
63608
63963
|
});
|
|
63609
63964
|
return resultSummary;
|
|
63610
63965
|
}
|
|
63966
|
+
function buildProviderProcessJournalMetadata(input) {
|
|
63967
|
+
const lifecycleMetadata = input.event.phase === "process_exit" ? {
|
|
63968
|
+
exitCode: input.event.exitCode,
|
|
63969
|
+
exitSignal: input.event.signal
|
|
63970
|
+
} : {
|
|
63971
|
+
...input.event.processLaunchKind ? { processLaunchKind: input.event.processLaunchKind } : {},
|
|
63972
|
+
...input.event.processWorkingDirectoryKind ? { processWorkingDirectoryKind: input.event.processWorkingDirectoryKind } : {}
|
|
63973
|
+
};
|
|
63974
|
+
return {
|
|
63975
|
+
agentControllerRef: input.agentControllerRef,
|
|
63976
|
+
...lifecycleMetadata,
|
|
63977
|
+
phaseTsMs: input.event.tsMs,
|
|
63978
|
+
processId: input.event.processId,
|
|
63979
|
+
signalTarget: input.event.signalTarget,
|
|
63980
|
+
sinceRuntimeStartedMs: Math.max(0, input.event.tsMs - input.runtimeStartedAtMs)
|
|
63981
|
+
};
|
|
63982
|
+
}
|
|
63611
63983
|
function emitSendTargetReferenceLoadFailureIfNeeded(input) {
|
|
63612
63984
|
if (input.sendTargetReference.status !== "failed") return;
|
|
63613
63985
|
emitRunLine({
|
|
@@ -67382,7 +67754,8 @@ async function runDaemonSocketSession(input) {
|
|
|
67382
67754
|
execute: () => resumeExactControllerConversation({
|
|
67383
67755
|
computerFileAccessStorePath: input.computerFileAccessStorePath,
|
|
67384
67756
|
localAdapterContainer: input.localAdapterContainer,
|
|
67385
|
-
request: parsed.data
|
|
67757
|
+
request: parsed.data,
|
|
67758
|
+
routeConfig: input.routeCatalogState.routeByProfileId.get(parsed.data.identity.targetProfileId) ?? null
|
|
67386
67759
|
}),
|
|
67387
67760
|
ledgerRootPath: input.ledgerPaths.rootDirPath,
|
|
67388
67761
|
request: parsed.data
|
|
@@ -71288,6 +71661,7 @@ var DaemonReinstallUnexpectedStartError = class extends Error {
|
|
|
71288
71661
|
var DaemonReinstallFailureError = class extends Error {
|
|
71289
71662
|
cause;
|
|
71290
71663
|
backupDataPath;
|
|
71664
|
+
errorCode;
|
|
71291
71665
|
evidencePath;
|
|
71292
71666
|
failureStage;
|
|
71293
71667
|
constructor(input) {
|
|
@@ -71295,6 +71669,7 @@ var DaemonReinstallFailureError = class extends Error {
|
|
|
71295
71669
|
this.name = "DaemonReinstallFailureError";
|
|
71296
71670
|
this.backupDataPath = input.backupDataPath;
|
|
71297
71671
|
this.cause = input.cause;
|
|
71672
|
+
this.errorCode = input.errorCode;
|
|
71298
71673
|
this.evidencePath = input.evidencePath ?? null;
|
|
71299
71674
|
this.failureStage = input.failureStage ?? null;
|
|
71300
71675
|
}
|
|
@@ -71419,7 +71794,14 @@ async function attachDaemonReinstallEvidence(input) {
|
|
|
71419
71794
|
function buildDaemonReinstallFailureMessage(input) {
|
|
71420
71795
|
const actionLabel = formatDaemonServiceMaintenanceActionLabel(input.action);
|
|
71421
71796
|
const actionCommand = formatDaemonServiceMaintenanceCommand(input.action);
|
|
71797
|
+
const controlEndpointMissing = input.failureStage === "stop_or_drain" && input.errorCode === "daemon.control.endpoint_missing";
|
|
71422
71798
|
if (input.resolvedView === "human" && input.includeDiagnosticDetails !== true) {
|
|
71799
|
+
if (controlEndpointMissing) return formatInlineOpenMeldCliCommands([
|
|
71800
|
+
`OpenMeld Service ${actionLabel} could not safely stop the existing Service because its control connection is missing.`,
|
|
71801
|
+
"Run `openmeld service status` to check for local Agent work.",
|
|
71802
|
+
`If none is running, run \`${actionCommand} --force\`.`,
|
|
71803
|
+
"The force option stops the old Service process."
|
|
71804
|
+
].join(" "));
|
|
71423
71805
|
if (input.errorMessage.includes("test fixture identity")) return formatInlineOpenMeldCliCommands([
|
|
71424
71806
|
`OpenMeld Service ${actionLabel} failed because this production lane contains old test setup identity that cannot be reused.`,
|
|
71425
71807
|
"Rerun the setup command from OpenMeld Web so OpenMeld can write a fresh production service contract.",
|
|
@@ -71432,7 +71814,16 @@ function buildDaemonReinstallFailureMessage(input) {
|
|
|
71432
71814
|
evidencePath: input.evidencePath,
|
|
71433
71815
|
failureStage: input.failureStage ?? null
|
|
71434
71816
|
});
|
|
71435
|
-
return
|
|
71817
|
+
return [
|
|
71818
|
+
`OpenMeld Service ${actionLabel} failed: ${input.errorMessage}.`,
|
|
71819
|
+
...input.errorCode ? [`Error code: ${input.errorCode}.`] : [],
|
|
71820
|
+
...controlEndpointMissing ? [
|
|
71821
|
+
"Recovery: run `openmeld service status --view agent`.",
|
|
71822
|
+
`Only if no local Agent work is running, run \`${actionCommand} --force --view agent\`.`,
|
|
71823
|
+
"The force option stops the old Service process."
|
|
71824
|
+
] : [],
|
|
71825
|
+
...failureContext.length > 0 ? [failureContext] : []
|
|
71826
|
+
].join(" ");
|
|
71436
71827
|
}
|
|
71437
71828
|
function isDaemonReinstallHealthyAndRunning(outcome) {
|
|
71438
71829
|
return outcome.ok && (outcome.result === "completed" || outcome.result === "already_healthy") && outcome.serviceState === "running";
|
|
@@ -72813,6 +73204,7 @@ async function runDaemonReinstall(input, options = {}) {
|
|
|
72813
73204
|
if (error instanceof DaemonReinstallFailureError) throw new Error(buildDaemonReinstallFailureMessage({
|
|
72814
73205
|
action: displayAction,
|
|
72815
73206
|
backupDataPath: error.backupDataPath,
|
|
73207
|
+
errorCode: error.errorCode,
|
|
72816
73208
|
errorMessage: toErrorMessage$37(error.cause),
|
|
72817
73209
|
failureStage: error.failureStage,
|
|
72818
73210
|
evidencePath: error.evidencePath ?? await captureDaemonServiceEvidenceBestEffort({
|
|
@@ -72885,6 +73277,7 @@ async function performDaemonReinstall(input) {
|
|
|
72885
73277
|
if (lifecycleResult.status === "failed") throw new DaemonReinstallFailureError({
|
|
72886
73278
|
backupDataPath: lifecycleResult.backupDataPath,
|
|
72887
73279
|
cause: new Error(lifecycleResult.errorMessage),
|
|
73280
|
+
errorCode: lifecycleResult.errorCode,
|
|
72888
73281
|
evidencePath: lifecycleResult.evidencePath,
|
|
72889
73282
|
failureStage: lifecycleResult.failureStage
|
|
72890
73283
|
});
|
|
@@ -102195,4 +102588,4 @@ function isHumanInteractiveSpaceRuntime(runtime) {
|
|
|
102195
102588
|
//#endregion
|
|
102196
102589
|
export { postLocalParticipationMutationReconcile as $, formatProfileAwareOpenMeldCliCommands as $a, ensureVersionStateReady as $i, createDoctorFailedGuideError as $n, readProfileWorkspaceConfig as $r, connectWebSocket as $t, prepareAuthenticatedSpaceCommandContext as A, createAuthenticationError as Aa, parseAgentControllerRef as Ai, buildDispatchResultMessageReadProjection as An, errLine as Ao, buildDualViewGuideMessage as Ar, fetchSpaceUpdates as At, runAgentsConfig as B, resolveAgentActivityRouteForPath as Ba, startCurrentCommandCheckScope as Bi, isReturnKeypress as Bn, revokeOrganizationJoinLinkResponseSchema as Bo, resolveDaemonServiceFreshnessWarning as Br, resolveDaemonServiceParticipationStatus as Bt, buildFormalSignalReadPayload as C, updateOpenMeldProfile as Ca, resolveDaemonDeviceId as Ci, collectLocalAgentControllerInventory as Cn, canonicalizeLocalProjectPath as Co, getCliVersionInfo as Cr, buildProfileWorkspaceRows as Ct, isSpaceCommandOutputHandledError as D, setSelectedOpenMeldProfileId as Da, getAgentControllerPermissionModeDisplayMetadata as Di, inspectSpaceCacheFile as Dn, renderTextInfoCard as Do, buildAgentOverviewFromContract as Dr, shouldEmitAgentOverview as Dt, parseEnvelope as E, getSelectedOpenMeldProfileId as Ea, createAgentExecutionStatusDisplayRows as Ei, resolveLocalAgentControllerReportDecision as En, renderInfoCard as Eo, registerBuiltinAgentSelectionOptions as Er, createDelayedSpinner as Et, buildReplyReadinessGuidance as F, setProfileDefaultView as Fa, resolveNativeAgentControllerPermissionModeForController as Fi, buildUpdatesReplyWorkflowProjection as Fn, cliJsonSkillsListEnvelopeSchema as Fo, buildAgentFacingPublicationModeGuideLines as Fr, readGatewayTextResponse as Ft, runAgentsDetect as G, readAgentActivityIntegrationStatus as Ga, getDaemonSystemServiceLogPath as Gi, readDispatchOwnedRuntimeGuard as Gn, mapAgentReplyReadinessToLegacyAutoReply as Gr, runSkillsEnsure as Gt, runAgentsCustomList as H, AGENT_ACTIVITY_INTEGRATION_OWNER as Ha, resolveVersionChangeDirection as Hi, assessCliUpdate as Hn, formatAgentReplyReadinessLabel as Hr, runDaemonStartDecisionPrompt as Ht, resolveHumanControllerDisplayName as I, LocalProjectConnectionError as Ia, finishCurrentCommandCheckScope as Ii, createSpaceMemberIdentityIndex as In, cliJsonSkillsLoadEnvelopeSchema as Io, canonicalizeAllowedActions as Ir, toStructuredGatewayFailure as It, runAgentsList as J, formatInlineOpenMeldCliCommands as Ja, resolveDaemonServiceManager as Ji, formatElapsedTime as Jn, syncProfileWorkspaceState as Jr, runSkillsUpdate as Jt, runAgentsDisable as K, resolveAgentActivityDispatcherCommand as Ka, isDaemonServiceJobNeverSpawned as Ki, readDispatchSpaceActionContextFromEnv as Kn, resolveGatewayChainReadiness as Kr, runSkillsInstall as Kt, persistAgentTransportSelection as L, validateLocalProjectConnectionPath as La, getCurrentCommandCheckState as Li, formatRemovedCcRelationMessage as Ln, cliJsonSkillsShowEnvelopeSchema as Lo, runDaemonServiceFullAlignment as Lr, parseJsonResponse$1 as Lt, emitSpaceAgentOverview as M, resolveAuthenticationGuidanceFromError as Ma, resolveAgentExecutionStatus as Mi, buildSignalIndex as Mn, outLine as Mo, OPENMELD_AGENT_MENTAL_MODEL_LINES as Mr, fetchSpaceMeta as Mt, emitSpaceCliAgentOverview as N, resolveAuthenticationGuidanceFromMessage as Na, resolveAgentProfileEditCapabilities as Ni, buildSignalMessageReadProjection as Nn, cliBinaryDeltaPatchSchema as No, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Nr, updateSpaceMeta as Nt, assertFullSignalIdArgument as O, buildAgentAuthenticationGuide as Oa, getAgentControllerPermissionModeFieldLabel as Oi, upsertSpaceConfig as On, sanitizeTerminalDisplayText as Oo, DualViewGuideError as Or, runDaemonStartupPreflight as Ot, prepareLocalAgentReadiness as P, getProfileDefaultView as Pa, resolveEvidenceSyncHealth as Pi, buildSpaceRoundReadProjection as Pn, cliJsonOutputEnvelopeSchema as Po, areAllowedActionsEquivalent as Pr, readGatewayJsonResponse as Pt, formatTransportModeDisplay as Q, formatOpenMeldCliTextBlock as Qa, compareSemver as Qi, canUseInteractivePrompts as Qn, normalizeCustomProfileWorkspacePath as Qr, readRecentDaemonDispatchJournalEvents as Qt, resolveAgentProfileSetup as R, isAgentActivityRouteRegistered as Ra, isCurrentCommandCheckScopeActive as Ri, promptSearchMultiselect as Rn, getOrganizationJoinLinkResponseSchema as Ro, formatDaemonFailureContextText as Rr, resolveLocalComponentsStatus as Rt, buildFormalDispatchResultReadPayload as S, resolveOpenMeldProfile as Sa, ensureDaemonRuntimePaths as Si, submitRuntimeAgentControllerReports as Sn, unbindProject as So, registerSkillsTargetSelectionOptions as Sr, buildProfileWorkspacePresentation as St, formatHumanReadTargetList as T, clearSelectedOpenMeldProfileId as Ta, buildAgentControllerRef as Ti, resolveLocalAgentControllerLaunchability as Tn, readControllerTaskLifecycleOutboxHealth as To, registerAuthLoginRequestOptions as Tr, emitDaemonAgentOverview as Tt, runAgentsCustomRemove as U, defaultManagedIntegrationPaths as Ua, readCurrentDaemonRuntimeContext as Ui, isCliUpdateCheckApplicable as Un, formatDeviceReplyReadinessLabel as Ur, collectSkillsReadinessSnapshot as Ut, runAgentsCustomAdd as V, unregisterAgentActivityRoute as Va, inspectDaemonServiceInventory as Vi, runInteractivePrompt as Vn, package_default as Vo, resolveCurrentReplyReadinessSnapshot as Vr, runDaemonServiceParticipationGate as Vt, runAgentsCustomUpdate as W, installAgentActivityIntegrations as Wa, readCurrentObservedDaemonRuntimeStatus as Wi, assertDispatchOwnedRuntimePublicWriteAllowed as Wn, formatHumanReplyReadinessReason as Wr, runSkillsCheck as Wt, runAgentsRepair as X, formatOpenMeldCliCommands as Xa, performManagedInstall as Xi, formatDaemonServiceDowngradeBlockedRecommendation as Xn, resolveProfileWorkspaceRuntime as Xr, readBundledOpenMeldCliSkillDocumentByPath as Xt, runAgentsManage as Y, formatOpenMeldCliCommand as Ya, buildInstallSelfJsonPayload as Yi, resolveElapsedTimeMs as Yn, createModelCatalogReadSession as Yr, ensureLocalSkills as Yt, runAgentsShow as Z, formatOpenMeldCliLine as Za, buildNextVersionState as Zi, formatDaemonServiceMissingRecommendation as Zn, ensureOpenMeldManagedProfileWorkspace as Zr, readRuntimeReportingHealthState as Zt, emitHumanReadSignalsTextProjection as _, createOpenMeldAgentProfile as _a, buildDaemonServiceTargetSpec as _i, resolveServiceParticipationReadiness as _n, listProjectConnectionsWithStatus as _o, createUpgradeConfirmationGuideError as _r, runDaemonSnapshot as _t, runSpaceDelete as a, resolveOpenMeldDistribution as aa, syncDeviceRuntimeStateProjection as ai, runAuthLogout as an, readAgentActivityContextForPath as ao, createSpaceAliasTargetGuideError as ar, renderOpenMeldLogo as at, loadSpaceSignalIndexOrNull as b, listOpenMeldProfiles as ba, classifyDaemonServiceWakeability as bi, submitProfileRuntimeAgentControllerReport as bn, runIfAgentActivityBindingGenerationIsCurrent as bo, registerSpaceMemberSelectionOptions as br, runDaemonTeardownStrict as bt, runSpaceLeave as c, resolveCurrentDaemonExpectedVersion as ca, listAgentTargetStates as ci, buildAuthStatusRows as cn, resolveObservedAgentActivityBinding as co, createSpaceMenuGuideError as cr, resolveSpaceSendText as ct, runSpaceRemoveMembers as d, parseCliViewMode as da, notifyDaemonRouteCatalogChanged as di, createProfileByKind as dn, enqueueAgentActivityHookEvent as do, createSpaceResultGuideError as dr, runDaemonBackgroundStartForDecision as dt, fetchLatestCliBinaryRelease as ea, resolveConfiguredProfileWorkspacePath as ei, assessServerRequiredVersion as en, resolveSetupFollowUpCliEntryCommand as eo, createProfileActionGuideError as er, colorizeAgentLabel as et, runSpaceSend as f, resolveRuntimeContext as fa, resolveLocalRegistryAgentIdFromAgentControllerRef as fi, resolveCreateProfileKind as fn, removeProjectInbox as fo, createSpaceSubcommandTargetGuideError as fr, runDaemonCancel as ft, buildHumanReadSignalsTranscriptItems as g, resolveOpenMeldProfileOrNull as ga, getSetupFlowCopy as gi, formatServiceParticipationReadinessLabel as gn, listProjectBindings as go, createStartAuthenticationGuideError as gr, runDaemonRun as gt, runSpaceWriteWithPasswordRetry as h, requireOpenMeldProfile as ha, buildOnboardingPlan as hi, ensureAgentProfileRuntimeBinding as hn, bindProject as ho, createStartAgentIdentityGuideError as hr, runDaemonReinstall as ht, runSpaceCreate as i, isBinaryDistribution as ia, describeProfileWorkspacePathValidationFailure as ii, runAuthLogin as in, upsertDaemonServiceContract as io, createSpaceAddMembersGuideError as ir, renderOpenMeldHeader as it, resolveOpenMeldProfileForSpaceCommand as j, resolveAuthenticationGuidance as ja, resolveAgentControllerPermissionModeForController as ji, buildDispatchResultReplyWorkflowProjection as jn, outJsonLine as jo, formatAgentOverviewPayload as jr, createCliSpaceApi as jt, assertValidSpaceIdTarget as k, buildHumanAuthenticationCard as ka, listAgentControllerPermissionModeOptions as ki, assertNoRemovedCcSpaceAddressingSyntax as kn, emitCliJsonEnvelope as ko, formatDualViewGuideForDisplay as kr, readDaemonStartFailureLogTailLines as kt, runSpaceList as l, createPresenter as la, reconcileNewRunnableBuiltinAgentsForSetup as li, buildAuthStatusSnapshot as ln, normalizeSharedSessionTitle as lo, createSpacePublicationSetGuideError as lr, runDaemon as lt, runSpaceReadWithPasswordRetry as m, isSelectedOpenMeldProfileRequiredError as ma, buildDaemonRouteObservationPresentation as mi, promptTextEntry as mn, removeProjectOutbox as mo, createSpaceUpdatesGuideError as mr, runDaemonInterrupt as mt, promptAndConfirmSpacePassword as n, readVersionState as na, setOpenMeldManagedProfileWorkspace as ni, ensureCommandAuthenticationOrCancel as nn, syncLocalAgentActivity as no, createProfileMenuGuideError as nr, printOpenMeldBanner as nt, runSpaceHistory as o, resolveDaemonRuntimeContractCompatibility as oa, createPrimaryBindingReadSession as oi, runAuthMenu as on, removeAgentActivityContextCache as oo, createSpaceContractSetGuideError as or, renderOpenMeldTagline as ot, runSpaceWatch as p, resolveViewProfileKey as pa, PREPARE_SESSION_RECONNECT_GRACE_MS as pi, resolveCreateProfileName as pn, readAgentActivityOutboxHealth as po, createSpaceTargetGuideError as pr, runDaemonInstall as pt, runAgentsEnable as q, uninstallAgentActivityIntegrations as qa, readDaemonServiceJobCrashExitCode as qi, writeDispatchSpaceActionRecord as qn, resolveOpenClawLocalDiagnosticsValue as qr, runSkillsUninstall as qt, runSpaceAddMembers as r, writeVersionState as ra, validateCustomProfileWorkspacePath as ri, evaluateCommandAuthentication as rn, readDaemonServiceContract as ro, createResetConfirmationGuideError as rr, renderOpenMeldBrandBlockLines as rt, runSpaceJoin as s, toStartBackgroundHelperExecutionCompatibility as sa, resolveAgentProfilePrimaryAgentControllerReport as si, runAuthStatus as sn, buildAgentActivityEvent as so, createSpaceLeaveGuideError as sr, resolveGatewayWebOrigin as st, buildCreateSpacePasswordPromptMessage as t, fetchLatestPackageInfo as ta, setCustomProfileWorkspace as ti, buildCommandAuthenticationPromptMessage as tn, resolveUserFacingCliEntryCommand as to, createProfileCreateGuideError as tr, colorizeDisplayProfileLabel as tt, runSpacePassword as u, formatMessage as ua, listBuiltinAgentsRegistryEntries as ui, formatActiveOrganizationLabel as un, readCodexSessionTitles as uo, createSpaceRemoveMembersGuideError as ur, runDaemonAutostart as ut, buildIdentityOnlyMembersSnapshotForReadProjection as v, createOpenMeldHumanProfile as va, resolveDaemonServiceAlignmentDecision as vi, assessActionParticipationCandidate as vn, migrateProjectBindingStore as vo, getCommandEntryContract as vr, runDaemonStatusFlow as vt, buildHumanReplyContextSummary as w, alignSelectedOpenMeldProfileStorage as wa, resolveOpenMeldEnvironmentTarget as wi, resolveLocalAgentControllerBlockerReasonCodes as wn, enqueueControllerTaskLifecycleEventWhileLocked as wo, registerDaemonControlTargetOptions as wr, reconcileCliVersionView as wt, toSpaceMetaUpsertInput as x, primeOpenMeldProfilesSessionCache as xa, readRecentDaemonLifecycleEvents as xi, submitRuntimeAgentControllerReport as xn, setDefaultProjectConnection as xo, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as xr, runDaemonUninstall as xt, loadSpaceIdentityDirectoryOrNull as y, deleteOpenMeldProfile as ya, classifyDaemonServiceRunStartability as yi, computeRetryDelayMs as yn, removeProjectConnection as yo, getCommandHintsFromContract as yr, runDaemonStop as yt, runAgents as z, registerAgentActivityRoute as za, resetCurrentCommandCheckState as zi, promptSearchSelect as zn, organizationJoinLinkErrorResponseSchema as zo, resolveServiceReadinessFromServiceStatus as zr, writeInstalledLocalComponentsSnapshot as zt };
|
|
102197
102590
|
|
|
102198
|
-
//# sourceMappingURL=command-
|
|
102591
|
+
//# sourceMappingURL=command-CS1VO--o.js.map
|