openmeld 0.3.96 → 0.3.98

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 { 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-Cv9x5Es9.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$41, 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$42, zt as agentActivityEventSchema } from "./dist-BBWU3O-I.js";
5
- import { $t as conversationExecutionStateSchema, A as runtimeTransportResumeControllerConversationFramePayloadSchema, An as agentInteractionRequestSchema, Ar as resolvePublicAgentAvailabilityCopy, B as openMeldSpaceEgressActionSchema, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, D as runtimeTransportRegisterSessionRequestSchema, Dr as MAX_TEXT_LENGTH$1, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, Er as trimmedStringFromUnknown, Fn as formatLocalSetupActionDescription, G as localFolderPickerHelperResultSchema, H as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, Hn as localServiceComponentUpdateProjectionSchema, Ht as spaceFileNameSchema, I as openMeldDaemonTaskResultEnvelopeWriteSchema, In as formatLocalSetupActionLabel, Ir as resolveCommandAgentWorkActivity, Jt as openMeldDaemonControlPlaneRequestSchema, Kn as parseOptionalClientMessageId, L as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Ln as installedLocalComponentsSnapshotSchema, M as runtimeTransportRouteCatalogChangedFramePayloadSchema, Mr as shouldPreferMappedPublicAgentFailureReason, Mt as SPACE_FILE_MAX_SIZE_BYTES, Nn as formatLocalComponentsSummaryDescription, O as runtimeTransportRegisterSessionResponseSchema, On as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, Or as resolveDetailedPublicAgentFailureReason$1, P as runtimeTransportSubmitTaskResultRequestSchema, Pn as formatLocalComponentsSummaryLabel, Qt as providerDispatchRuntimeContextSchema, R as openMeldDaemonTaskResultPayloadSchema, Rn as localCliComponentUpdateProjectionSchema, Rt as resolveSpaceFileMimeType, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, U as localFolderPickerDaemonFrameSchema, V as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, W as localFolderPickerHelperProtocolResultSchema, Xn as runtimeCoordinatorExecutionTokenEnvelopeSchema, Yt as openMeldDaemonControlPlaneResponseSchema, Zn as runtimeTransportDeliveryExecutionIdentitySchema, Zt as skippedDaemonProfileSchema, _ as runtimeTransportHeartbeatRequestSchema, _n as getSpaceMessageAddressingRelationSupportForTargetKind, _r as openMeldRuntimeProfileIdSchema, a as runtimeTransportCapabilitiesSchema, b as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, bn as resolveMessageEnvelopeTargetField, c as runtimeTransportDispatchInteractionRequestSchema, ct as CONVERSATION_CONTINUITY_WARNING_PURPOSE, d as runtimeTransportDispatchPreviewEndRequestSchema, er as normalizeSpacePasswordText, f as runtimeTransportDispatchPreviewRequestSchema, ft as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, g as runtimeTransportForkAgentSessionResultSchema, gn as formatCanonicalMentionLiteral, gr as normalizeOptionalWorkingDirectory, gt as sanitizeSignalTextPreview, h as runtimeTransportErrorCodeSchema, hn as collectCanonicalMentionTextFragments, hr as agentProfileIdSchema, i as localWakeRouteReportSchema, j as runtimeTransportResumeControllerConversationResultFramePayloadSchema, jn as agentInteractionResolutionSchema, jr as resolvePublicAgentFailureRecovery, k as runtimeTransportRejectedProfileRegistrationSchema, kr as resolveMappedPublicAgentFailureReason, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, m as runtimeTransportDispatchToolActivityRequestSchema, mn as MESSAGE_MENTION_TYPE_VALUES, mr as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, mt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, n as daemonExecutionCompatibilitySchema, nr as resolveSingleSpaceMentionLabels, o as runtimeTransportDeliverDispatchRequestSchema, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pr as openMeldRequestContextSchema, pt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, r as daemonStreamFrameSchema, rr as resolveSpaceMentionLabels, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportHeartbeatResponseSchema, w as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, x as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, xr as profileWorkspaceModeSchema, y as runtimeTransportLocalAgentControlCancelFramePayloadSchema, yn as normalizeMessageEnvelope } from "./runtime-transport-J50KvRbm.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$42, 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$43, zt as agentActivityEventSchema } from "./dist-BKlTzgZt.js";
5
+ import { $t as conversationExecutionStateSchema, A as runtimeTransportResumeControllerConversationFramePayloadSchema, An as agentInteractionRequestSchema, Ar as resolvePublicAgentAvailabilityCopy, B as openMeldSpaceEgressActionSchema, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, D as runtimeTransportRegisterSessionRequestSchema, Dr as MAX_TEXT_LENGTH$1, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, Er as trimmedStringFromUnknown, Fn as formatLocalSetupActionDescription, G as localFolderPickerHelperResultSchema, H as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, Hn as localServiceComponentUpdateProjectionSchema, Ht as spaceFileNameSchema, I as openMeldDaemonTaskResultEnvelopeWriteSchema, In as formatLocalSetupActionLabel, Ir as resolveCommandAgentWorkActivity, Jt as openMeldDaemonControlPlaneRequestSchema, Kn as parseOptionalClientMessageId, L as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Ln as installedLocalComponentsSnapshotSchema, M as runtimeTransportRouteCatalogChangedFramePayloadSchema, Mr as shouldPreferMappedPublicAgentFailureReason, Mt as SPACE_FILE_MAX_SIZE_BYTES, Nn as formatLocalComponentsSummaryDescription, O as runtimeTransportRegisterSessionResponseSchema, On as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, Or as resolveDetailedPublicAgentFailureReason$1, P as runtimeTransportSubmitTaskResultRequestSchema, Pn as formatLocalComponentsSummaryLabel, Qt as providerDispatchRuntimeContextSchema, R as openMeldDaemonTaskResultPayloadSchema, Rn as localCliComponentUpdateProjectionSchema, Rt as resolveSpaceFileMimeType, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, U as localFolderPickerDaemonFrameSchema, V as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, W as localFolderPickerHelperProtocolResultSchema, Xn as runtimeCoordinatorExecutionTokenEnvelopeSchema, Yt as openMeldDaemonControlPlaneResponseSchema, Zn as runtimeTransportDeliveryExecutionIdentitySchema, Zt as skippedDaemonProfileSchema, _ as runtimeTransportHeartbeatRequestSchema, _n as getSpaceMessageAddressingRelationSupportForTargetKind, _r as openMeldRuntimeProfileIdSchema, a as runtimeTransportCapabilitiesSchema, b as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, bn as resolveMessageEnvelopeTargetField, c as runtimeTransportDispatchInteractionRequestSchema, ct as CONVERSATION_CONTINUITY_WARNING_PURPOSE, d as runtimeTransportDispatchPreviewEndRequestSchema, er as normalizeSpacePasswordText, f as runtimeTransportDispatchPreviewRequestSchema, ft as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, g as runtimeTransportForkAgentSessionResultSchema, gn as formatCanonicalMentionLiteral, gr as normalizeOptionalWorkingDirectory, gt as sanitizeSignalTextPreview, h as runtimeTransportErrorCodeSchema, hn as collectCanonicalMentionTextFragments, hr as agentProfileIdSchema, i as localWakeRouteReportSchema, j as runtimeTransportResumeControllerConversationResultFramePayloadSchema, jn as agentInteractionResolutionSchema, jr as resolvePublicAgentFailureRecovery, k as runtimeTransportRejectedProfileRegistrationSchema, kr as resolveMappedPublicAgentFailureReason, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, m as runtimeTransportDispatchToolActivityRequestSchema, mn as MESSAGE_MENTION_TYPE_VALUES, mr as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, mt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, n as daemonExecutionCompatibilitySchema, nr as resolveSingleSpaceMentionLabels, o as runtimeTransportDeliverDispatchRequestSchema, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pr as openMeldRequestContextSchema, pt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, r as daemonStreamFrameSchema, rr as resolveSpaceMentionLabels, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportHeartbeatResponseSchema, w as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, x as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, xr as profileWorkspaceModeSchema, y as runtimeTransportLocalAgentControlCancelFramePayloadSchema, yn as normalizeMessageEnvelope } from "./runtime-transport-Ch3hTK9F.js";
6
6
  import { r as daemonServiceLaneSchema, t as daemonServiceContractSchema } from "./service-contract-DZWQdPz5.js";
7
7
  import { A as isDaemonServiceRuntimeHeartbeatStale, B as setDaemonServiceRuntimeState, C as daemonServiceStableExecutableWrapperPath, D as getDaemonRuntimeStatus, E as ensureDaemonControlPlaneToken, F as releaseDaemonServiceLifecycleLock, G as withDaemonServiceStopLock, H as withDaemonServiceReconcileLock, I as resolveDaemonControlPlaneEndpoint, K as readDaemonLocalStateFile, 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 withDaemonServiceRegistrationMutationLock, V as uninstallDaemon, W as withDaemonServiceRunLock, _ 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, q as writeDaemonLocalStateFile, 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 rotateDaemonControlPlaneTokenIfExpired } from "./daemon-runtime-lease-DiRoGxhm.js";
8
- import { A as REGISTER_RESPONSE_TIMEOUT_MS$1, C as MAX_HEARTBEAT_INTERVAL_MS$2, D as OPENCLAW_CLI_TIMEOUT_MS$1, M as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, N as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, O as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, P as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, S as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, T as MIN_HEARTBEAT_INTERVAL_MS$2, _ as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, a as getAuthSessionState, b as DEFAULT_HEARTBEAT_INTERVAL_MS$1, c as setAuthSession, d as isBinaryDistribution, f as resolveOpenMeldDistribution, g as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, h as DAEMON_RUNTIME_CONTRACT_EPOCH$1, k as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, m as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, n as clearAuthSession, p as CATALOG_SYNC_RETRY_INTERVAL_MS$1, r as getAuthSession, v as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, y as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1 } from "./auth-session-BcT7IOfJ.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-BJIJ540D.js";
8
+ import { D as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, E as OPENCLAW_CLI_TIMEOUT_MS$1, M as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, N as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, O as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, S as MAX_HEARTBEAT_INTERVAL_MS$2, _ as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, d as resolveOpenMeldDistribution, f as CATALOG_SYNC_RETRY_INTERVAL_MS$1, g as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, h as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, i as getAuthSessionState, j as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, k as REGISTER_RESPONSE_TIMEOUT_MS$1, m as DAEMON_RUNTIME_CONTRACT_EPOCH$1, n as clearAuthSession, p as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, s as setAuthSession, u as isBinaryDistribution, v as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, w as MIN_HEARTBEAT_INTERVAL_MS$2, x as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, y as DEFAULT_HEARTBEAT_INTERVAL_MS$1 } from "./auth-session-BH5KpxlR.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-DhBFOgEh.js";
10
10
  import { createRequire } from "node:module";
11
11
  import { homedir, tmpdir, userInfo } from "node:os";
12
12
  import { z } from "zod/v4";
@@ -34,7 +34,7 @@ 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.96",
37
+ version: "0.3.98",
38
38
  openMeldReleaseDate: "2026-08-24",
39
39
  description: "OpenMeld CLI - https://openmeld.ai",
40
40
  license: "MIT",
@@ -4687,6 +4687,9 @@ function materializeCliLaunchCommand(input) {
4687
4687
  bin: input.launchContract.nodePath
4688
4688
  };
4689
4689
  }
4690
+ function resolveLaunchContractEntrypointPath(launchContract) {
4691
+ return launchContract.kind === "executable" ? launchContract.commandPath : launchContract.scriptPath;
4692
+ }
4690
4693
  function buildCliLaunchInvocation(input) {
4691
4694
  const launchCommand = materializeCliLaunchCommand({ launchContract: input.launchContract });
4692
4695
  return {
@@ -4709,7 +4712,7 @@ async function verifyLaunchContractFiles(input) {
4709
4712
  };
4710
4713
  } catch (error) {
4711
4714
  return {
4712
- errorMessage: toErrorMessage$40(error),
4715
+ errorMessage: toErrorMessage$41(error),
4713
4716
  failureKind: "completed_negative",
4714
4717
  ok: false
4715
4718
  };
@@ -4738,7 +4741,7 @@ async function verifyCliLaunchContract(input) {
4738
4741
  return fileCheck;
4739
4742
  } catch (error) {
4740
4743
  return {
4741
- errorMessage: `${input.displayName} can't start on this device: ${toErrorMessage$40(error)}`,
4744
+ errorMessage: `${input.displayName} can't start on this device: ${toErrorMessage$41(error)}`,
4742
4745
  failureKind: classifyLaunchContractVerificationFailure(error),
4743
4746
  ok: false
4744
4747
  };
@@ -4776,10 +4779,12 @@ async function resolveInstalledNodeScriptLaunchContract(input) {
4776
4779
  };
4777
4780
  }
4778
4781
  async function resolveInstalledNodeScriptLaunchCandidates(input) {
4782
+ const preferredCommandPath = input.preferredLaunchContract ? resolveLaunchContractEntrypointPath(input.preferredLaunchContract) : null;
4779
4783
  const commandPaths = await resolveInstalledCommandPathsForLaunch({
4780
4784
  additionalCommandDirectories: input.additionalCommandDirectories ?? null,
4781
4785
  commandName: input.commandName,
4782
- configuredCommand: input.configuredCommand ?? null
4786
+ configuredCommand: input.configuredCommand ?? null,
4787
+ preferredCommandPath
4783
4788
  });
4784
4789
  if (commandPaths.length === 0) return {
4785
4790
  errorMessage: `${input.displayName} is not installed on this device.`,
@@ -4800,16 +4805,18 @@ async function resolveInstalledNodeScriptLaunchCandidates(input) {
4800
4805
  }
4801
4806
  if (candidateIds.has(candidate.dedupeId)) continue;
4802
4807
  candidateIds.add(candidate.dedupeId);
4803
- candidates.push(candidate);
4808
+ candidates.push({
4809
+ ...candidate,
4810
+ preferred: preferredCommandPath !== null && normalizePathForDetection(commandPath) === normalizePathForDetection(preferredCommandPath)
4811
+ });
4804
4812
  }
4805
4813
  if (candidates.length === 0) return {
4806
4814
  errorMessage: inspectionErrors[0] ?? `${input.displayName} is installed, but OpenMeld could not inspect its launch files.`,
4807
4815
  reason: "not_launchable",
4808
4816
  ok: false
4809
4817
  };
4810
- const stableCandidates = candidates.filter((candidate) => !candidate.transientWrapper);
4811
4818
  return {
4812
- candidates: finalizeLaunchCandidateDisplayMetadata((stableCandidates.length > 0 ? stableCandidates : candidates).map((candidate) => candidate.launchCandidate)),
4819
+ candidates: finalizeLaunchCandidateDisplayMetadata((candidates.filter((candidate) => !candidate.transientWrapper).length > 0 ? candidates.filter((candidate) => !candidate.transientWrapper || candidate.preferred) : candidates).map((candidate) => candidate.launchCandidate)),
4813
4820
  ok: true
4814
4821
  };
4815
4822
  }
@@ -4850,7 +4857,7 @@ async function inspectInstalledNodeScriptLaunchCandidate(input) {
4850
4857
  };
4851
4858
  } catch (error) {
4852
4859
  return {
4853
- errorMessage: `${input.displayName} is installed, but OpenMeld could not inspect its launch files: ${toErrorMessage$40(error)}`,
4860
+ errorMessage: `${input.displayName} is installed, but OpenMeld could not inspect its launch files: ${toErrorMessage$41(error)}`,
4854
4861
  ok: false
4855
4862
  };
4856
4863
  }
@@ -4868,19 +4875,21 @@ function resolveInstalledCommandPaths(input) {
4868
4875
  return resolveExecutablePathsOnPath(input.commandName);
4869
4876
  }
4870
4877
  async function resolveInstalledCommandPathsForLaunch(input) {
4878
+ const preferredCommandPath = normalizeOptionalText$71(input.preferredCommandPath);
4879
+ const preferredCommandPaths = preferredCommandPath && isAbsolute(preferredCommandPath) ? [preferredCommandPath] : [];
4871
4880
  const configuredCommand = normalizeOptionalText$71(input.configuredCommand);
4872
4881
  if (configuredCommand) {
4873
- if (isAbsolute(configuredCommand)) return [configuredCommand];
4874
- if (configuredCommand.includes("/") || configuredCommand.includes("\\")) return [];
4875
- return await resolveExecutablePathsFromSearchSurface({
4882
+ if (isAbsolute(configuredCommand)) return mergeUniquePaths(preferredCommandPaths, [configuredCommand]);
4883
+ if (configuredCommand.includes("/") || configuredCommand.includes("\\")) return preferredCommandPaths;
4884
+ return mergeUniquePaths(preferredCommandPaths, await resolveExecutablePathsFromSearchSurface({
4876
4885
  additionalCommandDirectories: input.additionalCommandDirectories ?? null,
4877
4886
  commandName: configuredCommand
4878
- });
4887
+ }));
4879
4888
  }
4880
- return await resolveExecutablePathsFromSearchSurface({
4889
+ return mergeUniquePaths(preferredCommandPaths, await resolveExecutablePathsFromSearchSurface({
4881
4890
  additionalCommandDirectories: input.additionalCommandDirectories ?? null,
4882
4891
  commandName: input.commandName
4883
- });
4892
+ }));
4884
4893
  }
4885
4894
  function resolveExecutableOnPath(commandName) {
4886
4895
  return resolveExecutablePathsOnPath(commandName)[0] ?? null;
@@ -5276,7 +5285,7 @@ function normalizePathForDetection(path) {
5276
5285
  function pathIsEqualOrDescendant(path, parentPath) {
5277
5286
  return path === parentPath || path.startsWith(`${parentPath}/`);
5278
5287
  }
5279
- function toErrorMessage$40(error) {
5288
+ function toErrorMessage$41(error) {
5280
5289
  return error instanceof Error ? error.message : String(error);
5281
5290
  }
5282
5291
  //#endregion
@@ -5554,7 +5563,7 @@ var AcpProcessSession = class {
5554
5563
  cause: error,
5555
5564
  code: "protocol.invalid",
5556
5565
  errorType: "adapter",
5557
- message: `protocol.invalid: ${this.#processLabel} ACP emitted non-JSON-RPC output (${toErrorMessage$39(error)})`
5566
+ message: `protocol.invalid: ${this.#processLabel} ACP emitted non-JSON-RPC output (${toErrorMessage$40(error)})`
5558
5567
  }));
5559
5568
  return;
5560
5569
  }
@@ -5716,7 +5725,7 @@ function normalizeOptionalText$70(value) {
5716
5725
  const normalized = String(value ?? "").trim();
5717
5726
  return normalized.length > 0 ? normalized : null;
5718
5727
  }
5719
- function toErrorMessage$39(error) {
5728
+ function toErrorMessage$40(error) {
5720
5729
  return error instanceof Error ? error.message : String(error);
5721
5730
  }
5722
5731
  //#endregion
@@ -6693,7 +6702,8 @@ async function resolveInstalledClaudeCodeLaunchCandidates(input) {
6693
6702
  const installedCandidates = await resolveInstalledNodeScriptLaunchCandidates({
6694
6703
  commandName: DEFAULT_CLAUDE_CODE_COMMAND,
6695
6704
  configuredCommand: normalizeOptionalText$66(process.env.OPENMELD_DAEMON_RUNTIME_CLAUDE_CODE_BIN),
6696
- displayName: "Claude Code"
6705
+ displayName: "Claude Code",
6706
+ preferredLaunchContract: input?.preferredLaunchContract
6697
6707
  });
6698
6708
  if (!installedCandidates.ok) return installedCandidates;
6699
6709
  const candidates = await resolveLaunchCandidatesAfterVerification({
@@ -8403,7 +8413,7 @@ async function invokeClaudeWithSingleContextHeal(input) {
8403
8413
  return new ClaudeRuntimeError({
8404
8414
  code: "context.rebuild_failed",
8405
8415
  errorType: "adapter",
8406
- message: `context.rebuild_failed: ${toErrorMessage$38(error)}`,
8416
+ message: `context.rebuild_failed: ${toErrorMessage$39(error)}`,
8407
8417
  ...providerAccessEvidence ? { providerAccessEvidence } : {},
8408
8418
  ...telemetry ? { telemetry } : {}
8409
8419
  });
@@ -8463,7 +8473,7 @@ async function invokeClaudeOnce(input) {
8463
8473
  throw new ClaudeRuntimeError({
8464
8474
  code: "upstream_unreachable",
8465
8475
  errorType: "adapter",
8466
- message: `upstream_unreachable: ${toErrorMessage$38(error)}`
8476
+ message: `upstream_unreachable: ${toErrorMessage$39(error)}`
8467
8477
  });
8468
8478
  }
8469
8479
  }
@@ -8516,7 +8526,7 @@ function getClaudeTelemetry(error) {
8516
8526
  const telemetry = error.telemetry;
8517
8527
  return telemetry && typeof telemetry === "object" ? telemetry : null;
8518
8528
  }
8519
- function toErrorMessage$38(error) {
8529
+ function toErrorMessage$39(error) {
8520
8530
  if (error instanceof Error) return error.message;
8521
8531
  return String(error);
8522
8532
  }
@@ -8656,73 +8666,6 @@ const normalizeOptionalText$60 = (value) => {
8656
8666
  return normalized.length > 0 ? normalized : null;
8657
8667
  };
8658
8668
  //#endregion
8659
- //#region ../../runtime/adapters/codex/dist/config/codex-runtime-config.js
8660
- const DEFAULT_CODEX_COMMAND = "codex";
8661
- const CODEX_APP_BUNDLE_RESOURCES_RELATIVE_PATH = join("Codex.app", "Contents", "Resources");
8662
- async function resolveInstalledCodexLaunchCandidates(input) {
8663
- const installedCandidates = await resolveInstalledNodeScriptLaunchCandidates({
8664
- additionalCommandDirectories: resolveCodexAppBundleCommandDirectories(),
8665
- commandName: DEFAULT_CODEX_COMMAND,
8666
- configuredCommand: normalizeOptionalText$59(process.env.OPENMELD_DAEMON_RUNTIME_CODEX_BIN),
8667
- displayName: "Codex"
8668
- });
8669
- if (!installedCandidates.ok) return installedCandidates;
8670
- const candidates = await resolveLaunchCandidatesAfterVerification({
8671
- candidates: installedCandidates.candidates,
8672
- verify: async (candidate) => await verifyCodexLaunchContract({
8673
- launchContract: candidate.launchContract,
8674
- timeoutMs: input?.timeoutMs
8675
- })
8676
- });
8677
- if (candidates.length === 0) return {
8678
- errorMessage: "Codex is installed, but OpenMeld can't start it on this device.",
8679
- reason: "not_launchable",
8680
- ok: false
8681
- };
8682
- return {
8683
- candidates,
8684
- ok: true
8685
- };
8686
- }
8687
- async function verifyCodexLaunchContract(input) {
8688
- return await verifyCliLaunchContract({
8689
- cwd: input.cwd ?? process.cwd(),
8690
- displayName: "Codex",
8691
- launchContract: input.launchContract,
8692
- probeArgs: ["--version"],
8693
- timeoutMs: input.timeoutMs ?? resolveCodexTimeoutMs()
8694
- });
8695
- }
8696
- function resolveCodexTimeoutMs() {
8697
- const raw = normalizeOptionalText$59(process.env.OPENMELD_DAEMON_RUNTIME_REQUEST_TIMEOUT_MS);
8698
- if (!raw) return null;
8699
- const parsed = Number.parseInt(raw, 10);
8700
- if (!Number.isFinite(parsed) || parsed <= 0) return null;
8701
- return parsed;
8702
- }
8703
- function resolveCodexAppBundleCommandDirectories() {
8704
- const home = normalizeOptionalText$59(process.env.HOME) ?? homedir();
8705
- return [join("/Applications", CODEX_APP_BUNDLE_RESOURCES_RELATIVE_PATH), join(home, "Applications", CODEX_APP_BUNDLE_RESOURCES_RELATIVE_PATH)];
8706
- }
8707
- function normalizeOptionalText$59(value) {
8708
- const normalized = String(value ?? "").trim();
8709
- return normalized.length > 0 ? normalized : null;
8710
- }
8711
- //#endregion
8712
- //#region ../../runtime/adapters/codex/dist/context/codex-context-heal.js
8713
- const CONTEXT_LOST_ERROR_PATTERNS = [
8714
- /thread.*not\s+found/i,
8715
- /session.*not\s+found/i,
8716
- /conversation.*not\s+found/i,
8717
- /unknown\s+thread/i,
8718
- /invalid\s+thread/i,
8719
- /cannot\s+resume/i,
8720
- /resume.*failed/i
8721
- ];
8722
- function isLikelyContextLostError(message) {
8723
- return CONTEXT_LOST_ERROR_PATTERNS.some((pattern) => pattern.test(message));
8724
- }
8725
- //#endregion
8726
8669
  //#region ../../runtime/adapters/codex/dist/output/codex-provider-failure.js
8727
8670
  /**
8728
8671
  * Codex provider-account failure classification shared by the CLI and
@@ -8752,7 +8695,7 @@ function isCodexAuthFailure(value) {
8752
8695
  * changes behavior.
8753
8696
  */
8754
8697
  function classifyCodexProviderAccountFailure(input) {
8755
- if (normalizeOptionalText$58(input.codexErrorInfo)?.toLowerCase() === "usagelimitexceeded") return {
8698
+ if (normalizeOptionalText$59(input.codexErrorInfo)?.toLowerCase() === "usagelimitexceeded") return {
8756
8699
  code: "quota.exceeded",
8757
8700
  errorType: "adapter"
8758
8701
  };
@@ -8771,7 +8714,7 @@ function classifyCodexProviderAccountFailure(input) {
8771
8714
  };
8772
8715
  return null;
8773
8716
  }
8774
- function normalizeOptionalText$58(value) {
8717
+ function normalizeOptionalText$59(value) {
8775
8718
  const normalized = String(value ?? "").trim();
8776
8719
  return normalized.length > 0 ? normalized : null;
8777
8720
  }
@@ -8803,7 +8746,7 @@ function extractCodexToolActivityEvent(value, fallbackObservedAtMs = Date.now())
8803
8746
  const params = toRecord$12(record.params);
8804
8747
  const item = toRecord$12(params?.item ?? record.item);
8805
8748
  const itemType = normalizeCompactName(item?.type);
8806
- const toolCallId = normalizeOptionalText$57(item?.id);
8749
+ const toolCallId = normalizeOptionalText$58(item?.id);
8807
8750
  if (!(item && toolCallId && CODEX_TOOL_ITEM_TYPES.has(itemType))) return null;
8808
8751
  const work = resolveAdapterToolWorkActivity(itemType, item);
8809
8752
  return {
@@ -8847,7 +8790,7 @@ function resolveObservedAtMs(input) {
8847
8790
  function normalizeCompactName(value) {
8848
8791
  return typeof value === "string" ? value.trim().toLowerCase() : "";
8849
8792
  }
8850
- function normalizeOptionalText$57(value) {
8793
+ function normalizeOptionalText$58(value) {
8851
8794
  const normalized = typeof value === "string" ? value.trim() : "";
8852
8795
  return normalized.length > 0 ? normalized : null;
8853
8796
  }
@@ -9095,6 +9038,7 @@ function tomlString(value) {
9095
9038
  }
9096
9039
  //#endregion
9097
9040
  //#region ../../runtime/adapters/codex/dist/transport/codex-app-server-transport.js
9041
+ const CODEX_APP_SERVER_VERSION_PATTERN = /\/([^\s]+)/u;
9098
9042
  const APP_SERVER_PROCESS_KILL_GRACE_MS = 1e3;
9099
9043
  const DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS = 15e3;
9100
9044
  var CodexAppServerTransportError = class extends Error {
@@ -9107,8 +9051,26 @@ var CodexAppServerTransportError = class extends Error {
9107
9051
  this.errorType = input.errorType;
9108
9052
  }
9109
9053
  };
9054
+ async function probeCodexAppServerAccount(input) {
9055
+ const timeoutMs = input.timeoutMs ?? DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS;
9056
+ return await withCodexAppServerSession({
9057
+ codexTimeoutMs: timeoutMs,
9058
+ codexWorkdir: tmpdir(),
9059
+ launchContract: input.launchContract,
9060
+ startupTimeoutMs: timeoutMs
9061
+ }, async (session, initialized) => {
9062
+ const response = toRecord$11(await session.request("account/read", {}));
9063
+ return {
9064
+ authStatus: resolveCodexAppServerAuthStatus({
9065
+ account: toRecord$11(response?.account),
9066
+ response
9067
+ }),
9068
+ version: parseCodexAppServerVersion(initialized)
9069
+ };
9070
+ });
9071
+ }
9110
9072
  async function invokeCodexAppServerTransport(input) {
9111
- const prompt = normalizeOptionalText$56(input.prompt);
9073
+ const prompt = normalizeOptionalText$57(input.prompt);
9112
9074
  if (!prompt) throw new CodexAppServerTransportError({
9113
9075
  code: "schema.invalid",
9114
9076
  errorType: "config",
@@ -9147,7 +9109,7 @@ async function invokeCodexAppServerTransport(input) {
9147
9109
  threadModel: threadContext.model
9148
9110
  });
9149
9111
  const executionThreadId = threadContext.threadId;
9150
- const continuityThreadId = input.executionMode === "repair" ? normalizeOptionalText$56(input.threadId) ?? executionThreadId : executionThreadId;
9112
+ const continuityThreadId = input.executionMode === "repair" ? normalizeOptionalText$57(input.threadId) ?? executionThreadId : executionThreadId;
9151
9113
  const turnPrompt = resolveCodexTurnPrompt({
9152
9114
  fallbackPrompt: prompt,
9153
9115
  instructionPrompt: input.instructionPrompt,
@@ -9191,7 +9153,7 @@ async function invokeCodexAppServerTransport(input) {
9191
9153
  errorType: "adapter",
9192
9154
  message: interactionFailure.message
9193
9155
  });
9194
- const output = normalizeOptionalText$56(readAgentMessageOutput(completedTurn) ?? session.readCollectedAgentMessageDeltaText());
9156
+ const output = normalizeOptionalText$57(readAgentMessageOutput(completedTurn) ?? session.readCollectedAgentMessageDeltaText());
9195
9157
  requireSuccessfulCodexTurn(completedTurn);
9196
9158
  if (output) session.markAgentOutputObserved();
9197
9159
  await emitPreviewIfRequested({
@@ -9204,7 +9166,7 @@ async function invokeCodexAppServerTransport(input) {
9204
9166
  telemetry: session.buildTelemetry({
9205
9167
  invokedAtMs,
9206
9168
  previewEmitted: input.streamingMode === "stream" && input.onPreview !== void 0,
9207
- resumedContext: normalizeOptionalText$56(input.threadId) !== null,
9169
+ resumedContext: normalizeOptionalText$57(input.threadId) !== null,
9208
9170
  streamingMode: input.streamingMode ?? "final"
9209
9171
  }),
9210
9172
  threadId: continuityThreadId
@@ -9239,7 +9201,7 @@ function requireSuccessfulCodexTurn(turn) {
9239
9201
  });
9240
9202
  }
9241
9203
  async function verifyCodexAppServerThread(input) {
9242
- const threadId = normalizeOptionalText$56(input.threadId);
9204
+ const threadId = normalizeOptionalText$57(input.threadId);
9243
9205
  if (!threadId) throw new CodexAppServerTransportError({
9244
9206
  code: "schema.invalid",
9245
9207
  errorType: "config",
@@ -9262,7 +9224,7 @@ async function verifyCodexAppServerThread(input) {
9262
9224
  });
9263
9225
  }
9264
9226
  async function forkCodexAppServerThread(input) {
9265
- const sourceThreadId = normalizeOptionalText$56(input.sourceThreadId);
9227
+ const sourceThreadId = normalizeOptionalText$57(input.sourceThreadId);
9266
9228
  if (!sourceThreadId) throw new CodexAppServerTransportError({
9267
9229
  code: "schema.invalid",
9268
9230
  errorType: "config",
@@ -9281,7 +9243,7 @@ async function forkCodexAppServerThread(input) {
9281
9243
  code: "context.fork_timeout",
9282
9244
  operation: "thread/fork"
9283
9245
  }));
9284
- const title = normalizeOptionalText$56(input.title);
9246
+ const title = normalizeOptionalText$57(input.title);
9285
9247
  if (title) try {
9286
9248
  await session.requestControl("thread/name/set", {
9287
9249
  name: title,
@@ -9300,7 +9262,7 @@ async function forkCodexAppServerThread(input) {
9300
9262
  });
9301
9263
  }
9302
9264
  async function resolveDispatchThreadContext(input) {
9303
- const existingThreadId = normalizeOptionalText$56(input.threadId);
9265
+ const existingThreadId = normalizeOptionalText$57(input.threadId);
9304
9266
  if (existingThreadId) {
9305
9267
  const dispatchThreadId = input.executionMode === "repair" ? await forkEphemeralCodexRepairThread({
9306
9268
  session: input.session,
@@ -9350,7 +9312,7 @@ function buildOpenMeldCodexThreadSource(instructionEpoch) {
9350
9312
  }
9351
9313
  async function resolveCodexAppServerCollaborationMode(input) {
9352
9314
  if (input.collaborationMode !== "plan") return null;
9353
- const model = normalizeOptionalText$56(input.model);
9315
+ const model = normalizeOptionalText$57(input.model);
9354
9316
  if (!model) throw new CodexAppServerTransportError({
9355
9317
  code: "protocol.invalid",
9356
9318
  errorType: "adapter",
@@ -9385,12 +9347,12 @@ async function resolveCodexAppServerTurnCollaborationMode(input) {
9385
9347
  }
9386
9348
  function readCodexAppServerCollaborationModePreset(value) {
9387
9349
  const preset = toRecord$11(value);
9388
- const mode = normalizeOptionalText$56(preset?.mode);
9350
+ const mode = normalizeOptionalText$57(preset?.mode);
9389
9351
  if (mode !== "default" && mode !== "plan") return null;
9390
9352
  return {
9391
9353
  mode,
9392
- model: normalizeOptionalText$56(preset?.model),
9393
- reasoningEffort: normalizeOptionalText$56(preset?.reasoning_effort)
9354
+ model: normalizeOptionalText$57(preset?.model),
9355
+ reasoningEffort: normalizeOptionalText$57(preset?.reasoning_effort)
9394
9356
  };
9395
9357
  }
9396
9358
  function resolveCodexAppServerPermissionModeParams(value, executionMode, hasComputerFileAccessBoundary = false) {
@@ -9445,17 +9407,16 @@ function resolveCodexAgentControllerPermissionMode$1(value) {
9445
9407
  }
9446
9408
  function resolveCodexAppServerConversationPolicyParams(conversationPolicy) {
9447
9409
  const params = {};
9448
- const model = normalizeOptionalText$56(conversationPolicy?.model);
9410
+ const model = normalizeOptionalText$57(conversationPolicy?.model);
9449
9411
  if (model) params.model = model;
9450
- const reasoningLevel = normalizeOptionalText$56(conversationPolicy?.reasoningLevel);
9412
+ const reasoningLevel = normalizeOptionalText$57(conversationPolicy?.reasoningLevel);
9451
9413
  if (reasoningLevel) params.effort = reasoningLevel;
9452
9414
  return params;
9453
9415
  }
9454
9416
  async function withCodexAppServerSession(input, callback) {
9455
9417
  const session = new CodexAppServerSession(input);
9456
9418
  try {
9457
- await session.start();
9458
- return await callback(session);
9419
+ return await callback(session, await session.start());
9459
9420
  } catch (error) {
9460
9421
  throw toCodexAppServerTransportError(error, input.codexTimeoutMs);
9461
9422
  } finally {
@@ -9651,20 +9612,21 @@ var CodexAppServerSession = class {
9651
9612
  this.#requestProcessTermination();
9652
9613
  }, this.#startupTimeoutMs);
9653
9614
  try {
9654
- await this.request("initialize", {
9615
+ const initialized = await this.request("initialize", {
9655
9616
  capabilities: { experimentalApi: true },
9656
9617
  clientInfo: {
9657
9618
  name: "openmeld",
9658
9619
  version: "0.0.0"
9659
9620
  }
9660
9621
  });
9622
+ this.notify("initialized", {});
9623
+ return initialized;
9661
9624
  } finally {
9662
9625
  if (this.#startupTimeout !== null) {
9663
9626
  clearTimeout(this.#startupTimeout);
9664
9627
  this.#startupTimeout = null;
9665
9628
  }
9666
9629
  }
9667
- this.notify("initialized", {});
9668
9630
  }
9669
9631
  async close() {
9670
9632
  this.#clearTimers();
@@ -9754,7 +9716,7 @@ var CodexAppServerSession = class {
9754
9716
  if (candidate.method !== "turn/completed") return false;
9755
9717
  const params = toRecord$11(candidate.params);
9756
9718
  const turn = toRecord$11(params?.turn);
9757
- return params?.threadId === input.threadId && normalizeOptionalText$56(turn?.id) === input.turnId;
9719
+ return params?.threadId === input.threadId && normalizeOptionalText$57(turn?.id) === input.turnId;
9758
9720
  })).params)?.turn);
9759
9721
  if (!turn) throw new CodexAppServerTransportError({
9760
9722
  code: "protocol.invalid",
@@ -9825,7 +9787,7 @@ var CodexAppServerSession = class {
9825
9787
  this.#failAll(new CodexAppServerTransportError({
9826
9788
  code: "protocol.invalid",
9827
9789
  errorType: "adapter",
9828
- message: `protocol.invalid: codex app-server emitted non-JSON output (${toErrorMessage$37(error)})`
9790
+ message: `protocol.invalid: codex app-server emitted non-JSON output (${toErrorMessage$38(error)})`
9829
9791
  }));
9830
9792
  return;
9831
9793
  }
@@ -9926,7 +9888,7 @@ var CodexAppServerSession = class {
9926
9888
  #collectAgentMessageDelta(message) {
9927
9889
  if (message.method !== "item/agentMessage/delta") return;
9928
9890
  const params = toRecord$11(message.params);
9929
- const itemId = normalizeOptionalText$56(params?.itemId);
9891
+ const itemId = normalizeOptionalText$57(params?.itemId);
9930
9892
  const delta = readAgentMessageDeltaText(params?.delta);
9931
9893
  if (!(itemId && delta)) return;
9932
9894
  this.markAgentOutputObserved();
@@ -9994,7 +9956,7 @@ var CodexAppServerSession = class {
9994
9956
  return this.#interactionFailure;
9995
9957
  }
9996
9958
  emitProviderConversationObserved(threadId) {
9997
- const agentControllerConversationId = normalizeOptionalText$56(threadId);
9959
+ const agentControllerConversationId = normalizeOptionalText$57(threadId);
9998
9960
  if (!agentControllerConversationId) return;
9999
9961
  this.#emitRuntimeEvent({
10000
9962
  agentControllerConversationId,
@@ -10012,9 +9974,9 @@ function readThreadIdFromResponse(value) {
10012
9974
  function readThreadContextFromResponse(value) {
10013
9975
  const response = toRecord$11(value);
10014
9976
  return {
10015
- model: normalizeOptionalText$56(response?.model),
9977
+ model: normalizeOptionalText$57(response?.model),
10016
9978
  threadId: readRequiredText(response?.thread?.id, "thread response thread.id"),
10017
- threadSource: normalizeOptionalText$56(response?.thread?.threadSource)
9979
+ threadSource: normalizeOptionalText$57(response?.thread?.threadSource)
10018
9980
  };
10019
9981
  }
10020
9982
  function readTurnStartResponse(value) {
@@ -10027,14 +9989,14 @@ function readTurnStartResponse(value) {
10027
9989
  return turn;
10028
9990
  }
10029
9991
  function readAgentMessageOutput(turn) {
10030
- const text = (Array.isArray(turn.items) ? turn.items : []).filter((item) => item.type === "agentMessage").map((item) => normalizeOptionalText$56(item.text)).filter((item) => item !== null).join("\n").trim();
9992
+ const text = (Array.isArray(turn.items) ? turn.items : []).filter((item) => item.type === "agentMessage").map((item) => normalizeOptionalText$57(item.text)).filter((item) => item !== null).join("\n").trim();
10031
9993
  return text.length > 0 ? text : null;
10032
9994
  }
10033
9995
  function readTurnFailureMessage(turn) {
10034
- return normalizeOptionalText$56(turn.error?.message) ?? "codex app-server turn failed";
9996
+ return normalizeOptionalText$57(turn.error?.message) ?? "codex app-server turn failed";
10035
9997
  }
10036
9998
  function readTurnFailureCodexErrorInfo(turn) {
10037
- return normalizeOptionalText$56(turn.error?.codexErrorInfo);
9999
+ return normalizeOptionalText$57(turn.error?.codexErrorInfo);
10038
10000
  }
10039
10001
  function readCodexTokenUsage(value) {
10040
10002
  const usage = toRecord$11(value);
@@ -10492,7 +10454,7 @@ function convertCodexMcpElicitationValues(values, schema) {
10492
10454
  return String(value);
10493
10455
  }
10494
10456
  function normalizeBoundedText$3(value, maxLength) {
10495
- const text = normalizeOptionalText$56(value);
10457
+ const text = normalizeOptionalText$57(value);
10496
10458
  return text ? text.slice(0, maxLength) : null;
10497
10459
  }
10498
10460
  function safeJsonStringify(value) {
@@ -10527,7 +10489,7 @@ function buildServerRequestDeclineResponse(method) {
10527
10489
  }
10528
10490
  }
10529
10491
  function toJsonRpcTransportError$1(error) {
10530
- const message = normalizeOptionalText$56(error.message) ?? "codex app-server error";
10492
+ const message = normalizeOptionalText$57(error.message) ?? "codex app-server error";
10531
10493
  const permissionDenial = classifyRuntimePermissionDenialMessage({
10532
10494
  message,
10533
10495
  source: "codex"
@@ -10567,19 +10529,19 @@ function toCodexAppServerTransportError(error, timeoutMs) {
10567
10529
  errorType: error.errorType,
10568
10530
  message: error.message
10569
10531
  });
10570
- if (timeoutMs !== null && toErrorMessage$37(error).includes("timed out")) return new CodexAppServerTransportError({
10532
+ if (timeoutMs !== null && toErrorMessage$38(error).includes("timed out")) return new CodexAppServerTransportError({
10571
10533
  code: "process.timeout",
10572
10534
  errorType: "timeout",
10573
- message: toErrorMessage$37(error)
10535
+ message: toErrorMessage$38(error)
10574
10536
  });
10575
10537
  return new CodexAppServerTransportError({
10576
10538
  code: "upstream_unreachable",
10577
10539
  errorType: "adapter",
10578
- message: `upstream_unreachable: failed to execute codex app-server (${toErrorMessage$37(error)})`
10540
+ message: `upstream_unreachable: failed to execute codex app-server (${toErrorMessage$38(error)})`
10579
10541
  });
10580
10542
  }
10581
10543
  function readRequiredText(value, label) {
10582
- const text = normalizeOptionalText$56(value);
10544
+ const text = normalizeOptionalText$57(value);
10583
10545
  if (text) return text;
10584
10546
  throw new CodexAppServerTransportError({
10585
10547
  code: "protocol.invalid",
@@ -10594,15 +10556,177 @@ function toRecord$11(value) {
10594
10556
  function normalizeText$11(value) {
10595
10557
  return String(value ?? "").trim();
10596
10558
  }
10597
- function normalizeOptionalText$56(value) {
10559
+ function normalizeOptionalText$57(value) {
10598
10560
  const normalized = normalizeText$11(value);
10599
10561
  return normalized.length > 0 ? normalized : null;
10600
10562
  }
10601
- function toErrorMessage$37(error) {
10563
+ function parseCodexAppServerVersion(response) {
10564
+ return normalizeOptionalText$57(toRecord$11(response)?.userAgent)?.match(CODEX_APP_SERVER_VERSION_PATTERN)?.[1] ?? null;
10565
+ }
10566
+ function resolveCodexAppServerAuthStatus(input) {
10567
+ if (input.account) return "authenticated";
10568
+ return input.response?.requiresOpenaiAuth === true ? "unauthenticated" : "unknown";
10569
+ }
10570
+ function toErrorMessage$38(error) {
10602
10571
  if (error instanceof Error) return error.message;
10603
10572
  return String(error);
10604
10573
  }
10605
10574
  //#endregion
10575
+ //#region ../../runtime/adapters/codex/dist/config/codex-runtime-config.js
10576
+ const DEFAULT_CODEX_COMMAND = "codex";
10577
+ const CODEX_APP_BUNDLE_NAMES = ["Codex.app", "ChatGPT.app"];
10578
+ const CODEX_CONTROL_PROBE_TIMEOUT_MS = 15e3;
10579
+ async function resolveInstalledCodexLaunchCandidates(input) {
10580
+ const installedCandidates = await resolveInstalledNodeScriptLaunchCandidates({
10581
+ additionalCommandDirectories: resolveCodexAppBundleCommandDirectories(input?.appBundleRoots),
10582
+ commandName: DEFAULT_CODEX_COMMAND,
10583
+ configuredCommand: normalizeOptionalText$56(process.env.OPENMELD_DAEMON_RUNTIME_CODEX_BIN),
10584
+ displayName: "Codex",
10585
+ preferredLaunchContract: input?.preferredLaunchContract
10586
+ });
10587
+ if (!installedCandidates.ok) return installedCandidates;
10588
+ const inspections = await Promise.all(installedCandidates.candidates.map(async (candidate, index) => ({
10589
+ candidate,
10590
+ index,
10591
+ inspection: await inspectCodexLaunchCandidate({
10592
+ candidate,
10593
+ timeoutMs: input?.timeoutMs
10594
+ })
10595
+ })));
10596
+ const completed = inspections.filter(({ inspection }) => inspection.ok);
10597
+ const selectedInspections = completed.length > 0 ? completed : inspections.filter(({ inspection }) => !inspection.ok && inspection.failureKind === "incomplete_check");
10598
+ const candidates = selectedInspections.map(({ candidate, inspection }) => inspection.ok ? decorateCodexLaunchCandidate({
10599
+ candidate,
10600
+ inspection
10601
+ }) : decorateCodexLaunchCandidate({
10602
+ candidate,
10603
+ inspection: null
10604
+ }));
10605
+ if (candidates.length === 0) return {
10606
+ errorMessage: inspections.find((entry) => !entry.inspection.ok)?.inspection.errorMessage ?? "Codex is installed, but OpenMeld can't start it on this device.",
10607
+ reason: "not_launchable",
10608
+ ok: false
10609
+ };
10610
+ const preferredInstallId = resolvePreferredCodexInstallId(selectedInspections);
10611
+ return {
10612
+ candidates,
10613
+ ok: true,
10614
+ ...preferredInstallId ? { preferredInstallId } : {}
10615
+ };
10616
+ }
10617
+ async function verifyCodexLaunchContract(input) {
10618
+ const fileCheck = await verifyLaunchContractFiles({ launchContract: input.launchContract });
10619
+ if (!fileCheck.ok) return fileCheck;
10620
+ try {
10621
+ await probeCodexAppServerAccount({
10622
+ launchContract: input.launchContract,
10623
+ timeoutMs: resolveCodexControlProbeTimeoutMs(input.timeoutMs)
10624
+ });
10625
+ return fileCheck;
10626
+ } catch (error) {
10627
+ return {
10628
+ errorMessage: `Codex app-server can't start on this device: ${toErrorMessage$37(error)}`,
10629
+ failureKind: error instanceof CodexAppServerTransportError && error.errorType === "timeout" ? "incomplete_check" : "completed_negative",
10630
+ ok: false
10631
+ };
10632
+ }
10633
+ }
10634
+ async function verifyCodexCommandLaunchContract(input) {
10635
+ return await verifyCliLaunchContract({
10636
+ cwd: input.cwd ?? process.cwd(),
10637
+ displayName: "Codex",
10638
+ launchContract: input.launchContract,
10639
+ probeArgs: ["--version"],
10640
+ timeoutMs: input.timeoutMs ?? resolveCodexTimeoutMs()
10641
+ });
10642
+ }
10643
+ function resolveCodexTimeoutMs() {
10644
+ const raw = normalizeOptionalText$56(process.env.OPENMELD_DAEMON_RUNTIME_REQUEST_TIMEOUT_MS);
10645
+ if (!raw) return null;
10646
+ const parsed = Number.parseInt(raw, 10);
10647
+ if (!Number.isFinite(parsed) || parsed <= 0) return null;
10648
+ return parsed;
10649
+ }
10650
+ function resolveCodexAppBundleCommandDirectories(appBundleRoots) {
10651
+ const home = normalizeOptionalText$56(process.env.HOME) ?? homedir();
10652
+ return (appBundleRoots ?? ["/Applications", join(home, "Applications")]).flatMap((root) => CODEX_APP_BUNDLE_NAMES.map((appBundleName) => join(root, appBundleName, "Contents", "Resources")));
10653
+ }
10654
+ async function inspectCodexLaunchCandidate(input) {
10655
+ try {
10656
+ return {
10657
+ ...await probeCodexAppServerAccount({
10658
+ launchContract: input.candidate.launchContract,
10659
+ timeoutMs: resolveCodexControlProbeTimeoutMs(input.timeoutMs)
10660
+ }),
10661
+ ok: true
10662
+ };
10663
+ } catch (error) {
10664
+ return {
10665
+ errorMessage: toErrorMessage$37(error),
10666
+ failureKind: error instanceof CodexAppServerTransportError && error.errorType === "timeout" ? "incomplete_check" : "completed_negative",
10667
+ ok: false
10668
+ };
10669
+ }
10670
+ }
10671
+ function resolvePreferredCodexInstallId(inspections) {
10672
+ return inspections.filter((entry) => entry.inspection.ok).sort((left, right) => {
10673
+ const scoreDifference = resolveCodexPreferenceScore(left) - resolveCodexPreferenceScore(right);
10674
+ return scoreDifference === 0 ? left.index - right.index : scoreDifference;
10675
+ })[0]?.candidate.installId ?? inspections[0]?.candidate.installId ?? null;
10676
+ }
10677
+ function resolveCodexPreferenceScore(input) {
10678
+ const authenticated = input.inspection.authStatus === "authenticated";
10679
+ const chatGptApp = isChatGptBundledCodex(input.candidate.commandPath);
10680
+ if (authenticated) return chatGptApp ? 0 : 1;
10681
+ return chatGptApp ? 2 : 3;
10682
+ }
10683
+ function decorateCodexLaunchCandidate(input) {
10684
+ const appLabel = resolveCodexAppLabel(input.candidate.commandPath);
10685
+ const status = resolveCodexSignInStatus(input.inspection?.authStatus);
10686
+ const version = input.inspection?.version ? `v${input.inspection.version}` : "Version unavailable";
10687
+ return {
10688
+ ...input.candidate,
10689
+ detail: `${version} · ${status} · ${input.candidate.detail}`,
10690
+ ...appLabel ? { label: appLabel } : {}
10691
+ };
10692
+ }
10693
+ function resolveCodexSignInStatus(authStatus) {
10694
+ if (authStatus === "authenticated") return "Signed in";
10695
+ if (authStatus === "unauthenticated") return "Sign in needed";
10696
+ return "Sign-in status unavailable";
10697
+ }
10698
+ function resolveCodexAppLabel(commandPath) {
10699
+ if (isChatGptBundledCodex(commandPath)) return "ChatGPT app";
10700
+ return commandPath.toLowerCase().includes("/codex.app/contents/resources/") ? "Codex app" : null;
10701
+ }
10702
+ function isChatGptBundledCodex(commandPath) {
10703
+ return commandPath.toLowerCase().includes("/chatgpt.app/contents/resources/");
10704
+ }
10705
+ function resolveCodexControlProbeTimeoutMs(timeoutMs) {
10706
+ return typeof timeoutMs === "number" ? timeoutMs : CODEX_CONTROL_PROBE_TIMEOUT_MS;
10707
+ }
10708
+ function toErrorMessage$37(error) {
10709
+ return error instanceof Error ? error.message : String(error);
10710
+ }
10711
+ function normalizeOptionalText$56(value) {
10712
+ const normalized = String(value ?? "").trim();
10713
+ return normalized.length > 0 ? normalized : null;
10714
+ }
10715
+ //#endregion
10716
+ //#region ../../runtime/adapters/codex/dist/context/codex-context-heal.js
10717
+ const CONTEXT_LOST_ERROR_PATTERNS = [
10718
+ /thread.*not\s+found/i,
10719
+ /session.*not\s+found/i,
10720
+ /conversation.*not\s+found/i,
10721
+ /unknown\s+thread/i,
10722
+ /invalid\s+thread/i,
10723
+ /cannot\s+resume/i,
10724
+ /resume.*failed/i
10725
+ ];
10726
+ function isLikelyContextLostError(message) {
10727
+ return CONTEXT_LOST_ERROR_PATTERNS.some((pattern) => pattern.test(message));
10728
+ }
10729
+ //#endregion
10606
10730
  //#region ../../runtime/adapters/codex/dist/output/codex-output-parser.js
10607
10731
  function processCodexStdoutLine(input) {
10608
10732
  const normalizedLine = input.line.trim();
@@ -11640,7 +11764,7 @@ async function interruptCodexActiveAppServerTurn(input) {
11640
11764
  async function resolveCodexDispatchLaunchContract(input) {
11641
11765
  const explicitLaunchContract = resolveConfiguredCodexLaunchContract(input);
11642
11766
  if (explicitLaunchContract) {
11643
- const verification = await verifyCodexLaunchContract({ launchContract: explicitLaunchContract });
11767
+ const verification = await verifyCodexCommandLaunchContract({ launchContract: explicitLaunchContract });
11644
11768
  if (verification.ok) return explicitLaunchContract;
11645
11769
  throw Object.assign(new Error(verification.errorMessage), {
11646
11770
  code: "controller.launch.needs_repair",
@@ -11669,7 +11793,8 @@ async function resolveInstalledGrokBuildLaunchCandidates(input) {
11669
11793
  additionalCommandDirectories: [join(resolveHome(), ".grok", "bin")],
11670
11794
  commandName: DEFAULT_GROK_BUILD_COMMAND,
11671
11795
  configuredCommand: normalizeOptionalText$52(process.env.OPENMELD_DAEMON_RUNTIME_GROK_BUILD_BIN),
11672
- displayName: "Grok Build"
11796
+ displayName: "Grok Build",
11797
+ preferredLaunchContract: input?.preferredLaunchContract
11673
11798
  });
11674
11799
  if (!installedCandidates.ok) return installedCandidates;
11675
11800
  const candidates = await resolveLaunchCandidatesAfterVerification({
@@ -12793,7 +12918,8 @@ async function resolveInstalledOpenCodeLaunchCandidates(input) {
12793
12918
  const installedCandidates = await resolveInstalledNodeScriptLaunchCandidates({
12794
12919
  commandName: DEFAULT_OPENCODE_COMMAND,
12795
12920
  configuredCommand: normalizeOptionalText$49(process.env.OPENMELD_DAEMON_RUNTIME_OPENCODE_BIN),
12796
- displayName: "OpenCode"
12921
+ displayName: "OpenCode",
12922
+ preferredLaunchContract: input?.preferredLaunchContract
12797
12923
  });
12798
12924
  if (!installedCandidates.ok) return installedCandidates;
12799
12925
  const candidates = await resolveLaunchCandidatesAfterVerification({
@@ -17629,7 +17755,7 @@ function resolveOpenMeldAccountContext(input) {
17629
17755
  };
17630
17756
  }
17631
17757
  async function resolveCurrentOpenMeldAccountContext() {
17632
- const { getAuthSessionMetadata } = await import("./auth-session-BcT7IOfJ.js").then((n) => n.t);
17758
+ const { getAuthSessionMetadata } = await import("./auth-session-BH5KpxlR.js").then((n) => n.t);
17633
17759
  return resolveOpenMeldAccountContext({ session: await getAuthSessionMetadata().catch(() => null) });
17634
17760
  }
17635
17761
  function resolveHostKey(baseUrl) {
@@ -19251,7 +19377,7 @@ function warnDaemonEvent(eventName, fields) {
19251
19377
  const definedFields = Object.fromEntries(Object.entries(fields).filter((entry) => entry[1] !== void 0));
19252
19378
  console.warn(`${nowIsoString()} ${eventName} ${JSON.stringify(definedFields)}`);
19253
19379
  }
19254
- const toErrorMessage$31 = toErrorMessage$41;
19380
+ const toErrorMessage$31 = toErrorMessage$42;
19255
19381
  function dirnamePath(path) {
19256
19382
  const lastSlash = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
19257
19383
  if (lastSlash <= 0) return ".";
@@ -21134,6 +21260,9 @@ const LAUNCHD_ENABLED_PATTERN = /enabled\s*=\s*(true|false)/i;
21134
21260
  const LAUNCHD_STATE_PATTERN = /state\s*=\s*running/i;
21135
21261
  const LAUNCHD_DISABLED_SERVICES_ENTRY_PATTERN = /"([^"]+)"\s*=>\s*(enabled|disabled)/i;
21136
21262
  const LAUNCHD_STRING_PATTERN = /<string>([^<]+)<\/string>/g;
21263
+ const LAUNCHD_ENVIRONMENT_BLOCK_PATTERN = /<key>EnvironmentVariables<\/key>\s*<dict>([\s\S]*?)<\/dict>/;
21264
+ const WINDOWS_LINE_SEPARATOR_PATTERN = /\r?\n/;
21265
+ const WINDOWS_ENVIRONMENT_ASSIGNMENT_PATTERN = /^set "([^=]+)=(.*)"$/i;
21137
21266
  const WINDOWS_STATE_PATTERN = /STATE\s*:\s*\d+\s+([A-Za-z_]+)/;
21138
21267
  const WINDOWS_AUTO_START_PATTERN = /auto|auto_start/i;
21139
21268
  const WINDOWS_SERVICE_DOES_NOT_EXIST_CODE_PATTERN = /(?:^|\D)1060(?:\D|$)/u;
@@ -21693,7 +21822,11 @@ function buildSystemdManager(pathInput = {}) {
21693
21822
  running: readSystemdServiceActiveProbe(activeResult),
21694
21823
  enabled: readSystemdServiceEnabledProbe(enabledResult),
21695
21824
  definitionPath: installed ? unitPath : null,
21696
- commandSummary: installed ? await readSystemServiceCommandSummary(unitPath, "ExecStart=") : null
21825
+ commandSummary: installed ? await readSystemServiceCommandSummary(unitPath, "ExecStart=") : null,
21826
+ environmentTarget: installed ? await readDaemonServiceEnvironmentTargetFromDefinition({
21827
+ controller: SYSTEMD_CONTROLLER,
21828
+ path: unitPath
21829
+ }) : null
21697
21830
  };
21698
21831
  },
21699
21832
  readJobDiagnostics: async () => null,
@@ -21874,7 +22007,11 @@ function buildLaunchdManager(pathInput = {}) {
21874
22007
  running: LAUNCHD_STATE_PATTERN.test(output),
21875
22008
  enabled: enabledFromDisabledServices ?? parseLaunchdEnabled(output),
21876
22009
  definitionPath: installed ? plistPath : null,
21877
- commandSummary: installed ? await readLaunchdProgramArguments(plistPath) : null
22010
+ commandSummary: installed ? await readLaunchdProgramArguments(plistPath) : null,
22011
+ environmentTarget: installed ? await readDaemonServiceEnvironmentTargetFromDefinition({
22012
+ controller: LAUNCHD_CONTROLLER,
22013
+ path: plistPath
22014
+ }) : null
21878
22015
  };
21879
22016
  },
21880
22017
  readJobDiagnostics: async () => {
@@ -22160,7 +22297,11 @@ function buildWindowsManager(pathInput = {}) {
22160
22297
  running: state?.toUpperCase() === "RUNNING",
22161
22298
  enabled: parseWindowsEnabled(startType),
22162
22299
  definitionPath: scriptPath,
22163
- commandSummary: await readWindowsRunnerCommandSummary(scriptPath) ?? parseRegexGroup(qc.stdout, WINDOWS_BINARY_PATH_PATTERN) ?? null
22300
+ commandSummary: await readWindowsRunnerCommandSummary(scriptPath) ?? parseRegexGroup(qc.stdout, WINDOWS_BINARY_PATH_PATTERN) ?? null,
22301
+ environmentTarget: await readDaemonServiceEnvironmentTargetFromDefinition({
22302
+ controller: WINDOWS_CONTROLLER,
22303
+ path: scriptPath
22304
+ })
22164
22305
  };
22165
22306
  },
22166
22307
  readJobDiagnostics: async () => null,
@@ -22234,6 +22375,75 @@ async function readLaunchdProgramArguments(path) {
22234
22375
  if (matches.length === 0) return null;
22235
22376
  return matches.join(" ");
22236
22377
  }
22378
+ const SERVICE_ENVIRONMENT_TARGET_KEYS = {
22379
+ preset: "OPENMELD_ENV_PRESET",
22380
+ gatewayUrl: "OPENMELD_GATEWAY_URL",
22381
+ authBaseUrl: "OPENMELD_AUTH_URL",
22382
+ userFacingCommand: "OPENMELD_USER_FACING_CLI_COMMAND"
22383
+ };
22384
+ function parseDaemonServiceEnvironmentTargetFromDefinition(input) {
22385
+ let environment;
22386
+ if (input.controller === SYSTEMD_CONTROLLER) environment = parseSystemdEnvironment(input.definition);
22387
+ else if (input.controller === LAUNCHD_CONTROLLER) environment = parseLaunchdEnvironment(input.definition);
22388
+ else environment = parseWindowsEnvironment(input.definition);
22389
+ const preset = environment[SERVICE_ENVIRONMENT_TARGET_KEYS.preset];
22390
+ const gatewayUrl = environment[SERVICE_ENVIRONMENT_TARGET_KEYS.gatewayUrl];
22391
+ const authBaseUrl = environment[SERVICE_ENVIRONMENT_TARGET_KEYS.authBaseUrl];
22392
+ const userFacingCommand = environment[SERVICE_ENVIRONMENT_TARGET_KEYS.userFacingCommand];
22393
+ if (!((preset === "prod" || preset === "canary" || preset === "dev-local") && gatewayUrl && authBaseUrl && userFacingCommand)) return null;
22394
+ return {
22395
+ preset,
22396
+ gatewayUrl,
22397
+ authBaseUrl,
22398
+ userFacingCommand
22399
+ };
22400
+ }
22401
+ async function readDaemonServiceEnvironmentTargetFromDefinition(input) {
22402
+ const definition = await readFile(input.path, "utf8").catch(() => null);
22403
+ if (!definition) return null;
22404
+ return parseDaemonServiceEnvironmentTargetFromDefinition({
22405
+ controller: input.controller,
22406
+ definition
22407
+ });
22408
+ }
22409
+ function parseSystemdEnvironment(definition) {
22410
+ const environment = {};
22411
+ for (const rawLine of definition.split("\n")) {
22412
+ const line = rawLine.trim();
22413
+ if (!line.startsWith("Environment=")) continue;
22414
+ const assignment = line.slice(12);
22415
+ const separatorIndex = assignment.indexOf("=");
22416
+ if (separatorIndex <= 0) continue;
22417
+ const key = assignment.slice(0, separatorIndex);
22418
+ let value = assignment.slice(separatorIndex + 1);
22419
+ if (value.startsWith("\"") && value.endsWith("\"")) value = value.slice(1, -1).replace(/\\"/g, "\"").replace(/\\\\/g, "\\");
22420
+ environment[key] = value;
22421
+ }
22422
+ return environment;
22423
+ }
22424
+ function parseLaunchdEnvironment(definition) {
22425
+ const environmentBlock = definition.match(LAUNCHD_ENVIRONMENT_BLOCK_PATTERN)?.[1];
22426
+ if (!environmentBlock) return {};
22427
+ const environment = {};
22428
+ for (const match of environmentBlock.matchAll(/<key>([^<]+)<\/key>\s*<string>([^<]*)<\/string>/g)) {
22429
+ const key = decodeXmlText(match[1] ?? "");
22430
+ if (!key) continue;
22431
+ environment[key] = decodeXmlText(match[2] ?? "");
22432
+ }
22433
+ return environment;
22434
+ }
22435
+ function parseWindowsEnvironment(definition) {
22436
+ const environment = {};
22437
+ for (const rawLine of definition.split(WINDOWS_LINE_SEPARATOR_PATTERN)) {
22438
+ const match = rawLine.trim().match(WINDOWS_ENVIRONMENT_ASSIGNMENT_PATTERN);
22439
+ if (!(match?.[1] && match[2] !== void 0)) continue;
22440
+ environment[match[1]] = match[2].replace(/\\"/g, "\"");
22441
+ }
22442
+ return environment;
22443
+ }
22444
+ function decodeXmlText(value) {
22445
+ return value.replace(/&apos;/g, "'").replace(/&quot;/g, "\"").replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&");
22446
+ }
22237
22447
  function isSystemdAvailable() {
22238
22448
  return runCommand$3({
22239
22449
  command: "systemctl",
@@ -23434,7 +23644,8 @@ async function resolveInstalledCursorLaunchCandidates(input) {
23434
23644
  additionalCommandDirectories: resolveCursorCommandDirectories(),
23435
23645
  commandName: DEFAULT_CURSOR_COMMAND,
23436
23646
  configuredCommand: normalizeOptionalText$42(process.env.OPENMELD_DAEMON_RUNTIME_CURSOR_BIN),
23437
- displayName: "Cursor CLI"
23647
+ displayName: "Cursor CLI",
23648
+ preferredLaunchContract: input?.preferredLaunchContract
23438
23649
  });
23439
23650
  if (!installedCandidates.ok) return installedCandidates;
23440
23651
  const candidates = await resolveLaunchCandidatesAfterVerification({
@@ -24609,7 +24820,8 @@ async function resolveInstalledOpenClawLaunchCandidates(input) {
24609
24820
  const installedCandidates = await resolveInstalledNodeScriptLaunchCandidates({
24610
24821
  commandName: DEFAULT_OPENCLAW_COMMAND,
24611
24822
  configuredCommand: normalizeOptionalText$39(process.env.OPENMELD_DAEMON_RUNTIME_OPENCLAW_BIN),
24612
- displayName: "OpenClaw"
24823
+ displayName: "OpenClaw",
24824
+ preferredLaunchContract: input?.preferredLaunchContract
24613
24825
  });
24614
24826
  if (!installedCandidates.ok) return installedCandidates;
24615
24827
  const candidates = await resolveLaunchCandidatesAfterVerification({
@@ -32138,7 +32350,8 @@ const DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES = /* @__PURE__ */ new Set([
32138
32350
  "bundle_strategy_legacy",
32139
32351
  "bundle_provenance_drift",
32140
32352
  "bundle_path_invalid",
32141
- "duplicate_owned_processes"
32353
+ "duplicate_owned_processes",
32354
+ "service_manager_environment_drift"
32142
32355
  ]);
32143
32356
  const DAEMON_SERVICE_AUTO_HEAL_ANOMALIES = /* @__PURE__ */ new Set([
32144
32357
  "runtime_stale",
@@ -32163,6 +32376,7 @@ const DAEMON_SERVICE_REPAIR_ANOMALIES = /* @__PURE__ */ new Set([
32163
32376
  "bundle_provenance_drift",
32164
32377
  "bundle_path_invalid",
32165
32378
  "service_manager_path_drift",
32379
+ "service_manager_environment_drift",
32166
32380
  "duplicate_owned_processes"
32167
32381
  ]);
32168
32382
  const DAEMON_SERVICE_RUN_BLOCKING_ANOMALIES = /* @__PURE__ */ new Set([
@@ -32183,6 +32397,7 @@ const DAEMON_SERVICE_RUN_BLOCKING_ANOMALIES = /* @__PURE__ */ new Set([
32183
32397
  "runtime_contract_unavailable",
32184
32398
  "runtime_stale",
32185
32399
  "service_manager_path_drift",
32400
+ "service_manager_environment_drift",
32186
32401
  "version_outdated"
32187
32402
  ])].filter((code) => code !== "runtime_stale" && code !== "version_outdated" && code !== "bundle_version_drift"),
32188
32403
  "duplicate_owned_processes",
@@ -32287,7 +32502,8 @@ function buildDaemonServiceTargetSpec(input) {
32287
32502
  const distribution = input.distribution ?? resolveOpenMeldDistribution();
32288
32503
  return {
32289
32504
  daemonVersion: input.daemonVersion,
32290
- bundleFormat: distribution === "binary" ? "binary_v1" : "self_contained_v1"
32505
+ bundleFormat: distribution === "binary" ? "binary_v1" : "self_contained_v1",
32506
+ environmentTarget: input.environmentTarget ?? resolveOpenMeldEnvironmentTargetFromEnv({ gatewayUrl: input.gatewayUrl })
32291
32507
  };
32292
32508
  }
32293
32509
  function resolveDaemonServiceAlignmentDecision(input) {
@@ -32344,8 +32560,16 @@ function collectFullAlignmentReasonCodes(input) {
32344
32560
  });
32345
32561
  if (input.versionDecision === "already_aligned" && input.inventory.activeBundle && input.inventory.activeBundle.daemonVersion !== resolveExpectedArtifactVersion(input.inventory) && !reasonCodes.includes("bundle_version_drift")) reasonCodes.push("bundle_version_drift");
32346
32562
  if (input.inventory.activeBundle && input.inventory.activeBundle.bundleFormat !== input.target.bundleFormat && !reasonCodes.includes("bundle_strategy_legacy")) reasonCodes.push("bundle_strategy_legacy");
32563
+ if (hasServiceManagerEnvironmentDrift(input) && !reasonCodes.includes("service_manager_environment_drift")) reasonCodes.push("service_manager_environment_drift");
32347
32564
  return reasonCodes;
32348
32565
  }
32566
+ function hasServiceManagerEnvironmentDrift(input) {
32567
+ const status = input.inventory.serviceManagerStatus;
32568
+ if (!(status?.installed && status.environmentTarget !== void 0)) return false;
32569
+ const observed = status.environmentTarget;
32570
+ const expected = input.target.environmentTarget;
32571
+ return observed === null || observed.preset !== expected.preset || observed.gatewayUrl !== expected.gatewayUrl || observed.authBaseUrl !== expected.authBaseUrl || observed.userFacingCommand !== expected.userFacingCommand;
32572
+ }
32349
32573
  function resolveVersionDecision(input) {
32350
32574
  const configuredVersion = resolveExpectedArtifactVersion(input.inventory);
32351
32575
  if (!configuredVersion) return "already_aligned";
@@ -32984,7 +33208,7 @@ function resolveBuiltinAgentControllerDefinition(agentId) {
32984
33208
  //#endregion
32985
33209
  //#region src/agents/local-controller-install.ts
32986
33210
  async function listBuiltinControllerInstalledCandidates(input) {
32987
- if (!(input.detected && input.runtimeSupported)) return {
33211
+ if (!(input.runtimeSupported && (input.detected || input.persistedLaunchContract))) return {
32988
33212
  errorCode: "controller.launch.needs_repair",
32989
33213
  errorMessage: `${input.displayName} is not available on this computer.`,
32990
33214
  ok: false
@@ -32995,7 +33219,7 @@ async function listBuiltinControllerInstalledCandidates(input) {
32995
33219
  errorMessage: `${input.displayName} does not expose a builtin local install resolver yet.`,
32996
33220
  ok: false
32997
33221
  };
32998
- const installedCandidates = await resolver.resolveInstalledLaunchCandidates();
33222
+ const installedCandidates = await resolver.resolveInstalledLaunchCandidates({ preferredLaunchContract: input.persistedLaunchContract ?? null });
32999
33223
  if (!installedCandidates.ok) return {
33000
33224
  errorCode: "controller.launch.needs_repair",
33001
33225
  errorMessage: installedCandidates.errorMessage,
@@ -33007,7 +33231,7 @@ async function listBuiltinControllerInstalledCandidates(input) {
33007
33231
  };
33008
33232
  }
33009
33233
  async function resolveBuiltinControllerInstallResolution(input) {
33010
- if (!(input.detected && input.runtimeSupported)) return {
33234
+ if (!(input.runtimeSupported && (input.detected || input.persistedLaunchContract))) return {
33011
33235
  detail: null,
33012
33236
  installChoices: [],
33013
33237
  launchContract: null,
@@ -33052,7 +33276,10 @@ async function resolveBuiltinControllerInstallResolution(input) {
33052
33276
  };
33053
33277
  }
33054
33278
  if (installedCandidates.candidates.length > 1) {
33055
- const selectedInstall = resolveAutomaticInstallChoice({ candidates: installedCandidates.candidates });
33279
+ const selectedInstall = resolveAutomaticInstallChoice({
33280
+ candidates: installedCandidates.candidates,
33281
+ preferredInstallId: installedCandidates.preferredInstallId
33282
+ });
33056
33283
  if (selectedInstall) return {
33057
33284
  detail: null,
33058
33285
  installChoices: [],
@@ -33075,13 +33302,13 @@ async function resolveBuiltinControllerInstallResolution(input) {
33075
33302
  }
33076
33303
  async function resolvePersistedControllerInstall(input) {
33077
33304
  const persistedVerification = await input.resolver.verifyLaunchContract({ launchContract: input.persistedLaunchContract });
33305
+ const installedCandidates = await input.resolver.resolveInstalledLaunchCandidates({ preferredLaunchContract: input.persistedLaunchContract });
33078
33306
  if (persistedVerification.ok || persistedVerification.failureKind === "incomplete_check") return {
33079
33307
  detail: null,
33080
- installChoices: [],
33308
+ installChoices: installedCandidates.ok ? installedCandidates.candidates : [],
33081
33309
  launchContract: input.persistedLaunchContract,
33082
33310
  status: "ready"
33083
33311
  };
33084
- const installedCandidates = await input.resolver.resolveInstalledLaunchCandidates();
33085
33312
  if (installedCandidates.ok && installedCandidates.candidates.length > 1) return {
33086
33313
  detail: buildNeedsInstallChoiceDetail(input.displayName),
33087
33314
  installChoices: installedCandidates.candidates,
@@ -33096,6 +33323,8 @@ async function resolvePersistedControllerInstall(input) {
33096
33323
  };
33097
33324
  }
33098
33325
  function resolveAutomaticInstallChoice(input) {
33326
+ const preferredInstall = input.preferredInstallId ? input.candidates.find((candidate) => candidate.installId === input.preferredInstallId) ?? null : null;
33327
+ if (preferredInstall) return preferredInstall;
33099
33328
  return input.candidates[0] ?? null;
33100
33329
  }
33101
33330
  async function repairBuiltinControllerInstall(input) {
@@ -35438,7 +35667,19 @@ function canManageRegistryAgentSkillTargets() {
35438
35667
  }
35439
35668
  async function detectInstalledSkillsAgents(registry) {
35440
35669
  const allowRegistryDefaults = canManageRegistryAgentSkillTargets();
35441
- return (await mapWithConcurrency(Object.entries(registry).filter(([, config]) => allowRegistryDefaults || config.globalSkillsDirSource === "config-override"), MAX_CONCURRENT_AGENT_DETECTIONS, async ([agentName, config]) => ({
35670
+ return await detectInstalledRegistryAgents({ entries: Object.entries(registry).filter(([, config]) => allowRegistryDefaults || config.globalSkillsDirSource === "config-override") });
35671
+ }
35672
+ /**
35673
+ * Detects local Agent Controllers without granting a lane permission to manage
35674
+ * their shared skills directories. Runtime discovery is read-only machine
35675
+ * evidence and must remain available in isolated dev and canary lanes.
35676
+ */
35677
+ async function detectInstalledRuntimeAgents(registry) {
35678
+ const allowRegistryDefaults = canManageRegistryAgentSkillTargets();
35679
+ return await detectInstalledRegistryAgents({ entries: Object.entries(registry).filter(([, config]) => config.runtimeSupported || allowRegistryDefaults || config.globalSkillsDirSource === "config-override") });
35680
+ }
35681
+ async function detectInstalledRegistryAgents(input) {
35682
+ return (await mapWithConcurrency(input.entries, MAX_CONCURRENT_AGENT_DETECTIONS, async ([agentName, config]) => ({
35442
35683
  agentName,
35443
35684
  installed: await config.detectInstalled()
35444
35685
  }))).filter((entry) => entry.installed).map((entry) => entry.agentName).sort((a, b) => a.localeCompare(b));
@@ -35531,7 +35772,7 @@ async function loadAgentCatalog() {
35531
35772
  throw wrapConfigError(error, "agents.config_read_failed");
35532
35773
  });
35533
35774
  const builtins = resolveSkillsAgentRegistry(skillsConfig);
35534
- const detectedIds = new Set(await detectInstalledSkillsAgents(builtins));
35775
+ const detectedIds = new Set(await detectInstalledRuntimeAgents(builtins));
35535
35776
  const builtinsById = /* @__PURE__ */ new Map();
35536
35777
  for (const [agentId, entry] of Object.entries(builtins)) builtinsById.set(agentId, {
35537
35778
  agentId,
@@ -35931,6 +36172,7 @@ async function manageAgentRegistrationInstallation(input) {
35931
36172
  agentId: state.agentId,
35932
36173
  detected: state.detected,
35933
36174
  displayName: state.displayName,
36175
+ persistedLaunchContract: state.registration.launchContract ?? null,
35934
36176
  runtimeSupported: state.runtimeSupported
35935
36177
  });
35936
36178
  if (!candidatesResult.ok) throw new Error(`${candidatesResult.errorCode}: ${candidatesResult.errorMessage}`);
@@ -35994,14 +36236,16 @@ async function toAgentTargetState(target, registration) {
35994
36236
  registration,
35995
36237
  targetKind: target.targetKind
35996
36238
  });
36239
+ const effectiveDetected = target.detected || Boolean(registration?.launchContract && normalizedLaunchResolution.status !== "not_available");
35997
36240
  const selectability = resolveTargetSelectability({
35998
- detected: target.detected,
36241
+ detected: effectiveDetected,
35999
36242
  launchStatus: normalizedLaunchResolution.status,
36000
36243
  runtimeSupported: target.runtimeSupported,
36001
36244
  targetKind: target.targetKind
36002
36245
  });
36003
36246
  return {
36004
36247
  ...target,
36248
+ detected: effectiveDetected,
36005
36249
  selectable: selectability.selectable,
36006
36250
  selectableReason: selectability.reason,
36007
36251
  installChoices: normalizedLaunchResolution.installChoices,
@@ -37265,9 +37509,9 @@ function createModelCatalogReadSession(input) {
37265
37509
  async function readModelCatalogOnce(baseUrl) {
37266
37510
  try {
37267
37511
  const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
37268
- import("./dist-BBWU3O-I.js").then((n) => n.w),
37512
+ import("./dist-BKlTzgZt.js").then((n) => n.w),
37269
37513
  import("./base-url-Cv9x5Es9.js").then((n) => n.n),
37270
- import("./api-client-foundation-BJIJ540D.js").then((n) => n.t)
37514
+ import("./api-client-foundation-DhBFOgEh.js").then((n) => n.t)
37271
37515
  ]);
37272
37516
  if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
37273
37517
  const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
@@ -39848,9 +40092,9 @@ async function resolveGatewayChainReadiness(input = {}) {
39848
40092
  applicable: true,
39849
40093
  baseUrl: fallbackBaseUrl,
39850
40094
  checkedAt,
39851
- details: toErrorMessage$42(error),
40095
+ details: toErrorMessage$43(error),
39852
40096
  errorCode: null,
39853
- errorMessage: toErrorMessage$42(error),
40097
+ errorMessage: toErrorMessage$43(error),
39854
40098
  failureKind: "gateway_unreachable",
39855
40099
  ready: false,
39856
40100
  status: null,
@@ -42431,7 +42675,7 @@ var DaemonServiceLifecycleDrainTimeoutError = class extends Error {
42431
42675
  var DaemonServiceLifecycleControlledDrainError = class extends Error {
42432
42676
  cause;
42433
42677
  constructor(cause) {
42434
- super(`controlled service drain failed: ${toErrorMessage$41(cause)}`);
42678
+ super(`controlled service drain failed: ${toErrorMessage$42(cause)}`);
42435
42679
  this.name = "DaemonServiceLifecycleControlledDrainError";
42436
42680
  this.cause = cause;
42437
42681
  }
@@ -42469,7 +42713,10 @@ async function runDaemonServiceLifecycle(input) {
42469
42713
  evidencePath: null,
42470
42714
  failureStage: null
42471
42715
  };
42472
- const target = buildDaemonServiceTargetSpec({ daemonVersion: input.expectedVersion });
42716
+ const target = buildDaemonServiceTargetSpec({
42717
+ daemonVersion: input.expectedVersion,
42718
+ gatewayUrl: input.gatewayUrl
42719
+ });
42473
42720
  const emitPhase = async (phase) => {
42474
42721
  state.completedPhases.push(phase);
42475
42722
  await input.onPhase?.(phase);
@@ -42590,7 +42837,7 @@ async function runDaemonServiceLifecycle(input) {
42590
42837
  evidencePath: state.evidencePath,
42591
42838
  recoveryStatus: "failed_before_safe_state",
42592
42839
  errorCode: resolveLifecycleFailureErrorCode(error),
42593
- errorMessage: toErrorMessage$41(error)
42840
+ errorMessage: toErrorMessage$42(error)
42594
42841
  };
42595
42842
  } finally {
42596
42843
  await cleanupPreparedBundleAfterLifecycle({
@@ -42613,7 +42860,7 @@ async function cleanupPreparedBundleAfterLifecycle(input) {
42613
42860
  } catch (error) {
42614
42861
  console.warn("[openmeld.daemon_bundle.cleanup_warning]", {
42615
42862
  bundleId: input.preparedBundle.bundleId,
42616
- errorMessage: toErrorMessage$41(error),
42863
+ errorMessage: toErrorMessage$42(error),
42617
42864
  operation: input.operation
42618
42865
  });
42619
42866
  }
@@ -42765,7 +43012,7 @@ async function executeDaemonServiceLifecycle(input) {
42765
43012
  }
42766
43013
  }
42767
43014
  async function recoverLifecycleFailure(input) {
42768
- const originalErrorMessage = toErrorMessage$41(input.error);
43015
+ const originalErrorMessage = toErrorMessage$42(input.error);
42769
43016
  const originalErrorCode = resolveLifecycleFailureErrorCode(input.error);
42770
43017
  const originalFailureStage = resolveLifecycleFailureStage(input.error, input.state.failureStage);
42771
43018
  const originalReasonCodes = resolveLifecycleFailureReasonCodes(input.error);
@@ -43045,7 +43292,7 @@ async function stopLifecycleSystemServiceRuntime(input) {
43045
43292
  } catch (restoreError) {
43046
43293
  throw new DaemonServiceLifecycleStageError({
43047
43294
  cause: restoreError,
43048
- message: `${toErrorMessage$41(drainError)}; failed to restore service autostart: ${toErrorMessage$41(restoreError)}`,
43295
+ message: `${toErrorMessage$42(drainError)}; failed to restore service autostart: ${toErrorMessage$42(restoreError)}`,
43049
43296
  stage: "stop_or_drain"
43050
43297
  });
43051
43298
  }
@@ -43098,7 +43345,7 @@ async function requestControlledSystemServiceDrain(input) {
43098
43345
  compatibilityReason: "legacy_missing_close_reason",
43099
43346
  observedDaemonVersion
43100
43347
  } : {},
43101
- errorMessage: toErrorMessage$41(error)
43348
+ errorMessage: toErrorMessage$42(error)
43102
43349
  },
43103
43350
  result: isCompatibilityFallback ? "fallback" : "failed",
43104
43351
  stopCause: "controlled_service_update",
@@ -43170,7 +43417,7 @@ async function waitForLifecycleRuntimeAbsentWithRetry(serviceManager) {
43170
43417
  } catch (retryError) {
43171
43418
  throw new DaemonServiceLifecycleStageError({
43172
43419
  cause: retryError,
43173
- message: `${toErrorMessage$41(retryError)}; initial absence verification failed: ${toErrorMessage$41(initialError)}`,
43420
+ message: `${toErrorMessage$42(retryError)}; initial absence verification failed: ${toErrorMessage$42(initialError)}`,
43174
43421
  stage: "wait_absent"
43175
43422
  });
43176
43423
  }
@@ -43180,7 +43427,7 @@ async function cleanupStaleDaemonRuntimeDataBackupsAfterHealthyLifecycle(operati
43180
43427
  await cleanupStaleDaemonRuntimeDataBackups();
43181
43428
  } catch (error) {
43182
43429
  console.warn("[openmeld.daemon_runtime_data.cleanup_warning]", {
43183
- errorMessage: toErrorMessage$41(error),
43430
+ errorMessage: toErrorMessage$42(error),
43184
43431
  operation
43185
43432
  });
43186
43433
  }
@@ -43586,7 +43833,7 @@ async function stopDaemonProcess$1(pid, signal) {
43586
43833
  process$1.kill(pid, signal);
43587
43834
  } catch (error) {
43588
43835
  if (error instanceof Error && error.code === "ESRCH") return true;
43589
- throw new Error(`Failed to send ${signal} to pid ${String(pid)}: ${toErrorMessage$41(error)}`);
43836
+ throw new Error(`Failed to send ${signal} to pid ${String(pid)}: ${toErrorMessage$42(error)}`);
43590
43837
  }
43591
43838
  if (signal === "SIGKILL") return true;
43592
43839
  return await waitForProcessToExit$1(pid, PROCESS_STOP_WAIT_MS);
@@ -43596,7 +43843,7 @@ async function stopDaemonProcessWithTimeout(pid, signal, timeoutMs) {
43596
43843
  process$1.kill(pid, signal);
43597
43844
  } catch (error) {
43598
43845
  if (error instanceof Error && error.code === "ESRCH") return true;
43599
- throw new Error(`Failed to send ${signal} to pid ${String(pid)}: ${toErrorMessage$41(error)}`);
43846
+ throw new Error(`Failed to send ${signal} to pid ${String(pid)}: ${toErrorMessage$42(error)}`);
43600
43847
  }
43601
43848
  return await waitForProcessToExit$1(pid, timeoutMs);
43602
43849
  }
@@ -43610,7 +43857,7 @@ async function waitForProcessToExit$1(pid, timeoutMs) {
43610
43857
  }
43611
43858
  function isLaunchdBootstrapIoError(serviceManager, error) {
43612
43859
  if (serviceManager.controller !== "launchd") return false;
43613
- const message = toErrorMessage$41(error).toLowerCase();
43860
+ const message = toErrorMessage$42(error).toLowerCase();
43614
43861
  return message.includes("bootstrap failed") && message.includes("input/output error");
43615
43862
  }
43616
43863
  async function writeLifecycleEvidenceEvent(input) {
@@ -54659,14 +54906,13 @@ async function runAuthLogout(input) {
54659
54906
  cleanup: await performLogoutLocalCleanup({ runtime }),
54660
54907
  presenter
54661
54908
  });
54662
- if (!await getAuthSession()) {
54909
+ if (!(await clearAuthSession()).hadLocalSession) {
54663
54910
  presenter.line({
54664
54911
  code: "auth.logout.no_session",
54665
54912
  text: "No local sign-in session found."
54666
54913
  });
54667
54914
  return;
54668
54915
  }
54669
- await clearAuthSession();
54670
54916
  presenter.line({
54671
54917
  code: "auth.logout.cleared",
54672
54918
  text: "Signed out on this device."
@@ -62378,7 +62624,7 @@ function resolveSystemServiceStartupFailureVerdict(input) {
62378
62624
  controller: input.controller,
62379
62625
  jobDiagnostics,
62380
62626
  localMachineIssue,
62381
- message: sanitizeSystemServiceErrorMessage$1(toErrorMessage$41(input.error)),
62627
+ message: sanitizeSystemServiceErrorMessage$1(toErrorMessage$42(input.error)),
62382
62628
  detail: input.detail ?? null
62383
62629
  };
62384
62630
  }
@@ -75592,7 +75838,7 @@ var DaemonReinstallUnexpectedStartError = class extends Error {
75592
75838
  diagnosticDetail;
75593
75839
  outcome;
75594
75840
  constructor(input) {
75595
- super(toErrorMessage$41(input.cause));
75841
+ super(toErrorMessage$42(input.cause));
75596
75842
  this.name = "DaemonReinstallUnexpectedStartError";
75597
75843
  this.cause = input.cause;
75598
75844
  this.diagnosticDetail = input.diagnosticDetail;
@@ -75611,7 +75857,7 @@ var DaemonReinstallFailureError = class extends Error {
75611
75857
  evidencePath;
75612
75858
  failureStage;
75613
75859
  constructor(input) {
75614
- super(toErrorMessage$41(input.cause));
75860
+ super(toErrorMessage$42(input.cause));
75615
75861
  this.name = "DaemonReinstallFailureError";
75616
75862
  this.backupDataPath = input.backupDataPath;
75617
75863
  this.cause = input.cause;
@@ -76264,18 +76510,18 @@ async function prepareManagedDaemonServiceForStop(input) {
76264
76510
  intent: "stop",
76265
76511
  metadata: {
76266
76512
  compatibilityFallback: isCompatibilityFallback,
76267
- errorMessage: toErrorMessage$41(error)
76513
+ errorMessage: toErrorMessage$42(error)
76268
76514
  },
76269
76515
  result: isCompatibilityFallback ? "fallback" : "failed",
76270
76516
  stopCause: "user_stop",
76271
76517
  type: "stop.controlled_drain"
76272
76518
  });
76273
76519
  if (isCompatibilityFallback) return null;
76274
- let errorMessage = toErrorMessage$41(error);
76520
+ let errorMessage = toErrorMessage$42(error);
76275
76521
  if (shouldRestoreAutostart) try {
76276
76522
  await serviceManager.enableAutostart();
76277
76523
  } catch (restoreError) {
76278
- errorMessage = `${errorMessage}; failed to restore service autostart: ${toErrorMessage$41(restoreError)}`;
76524
+ errorMessage = `${errorMessage}; failed to restore service autostart: ${toErrorMessage$42(restoreError)}`;
76279
76525
  }
76280
76526
  if (input.mode !== "best_effort") throw new Error(`OpenMeld Service stayed running because its final offline status could not be delivered: ${errorMessage}`);
76281
76527
  return buildDaemonStopWarningResult({
@@ -76325,11 +76571,11 @@ async function stopRegisteredDaemonServiceManager(input) {
76325
76571
  run: async () => await input.ownerSnapshot.serviceManager?.stop()
76326
76572
  });
76327
76573
  } catch (error) {
76328
- if (input.mode !== "best_effort") throw new Error(`Failed to stop system service (${input.ownerSnapshot.runtimeStatus.serviceController}): ${toErrorMessage$41(error)}`);
76574
+ if (input.mode !== "best_effort") throw new Error(`Failed to stop system service (${input.ownerSnapshot.runtimeStatus.serviceController}): ${toErrorMessage$42(error)}`);
76329
76575
  return buildDaemonStopWarningResult({
76330
76576
  reason: "stop_failed",
76331
76577
  runtimeStatus: input.ownerSnapshot.runtimeStatus,
76332
- errorMessage: toErrorMessage$41(error)
76578
+ errorMessage: toErrorMessage$42(error)
76333
76579
  });
76334
76580
  }
76335
76581
  if (!await waitForDaemonSystemServiceToStop({
@@ -76360,7 +76606,7 @@ async function stopRegisteredDaemonServiceManager(input) {
76360
76606
  return buildDaemonStopWarningResult({
76361
76607
  reason: "stop_failed",
76362
76608
  runtimeStatus: input.ownerSnapshot.runtimeStatus,
76363
- errorMessage: toErrorMessage$41(error)
76609
+ errorMessage: toErrorMessage$42(error)
76364
76610
  });
76365
76611
  }
76366
76612
  const finalOwnerSnapshot = residualCleanupResult.shouldRefresh ? await readCurrentDaemonOwnerSnapshot() : residualCleanupResult.ownerSnapshot;
@@ -76433,7 +76679,7 @@ async function stopCurrentLaneDaemonProcess(input) {
76433
76679
  pid: daemonPid,
76434
76680
  reason: "stop_failed",
76435
76681
  runtimeStatus: input.runtimeStatus,
76436
- errorMessage: toErrorMessage$41(error)
76682
+ errorMessage: toErrorMessage$42(error)
76437
76683
  };
76438
76684
  }
76439
76685
  }
@@ -76517,7 +76763,7 @@ async function stopTrackedDaemonProcess(input) {
76517
76763
  type: "process_stop.action",
76518
76764
  result: "failed",
76519
76765
  metadata: {
76520
- errorMessage: toErrorMessage$41(error),
76766
+ errorMessage: toErrorMessage$42(error),
76521
76767
  pid: input.pid,
76522
76768
  reason: input.reason,
76523
76769
  signal: input.signal
@@ -76552,7 +76798,7 @@ async function stopDaemonProcess(pid, signal) {
76552
76798
  process.kill(pid, signal);
76553
76799
  } catch (error) {
76554
76800
  if (isNodeErrorCode(error, "ESRCH")) return true;
76555
- throw new Error(`Failed to send ${signal} to pid ${String(pid)}: ${toErrorMessage$41(error)}`);
76801
+ throw new Error(`Failed to send ${signal} to pid ${String(pid)}: ${toErrorMessage$42(error)}`);
76556
76802
  }
76557
76803
  if (signal === "SIGKILL") return true;
76558
76804
  return await waitForProcessToExit(pid);
@@ -76626,7 +76872,7 @@ async function stopDaemonForStrictTeardown(input) {
76626
76872
  await input.context.serviceManager.stop().catch((error) => {
76627
76873
  throw createStrictTeardownError({
76628
76874
  reason: input.reason,
76629
- message: `failed to stop system service (${input.context.serviceManager?.controller}): ${toErrorMessage$41(error)}`,
76875
+ message: `failed to stop system service (${input.context.serviceManager?.controller}): ${toErrorMessage$42(error)}`,
76630
76876
  hint: "run `openmeld service stop --force` and retry",
76631
76877
  stage: "stop-wait"
76632
76878
  });
@@ -76671,7 +76917,7 @@ async function uninstallSystemServiceForStrictTeardown(input) {
76671
76917
  for (const manager of managers) await manager.uninstall().catch((error) => {
76672
76918
  throw createStrictTeardownError({
76673
76919
  reason: input.reason,
76674
- message: `failed to uninstall system service (${manager.controller}): ${toErrorMessage$41(error)}`,
76920
+ message: `failed to uninstall system service (${manager.controller}): ${toErrorMessage$42(error)}`,
76675
76921
  hint: "fix OS service permissions and retry",
76676
76922
  stage: "uninstall-verify"
76677
76923
  });
@@ -76688,7 +76934,7 @@ async function verifySystemServiceRemovedAfterStrictTeardown(input) {
76688
76934
  const finalManagerStatus = await manager.status().catch((error) => {
76689
76935
  throw createStrictTeardownError({
76690
76936
  reason: input.reason,
76691
- message: `failed to verify system service status (${manager.controller}): ${toErrorMessage$41(error)}`,
76937
+ message: `failed to verify system service status (${manager.controller}): ${toErrorMessage$42(error)}`,
76692
76938
  hint: "run `openmeld service status` and confirm service manager state",
76693
76939
  stage: "uninstall-verify"
76694
76940
  });
@@ -76705,7 +76951,7 @@ async function verifySystemServiceRemovedAfterStrictTeardown(input) {
76705
76951
  const finalManagerStatus = await manager.status().catch((error) => {
76706
76952
  throw createStrictTeardownError({
76707
76953
  reason: input.reason,
76708
- message: `failed to verify system service status (${manager.controller}): ${toErrorMessage$41(error)}`,
76954
+ message: `failed to verify system service status (${manager.controller}): ${toErrorMessage$42(error)}`,
76709
76955
  hint: "run `openmeld service status` and confirm service manager state",
76710
76956
  stage: "uninstall-verify"
76711
76957
  });
@@ -77145,7 +77391,7 @@ async function runDaemonReinstall(input, options = {}) {
77145
77391
  action: displayAction,
77146
77392
  backupDataPath: error.backupDataPath,
77147
77393
  errorCode: error.errorCode,
77148
- errorMessage: toErrorMessage$41(error.cause),
77394
+ errorMessage: toErrorMessage$42(error.cause),
77149
77395
  failureStage: error.failureStage,
77150
77396
  evidencePath: error.evidencePath ?? await captureDaemonServiceEvidenceBestEffort({
77151
77397
  runtime,
@@ -77174,7 +77420,8 @@ async function performDaemonReinstall(input) {
77174
77420
  if (!input.resolved.forceReinstall) {
77175
77421
  const alreadyHealthy = await input.resolved.withReconcileLock(async () => await resolveAlreadyHealthyDaemonRepair({
77176
77422
  expectedVersion: input.resolved.daemonVersion,
77177
- cliScriptPath: input.resolved.cliScriptPath
77423
+ cliScriptPath: input.resolved.cliScriptPath,
77424
+ gatewayUrl: input.gatewayUrl
77178
77425
  }));
77179
77426
  if (alreadyHealthy) return alreadyHealthy;
77180
77427
  }
@@ -77446,7 +77693,10 @@ async function resolveAlreadyHealthyDaemonRepair(input) {
77446
77693
  });
77447
77694
  if (resolveDaemonServiceAlignmentDecision({
77448
77695
  inventory,
77449
- target: buildDaemonServiceTargetSpec({ daemonVersion: input.expectedVersion })
77696
+ target: buildDaemonServiceTargetSpec({
77697
+ daemonVersion: input.expectedVersion,
77698
+ gatewayUrl: input.gatewayUrl
77699
+ })
77450
77700
  }).status !== "already_aligned") return null;
77451
77701
  if (!inventory.serviceContract) return null;
77452
77702
  const desiredState = inventory.serviceContract.desiredState;
@@ -77960,7 +78210,7 @@ async function runDirectDaemonServiceLoop(input) {
77960
78210
  };
77961
78211
  } catch (error) {
77962
78212
  return await handleDaemonRunStartFailure({
77963
- fallbackRawLine: toErrorMessage$41(error),
78213
+ fallbackRawLine: toErrorMessage$42(error),
77964
78214
  gatewayUrl: input.gatewayUrl,
77965
78215
  presenter: input.presenter,
77966
78216
  runtime: input.runtime,
@@ -78161,7 +78411,7 @@ async function bestEffortStopCurrentLaneDaemonService(input) {
78161
78411
  if (!isOpenMeldLockError(error)) throw error;
78162
78412
  let errorMessage = error.message;
78163
78413
  const runtimeStatus = await readCurrentObservedDaemonRuntimeStatus().catch((statusError) => {
78164
- errorMessage = `${errorMessage}; service status could not be read: ${toErrorMessage$41(statusError)}`;
78414
+ errorMessage = `${errorMessage}; service status could not be read: ${toErrorMessage$42(statusError)}`;
78165
78415
  return {
78166
78416
  status: "unknown",
78167
78417
  mode: null,
@@ -78597,7 +78847,7 @@ async function runSystemDaemonCore(context) {
78597
78847
  } catch (error) {
78598
78848
  if (!isSystemServiceBootstrap) throw error;
78599
78849
  return await handleDaemonRunStartFailure({
78600
- fallbackRawLine: toErrorMessage$41(error),
78850
+ fallbackRawLine: toErrorMessage$42(error),
78601
78851
  gatewayUrl: input.gatewayUrl,
78602
78852
  presenter,
78603
78853
  runtime,
@@ -79198,7 +79448,7 @@ async function recoverSystemServiceStartupAfterTimeout(input) {
79198
79448
  error,
79199
79449
  recovery: {
79200
79450
  ...recovery,
79201
- failureMessage: toErrorMessage$41(error)
79451
+ failureMessage: toErrorMessage$42(error)
79202
79452
  }
79203
79453
  };
79204
79454
  }
@@ -79424,7 +79674,7 @@ function resolvePersistedDaemonServiceContractGatewayUrl(gatewayUrl) {
79424
79674
  try {
79425
79675
  return normalizeGatewayBaseUrl(gatewayUrl);
79426
79676
  } catch (error) {
79427
- throw new Error(`Invalid persisted OpenMeld Service contract gateway URL "${gatewayUrl}": ${toErrorMessage$41(error)}`);
79677
+ throw new Error(`Invalid persisted OpenMeld Service contract gateway URL "${gatewayUrl}": ${toErrorMessage$42(error)}`);
79428
79678
  }
79429
79679
  }
79430
79680
  function resolveSystemServiceStartupWaitMs(controller) {
@@ -79553,13 +79803,13 @@ async function runDaemonServiceDetached(input) {
79553
79803
  if (typeof child.pid === "number" && child.pid > 0) await cleanupDetachedRuntimeStateIfOwnedByPid(child.pid).catch(() => {});
79554
79804
  return await handleDaemonRunStartFailure({
79555
79805
  cursor: startFailureLogCursor,
79556
- fallbackRawLine: selectRelevantDaemonStartFailureLogLine(startupOutput.summary()) ?? toErrorMessage$41(error),
79806
+ fallbackRawLine: selectRelevantDaemonStartFailureLogLine(startupOutput.summary()) ?? toErrorMessage$42(error),
79557
79807
  gatewayUrl: input.gatewayUrl,
79558
79808
  presenter: input.presenter,
79559
79809
  runtime: input.runtime,
79560
79810
  genericErrorPayload: {
79561
79811
  codePrefix: "daemon.run.start_failed",
79562
- error: /* @__PURE__ */ new Error(`Failed to start OpenMeld Service process: ${toErrorMessage$41(error)}`)
79812
+ error: /* @__PURE__ */ new Error(`Failed to start OpenMeld Service process: ${toErrorMessage$42(error)}`)
79563
79813
  }
79564
79814
  });
79565
79815
  } finally {
@@ -106512,4 +106762,4 @@ function isHumanInteractiveSpaceRuntime(runtime) {
106512
106762
  //#endregion
106513
106763
  export { runAgentsRepair as $, uninstallAgentActivityIntegrations as $a, performManagedInstall as $i, formatDaemonServiceDowngradeBlockedRecommendation as $n, resolveProfileWorkspaceRuntime as $r, readBundledOpenMeldCliSkillDocumentByPath as $t, assertFullSignalIdArgument as A, getSelectedOpenMeldProfileId as Aa, getAgentControllerPermissionModeDisplayMetadata as Ai, inspectSpaceCacheFile as An, enqueueControllerTaskLifecycleEventWhileLocked as Ao, buildAgentOverviewFromContract as Ar, shouldEmitAgentOverview as At, persistAgentTransportSelection as B, LocalProjectConnectionError as Ba, getCurrentCommandCheckState as Bi, formatRemovedCcRelationMessage as Bn, cliJsonOutputEnvelopeSchema as Bo, runDaemonServiceFullAlignment as Br, parseJsonResponse$1 as Bt, toSpaceMetaUpsertInput as C, deleteOpenMeldProfile as Ca, classifyDaemonServiceWakeability as Ci, submitProfileRuntimeAgentControllerReport as Cn, listProjectConnectionsWithStatus as Co, registerSpaceMemberSelectionOptions as Cr, runDaemonTeardownStrict as Ct, formatHumanReadTargetList as D, updateOpenMeldProfile as Da, resolveOpenMeldEnvironmentTarget as Di, resolveLocalAgentControllerBlockerReasonCodes as Dn, setDefaultProjectConnection as Do, registerDaemonControlTargetOptions as Dr, reconcileCliVersionView as Dt, buildHumanReplyContextSummary as E, resolveOpenMeldProfile as Ea, resolveDaemonDeviceId as Ei, collectLocalAgentControllerInventory as En, runIfAgentActivityBindingGenerationIsCurrent as Eo, getCliVersionInfo as Er, buildProfileWorkspaceRows as Et, emitSpaceAgentOverview as F, resolveAuthenticationGuidance as Fa, resolveAgentExecutionStatus as Fi, buildSignalIndex as Fn, emitCliJsonEnvelope as Fo, OPENMELD_AGENT_MENTAL_MODEL_LINES as Fr, fetchSpaceMeta as Ft, runAgentsCustomList as G, registerAgentActivityRoute as Ga, resolveVersionChangeDirection as Gi, assessCliUpdate as Gn, organizationJoinLinkErrorResponseSchema as Go, formatAgentReplyReadinessLabel as Gr, runDaemonStartDecisionPrompt as Gt, runAgents as H, LocalDaemonControlPlaneClientError as Ha, resetCurrentCommandCheckState as Hi, promptSearchSelect as Hn, cliJsonSkillsLoadEnvelopeSchema as Ho, resolveServiceReadinessFromServiceStatus as Hr, writeInstalledLocalComponentsSnapshot as Ht, emitSpaceCliAgentOverview as I, resolveAuthenticationGuidanceFromError as Ia, resolveAgentProfileEditCapabilities as Ii, buildSignalMessageReadProjection as In, errLine as Io, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Ir, updateSpaceMeta as It, runAgentsDetect as J, AGENT_ACTIVITY_INTEGRATION_OWNER as Ja, getDaemonSystemServiceLogPath as Ji, readDispatchOwnedRuntimeGuard as Jn, package_default as Jo, mapAgentReplyReadinessToLegacyAutoReply as Jr, runSkillsEnsure as Jt, runAgentsCustomRemove as K, resolveAgentActivityRouteForPath as Ka, readCurrentDaemonRuntimeContext as Ki, isCliUpdateCheckApplicable as Kn, revokeOrganizationJoinLinkResponseSchema as Ko, formatDeviceReplyReadinessLabel as Kr, collectSkillsReadinessSnapshot as Kt, prepareLocalAgentReadiness as L, resolveAuthenticationGuidanceFromMessage as La, resolveEvidenceSyncHealth as Li, buildSpaceRoundReadProjection as Ln, outJsonLine as Lo, areAllowedActionsEquivalent as Lr, readGatewayJsonResponse as Lt, prepareAuthenticatedSpaceCommandContext as M, buildAgentAuthenticationGuide as Ma, listAgentControllerPermissionModeOptions as Mi, assertNoRemovedCcSpaceAddressingSyntax as Mn, renderInfoCard as Mo, formatDualViewGuideForDisplay as Mr, readDaemonStartFailureLogTailLines as Mt, resolveOpenMeldProfileForSpaceCommand as N, buildHumanAuthenticationCard as Na, parseAgentControllerRef as Ni, buildDispatchResultMessageReadProjection as Nn, renderTextInfoCard as No, buildDualViewGuideMessage as Nr, fetchSpaceUpdates as Nt, parseEnvelope as O, alignSelectedOpenMeldProfileStorage as Oa, buildAgentControllerRef as Oi, resolveLocalAgentControllerLaunchability as On, unbindProject as Oo, registerAuthLoginRequestOptions as Or, emitDaemonAgentOverview as Ot, resolveSpaceAccessLabel as P, createAuthenticationError as Pa, resolveAgentControllerPermissionModeForController as Pi, buildDispatchResultReplyWorkflowProjection as Pn, sanitizeTerminalDisplayText as Po, formatAgentOverviewPayload as Pr, createCliSpaceApi as Pt, runAgentsManage as Q, resolveAgentActivityDispatcherCommand as Qa, buildInstallSelfJsonPayload as Qi, resolveElapsedTimeMs as Qn, createModelCatalogReadSession as Qr, ensureLocalSkills as Qt, buildReplyReadinessGuidance as R, getProfileDefaultView as Ra, resolveNativeAgentControllerPermissionModeForController as Ri, buildUpdatesReplyWorkflowProjection as Rn, outLine as Ro, buildAgentFacingPublicationModeGuideLines as Rr, readGatewayTextResponse as Rt, loadSpaceSignalIndexOrNull as S, createOpenMeldHumanProfile as Sa, classifyDaemonServiceRunStartability as Si, computeRetryDelayMs as Sn, listProjectBindings as So, getCommandHintsFromContract as Sr, runDaemonStop as St, buildFormalSignalReadPayload as T, primeOpenMeldProfilesSessionCache as Ta, ensureDaemonRuntimePaths as Ti, submitRuntimeAgentControllerReports as Tn, removeProjectConnection as To, registerSkillsTargetSelectionOptions as Tr, buildProfileWorkspacePresentation as Tt, runAgentsConfig as U, requestLocalAgentActivitySync as Ua, startCurrentCommandCheckScope as Ui, isReturnKeypress as Un, cliJsonSkillsShowEnvelopeSchema as Uo, resolveDaemonServiceFreshnessWarning as Ur, resolveDaemonServiceParticipationStatus as Ut, resolveAgentProfileSetup as V, validateLocalProjectConnectionPath as Va, isCurrentCommandCheckScopeActive as Vi, promptSearchMultiselect as Vn, cliJsonSkillsListEnvelopeSchema as Vo, formatDaemonFailureContextText as Vr, resolveLocalComponentsStatus as Vt, runAgentsCustomAdd as W, isAgentActivityRouteRegistered as Wa, inspectDaemonServiceInventory as Wi, runInteractivePrompt as Wn, getOrganizationJoinLinkResponseSchema as Wo, resolveCurrentReplyReadinessSnapshot as Wr, runDaemonServiceParticipationGate as Wt, runAgentsEnable as X, installAgentActivityIntegrations as Xa, readDaemonServiceJobCrashExitCode as Xi, writeDispatchSpaceActionRecord as Xn, resolveOpenClawLocalDiagnosticsValue as Xr, runSkillsUninstall as Xt, runAgentsDisable as Y, defaultManagedIntegrationPaths as Ya, isDaemonServiceJobNeverSpawned as Yi, readDispatchSpaceActionContextFromEnv as Yn, resolveGatewayChainReadiness as Yr, runSkillsInstall as Yt, runAgentsList as Z, readAgentActivityIntegrationStatus as Za, resolveDaemonServiceManager as Zi, formatElapsedTime as Zn, syncProfileWorkspaceState as Zr, runSkillsUpdate as Zt, runSpaceWriteWithPasswordRetry as _, resolveViewProfileKey as _a, buildDaemonRouteObservationPresentation as _i, promptTextEntry as _n, enqueueAgentActivityHookEvent as _o, createSpaceUpdatesGuideError as _r, runDaemonInterrupt as _t, runSpaceDelete as a, readVersionState as aa, setOpenMeldManagedProfileWorkspace as ai, ensureCommandAuthenticationOrCancel as an, formatProfileAwareOpenMeldCliCommands as ao, createProfileMenuGuideError as ar, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, resolveOpenMeldProfileOrNull as ba, buildDaemonServiceTargetSpec as bi, resolveServiceParticipationReadiness as bn, removeProjectOutbox as bo, createUpgradeConfirmationGuideError as br, runDaemonSnapshot as bt, runSpaceLeave as c, toStartBackgroundHelperExecutionCompatibility as ca, syncDeviceRuntimeStateProjection as ci, runAuthLogout as cn, syncLocalAgentActivity as co, createSpaceAliasTargetGuideError as cr, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, renderHumanErrorCard as da, listAgentTargetStates as di, buildAuthStatusRows as dn, readAgentActivityContextForPath as do, createSpaceMenuGuideError as dr, resolveSpaceSendText as dt, buildNextVersionState as ea, ensureOpenMeldManagedProfileWorkspace as ei, readRuntimeReportingHealthState as en, formatInlineOpenMeldCliCommands as eo, formatDaemonServiceMissingRecommendation as er, runAgentsShow as et, runSpaceSend as f, renderHumanTextErrorCard as fa, reconcileNewRunnableBuiltinAgentsForSetup as fi, buildAuthStatusSnapshot as fn, removeAgentActivityContextCache as fo, createSpacePublicationSetGuideError as fr, runDaemon as ft, runSpaceReadWithPasswordRetry as g, resolveRuntimeContext as ga, PREPARE_SESSION_RECONNECT_GRACE_MS as gi, resolveCreateProfileName as gn, readCodexSessionTitles as go, createSpaceTargetGuideError as gr, runDaemonInstall as gt, uploadPreparedSpaceFiles as h, parseCliViewMode as ha, resolveLocalRegistryAgentIdFromAgentControllerRef as hi, resolveCreateProfileKind as hn, normalizeSharedSessionTitle as ho, createSpaceSubcommandTargetGuideError as hr, runDaemonCancel as ht, runSpaceCreate as i, fetchLatestPackageInfo as ia, setCustomProfileWorkspace as ii, buildCommandAuthenticationPromptMessage as in, formatOpenMeldCliTextBlock as io, createProfileCreateGuideError as ir, colorizeDisplayProfileLabel as it, assertValidSpaceIdTarget as j, setSelectedOpenMeldProfileId as ja, getAgentControllerPermissionModeFieldLabel as ji, upsertSpaceConfig as jn, readControllerTaskLifecycleOutboxHealth as jo, DualViewGuideError as jr, runDaemonStartupPreflight as jt, isSpaceCommandOutputHandledError as k, clearSelectedOpenMeldProfileId as ka, createAgentExecutionStatusDisplayRows as ki, resolveLocalAgentControllerReportDecision as kn, canonicalizeLocalProjectPath as ko, registerBuiltinAgentSelectionOptions as kr, createDelayedSpinner as kt, runSpaceList as l, resolveCurrentDaemonExpectedVersion as la, createPrimaryBindingReadSession as li, runAuthMenu as ln, readDaemonServiceContract as lo, createSpaceContractSetGuideError as lr, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, formatMessage as ma, notifyDaemonRouteCatalogChanged as mi, createProfileByKind as mn, resolveObservedAgentActivityBinding as mo, createSpaceResultGuideError as mr, runDaemonBackgroundStartForDecision as mt, promptAndConfirmSpacePassword as n, ensureVersionStateReady as na, readProfileWorkspaceConfig as ni, connectWebSocket as nn, formatOpenMeldCliCommands as no, createDoctorFailedGuideError as nr, postLocalParticipationMutationReconcile as nt, runSpaceHistory as o, writeVersionState as oa, validateCustomProfileWorkspacePath as oi, evaluateCommandAuthentication as on, resolveSetupFollowUpCliEntryCommand as oo, createResetConfirmationGuideError as or, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, createPresenter as pa, listBuiltinAgentsRegistryEntries as pi, formatActiveOrganizationLabel as pn, buildAgentActivityEvent as po, createSpaceRemoveMembersGuideError as pr, runDaemonAutostart as pt, runAgentsCustomUpdate as q, unregisterAgentActivityRoute as qa, readCurrentObservedDaemonRuntimeStatus as qi, assertDispatchOwnedRuntimePublicWriteAllowed as qn, compareAgentControllerRefsForDisplay as qo, formatHumanReplyReadinessReason as qr, runSkillsCheck as qt, runSpaceAddMembers as r, fetchLatestCliBinaryRelease as ra, resolveConfiguredProfileWorkspacePath as ri, assessServerRequiredVersion as rn, formatOpenMeldCliLine as ro, createProfileActionGuideError as rr, colorizeAgentLabel as rt, runSpaceJoin as s, resolveDaemonRuntimeContractCompatibility as sa, describeProfileWorkspacePathValidationFailure as si, runAuthLogin as sn, resolveUserFacingCliEntryCommand as so, createSpaceAddMembersGuideError as sr, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, compareSemver as ta, normalizeCustomProfileWorkspacePath as ti, readRecentDaemonDispatchJournalEvents as tn, formatOpenMeldCliCommand as to, canUseInteractivePrompts as tr, formatTransportModeDisplay as tt, runSpacePassword as u, buildHumanErrorCopy as ua, resolveAgentProfilePrimaryAgentControllerReport as ui, runAuthStatus as un, upsertDaemonServiceContract as uo, createSpaceLeaveGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, isSelectedOpenMeldProfileRequiredError as va, buildOnboardingPlan as vi, ensureAgentProfileRuntimeBinding as vn, removeProjectInbox as vo, createStartAgentIdentityGuideError as vr, runDaemonReinstall as vt, buildFormalDispatchResultReadPayload as w, listOpenMeldProfiles as wa, readRecentDaemonLifecycleEvents as wi, submitRuntimeAgentControllerReport as wn, migrateProjectBindingStore as wo, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as wr, runDaemonUninstall as wt, loadSpaceIdentityDirectoryOrNull as x, createOpenMeldAgentProfile as xa, resolveDaemonServiceAlignmentDecision as xi, assessActionParticipationCandidate as xn, bindProject as xo, getCommandEntryContract as xr, runDaemonStatusFlow as xt, emitHumanReadSignalsTextProjection as y, requireOpenMeldProfile as ya, getSetupFlowCopy as yi, formatServiceParticipationReadinessLabel as yn, readAgentActivityOutboxHealth as yo, createStartAuthenticationGuideError as yr, runDaemonRunAfterEntryChecks as yt, resolveHumanControllerDisplayName as z, setProfileDefaultView as za, finishCurrentCommandCheckScope as zi, createSpaceMemberIdentityIndex as zn, cliBinaryDeltaPatchSchema as zo, canonicalizeAllowedActions as zr, toStructuredGatewayFailure as zt };
106514
106764
 
106515
- //# sourceMappingURL=command-cWXoKcwr.js.map
106765
+ //# sourceMappingURL=command-BzpvQPph.js.map