openmeld 0.3.98 → 0.3.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openmeld.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { $ as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, At as openMeldManagedBinaryPath, Bt as resolveOpenMeldCliEntryNameFromArgv, D as toSpaceBoardUrl, Et as normalizeAccountKey, Ft as organizationSkillReleaseDir, G as isOpenMeldOrphanedLockError, H as acquireLock, It as profileDir, J as releaseLockSync, Jt as systemDir, Kt as skillsDir, Lt as profileViewPath, M as toSpaceDispatchLookupUrl, N as toSpaceDispatchTraceUrl, Nt as openMeldRootDir, O as toSpaceContractUrl, Ot as openMeldBackupsDir, S as updateConfiguredOnboardingConfig, T as normalizeBaseUrl, U as buildOpenMeldOrphanedLockAction, Ut as resolveOpenMeldRootDir, Vt as resolveOpenMeldEnvPreset, W as isOpenMeldLockError, X as resolveOpenMeldOrphanedLockIssue, Y as repairOrphanedLegacyLocks, Yt as formatLocalMachineIssueMessage, Z as runWithHeldLock, _t as accountProfileSpaceCacheDir, a as resolveBaseUrl, b as setConfiguredSkillsConfig, bt as accountsDir, c as resolveExplicitGatewayUrlOrThrow, ct as LocalMachineFailureError, et as OPENMELD_CLI_CONTEXT_ENV_KEY, ft as createOrphanedSetupConcurrencyIssue, h as getConfiguredSkillsConfig, jt as openMeldManagedVersionBinaryPath, m as getConfiguredOnboardingDisclaimerAcceptedAt, mt as toRecognizedLocalMachineFailureError, nn as agentControllerConversationRefSchema, o as resolveBaseUrlOrNull, ot as formatLaneScopeSentence, pt as isLocalMachineFailureError, qt as spacesDir, rt as resolveCliContext, st as resolveOpenMeldLaneDescriptor, u as alignRuntimeConfigStorage, ut as createActiveSetupConcurrencyIssue, vt as accountProfileViewPath, w as updateConfiguredStartV1OnboardingState, y as setConfiguredBaseUrl, z as toSpaceResultUrl } from "./base-url-Cv9x5Es9.js";
4
- import { $ as runAgentsRepair, $a as uninstallAgentActivityIntegrations, $i as performManagedInstall, $n as formatDaemonServiceDowngradeBlockedRecommendation, $r as resolveProfileWorkspaceRuntime, $t as readBundledOpenMeldCliSkillDocumentByPath, A as assertFullSignalIdArgument, Aa as getSelectedOpenMeldProfileId, Ai as getAgentControllerPermissionModeDisplayMetadata, An as inspectSpaceCacheFile, Ao as enqueueControllerTaskLifecycleEventWhileLocked, Ar as buildAgentOverviewFromContract, At as shouldEmitAgentOverview, B as persistAgentTransportSelection, Ba as LocalProjectConnectionError, Bi as getCurrentCommandCheckState, Bn as formatRemovedCcRelationMessage, Bo as cliJsonOutputEnvelopeSchema, Br as runDaemonServiceFullAlignment, Bt as parseJsonResponse, C as toSpaceMetaUpsertInput, Ca as deleteOpenMeldProfile, Ci as classifyDaemonServiceWakeability, Cn as submitProfileRuntimeAgentControllerReport, Co as listProjectConnectionsWithStatus, Cr as registerSpaceMemberSelectionOptions, Ct as runDaemonTeardownStrict, D as formatHumanReadTargetList, Da as updateOpenMeldProfile, Di as resolveOpenMeldEnvironmentTarget, Dn as resolveLocalAgentControllerBlockerReasonCodes, Do as setDefaultProjectConnection, Dr as registerDaemonControlTargetOptions, Dt as reconcileCliVersionView, E as buildHumanReplyContextSummary, Ea as resolveOpenMeldProfile, Ei as resolveDaemonDeviceId, En as collectLocalAgentControllerInventory, Eo as runIfAgentActivityBindingGenerationIsCurrent, Er as getCliVersionInfo, Et as buildProfileWorkspaceRows, F as emitSpaceAgentOverview, Fa as resolveAuthenticationGuidance, Fi as resolveAgentExecutionStatus, Fn as buildSignalIndex, Fo as emitCliJsonEnvelope, Fr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ft as fetchSpaceMeta, G as runAgentsCustomList, Ga as registerAgentActivityRoute, Gi as resolveVersionChangeDirection, Gn as assessCliUpdate, Go as organizationJoinLinkErrorResponseSchema, Gr as formatAgentReplyReadinessLabel, Gt as runDaemonStartDecisionPrompt, H as runAgents, Ha as LocalDaemonControlPlaneClientError, Hi as resetCurrentCommandCheckState, Hn as promptSearchSelect, Ho as cliJsonSkillsLoadEnvelopeSchema, Hr as resolveServiceReadinessFromServiceStatus, Ht as writeInstalledLocalComponentsSnapshot, I as emitSpaceCliAgentOverview, Ia as resolveAuthenticationGuidanceFromError, Ii as resolveAgentProfileEditCapabilities, In as buildSignalMessageReadProjection, Io as errLine, Ir as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, It as updateSpaceMeta, J as runAgentsDetect, Ji as getDaemonSystemServiceLogPath, Jn as readDispatchOwnedRuntimeGuard, Jo as package_default, Jr as mapAgentReplyReadinessToLegacyAutoReply, Jt as runSkillsEnsure, K as runAgentsCustomRemove, Ka as resolveAgentActivityRouteForPath, Ki as readCurrentDaemonRuntimeContext, Kn as isCliUpdateCheckApplicable, Ko as revokeOrganizationJoinLinkResponseSchema, Kr as formatDeviceReplyReadinessLabel, Kt as collectSkillsReadinessSnapshot, L as prepareLocalAgentReadiness, La as resolveAuthenticationGuidanceFromMessage, Li as resolveEvidenceSyncHealth, Ln as buildSpaceRoundReadProjection, Lo as outJsonLine, Lr as areAllowedActionsEquivalent, Lt as readGatewayJsonResponse, M as prepareAuthenticatedSpaceCommandContext, Ma as buildAgentAuthenticationGuide, Mi as listAgentControllerPermissionModeOptions, Mn as assertNoRemovedCcSpaceAddressingSyntax, Mo as renderInfoCard, Mr as formatDualViewGuideForDisplay, Mt as readDaemonStartFailureLogTailLines, N as resolveOpenMeldProfileForSpaceCommand, Na as buildHumanAuthenticationCard, Ni as parseAgentControllerRef, Nn as buildDispatchResultMessageReadProjection, No as renderTextInfoCard, Nr as buildDualViewGuideMessage, Nt as fetchSpaceUpdates, O as parseEnvelope, Oa as alignSelectedOpenMeldProfileStorage, Oi as buildAgentControllerRef, On as resolveLocalAgentControllerLaunchability, Oo as unbindProject, Or as registerAuthLoginRequestOptions, Ot as emitDaemonAgentOverview, P as resolveSpaceAccessLabel, Pa as createAuthenticationError, Pi as resolveAgentControllerPermissionModeForController, Pn as buildDispatchResultReplyWorkflowProjection, Po as sanitizeTerminalDisplayText, Pr as formatAgentOverviewPayload, Pt as createCliSpaceApi, Q as runAgentsManage, Qa as resolveAgentActivityDispatcherCommand, Qi as buildInstallSelfJsonPayload, Qn as resolveElapsedTimeMs, Qr as createModelCatalogReadSession, Qt as ensureLocalSkills, R as buildReplyReadinessGuidance, Ra as getProfileDefaultView, Ri as resolveNativeAgentControllerPermissionModeForController, Rn as buildUpdatesReplyWorkflowProjection, Ro as outLine, Rr as buildAgentFacingPublicationModeGuideLines, Rt as readGatewayTextResponse, S as loadSpaceSignalIndexOrNull, Sa as createOpenMeldHumanProfile, Si as classifyDaemonServiceRunStartability, Sn as computeRetryDelayMs, So as listProjectBindings, Sr as getCommandHintsFromContract, St as runDaemonStop, T as buildFormalSignalReadPayload, Ta as primeOpenMeldProfilesSessionCache, Ti as ensureDaemonRuntimePaths, Tn as submitRuntimeAgentControllerReports, To as removeProjectConnection, Tr as registerSkillsTargetSelectionOptions, Tt as buildProfileWorkspacePresentation, U as runAgentsConfig, Ua as requestLocalAgentActivitySync, Ui as startCurrentCommandCheckScope, Un as isReturnKeypress, Uo as cliJsonSkillsShowEnvelopeSchema, Ur as resolveDaemonServiceFreshnessWarning, Ut as resolveDaemonServiceParticipationStatus, V as resolveAgentProfileSetup, Va as validateLocalProjectConnectionPath, Vi as isCurrentCommandCheckScopeActive, Vn as promptSearchMultiselect, Vo as cliJsonSkillsListEnvelopeSchema, Vr as formatDaemonFailureContextText, Vt as resolveLocalComponentsStatus, W as runAgentsCustomAdd, Wa as isAgentActivityRouteRegistered, Wi as inspectDaemonServiceInventory, Wn as runInteractivePrompt, Wo as getOrganizationJoinLinkResponseSchema, Wr as resolveCurrentReplyReadinessSnapshot, Wt as runDaemonServiceParticipationGate, X as runAgentsEnable, Xa as installAgentActivityIntegrations, Xi as readDaemonServiceJobCrashExitCode, Xn as writeDispatchSpaceActionRecord, Xr as resolveOpenClawLocalDiagnosticsValue, Xt as runSkillsUninstall, Y as runAgentsDisable, Ya as defaultManagedIntegrationPaths, Yi as isDaemonServiceJobNeverSpawned, Yn as readDispatchSpaceActionContextFromEnv, Yr as resolveGatewayChainReadiness, Yt as runSkillsInstall, Z as runAgentsList, Za as readAgentActivityIntegrationStatus, Zi as resolveDaemonServiceManager, Zn as formatElapsedTime, Zr as syncProfileWorkspaceState, Zt as runSkillsUpdate, _ as runSpaceWriteWithPasswordRetry, _a as resolveViewProfileKey, _i as buildDaemonRouteObservationPresentation$1, _n as promptTextEntry, _o as enqueueAgentActivityHookEvent, _r as createSpaceUpdatesGuideError, _t as runDaemonInterrupt, a as runSpaceDelete, aa as readVersionState, ai as setOpenMeldManagedProfileWorkspace, an as ensureCommandAuthenticationOrCancel, ao as formatProfileAwareOpenMeldCliCommands, ar as createProfileMenuGuideError, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as resolveOpenMeldProfileOrNull, bi as buildDaemonServiceTargetSpec, bn as resolveServiceParticipationReadiness, bo as removeProjectOutbox, br as createUpgradeConfirmationGuideError, bt as runDaemonSnapshot, c as runSpaceLeave, ca as toStartBackgroundHelperExecutionCompatibility, ci as syncDeviceRuntimeStateProjection, cn as runAuthLogout, co as syncLocalAgentActivity, cr as createSpaceAliasTargetGuideError, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as renderHumanErrorCard, di as listAgentTargetStates, dn as buildAuthStatusRows, do as readAgentActivityContextForPath, dr as createSpaceMenuGuideError, dt as resolveSpaceSendText, ea as buildNextVersionState, ei as ensureOpenMeldManagedProfileWorkspace, en as readRuntimeReportingHealthState, eo as formatInlineOpenMeldCliCommands, er as formatDaemonServiceMissingRecommendation, et as runAgentsShow, f as runSpaceSend, fa as renderHumanTextErrorCard, fi as reconcileNewRunnableBuiltinAgentsForSetup, fn as buildAuthStatusSnapshot, fo as removeAgentActivityContextCache, fr as createSpacePublicationSetGuideError, ft as runDaemon, g as runSpaceReadWithPasswordRetry, ga as resolveRuntimeContext, gn as resolveCreateProfileName, go as readCodexSessionTitles, gr as createSpaceTargetGuideError, gt as runDaemonInstall, h as uploadPreparedSpaceFiles, ha as parseCliViewMode, hi as resolveLocalRegistryAgentIdFromAgentControllerRef, hn as resolveCreateProfileKind, ho as normalizeSharedSessionTitle, hr as createSpaceSubcommandTargetGuideError, ht as runDaemonCancel, i as runSpaceCreate, ia as fetchLatestPackageInfo, ii as setCustomProfileWorkspace, in as buildCommandAuthenticationPromptMessage, io as formatOpenMeldCliTextBlock, ir as createProfileCreateGuideError, it as colorizeDisplayProfileLabel, j as assertValidSpaceIdTarget, ja as setSelectedOpenMeldProfileId, ji as getAgentControllerPermissionModeFieldLabel, jn as upsertSpaceConfig, jo as readControllerTaskLifecycleOutboxHealth, jr as DualViewGuideError, jt as runDaemonStartupPreflight, k as isSpaceCommandOutputHandledError, ka as clearSelectedOpenMeldProfileId, ki as createAgentExecutionStatusDisplayRows, kn as resolveLocalAgentControllerReportDecision, ko as canonicalizeLocalProjectPath, kr as registerBuiltinAgentSelectionOptions, kt as createDelayedSpinner, l as runSpaceList, la as resolveCurrentDaemonExpectedVersion, li as createPrimaryBindingReadSession, ln as runAuthMenu, lo as readDaemonServiceContract, lr as createSpaceContractSetGuideError, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as formatMessage, mi as notifyDaemonRouteCatalogChanged, mn as createProfileByKind, mo as resolveObservedAgentActivityBinding, mr as createSpaceResultGuideError, mt as runDaemonBackgroundStartForDecision, n as promptAndConfirmSpacePassword, na as ensureVersionStateReady, ni as readProfileWorkspaceConfig, nn as connectWebSocket, no as formatOpenMeldCliCommands, nr as createDoctorFailedGuideError, nt as postLocalParticipationMutationReconcile, o as runSpaceHistory, oa as writeVersionState, oi as validateCustomProfileWorkspacePath, on as evaluateCommandAuthentication, oo as resolveSetupFollowUpCliEntryCommand, or as createResetConfirmationGuideError, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as createPresenter, pi as listBuiltinAgentsRegistryEntries, pn as formatActiveOrganizationLabel, po as buildAgentActivityEvent, pr as createSpaceRemoveMembersGuideError, pt as runDaemonAutostart, q as runAgentsCustomUpdate, qa as unregisterAgentActivityRoute, qi as readCurrentObservedDaemonRuntimeStatus, qn as assertDispatchOwnedRuntimePublicWriteAllowed, qo as compareAgentControllerRefsForDisplay, qr as formatHumanReplyReadinessReason$1, qt as runSkillsCheck$1, r as runSpaceAddMembers, ra as fetchLatestCliBinaryRelease, ri as resolveConfiguredProfileWorkspacePath, rn as assessServerRequiredVersion, ro as formatOpenMeldCliLine, rr as createProfileActionGuideError, rt as colorizeAgentLabel, s as runSpaceJoin, sa as resolveDaemonRuntimeContractCompatibility, si as describeProfileWorkspacePathValidationFailure, sn as runAuthLogin, so as resolveUserFacingCliEntryCommand, sr as createSpaceAddMembersGuideError, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as compareSemver, ti as normalizeCustomProfileWorkspacePath, tn as readRecentDaemonDispatchJournalEvents, to as formatOpenMeldCliCommand, tr as canUseInteractivePrompts, tt as formatTransportModeDisplay, u as runSpacePassword, ua as buildHumanErrorCopy, ui as resolveAgentProfilePrimaryAgentControllerReport, un as runAuthStatus, uo as upsertDaemonServiceContract, ur as createSpaceLeaveGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as isSelectedOpenMeldProfileRequiredError, vi as buildOnboardingPlan, vn as ensureAgentProfileRuntimeBinding, vo as removeProjectInbox, vr as createStartAgentIdentityGuideError, vt as runDaemonReinstall, w as buildFormalDispatchResultReadPayload, wa as listOpenMeldProfiles, wi as readRecentDaemonLifecycleEvents, wn as submitRuntimeAgentControllerReport, wo as migrateProjectBindingStore, wr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, wt as runDaemonUninstall, x as loadSpaceIdentityDirectoryOrNull, xa as createOpenMeldAgentProfile, xi as resolveDaemonServiceAlignmentDecision, xn as assessActionParticipationCandidate, xo as bindProject, xr as getCommandEntryContract, xt as runDaemonStatusFlow, y as emitHumanReadSignalsTextProjection, ya as requireOpenMeldProfile, yi as getSetupFlowCopy, yn as formatServiceParticipationReadinessLabel, yo as readAgentActivityOutboxHealth, yr as createStartAuthenticationGuideError, yt as runDaemonRunAfterEntryChecks, z as resolveHumanControllerDisplayName, za as setProfileDefaultView, zi as finishCurrentCommandCheckScope, zn as createSpaceMemberIdentityIndex, zo as cliBinaryDeltaPatchSchema, zr as canonicalizeAllowedActions, zt as toStructuredGatewayFailure } from "./command-BzpvQPph.js";
5
- import { $ as ownerComputerDiagnosticsSchema, $t as agentActivityInventorySessionStatusSchema, B as sleep, Bt as agentActivityProviderSchema, Ct as authProfileKindSchema, D as toStructuredApiClientFailure, F as OPENMELD_HEADER_PROFILE_ID, G as projectSpaceDispatchTraceFinalVisibleOutcome, Ht as agentActivitySnapshotQuerySchema, J as spaceDispatchTraceDispatchStatusSchema, K as resolveSpaceDispatchTraceRootCause, Ot as submitFeedbackIssueRequestSchema, Qt as agentActivityInventorySessionOriginSchema, Vt as agentActivitySessionStatusSchema, W as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, X as observabilityWakeTraceSelectorSchema, Y as spaceDispatchTraceResponseSchema, Z as projectObservabilityWakeCorrelation, _ as createOrganizationSkillsApi, b as createProjectsApi, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, dn as START_BOUNDED_ID_SCHEMA, en as agentActivitySessionInventoryQuerySchema, et as projectOwnerComputerLocalRuntimes, f as createFeedbackApi, fn as START_BOUNDED_VERSION_SCHEMA, g as createOrganizationApi, gn as localAgentCatalogSchema, gt as organizationSkillBundleSchema, hn as startReplyReadinessSummarySchema, l as createCenterAgentApi, mn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, nn as localAgentSessionProviderSchema, nt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, pn as START_ISO_DATE_TIME_SCHEMA, q as spaceDispatchTraceAttemptStatusSchema, rt as agentProfileCreationConfigurationSchema, s as createAgentActivityApi, tt as summarizeComputerFileAccessPolicy, u as createComputerFileAccessApi, v as createPrepareReadinessApi, wt as authProfileManagedRoleSchema, x as createRoutinesApi, yt as stringifyOrganizationSkillBundleCanonicalJson } from "./dist-BKlTzgZt.js";
6
- import { At as centerAgentInteractionSourceSchema, Er as trimmedStringFromUnknown, Ft as isSpaceFileTextEditable, Gn as clientMessageIdSchema, Rt as resolveSpaceFileMimeType, _r as openMeldRuntimeProfileIdSchema, an as spaceContractFieldsSchema, en as dispatchExecutionSchema, fr as openMeldProfileIdSchema, kt as spaceStatusSchema, on as spaceContractSchema, tn as spaceThreadContextSchema, vn as messageEnvelopeSchema, wr as nonEmptyTrimmedStringFromUnknown } from "./runtime-transport-Ch3hTK9F.js";
4
+ import { $ as runAgentsRepair, $a as readAgentActivityIntegrationStatus, $i as resolveDaemonServiceManager, $n as formatDaemonServiceMissingRecommendation, $r as readRecentDaemonLifecycleEvents, $t as readBundledOpenMeldCliSkillDocumentByPath, A as assertFullSignalIdArgument, Aa as alignSelectedOpenMeldProfileStorage, An as upsertSpaceConfig, Ao as unbindProject, Ar as DualViewGuideError, At as shouldEmitAgentOverview, B as persistAgentTransportSelection, Ba as getProfileDefaultView, Bi as resolveOpenMeldEnvironmentTarget, Bn as promptSearchMultiselect, Bo as outLine, Br as scheduleDaemonServiceUpdate, Bt as parseJsonResponse, C as toSpaceMetaUpsertInput, Ca as createOpenMeldAgentProfile, Ci as listAgentControllerPermissionModeOptions, Cn as submitRuntimeAgentControllerReport, Co as bindProject, Cr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Ct as runDaemonTeardownStrict, D as formatHumanReadTargetList, Da as primeOpenMeldProfilesSessionCache, Di as resolveAgentProfileEditCapabilities, Dn as resolveLocalAgentControllerLaunchability, Do as removeProjectConnection, Dr as registerAuthLoginRequestOptions, Dt as reconcileCliVersionView, E as buildHumanReplyContextSummary, Ea as listOpenMeldProfiles, Ei as resolveAgentExecutionStatus, En as resolveLocalAgentControllerBlockerReasonCodes, Eo as migrateProjectBindingStore, Er as registerDaemonControlTargetOptions, Et as buildProfileWorkspaceRows, F as emitSpaceAgentOverview, Fa as buildHumanAuthenticationCard, Fi as resolveDaemonServiceAlignmentDecision, Fn as buildSignalMessageReadProjection, Fo as renderTextInfoCard, Fr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Ft as fetchSpaceMeta, G as runAgentsCustomList, Ga as requestLocalAgentActivitySync, Gi as startCurrentCommandCheckScope, Gn as isCliUpdateCheckApplicable, Go as cliJsonSkillsShowEnvelopeSchema, Gr as resolveDaemonServiceFreshnessWarning, Gt as runDaemonStartDecisionPrompt, H as runAgents, Ha as LocalProjectConnectionError, Hi as getCurrentCommandCheckState, Hn as isReturnKeypress, Ho as cliJsonOutputEnvelopeSchema, Hr as resolveDaemonDeviceId, Ht as writeInstalledLocalComponentsSnapshot, I as emitSpaceCliAgentOverview, Ia as createAuthenticationError, Ii as classifyDaemonServiceRunStartability, In as buildSpaceRoundReadProjection, Io as sanitizeTerminalDisplayText, Ir as areAllowedActionsEquivalent, It as updateSpaceMeta, J as runAgentsDetect, Ja as resolveAgentActivityRouteForPath, Ji as readCurrentDaemonRuntimeContext, Jn as readDispatchSpaceActionContextFromEnv, Jo as revokeOrganizationJoinLinkResponseSchema, Jr as formatDeviceReplyReadinessLabel, Jt as runSkillsEnsure, K as runAgentsCustomRemove, Ka as isAgentActivityRouteRegistered, Ki as inspectDaemonServiceInventory, Kn as assertDispatchOwnedRuntimePublicWriteAllowed, Ko as getOrganizationJoinLinkResponseSchema, Kr as resolveCurrentReplyReadinessSnapshot, Kt as collectSkillsReadinessSnapshot, L as prepareLocalAgentReadiness, La as resolveAuthenticationGuidance, Li as classifyDaemonServiceWakeability, Ln as buildUpdatesReplyWorkflowProjection, Lo as emitCliJsonEnvelope, Lr as buildAgentFacingPublicationModeGuideLines, Lt as readGatewayJsonResponse, M as prepareAuthenticatedSpaceCommandContext, Ma as getSelectedOpenMeldProfileId, Mi as buildOnboardingPlan, Mn as buildDispatchResultMessageReadProjection, Mo as enqueueControllerTaskLifecycleEventWhileLocked, Mr as buildDualViewGuideMessage, Mt as readDaemonStartFailureLogTailLines, N as resolveOpenMeldProfileForSpaceCommand, Na as setSelectedOpenMeldProfileId, Ni as getSetupFlowCopy, Nn as buildDispatchResultReplyWorkflowProjection, No as readControllerTaskLifecycleOutboxHealth, Nr as formatAgentOverviewPayload, Nt as fetchSpaceUpdates, O as parseEnvelope, Oa as resolveOpenMeldProfile, Oi as resolveEvidenceSyncHealth, On as resolveLocalAgentControllerReportDecision, Oo as runIfAgentActivityBindingGenerationIsCurrent, Or as registerBuiltinAgentSelectionOptions, Ot as emitDaemonAgentOverview, P as resolveSpaceAccessLabel, Pa as buildAgentAuthenticationGuide, Pi as buildDaemonServiceTargetSpec, Pn as buildSignalIndex, Po as renderInfoCard, Pr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Pt as createCliSpaceApi, Q as runAgentsManage, Qa as installAgentActivityIntegrations, Qi as readDaemonServiceJobCrashExitCode, Qn as formatDaemonServiceDowngradeBlockedRecommendation, Qr as resolveOpenClawLocalDiagnosticsValue, Qt as ensureLocalSkills, R as buildReplyReadinessGuidance, Ra as resolveAuthenticationGuidanceFromError, Ri as resolveServiceUpdateUrgency, Rn as createSpaceMemberIdentityIndex, Ro as errLine, Rr as canonicalizeAllowedActions, Rt as readGatewayTextResponse, S as loadSpaceSignalIndexOrNull, Sa as resolveOpenMeldProfileOrNull, Si as getAgentControllerPermissionModeFieldLabel, Sn as submitProfileRuntimeAgentControllerReport, So as removeProjectOutbox, Sr as registerSpaceMemberSelectionOptions, St as runDaemonStop, T as buildFormalSignalReadPayload, Ta as deleteOpenMeldProfile, Ti as resolveAgentControllerPermissionModeForController, Tn as collectLocalAgentControllerInventory, To as listProjectConnectionsWithStatus, Tr as getCliVersionInfo, Tt as buildProfileWorkspacePresentation, U as runAgentsConfig, Ua as validateLocalProjectConnectionPath, Ui as isCurrentCommandCheckScopeActive, Un as runInteractivePrompt, Uo as cliJsonSkillsListEnvelopeSchema, Ur as formatDaemonFailureContextText, Ut as resolveDaemonServiceParticipationStatus, V as resolveAgentProfileSetup, Va as setProfileDefaultView, Vi as finishCurrentCommandCheckScope, Vn as promptSearchSelect, Vo as cliBinaryDeltaPatchSchema, Vr as ensureDaemonRuntimePaths, Vt as resolveLocalComponentsStatus, W as runAgentsCustomAdd, Wa as LocalDaemonControlPlaneClientError, Wi as resetCurrentCommandCheckState, Wn as assessCliUpdate, Wo as cliJsonSkillsLoadEnvelopeSchema, Wr as resolveServiceReadinessFromServiceStatus, Wt as runDaemonServiceParticipationGate, X as runAgentsEnable, Xi as getDaemonSystemServiceLogPath, Xn as formatElapsedTime, Xo as package_default, Xr as mapAgentReplyReadinessToLegacyAutoReply, Xt as runSkillsUninstall, Y as runAgentsDisable, Ya as unregisterAgentActivityRoute, Yi as readCurrentObservedDaemonRuntimeStatus, Yn as writeDispatchSpaceActionRecord, Yo as compareAgentControllerRefsForDisplay, Yr as formatHumanReplyReadinessReason$1, Yt as runSkillsInstall, Z as runAgentsList, Za as defaultManagedIntegrationPaths, Zi as isDaemonServiceJobNeverSpawned, Zn as resolveElapsedTimeMs, Zr as resolveGatewayChainReadiness, Zt as runSkillsUpdate, _ as runSpaceWriteWithPasswordRetry, _a as parseCliViewMode, _i as notifyDaemonRouteCatalogChanged, _n as ensureAgentProfileRuntimeBinding, _o as normalizeSharedSessionTitle, _r as createStartAgentIdentityGuideError, _t as runDaemonInterrupt, a as runSpaceDelete, aa as fetchLatestCliBinaryRelease, ai as readProfileWorkspaceConfig, an as evaluateCommandAuthentication, ao as formatOpenMeldCliLine, ar as createResetConfirmationGuideError, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as isSelectedOpenMeldProfileRequiredError, bi as createAgentExecutionStatusDisplayRows, bn as assessActionParticipationCandidate, bo as removeProjectInbox, br as getCommandEntryContract, bt as runDaemonSnapshot, c as runSpaceLeave, ca as writeVersionState, ci as setOpenMeldManagedProfileWorkspace, cn as runAuthMenu, co as resolveSetupFollowUpCliEntryCommand, cr as createSpaceContractSetGuideError, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as resolveCurrentDaemonExpectedVersion, di as syncDeviceRuntimeStateProjection, dn as buildAuthStatusSnapshot, do as readDaemonServiceContract, dr as createSpacePublicationSetGuideError, dt as resolveSpaceSendText, ea as buildInstallSelfJsonPayload, ei as syncProfileWorkspaceState, en as readRuntimeReportingHealthState, eo as resolveAgentActivityDispatcherCommand, er as canUseInteractivePrompts, et as runAgentsShow, f as runSpaceSend, fa as buildHumanErrorCopy, fi as createPrimaryBindingReadSession, fn as formatActiveOrganizationLabel, fo as upsertDaemonServiceContract, fr as createSpaceRemoveMembersGuideError, ft as runDaemon, g as runSpaceReadWithPasswordRetry, ga as formatMessage, gi as listBuiltinAgentsRegistryEntries, gn as promptTextEntry, go as resolveObservedAgentActivityBinding, gr as createSpaceUpdatesGuideError, gt as runDaemonInstall, h as uploadPreparedSpaceFiles, ha as createPresenter, hi as reconcileNewRunnableBuiltinAgentsForSetup, hn as resolveCreateProfileName, ho as buildAgentActivityEvent, hr as createSpaceTargetGuideError, ht as runDaemonCancel, i as runSpaceCreate, ia as ensureVersionStateReady, ii as normalizeCustomProfileWorkspacePath, in as ensureCommandAuthenticationOrCancel, io as formatOpenMeldCliCommands, ir as createProfileMenuGuideError, it as colorizeDisplayProfileLabel, j as assertValidSpaceIdTarget, ja as clearSelectedOpenMeldProfileId, ji as buildDaemonRouteObservationPresentation$1, jn as assertNoRemovedCcSpaceAddressingSyntax, jo as canonicalizeLocalProjectPath, jr as formatDualViewGuideForDisplay, jt as runDaemonStartupPreflight, k as isSpaceCommandOutputHandledError, ka as updateOpenMeldProfile, ki as resolveNativeAgentControllerPermissionModeForController, kn as inspectSpaceCacheFile, ko as setDefaultProjectConnection, kr as buildAgentOverviewFromContract, kt as createDelayedSpinner, l as runSpaceList, la as resolveDaemonRuntimeContractCompatibility, li as validateCustomProfileWorkspacePath, ln as runAuthStatus, lo as resolveUserFacingCliEntryCommand, lr as createSpaceLeaveGuideError, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as renderHumanTextErrorCard, mi as listAgentTargetStates, mn as resolveCreateProfileKind, mo as removeAgentActivityContextCache, mr as createSpaceSubcommandTargetGuideError, mt as runDaemonBackgroundStartForDecision, n as promptAndConfirmSpacePassword, na as buildNextVersionState, ni as resolveProfileWorkspaceRuntime, nn as connectWebSocket, no as formatInlineOpenMeldCliCommands, nr as createProfileActionGuideError, nt as postLocalParticipationMutationReconcile, o as runSpaceHistory, oa as fetchLatestPackageInfo, oi as resolveConfiguredProfileWorkspacePath, on as runAuthLogin, oo as formatOpenMeldCliTextBlock, or as createSpaceAddMembersGuideError, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as renderHumanErrorCard, pi as resolveAgentProfilePrimaryAgentControllerReport, pn as createProfileByKind, po as readAgentActivityContextForPath, pr as createSpaceResultGuideError, pt as runDaemonAutostart, q as runAgentsCustomUpdate, qa as registerAgentActivityRoute, qi as resolveVersionChangeDirection, qn as readDispatchOwnedRuntimeGuard, qo as organizationJoinLinkErrorResponseSchema, qr as formatAgentReplyReadinessLabel, qt as runSkillsCheck$1, r as runSpaceAddMembers, ra as compareSemver, ri as ensureOpenMeldManagedProfileWorkspace, rn as buildCommandAuthenticationPromptMessage, ro as formatOpenMeldCliCommand, rr as createProfileCreateGuideError, rt as colorizeAgentLabel, s as runSpaceJoin, sa as readVersionState, si as setCustomProfileWorkspace, sn as runAuthLogout, so as formatProfileAwareOpenMeldCliCommands, sr as createSpaceAliasTargetGuideError, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as performManagedInstall, ti as createModelCatalogReadSession, tn as readRecentDaemonDispatchJournalEvents, to as uninstallAgentActivityIntegrations, tr as createDoctorFailedGuideError, tt as formatTransportModeDisplay, u as runSpacePassword, ua as toStartBackgroundHelperExecutionCompatibility, ui as describeProfileWorkspacePathValidationFailure, un as buildAuthStatusRows, uo as syncLocalAgentActivity, ur as createSpaceMenuGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as resolveRuntimeContext, vi as resolveLocalRegistryAgentIdFromAgentControllerRef, vn as formatServiceParticipationReadinessLabel, vo as readCodexSessionTitles, vr as createStartAuthenticationGuideError, vt as runDaemonReinstall, w as buildFormalDispatchResultReadPayload, wa as createOpenMeldHumanProfile, wi as parseAgentControllerRef, wn as submitRuntimeAgentControllerReports, wo as listProjectBindings, wr as registerSkillsTargetSelectionOptions, wt as runDaemonUninstall, x as loadSpaceIdentityDirectoryOrNull, xa as requireOpenMeldProfile, xi as getAgentControllerPermissionModeDisplayMetadata, xn as computeRetryDelayMs, xo as readAgentActivityOutboxHealth, xr as getCommandHintsFromContract, xt as runDaemonStatusFlow, y as emitHumanReadSignalsTextProjection, ya as resolveViewProfileKey, yi as buildAgentControllerRef, yn as resolveServiceParticipationReadiness, yo as enqueueAgentActivityHookEvent, yr as createUpgradeConfirmationGuideError, yt as runDaemonRunAfterEntryChecks, z as resolveHumanControllerDisplayName, za as resolveAuthenticationGuidanceFromMessage, zi as assessServerRequiredVersion, zn as formatRemovedCcRelationMessage, zo as outJsonLine, zr as runPendingDaemonServiceUpdate, zt as toStructuredGatewayFailure } from "./command-CCJpD7sJ.js";
5
+ import { $ as ownerComputerDiagnosticsSchema, $t as agentActivityInventorySessionStatusSchema, B as sleep, Bt as agentActivityProviderSchema, Ct as authProfileKindSchema, D as toStructuredApiClientFailure, F as OPENMELD_HEADER_PROFILE_ID, G as projectSpaceDispatchTraceFinalVisibleOutcome, Ht as agentActivitySnapshotQuerySchema, J as spaceDispatchTraceDispatchStatusSchema, K as resolveSpaceDispatchTraceRootCause, Ot as submitFeedbackIssueRequestSchema, Qt as agentActivityInventorySessionOriginSchema, Vt as agentActivitySessionStatusSchema, W as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, X as observabilityWakeTraceSelectorSchema, Y as spaceDispatchTraceResponseSchema, Z as projectObservabilityWakeCorrelation, _ as createOrganizationSkillsApi, b as createProjectsApi, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, dn as START_BOUNDED_ID_SCHEMA, en as agentActivitySessionInventoryQuerySchema, et as projectOwnerComputerLocalRuntimes, f as createFeedbackApi, fn as START_BOUNDED_VERSION_SCHEMA, g as createOrganizationApi, gn as localAgentCatalogSchema, gt as organizationSkillBundleSchema, hn as startReplyReadinessSummarySchema, l as createCenterAgentApi, mn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, nn as localAgentSessionProviderSchema, nt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, pn as START_ISO_DATE_TIME_SCHEMA, q as spaceDispatchTraceAttemptStatusSchema, rt as agentProfileCreationConfigurationSchema, s as createAgentActivityApi, tt as summarizeComputerFileAccessPolicy, u as createComputerFileAccessApi, v as createPrepareReadinessApi, wt as authProfileManagedRoleSchema, x as createRoutinesApi, yt as stringifyOrganizationSkillBundleCanonicalJson } from "./dist-tBSl0WJC.js";
6
+ import { At as centerAgentInteractionSourceSchema, Er as trimmedStringFromUnknown, Ft as isSpaceFileTextEditable, Gn as clientMessageIdSchema, Rt as resolveSpaceFileMimeType, _r as openMeldRuntimeProfileIdSchema, an as spaceContractFieldsSchema, en as dispatchExecutionSchema, fr as openMeldProfileIdSchema, kt as spaceStatusSchema, on as spaceContractSchema, tn as spaceThreadContextSchema, vn as messageEnvelopeSchema, wr as nonEmptyTrimmedStringFromUnknown } from "./runtime-transport-DTqyhBcv.js";
7
7
  import { r as daemonServiceLaneSchema } from "./service-contract-DZWQdPz5.js";
8
8
  import { O as getDaemonStatus } from "./daemon-runtime-lease-DiRoGxhm.js";
9
- import { a as getCurrentAuthOwnerUserId, c as updateAuthSessionActiveOrganization, d as resolveOpenMeldDistribution, i as getAuthSessionState, l as runMacOsNativeKeychainHelperIfRequested, n as clearAuthSession, o as normalizeStoredActiveOrganization, r as getAuthSessionMetadata, u as isBinaryDistribution } from "./auth-session-BH5KpxlR.js";
10
- import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth } from "./api-client-foundation-DhBFOgEh.js";
9
+ import { a as getCurrentAuthOwnerUserId, c as updateAuthSessionActiveOrganization, d as resolveOpenMeldDistribution, i as getAuthSessionState, l as runMacOsNativeKeychainHelperIfRequested, n as clearAuthSession, o as normalizeStoredActiveOrganization, r as getAuthSessionMetadata, u as isBinaryDistribution } from "./auth-session-DIMnEdJJ.js";
10
+ import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth } from "./api-client-foundation-Dkpm10n_.js";
11
11
  import { Command, Option } from "commander";
12
12
  import os, { homedir, hostname, release, tmpdir } from "node:os";
13
13
  import { z } from "zod/v4";
@@ -2997,77 +2997,6 @@ function formatNpmPackageAcquisitionFailureDiagnosis(diagnosis) {
2997
2997
  ].join("\n");
2998
2998
  }
2999
2999
  //#endregion
3000
- //#region src/system/local-service-alignment-progress-ui.ts
3001
- const DEFAULT_SPINNER_DELAY_MS = 250;
3002
- function createDaemonServiceAlignmentProgressUi(input) {
3003
- if (!(input.view === "human" && (input.isTTY ?? process.stdout.isTTY) === true)) return {
3004
- onProgress: () => void 0,
3005
- complete: () => void 0,
3006
- fail: () => void 0
3007
- };
3008
- const progressSpinner = spinner();
3009
- const delayMs = input.delayMs ?? DEFAULT_SPINNER_DELAY_MS;
3010
- let pendingTimer = null;
3011
- let spinnerVisible = false;
3012
- let latestMessage = resolveAlignmentProgressMessage("inspecting_local_service");
3013
- const clearPendingTimer = () => {
3014
- if (!pendingTimer) return;
3015
- clearTimeout(pendingTimer);
3016
- pendingTimer = null;
3017
- };
3018
- const ensureSpinnerStarted = () => {
3019
- if (spinnerVisible || pendingTimer) return;
3020
- pendingTimer = setTimeout(() => {
3021
- pendingTimer = null;
3022
- spinnerVisible = true;
3023
- progressSpinner.start(latestMessage);
3024
- }, delayMs);
3025
- };
3026
- return {
3027
- onProgress: (step) => {
3028
- latestMessage = resolveAlignmentProgressMessage(step);
3029
- if (spinnerVisible) {
3030
- progressSpinner.message(latestMessage);
3031
- return;
3032
- }
3033
- ensureSpinnerStarted();
3034
- },
3035
- complete: (message) => {
3036
- clearPendingTimer();
3037
- if (!spinnerVisible) return;
3038
- spinnerVisible = false;
3039
- if (message) {
3040
- progressSpinner.stop(message);
3041
- return;
3042
- }
3043
- progressSpinner.clear();
3044
- },
3045
- fail: () => {
3046
- clearPendingTimer();
3047
- if (!spinnerVisible) return;
3048
- spinnerVisible = false;
3049
- progressSpinner.clear();
3050
- }
3051
- };
3052
- }
3053
- function resolveAlignmentProgressMessage(step) {
3054
- switch (step) {
3055
- case "inspecting_local_service": return "Inspecting local OpenMeld service...";
3056
- case "backing_up_runtime_data": return "Backing up OpenMeld service data...";
3057
- case "stopping_old_service_processes": return "Stopping old OpenMeld service processes...";
3058
- case "removing_system_service_registration": return "Removing old OpenMeld service registration...";
3059
- case "cleaning_old_service_files": return "Cleaning old OpenMeld service files...";
3060
- case "preparing_latest_service_bundle": return "Checking the replacement OpenMeld Service...";
3061
- case "installing_latest_service_bundle": return "Updating OpenMeld Service files...";
3062
- case "installing_system_service_registration": return "Registering OpenMeld background service...";
3063
- case "restoring_runtime_data": return "Restoring local OpenMeld service data...";
3064
- case "starting_background_service": return "Starting OpenMeld background service...";
3065
- case "verifying_service_health": return "Verifying OpenMeld service health...";
3066
- case "cleaning_stale_backups": return "Cleaning temporary OpenMeld service backups...";
3067
- default: return "Aligning OpenMeld background service...";
3068
- }
3069
- }
3070
- //#endregion
3071
3000
  //#region src/commands/top-level-agent-overview.ts
3072
3001
  function emitTopLevelAgentOverview(input) {
3073
3002
  input.presenter.data({
@@ -3623,60 +3552,26 @@ async function runInternalUpgradeServiceAlignment(input) {
3623
3552
  });
3624
3553
  throw new UpgradeOutputHandledError(errorMessage);
3625
3554
  }
3626
- const alignmentProgressUi = createDaemonServiceAlignmentProgressUi({ view: input.resolvedView });
3627
- const alignmentResult = await runDaemonServiceFullAlignment({
3628
- expectedVersion: input.daemonVersion,
3629
- intent: "upgrade_reconcile",
3630
- ...input.cliScriptPath ? { cliScriptPath: input.cliScriptPath } : {},
3631
- onProgress: alignmentProgressUi.onProgress
3555
+ const scheduled = await scheduleDaemonServiceUpdate({
3556
+ targetVersion: input.daemonVersion,
3557
+ urgency: await resolveServiceUpdateUrgency(),
3558
+ ...input.cliScriptPath ? { cliScriptPath: input.cliScriptPath } : {}
3632
3559
  });
3633
- if (alignmentResult.status === "aligned") {
3634
- alignmentProgressUi.complete();
3635
- emitUpgradeReconcileCompleted({
3636
- presenter: input.presenter,
3637
- resolvedView: input.resolvedView,
3638
- expectedVersion: input.daemonVersion
3639
- });
3640
- return;
3641
- }
3642
- if (alignmentResult.status === "stopped_safe") {
3643
- alignmentProgressUi.fail();
3644
- emitUpgradeReconcileStoppedSafe({
3645
- presenter: input.presenter,
3646
- resolvedView: input.resolvedView,
3647
- expectedVersion: input.daemonVersion,
3648
- errorMessage: alignmentResult.errorMessage,
3649
- failureStage: alignmentResult.failureStage ?? null,
3650
- evidencePath: alignmentResult.evidencePath ?? null
3651
- });
3652
- return;
3653
- }
3654
- if (alignmentResult.status === "already_aligned") {
3655
- alignmentProgressUi.complete();
3656
- emitUpgradeReconcileAlreadyCurrent({
3657
- presenter: input.presenter,
3658
- resolvedView: input.resolvedView,
3659
- expectedVersion: input.daemonVersion
3560
+ if (input.resolvedView === "human") {
3561
+ input.presenter.line({
3562
+ code: "upgrade.reconcile.scheduled",
3563
+ text: "OpenMeld will finish updating the Service in the background. You can close this Terminal."
3660
3564
  });
3661
3565
  return;
3662
3566
  }
3663
- alignmentProgressUi.fail();
3664
- const errorMessage = alignmentResult.status === "blocked" ? buildUpgradeAlignmentBlockedMessage(alignmentResult.reasonCodes) : alignmentResult.errorMessage;
3665
- emitUpgradeReconcileFailure({
3666
- presenter: input.presenter,
3667
- resolvedView: input.resolvedView,
3668
- message: alignmentResult.status === "blocked" ? errorMessage : formatUpgradeReconcileFailureMessage({
3669
- errorMessage,
3670
- backupDataPath: alignmentResult.backupDataPath,
3671
- failureStage: alignmentResult.failureStage ?? null,
3672
- evidencePath: alignmentResult.evidencePath ?? null
3673
- }),
3674
- errorMessage,
3675
- backupDataPath: alignmentResult.status === "failed" ? alignmentResult.backupDataPath : null,
3676
- failureStage: alignmentResult.status === "failed" ? alignmentResult.failureStage ?? null : null,
3677
- evidencePath: alignmentResult.status === "failed" ? alignmentResult.evidencePath ?? null : null
3567
+ input.presenter.data({
3568
+ code: "upgrade.reconcile.scheduled",
3569
+ payload: {
3570
+ status: scheduled.status,
3571
+ jobId: scheduled.job.jobId,
3572
+ targetVersion: scheduled.job.targetVersion
3573
+ }
3678
3574
  });
3679
- throw new UpgradeOutputHandledError(errorMessage);
3680
3575
  }
3681
3576
  async function handoffUpgradeServiceAlignmentToLatestBinary(input) {
3682
3577
  const useInheritedOutput = input.resolvedView === "human" && process.stdout.isTTY === true && process.stderr.isTTY === true;
@@ -3782,12 +3677,6 @@ function buildUpgradeAlignmentBlockedMessage(reasonCodes) {
3782
3677
  if (reasonCodes.includes("downgrade_blocked")) return formatDaemonServiceDowngradeBlockedRecommendation({ expectedVersion: package_default.version });
3783
3678
  return formatInlineOpenMeldCliCommands(`Service alignment is blocked (${reasonCodes.length > 0 ? reasonCodes.join(", ") : "unknown"}). Please run \`openmeld service status\` or \`openmeld service repair\` manually.`);
3784
3679
  }
3785
- function emitUpgradeReconcileCompleted(input) {
3786
- input.presenter.line({
3787
- code: "upgrade.reconcile.completed",
3788
- text: `OpenMeld Service reconciled to v${input.expectedVersion}.`
3789
- });
3790
- }
3791
3680
  function emitUpgradeReconcileAlreadyCurrent(input) {
3792
3681
  if (input.resolvedView === "human") {
3793
3682
  input.presenter.line({
@@ -3825,31 +3714,6 @@ function emitUpgradeReconcileFailure(input) {
3825
3714
  }
3826
3715
  });
3827
3716
  }
3828
- function emitUpgradeReconcileStoppedSafe(input) {
3829
- const message = formatInlineOpenMeldCliCommands(`OpenMeld Service reconciled to v${input.expectedVersion} and is safely stopped on the current version. OpenMeld did not roll back to older local service state. Run \`openmeld service start\` when you want to start it again.${input.errorMessage.length > 0 ? ` Reason: ${input.errorMessage}.` : ""}${input.failureStage || input.evidencePath ? ` ${formatDaemonFailureContextText({
3830
- failureStage: input.failureStage ?? null,
3831
- evidencePath: input.evidencePath
3832
- })}` : ""}`);
3833
- if (input.resolvedView === "human") {
3834
- input.presenter.line({
3835
- code: "upgrade.reconcile.stopped_safe",
3836
- text: message
3837
- });
3838
- return;
3839
- }
3840
- input.presenter.data({
3841
- code: "upgrade.reconcile.stopped_safe",
3842
- payload: {
3843
- status: "stopped_safe",
3844
- expectedVersion: input.expectedVersion,
3845
- message,
3846
- errorMessage: input.errorMessage,
3847
- ...input.failureStage ? { failureStage: input.failureStage } : {},
3848
- ...input.evidencePath ? { evidencePath: input.evidencePath } : {},
3849
- command: "openmeld service start"
3850
- }
3851
- });
3852
- }
3853
3717
  function resolveUpgradeReconcileSkipMessage(reason) {
3854
3718
  if (reason === "not_installed") return {
3855
3719
  text: formatDaemonServiceMissingRecommendation(),
@@ -5922,6 +5786,77 @@ function emitSelectedProfileStatus(input) {
5922
5786
  });
5923
5787
  }
5924
5788
  //#endregion
5789
+ //#region src/system/local-service-alignment-progress-ui.ts
5790
+ const DEFAULT_SPINNER_DELAY_MS = 250;
5791
+ function createDaemonServiceAlignmentProgressUi(input) {
5792
+ if (!(input.view === "human" && (input.isTTY ?? process.stdout.isTTY) === true)) return {
5793
+ onProgress: () => void 0,
5794
+ complete: () => void 0,
5795
+ fail: () => void 0
5796
+ };
5797
+ const progressSpinner = spinner();
5798
+ const delayMs = input.delayMs ?? DEFAULT_SPINNER_DELAY_MS;
5799
+ let pendingTimer = null;
5800
+ let spinnerVisible = false;
5801
+ let latestMessage = resolveAlignmentProgressMessage("inspecting_local_service");
5802
+ const clearPendingTimer = () => {
5803
+ if (!pendingTimer) return;
5804
+ clearTimeout(pendingTimer);
5805
+ pendingTimer = null;
5806
+ };
5807
+ const ensureSpinnerStarted = () => {
5808
+ if (spinnerVisible || pendingTimer) return;
5809
+ pendingTimer = setTimeout(() => {
5810
+ pendingTimer = null;
5811
+ spinnerVisible = true;
5812
+ progressSpinner.start(latestMessage);
5813
+ }, delayMs);
5814
+ };
5815
+ return {
5816
+ onProgress: (step) => {
5817
+ latestMessage = resolveAlignmentProgressMessage(step);
5818
+ if (spinnerVisible) {
5819
+ progressSpinner.message(latestMessage);
5820
+ return;
5821
+ }
5822
+ ensureSpinnerStarted();
5823
+ },
5824
+ complete: (message) => {
5825
+ clearPendingTimer();
5826
+ if (!spinnerVisible) return;
5827
+ spinnerVisible = false;
5828
+ if (message) {
5829
+ progressSpinner.stop(message);
5830
+ return;
5831
+ }
5832
+ progressSpinner.clear();
5833
+ },
5834
+ fail: () => {
5835
+ clearPendingTimer();
5836
+ if (!spinnerVisible) return;
5837
+ spinnerVisible = false;
5838
+ progressSpinner.clear();
5839
+ }
5840
+ };
5841
+ }
5842
+ function resolveAlignmentProgressMessage(step) {
5843
+ switch (step) {
5844
+ case "inspecting_local_service": return "Inspecting local OpenMeld service...";
5845
+ case "backing_up_runtime_data": return "Backing up OpenMeld service data...";
5846
+ case "stopping_old_service_processes": return "Stopping old OpenMeld service processes...";
5847
+ case "removing_system_service_registration": return "Removing old OpenMeld service registration...";
5848
+ case "cleaning_old_service_files": return "Cleaning old OpenMeld service files...";
5849
+ case "preparing_latest_service_bundle": return "Checking the replacement OpenMeld Service...";
5850
+ case "installing_latest_service_bundle": return "Updating OpenMeld Service files...";
5851
+ case "installing_system_service_registration": return "Registering OpenMeld background service...";
5852
+ case "restoring_runtime_data": return "Restoring local OpenMeld service data...";
5853
+ case "starting_background_service": return "Starting OpenMeld background service...";
5854
+ case "verifying_service_health": return "Verifying OpenMeld service health...";
5855
+ case "cleaning_stale_backups": return "Cleaning temporary OpenMeld service backups...";
5856
+ default: return "Aligning OpenMeld background service...";
5857
+ }
5858
+ }
5859
+ //#endregion
5925
5860
  //#region src/command-entry-checks/check-service.ts
5926
5861
  async function runServiceCheck(input) {
5927
5862
  if (input.requirement.mode === "skip") return { status: "continue" };
@@ -18620,11 +18555,19 @@ async function maybeCompleteServiceReadinessAfterPreparation(input) {
18620
18555
  expectedVersion: resolveCurrentDaemonExpectedVersion(),
18621
18556
  intent: "status_cleanup"
18622
18557
  });
18623
- const hasBlockingServiceDrift = classifyDaemonServiceWakeability({ inventory }).blocksWake;
18624
- const serviceRunWouldBeBlocked = classifyDaemonServiceRunStartability({ inventory }).blocksStart;
18558
+ const wakeability = classifyDaemonServiceWakeability({ inventory });
18559
+ const startability = classifyDaemonServiceRunStartability({ inventory });
18560
+ const hasBlockingServiceDrift = wakeability.blocksWake;
18561
+ const serviceRunWouldBeBlocked = startability.blocksStart;
18562
+ const scheduleBackgroundUpdate = shouldScheduleSetupServiceUpdate({
18563
+ inventory,
18564
+ serviceRunWouldBeBlocked,
18565
+ wakeability
18566
+ });
18625
18567
  if (hasBlockingServiceDrift || serviceRunWouldBeBlocked || reasonCodes.includes("service.drifted")) {
18626
18568
  const refreshOutcome = await runDaemonReinstall({
18627
18569
  agentOverviewHandled: true,
18570
+ ...scheduleBackgroundUpdate ? { displayAction: "update" } : {},
18628
18571
  gatewayUrl: await resolveBaseUrl(),
18629
18572
  profile: input.profile.openMeldProfileId,
18630
18573
  view: input.view
@@ -18659,6 +18602,9 @@ async function maybeCompleteServiceReadinessAfterPreparation(input) {
18659
18602
  }
18660
18603
  return "completed";
18661
18604
  }
18605
+ function shouldScheduleSetupServiceUpdate(input) {
18606
+ return input.inventory.anomalies.some((anomaly) => anomaly.code === "version_outdated" || anomaly.code === "bundle_version_drift") && input.wakeability.executionEvidenceSafe && !input.wakeability.blocksWake && !input.serviceRunWouldBeBlocked;
18607
+ }
18662
18608
  function collectReadinessReasonCodes(input) {
18663
18609
  const reasonCodes = [];
18664
18610
  for (const reasonCode of input.deviceReplyReadiness.reasonCodes) if (!reasonCodes.includes(reasonCode)) reasonCodes.push(reasonCode);
@@ -27399,7 +27345,7 @@ function normalizeOptionalString(value) {
27399
27345
  return normalized.length > 0 ? normalized : null;
27400
27346
  }
27401
27347
  async function runDefaultSpaceAddMeMembership(input) {
27402
- const { runSpaceAddMeMembership } = await import("./add-me-membership-CnjkM97q.js");
27348
+ const { runSpaceAddMeMembership } = await import("./add-me-membership-B_PkvB_e.js");
27403
27349
  return await runSpaceAddMeMembership(input);
27404
27350
  }
27405
27351
  //#endregion
@@ -32160,6 +32106,9 @@ const serviceCmd = program.command("service").alias("daemon").description("Manag
32160
32106
  });
32161
32107
  serviceCmd.command("start").description("Start OpenMeld Service on this device.").option("--mode <mode>", "Start mode: background (default) or foreground").option("--gateway-url <url>", "OpenMeld gateway URL (command line, OPENMELD_GATEWAY_URL, or saved OpenMeld settings)").option("--profile <id-or-name>", "Optional OpenMeld profile override used for owner resolution").option("--device-id <id>", "Override daemon device id for this run").option("--heartbeat-ms <n>", "Heartbeat interval in milliseconds (default: 25000)").option("--json", "Print machine-readable JSON.", false).action(runServiceStartCliAction);
32162
32108
  serviceCmd.command("run", { hidden: true }).description("Run OpenMeld Service in this process. System service entrypoint (launchd/systemd unit definitions call this); humans should use `openmeld service start`.").option("--mode <mode>", "Run mode: background (default) or foreground").option("--gateway-url <url>", "OpenMeld gateway URL (command line, OPENMELD_GATEWAY_URL, or saved OpenMeld settings)").option("--profile <id-or-name>", "Optional OpenMeld profile override used for owner resolution").option("--device-id <id>", "Override daemon device id for this run").option("--heartbeat-ms <n>", "Heartbeat interval in milliseconds (default: 25000)").action(runServiceStartCliAction);
32109
+ serviceCmd.command("update-worker", { hidden: true }).description("Resume one durable OpenMeld Service update in the background.").action(async () => {
32110
+ if ((await runPendingDaemonServiceUpdate())?.status === "failed") process.exitCode = 1;
32111
+ });
32163
32112
  serviceCmd.command("status").description("Show OpenMeld Service status on this device.").option("--json", "Print machine-readable JSON.", false).option("--profile <id-or-name>", "Optional OpenMeld profile context for local service diagnostics").action(async (opts) => {
32164
32113
  const json = opts.json === true;
32165
32114
  const view = json ? "agent" : getGlobalViewOption();
@@ -32330,7 +32279,7 @@ serviceCmd.command("uninstall").description("Remove OpenMeld Service from this d
32330
32279
  serviceCmd.command("repair").description("Repair OpenMeld Service on this device.").option("--force", "Allow force-continue when graceful stop/drain times out (may drop in-flight tasks)").option("--json", "Print machine-readable JSON.", false).action(async (opts) => {
32331
32280
  await runServiceMaintenanceCliAction(opts, "repair");
32332
32281
  });
32333
- serviceCmd.command("update").description("Update OpenMeld Service on this device.").option("--force", "Allow force-continue when graceful stop/drain times out (may drop in-flight tasks)").option("--json", "Print machine-readable JSON.", false).action(async (opts) => {
32282
+ serviceCmd.command("update").description("Update OpenMeld Service on this device.").option("--force", "This option is no longer needed. Updates always let running Agent work finish.").option("--json", "Print machine-readable JSON.", false).action(async (opts) => {
32334
32283
  await runServiceMaintenanceCliAction(opts, "update");
32335
32284
  });
32336
32285
  serviceCmd.command("reinstall", { hidden: true }).description("Deprecated alias for `openmeld service repair`.").option("--force", "Allow force-continue when graceful stop/drain times out (may drop in-flight tasks)").option("--json", "Print machine-readable JSON.", false).action(async (opts) => {