openmeld 0.3.137 → 0.3.139

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 resolveOpenMeldOrphanedLockIssue, $t as systemDir, A as toSpaceContractUrl, Bt as organizationSkillReleaseDir, Ct as accountProfileViewPath, D as normalizeBaseUrl, E as updateConfiguredStartV1OnboardingState, F as toSpaceDispatchTraceUrl, Ft as openMeldManagedBinaryPath, G as acquireLock, Gt as resolveOpenMeldCliEntryNameFromArgv, Ht as profileViewPath, It as openMeldManagedVersionBinaryPath, J as isOpenMeldOrphanedLockError, Jt as resolveOpenMeldRootDir, K as buildOpenMeldOrphanedLockAction, Kt as resolveOpenMeldEnvPreset, Nt as openMeldBackupsDir, P as toSpaceDispatchLookupUrl, Q as repairOrphanedLegacyLocks, Qt as spacesDir, Rt as openMeldRootDir, S as setConfiguredSkillsConfig, St as accountProfileSpaceCacheDir, Tt as accountsDir, V as toSpaceResultUrl, Vt as profileDir, Z as releaseLockSync, Zt as skillsDir, _t as toRecognizedLocalMachineFailureError, a as resolveBaseUrl, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, dt as LocalMachineFailureError, en as formatLocalMachineIssueMessage, et as runWithHeldLock, g as getConfiguredSkillsConfig, gt as isLocalMachineFailureError, ht as createOrphanedSetupConcurrencyIssue, jt as normalizeAccountKey, k as toSpaceBoardUrl, lt as formatLaneScopeSentence, m as getConfiguredOnboardingDisclaimerAcceptedAt, nt as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, o as resolveBaseUrlOrNull, ot as resolveCliContext, pt as createActiveSetupConcurrencyIssue, q as isOpenMeldLockError, rt as OPENMELD_CLI_CONTEXT_ENV_KEY, sn as agentControllerConversationRefSchema, u as alignRuntimeConfigStorage, ut as resolveOpenMeldLaneDescriptor, w as updateConfiguredOnboardingConfig } from "./base-url-CY_j4bLH.js";
4
- import { $ as runAgentsManage, $a as setProfileDefaultView, $i as isCurrentCommandCheckScopeActive, $n as assessCliUpdate, $o as cliBinaryDeltaPatchSchema, $r as formatDaemonFailureContextText, $t as runSkillsUpdate, A as parseEnvelope, Aa as resolveRuntimeContext, Ai as getAgentControllerPermissionModeDisplayMetadata, An as computeRetryDelayMs, Ao as readCodexSessionTitles, Ar as getCommandHintsFromContract, At as emitDaemonAgentOverview, B as resolveHumanControllerDisplayName, Ba as resolveOpenMeldProfile, Bi as buildDaemonRouteObservationPresentation$1, Bn as assertNoRemovedCcSpaceAddressingSyntax, Bo as runIfAgentActivityBindingGenerationIsCurrent, Br as formatDualViewGuideForDisplay, Bt as readGatewayTextResponse, C as toSpaceMetaUpsertInput, Ca as OPENMELD_VERSION, Ci as listAgentTargetStates, Cn as resolveCreateProfileKind, Co as readDaemonServiceContract, Cr as createSpaceSubcommandTargetGuideError, Ct as runDaemonStatusFlow, D as formatHumanReadTargetList, Da as createPresenter, Di as resolveLocalRegistryAgentIdFromAgentControllerRef, Dn as formatServiceParticipationReadinessLabel, Do as buildAgentActivityEvent, Dr as createStartAuthenticationGuideError, Dt as buildProfileWorkspacePresentation, E as buildHumanReplyContextSummary, Ea as renderHumanTextErrorCard, Ei as notifyDaemonRouteCatalogChanged, En as ensureAgentProfileRuntimeBinding, Eo as removeAgentActivityContextCache, Er as createStartAgentIdentityGuideError, Et as runDaemonUninstall, F as resolveOpenMeldProfileForSpaceCommand, Fa as createOpenMeldAgentProfile, Fi as resolveAgentExecutionStatus, Fn as resolveLocalAgentControllerBlockerReasonCodes, Fo as bindProject, Fr as registerDaemonControlTargetOptions, Ft as fetchSpaceUpdates, G as runAgentsCustomAdd, Ga as setSelectedOpenMeldProfileId, Gi as classifyDaemonServiceRunStartability, Gn as buildSpaceRoundReadProjection, Go as readControllerTaskLifecycleOutboxHealth, Gr as areAllowedActionsEquivalent, Gt as resolveDaemonServiceParticipationStatus, H as resolveAgentProfileSetup, Ha as alignSelectedOpenMeldProfileStorage, Hi as getSetupFlowCopy, Hn as buildDispatchResultReplyWorkflowProjection, Ho as unbindProject, Hr as formatAgentOverviewPayload, Ht as parseJsonResponse, I as emitSpaceAgentOverview, Ia as createOpenMeldHumanProfile, Ii as resolveAgentProfileEditCapabilities, In as resolveLocalAgentControllerLaunchability, Io as listProjectBindings, Ir as registerAuthLoginRequestOptions, It as createCliSpaceApi, J as runAgentsCustomUpdate, Ja as createAuthenticationError, Ji as assessServerRequiredVersion, Jn as formatRemovedCcRelationMessage, Jo as sanitizeTerminalDisplayText, Jr as readOpenMeldToolsUpdateContextFromEnv, Jt as collectSkillsReadinessSnapshot, K as runAgentsCustomList, Ka as buildAgentAuthenticationGuide, Ki as classifyDaemonServiceWakeability, Kn as buildUpdatesReplyWorkflowProjection, Ko as renderInfoCard, Kr as buildAgentFacingPublicationModeGuideLines, Kt as runDaemonServiceParticipationGate, L as emitSpaceCliAgentOverview, La as deleteOpenMeldProfile, Li as resolveEvidenceSyncHealth, Ln as resolveLocalAgentControllerReportDecision, Lo as listProjectConnectionsWithStatus, Lr as registerBuiltinAgentSelectionOptions, Lt as fetchSpaceMeta, M as assertFullSignalIdArgument, Ma as isSelectedOpenMeldProfileRequiredError, Mi as listAgentControllerPermissionModeOptions, Mn as submitRuntimeAgentControllerReport, Mo as removeProjectInbox, Mr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Mt as shouldEmitAgentOverview, N as assertValidSpaceIdTarget, Na as requireOpenMeldProfile, Ni as parseAgentControllerRef, Nn as submitRuntimeAgentControllerReports, No as readAgentActivityOutboxHealth, Nr as registerSkillsTargetSelectionOptions, Nt as runDaemonStartupPreflight, O as resolveLinkAccessLabel, Oa as formatMessage, Oi as buildAgentControllerRef, On as resolveServiceParticipationReadiness, Oo as resolveObservedAgentActivityBinding, Or as createUpgradeConfirmationGuideError, Ot as buildProfileWorkspaceRows, P as prepareAuthenticatedSpaceCommandContext, Pa as resolveOpenMeldProfileOrNull, Pi as resolveAgentControllerPermissionModeForController, Pn as collectLocalAgentControllerInventory, Po as removeProjectOutbox, Pr as getCliVersionInfo, Pt as readDaemonStartFailureLogTailLines, Q as runAgentsList, Qa as getProfileDefaultView, Qi as getCurrentCommandCheckState, Qn as runInteractivePrompt, Qo as outLine, Qr as resolveDaemonDeviceId, Qt as runSkillsUninstall, R as prepareLocalAgentReadiness, Ra as listOpenMeldProfiles, Ri as resolveNativeAgentControllerPermissionModeForController, Rn as inspectSpaceCacheFile, Ro as migrateProjectBindingStore, Rr as buildAgentOverviewFromContract, Rt as updateSpaceMeta, S as loadSpaceSignalIndexOrNull, Sa as resolveCurrentDaemonExpectedVersion, Si as resolveAgentProfilePrimaryAgentControllerReport, Sn as createProfileByKind, So as syncLocalAgentActivity, Sr as createSpaceResultGuideError, St as runDaemonSnapshot, T as buildFormalSignalReadPayload, Ta as renderHumanErrorCard, Ti as listBuiltinAgentsRegistryEntries, Tn as promptTextEntry, To as readAgentActivityContextForPath, Tr as createSpaceUpdatesGuideError, Tt as runDaemonTeardownStrict, U as runAgents, Ua as clearSelectedOpenMeldProfileId, Ui as buildDaemonServiceTargetSpec, Un as buildSignalIndex, Uo as canonicalizeLocalProjectPath, Ur as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ut as resolveLocalComponentsStatus, V as persistAgentTransportSelection, Va as updateOpenMeldProfile, Vi as buildOnboardingPlan, Vn as buildDispatchResultMessageReadProjection, Vo as setDefaultProjectConnection, Vr as buildDualViewGuideMessage, Vt as toStructuredGatewayFailure, W as runAgentsConfig, Wa as getSelectedOpenMeldProfileId, Wi as resolveDaemonServiceAlignmentDecision, Wn as buildSignalMessageReadProjection, Wo as enqueueControllerTaskLifecycleEventWhileLocked, Wr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Wt as writeInstalledLocalComponentsSnapshot, X as runAgentsDisable, Xa as resolveAuthenticationGuidanceFromError, Xi as resolveAuthBaseUrl, Xn as promptSearchSelect, Xo as errLine, Xr as scheduleDaemonServiceUpdate, Xt as runSkillsEnsure, Y as runAgentsDetect, Ya as resolveAuthenticationGuidance, Yi as resolveOpenMeldEnvironmentTarget, Yn as promptSearchMultiselect, Yo as emitCliJsonEnvelope, Yr as runPendingDaemonServiceUpdate, Yt as runSkillsCheck$1, Z as runAgentsEnable, Za as resolveAuthenticationGuidanceFromMessage, Zi as finishCurrentCommandCheckScope, Zn as isReturnKeypress, Zo as outJsonLine, Zr as ensureDaemonRuntimePaths, Zt as runSkillsInstall, _ as runSpaceWriteWithPasswordRetry, _a as fetchLatestPackageInfo, _i as setOpenMeldManagedProfileWorkspace, _n as fetchAuthUserSnapshot, _o as formatOpenMeldCliLine, _r as createSpaceContractSetGuideError, _t as runDaemonCancel, a as runSpaceDelete, aa as readCurrentObservedDaemonRuntimeStatus, ai as formatHumanReplyReadinessReason$1, an as buildCommandAuthenticationPromptMessage, ao as registerAgentActivityRoute, ar as formatElapsedTime, as as organizationJoinLinkErrorResponseSchema, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as resolveDaemonRuntimeContractCompatibility, bi as syncDeviceRuntimeStateProjection, bn as resolveDeviceTokenExpiresAt, bo as resolveSetupFollowUpCliEntryCommand, br as createSpacePublicationSetGuideError, bt as runDaemonReinstall, c as runSpaceLeave, ca as readDaemonServiceJobCrashExitCode, ci as resolveOpenClawLocalDiagnosticsValue, cn as runAuthLogin, cr as formatDaemonServiceMissingRecommendation, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as buildInstallSelfJsonPayload, di as resolveProfileWorkspaceRuntime, dn as runAuthStatus, do as readAgentActivityIntegrationStatus, dr as createProfileActionGuideError, dt as resolveSpaceWebGatewayOrigin, ea as resetCurrentCommandCheckState, ei as resolveServiceReadinessFromServiceStatus, en as ensureLocalSkills, eo as LocalProjectConnectionError, er as isCliUpdateCheckApplicable, es as cliJsonOutputEnvelopeSchema, et as runAgentsRepair, f as runSpaceSend, fa as performManagedInstall, fi as ensureOpenMeldManagedProfileWorkspace, fn as exchangeOneTimeTokenAuthSession, fo as resolveAgentActivityDispatcherCommand, fr as createProfileCreateGuideError, ft as resolveSpaceSendText, g as runSpaceReadWithPasswordRetry, ga as fetchLatestCliBinaryRelease, gi as setCustomProfileWorkspace, gn as extractAuthApiErrorMessage, go as formatOpenMeldCliCommands, gr as createSpaceAliasTargetGuideError, gt as runDaemonBackgroundStartForDecision, h as uploadPreparedSpaceFiles, ha as ensureVersionStateReady, hi as resolveConfiguredProfileWorkspacePath, hn as formatActiveOrganizationLabel, ho as formatOpenMeldCliCommand, hr as createSpaceAddMembersGuideError, ht as runDaemonAutostart, i as runSpaceCreate, ia as readCurrentDaemonRuntimeContext, ii as formatDeviceReplyReadinessLabel, in as connectWebSocket, io as isAgentActivityRouteRegistered, ir as writeDispatchSpaceActionRecord, is as getOrganizationJoinLinkResponseSchema, it as colorizeDisplayProfileLabel, j as isSpaceCommandOutputHandledError, ja as resolveViewProfileKey, ji as getAgentControllerPermissionModeFieldLabel, jn as submitProfileRuntimeAgentControllerReport, jo as enqueueAgentActivityHookEvent, jr as registerSpaceMemberSelectionOptions, jt as createDelayedSpinner, k as resolveOrganizationVisibilityLabel, ka as parseCliViewMode, ki as createAgentExecutionStatusDisplayRows, kn as assessActionParticipationCandidate, ko as normalizeSharedSessionTitle, kr as getCommandEntryContract, kt as reconcileCliVersionView, l as runSpaceList, la as resolveDaemonServiceManager, li as syncProfileWorkspaceState, ln as runAuthLogout, lo as defaultManagedIntegrationPaths, lr as canUseInteractivePrompts, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as compareSemver, mi as readProfileWorkspaceConfig, mn as buildAuthStatusSnapshot, mo as formatInlineOpenMeldCliCommands, mr as createResetConfirmationGuideError, mt as runDaemon, n as promptAndConfirmSpacePassword, na as inspectDaemonServiceInventory, ni as resolveCurrentReplyReadinessSnapshot, nn as readRuntimeReportingHealthState, no as LocalDaemonControlPlaneClientError, nr as readDispatchOwnedRuntimeGuard, ns as cliJsonSkillsLoadEnvelopeSchema, nt as formatTransportModeDisplay, o as runSpaceHistory, oa as getDaemonSystemServiceLogPath, oi as mapAgentReplyReadinessToLegacyAutoReply, on as ensureCommandAuthenticationOrCancel, oo as resolveAgentActivityRouteForPath, or as resolveElapsedTimeMs, os as revokeOrganizationJoinLinkResponseSchema, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as buildNextVersionState, pi as normalizeCustomProfileWorkspacePath, pn as buildAuthStatusRows, po as uninstallAgentActivityIntegrations, pr as createProfileMenuGuideError, pt as bestEffortStopCurrentLaneDaemonService, q as runAgentsCustomRemove, qa as buildHumanAuthenticationCard, qi as resolveServiceUpdateUrgency, qn as createSpaceMemberIdentityIndex, qo as renderTextInfoCard, qr as canonicalizeAllowedActions, qt as runDaemonStartDecisionPrompt, r as runSpaceAddMembers, ra as resolveVersionChangeDirection, ri as formatAgentReplyReadinessLabel, rn as readRecentDaemonDispatchJournalEvents, ro as requestLocalAgentActivitySync, rr as readDispatchSpaceActionContextFromEnv, rs as cliJsonSkillsShowEnvelopeSchema, rt as colorizeAgentLabel, s as runSpaceJoin, sa as isDaemonServiceJobNeverSpawned, si as resolveGatewayChainReadiness, sn as evaluateCommandAuthentication, so as unregisterAgentActivityRoute, sr as formatDaemonServiceDowngradeBlockedRecommendation, ss as compareAgentControllerRefsForDisplay, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as startCurrentCommandCheckScope, ti as resolveDaemonServiceFreshnessWarning, tn as readBundledOpenMeldCliSkillDocumentByPath, to as validateLocalProjectConnectionPath, tr as assertDispatchOwnedRuntimePublicWriteAllowed, ts as cliJsonSkillsListEnvelopeSchema, tt as runAgentsShow, u as runSpacePassword, ua as readRecentDaemonLifecycleEvents, ui as createModelCatalogReadSession, un as runAuthMenu, uo as installAgentActivityIntegrations, ur as createDoctorFailedGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as readVersionState, vi as validateCustomProfileWorkspacePath, vn as requestDeviceToken, vo as formatOpenMeldCliTextBlock, vr as createSpaceLeaveGuideError, vt as runDaemonInstall, w as buildFormalDispatchResultReadPayload, wa as buildHumanErrorCopy, wi as reconcileNewRunnableBuiltinAgentsForSetup, wn as resolveCreateProfileName, wo as upsertDaemonServiceContract, wr as createSpaceTargetGuideError, wt as runDaemonStop, x as loadSpaceIdentityDirectoryOrNull, xa as toStartBackgroundHelperExecutionCompatibility, xi as createPrimaryBindingReadSession, xn as revokeAuthAccessToken, xo as resolveUserFacingCliEntryCommand, xr as createSpaceRemoveMembersGuideError, xt as runDaemonRunAfterEntryChecks, y as emitHumanReadSignalsTextProjection, ya as writeVersionState, yi as describeProfileWorkspacePathValidationFailure, yn as resolveDeviceAuthClientId, yo as formatProfileAwareOpenMeldCliCommands, yr as createSpaceMenuGuideError, yt as runDaemonInterrupt, z as buildReplyReadinessGuidance, za as primeOpenMeldProfilesSessionCache, zn as upsertSpaceConfig, zo as removeProjectConnection, zr as DualViewGuideError, zt as readGatewayJsonResponse } from "./command-CU_3raCS.js";
5
- import { At as submitFeedbackIssueRequestSchema, D as toStructuredApiClientFailure, Et as authProfileManagedRoleSchema, F as OPENMELD_HEADER_PROFILE_ID, G as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Ht as agentActivityProviderSchema, J as spaceDispatchTraceAttemptStatusSchema, K as projectSpaceDispatchTraceFinalVisibleOutcome, Q as projectObservabilityWakeCorrelation, R as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Tt as authProfileKindSchema, Ut as agentActivitySessionStatusSchema, V as sleep, Wt as agentActivitySnapshotQuerySchema, X as spaceDispatchTraceResponseSchema, Y as spaceDispatchTraceDispatchStatusSchema, Z as observabilityWakeTraceSelectorSchema, _ as createOrganizationSkillsApi, _n as startReplyReadinessSummarySchema, b as createProjectsApi, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, en as agentActivityInventorySessionOriginSchema, et as ownerComputerDiagnosticsSchema, f as createFeedbackApi, g as createOrganizationApi, gn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, hn as START_ISO_DATE_TIME_SCHEMA, in as localAgentSessionProviderSchema, it as agentProfileCreationConfigurationSchema, l as createCenterAgentApi, mn as START_BOUNDED_VERSION_SCHEMA, nn as agentActivitySessionInventoryQuerySchema, nt as summarizeComputerFileAccessPolicy, pn as START_BOUNDED_ID_SCHEMA, q as resolveSpaceDispatchTraceRootCause, rt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, s as createAgentActivityApi, tn as agentActivityInventorySessionStatusSchema, tt as projectOwnerComputerLocalRuntimes, u as createComputerFileAccessApi, v as createPrepareReadinessApi, vn as localAgentCatalogSchema, vt as organizationSkillBundleSchema, x as createRoutinesApi, xt as stringifyOrganizationSkillBundleCanonicalJson } from "./dist-NJH-sDDB.js";
6
- import { Ar as clientMessageIdSchema, Dn as messageEnvelopeSchema, Er as unknown, Ft as spaceStatusSchema, Ht as isSpaceFileTextEditable, It as centerAgentInteractionSourceSchema, Kt as resolveSpaceFileMimeType, Sr as string, Tr as union, Zr as openMeldProfileIdSchema, br as record, di as trimmedStringFromUnknown, dr as enumFactory, fr as int, gr as nullFactory, hn as spaceContractSchema, li as nonEmptyTrimmedStringFromUnknown, ln as dispatchExecutionSchema, lr as discriminatedUnion, mn as spaceContractFieldsSchema, mr as literal, ni as openMeldRuntimeProfileIdSchema, or as array, pr as iso, sr as boolean, un as spaceThreadContextSchema, vr as object, xr as strictObject } from "./runtime-transport-DYzU1lHC.js";
4
+ import { $ as runAgentsManage, $a as resolveAuthenticationGuidanceFromMessage, $i as getCurrentCommandCheckState, $n as assessCliUpdate, $o as outJsonLine, $r as resolveDaemonDeviceId, $t as runSkillsUpdate, A as parseEnvelope, Aa as formatMessage, Ai as createAgentExecutionStatusDisplayRows, An as computeRetryDelayMs, Ao as resolveObservedAgentActivityBinding, Ar as getCommandHintsFromContract, At as emitDaemonAgentOverview, B as resolveHumanControllerDisplayName, Ba as listOpenMeldProfiles, Bn as assertNoRemovedCcSpaceAddressingSyntax, Bo as migrateProjectBindingStore, Br as formatDualViewGuideForDisplay, Bt as readGatewayTextResponse, C as toSpaceMetaUpsertInput, Ca as toStartBackgroundHelperExecutionCompatibility, Ci as resolveAgentProfilePrimaryAgentControllerReport, Cn as resolveCreateProfileKind, Co as resolveUserFacingCliEntryCommand, Cr as createSpaceSubcommandTargetGuideError, Ct as runDaemonStatusFlow, D as formatHumanReadTargetList, Da as renderHumanErrorCard, Di as notifyDaemonRouteCatalogChanged, Dn as formatServiceParticipationReadinessLabel, Do as readAgentActivityContextForPath, Dr as createStartAuthenticationGuideError, Dt as buildProfileWorkspacePresentation, E as buildHumanReplyContextSummary, Ea as buildHumanErrorCopy, Ei as listBuiltinAgentsRegistryEntries, En as ensureAgentProfileRuntimeBinding, Eo as upsertDaemonServiceContract, Er as createStartAgentIdentityGuideError, Et as runDaemonUninstall, F as resolveOpenMeldProfileForSpaceCommand, Fa as requireOpenMeldProfile, Fi as resolveAgentControllerPermissionModeForController, Fn as resolveLocalAgentControllerBlockerReasonCodes, Fo as readAgentActivityOutboxHealth, Fr as registerDaemonControlTargetOptions, Ft as fetchSpaceUpdates, G as runAgentsCustomAdd, Ga as clearSelectedOpenMeldProfileId, Gi as resolveDaemonServiceAlignmentDecision, Gn as buildSpaceRoundReadProjection, Go as canonicalizeLocalProjectPath, Gr as areAllowedActionsEquivalent, Gt as resolveDaemonServiceParticipationStatus, H as resolveAgentProfileSetup, Ha as resolveOpenMeldProfile, Hi as buildOnboardingPlan, Hn as buildDispatchResultReplyWorkflowProjection, Ho as runIfAgentActivityBindingGenerationIsCurrent, Hr as formatAgentOverviewPayload, Ht as parseJsonResponse, I as emitSpaceAgentOverview, Ia as resolveOpenMeldProfileOrNull, Ii as resolveAgentExecutionStatus, In as resolveLocalAgentControllerLaunchability, Io as removeProjectOutbox, Ir as registerAuthLoginRequestOptions, It as createCliSpaceApi, J as runAgentsCustomUpdate, Ja as buildAgentAuthenticationGuide, Ji as resolveServiceUpdateUrgency, Jn as formatRemovedCcRelationMessage, Jo as renderInfoCard, Jr as readPendingOpenMeldToolsUpdateAttempt, Jt as collectSkillsReadinessSnapshot, K as runAgentsCustomList, Ka as getSelectedOpenMeldProfileId, Ki as classifyDaemonServiceRunStartability, Kn as buildUpdatesReplyWorkflowProjection, Ko as enqueueControllerTaskLifecycleEventWhileLocked, Kr as buildAgentFacingPublicationModeGuideLines, Kt as runDaemonServiceParticipationGate, L as emitSpaceCliAgentOverview, La as createOpenMeldAgentProfile, Li as resolveAgentProfileEditCapabilities, Ln as resolveLocalAgentControllerReportDecision, Lo as bindProject, Lr as registerBuiltinAgentSelectionOptions, Lt as fetchSpaceMeta, M as assertFullSignalIdArgument, Ma as resolveRuntimeContext, Mi as getAgentControllerPermissionModeFieldLabel, Mn as submitRuntimeAgentControllerReport, Mo as readCodexSessionTitles, Mr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Mt as shouldEmitAgentOverview, N as assertValidSpaceIdTarget, Na as resolveViewProfileKey, Ni as listAgentControllerPermissionModeOptions, Nn as submitRuntimeAgentControllerReports, No as enqueueAgentActivityHookEvent, Nr as registerSkillsTargetSelectionOptions, Nt as runDaemonStartupPreflight, O as resolveLinkAccessLabel, Oa as renderHumanTextErrorCard, Oi as resolveLocalRegistryAgentIdFromAgentControllerRef, On as resolveServiceParticipationReadiness, Oo as removeAgentActivityContextCache, Or as createUpgradeConfirmationGuideError, Ot as buildProfileWorkspaceRows, P as prepareAuthenticatedSpaceCommandContext, Pa as isSelectedOpenMeldProfileRequiredError, Pi as parseAgentControllerRef, Pn as collectLocalAgentControllerInventory, Po as removeProjectInbox, Pr as getCliVersionInfo, Pt as readDaemonStartFailureLogTailLines, Q as runAgentsList, Qa as resolveAuthenticationGuidanceFromError, Qi as finishCurrentCommandCheckScope, Qn as runInteractivePrompt, Qo as errLine, Qr as ensureDaemonRuntimePaths, Qt as runSkillsUninstall, R as prepareLocalAgentReadiness, Ra as createOpenMeldHumanProfile, Ri as resolveEvidenceSyncHealth, Rn as inspectSpaceCacheFile, Ro as listProjectBindings, Rr as buildAgentOverviewFromContract, Rt as updateSpaceMeta, S as loadSpaceSignalIndexOrNull, Sa as resolveDaemonRuntimeContractCompatibility, Si as createPrimaryBindingReadSession, Sn as createProfileByKind, So as resolveSetupFollowUpCliEntryCommand, Sr as createSpaceResultGuideError, St as runDaemonSnapshot, T as buildFormalSignalReadPayload, Ta as OPENMELD_VERSION, Ti as reconcileNewRunnableBuiltinAgentsForSetup, Tn as promptTextEntry, To as readDaemonServiceContract, Tr as createSpaceUpdatesGuideError, Tt as runDaemonTeardownStrict, U as runAgents, Ua as updateOpenMeldProfile, Ui as getSetupFlowCopy, Un as buildSignalIndex, Uo as setDefaultProjectConnection, Ur as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ut as resolveLocalComponentsStatus, V as persistAgentTransportSelection, Va as primeOpenMeldProfilesSessionCache, Vi as buildDaemonRouteObservationPresentation$1, Vn as buildDispatchResultMessageReadProjection, Vo as removeProjectConnection, Vr as buildDualViewGuideMessage, Vt as toStructuredGatewayFailure, W as runAgentsConfig, Wa as alignSelectedOpenMeldProfileStorage, Wi as buildDaemonServiceTargetSpec, Wn as buildSignalMessageReadProjection, Wo as unbindProject, Wr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Wt as writeInstalledLocalComponentsSnapshot, X as runAgentsDisable, Xa as createAuthenticationError, Xi as resolveOpenMeldEnvironmentTarget, Xn as promptSearchSelect, Xo as sanitizeTerminalDisplayText, Xr as runPendingDaemonServiceUpdate, Xt as runSkillsEnsure, Y as runAgentsDetect, Ya as buildHumanAuthenticationCard, Yi as assessServerRequiredVersion, Yn as promptSearchMultiselect, Yo as renderTextInfoCard, Yr as readOpenMeldToolsUpdateContextFromEnv, Yt as runSkillsCheck$1, Z as runAgentsEnable, Za as resolveAuthenticationGuidance, Zi as resolveAuthBaseUrl, Zn as isReturnKeypress, Zo as emitCliJsonEnvelope, Zr as scheduleDaemonServiceUpdate, Zt as runSkillsInstall, _ as runSpaceWriteWithPasswordRetry, _a as ensureVersionStateReady, _i as setCustomProfileWorkspace, _n as fetchAuthUserSnapshot, _o as formatOpenMeldCliCommand, _r as createSpaceContractSetGuideError, _t as runDaemonCancel, a as runSpaceDelete, aa as readCurrentDaemonRuntimeContext, ai as formatDeviceReplyReadinessLabel, an as buildCommandAuthenticationPromptMessage, ao as requestLocalAgentActivitySync, ar as formatElapsedTime, as as cliJsonSkillsShowEnvelopeSchema, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as readVersionState, bi as describeProfileWorkspacePathValidationFailure, bn as resolveDeviceTokenExpiresAt, bo as formatOpenMeldCliTextBlock, br as createSpacePublicationSetGuideError, bt as runDaemonReinstall, c as runSpaceLeave, ca as isDaemonServiceJobNeverSpawned, ci as resolveGatewayChainReadiness, cn as runAuthLogin, co as resolveAgentActivityRouteForPath, cr as formatDaemonServiceMissingRecommendation, cs as revokeOrganizationJoinLinkResponseSchema, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as readRecentDaemonLifecycleEvents, di as createModelCatalogReadSession, dn as runAuthStatus, do as defaultManagedIntegrationPaths, dr as createProfileActionGuideError, dt as resolveSpaceWebGatewayOrigin, ea as isCurrentCommandCheckScopeActive, ei as formatDaemonFailureContextText, en as ensureLocalSkills, eo as getProfileDefaultView, er as isCliUpdateCheckApplicable, es as outLine, et as runAgentsRepair, f as runSpaceSend, fa as buildInstallSelfJsonPayload, fi as resolveProfileWorkspaceRuntime, fn as exchangeOneTimeTokenAuthSession, fo as installAgentActivityIntegrations, fr as createProfileCreateGuideError, ft as resolveSpaceSendText, g as runSpaceReadWithPasswordRetry, ga as compareSemver, gi as resolveConfiguredProfileWorkspacePath, gn as extractAuthApiErrorMessage, go as formatInlineOpenMeldCliCommands, gr as createSpaceAliasTargetGuideError, gt as runDaemonBackgroundStartForDecision, h as uploadPreparedSpaceFiles, ha as buildNextVersionState, hi as readProfileWorkspaceConfig, hn as formatActiveOrganizationLabel, ho as uninstallAgentActivityIntegrations, hr as createSpaceAddMembersGuideError, ht as runDaemonAutostart, i as runSpaceCreate, ia as resolveVersionChangeDirection, ii as formatAgentReplyReadinessLabel, in as connectWebSocket, io as LocalDaemonControlPlaneClientError, ir as writeDispatchSpaceActionRecord, is as cliJsonSkillsLoadEnvelopeSchema, it as colorizeDisplayProfileLabel, j as isSpaceCommandOutputHandledError, ja as parseCliViewMode, ji as getAgentControllerPermissionModeDisplayMetadata, jn as submitProfileRuntimeAgentControllerReport, jo as normalizeSharedSessionTitle, jr as registerSpaceMemberSelectionOptions, jt as createDelayedSpinner, k as resolveOrganizationVisibilityLabel, ka as createPresenter, ki as buildAgentControllerRef, kn as assessActionParticipationCandidate, ko as buildAgentActivityEvent, kr as getCommandEntryContract, kt as reconcileCliVersionView, l as runSpaceList, la as readDaemonServiceJobCrashExitCode, li as resolveOpenClawLocalDiagnosticsValue, ln as runAuthLogout, lo as unregisterAgentActivityRoute, lr as canUseInteractivePrompts, ls as compareAgentControllerRefsForDisplay, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as readPendingDaemonServiceUpdate, mi as normalizeCustomProfileWorkspacePath, mn as buildAuthStatusSnapshot, mo as resolveAgentActivityDispatcherCommand, mr as createResetConfirmationGuideError, mt as runDaemon, n as promptAndConfirmSpacePassword, na as startCurrentCommandCheckScope, ni as resolveDaemonServiceFreshnessWarning, nn as readRuntimeReportingHealthState, no as LocalProjectConnectionError, nr as readDispatchOwnedRuntimeGuard, ns as cliJsonOutputEnvelopeSchema, nt as formatTransportModeDisplay, o as runSpaceHistory, oa as readCurrentObservedDaemonRuntimeStatus, oi as formatHumanReplyReadinessReason$1, on as ensureCommandAuthenticationOrCancel, oo as isAgentActivityRouteRegistered, or as resolveElapsedTimeMs, os as getOrganizationJoinLinkResponseSchema, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as performManagedInstall, pi as ensureOpenMeldManagedProfileWorkspace, pn as buildAuthStatusRows, po as readAgentActivityIntegrationStatus, pr as createProfileMenuGuideError, pt as bestEffortStopCurrentLaneDaemonService, q as runAgentsCustomRemove, qa as setSelectedOpenMeldProfileId, qi as classifyDaemonServiceWakeability, qn as createSpaceMemberIdentityIndex, qo as readControllerTaskLifecycleOutboxHealth, qr as canonicalizeAllowedActions, qt as runDaemonStartDecisionPrompt, r as runSpaceAddMembers, ra as inspectDaemonServiceInventory, ri as resolveCurrentReplyReadinessSnapshot, rn as readRecentDaemonDispatchJournalEvents, ro as validateLocalProjectConnectionPath, rr as readDispatchSpaceActionContextFromEnv, rs as cliJsonSkillsListEnvelopeSchema, rt as colorizeAgentLabel, s as runSpaceJoin, sa as getDaemonSystemServiceLogPath, si as mapAgentReplyReadinessToLegacyAutoReply, sn as evaluateCommandAuthentication, so as registerAgentActivityRoute, sr as formatDaemonServiceDowngradeBlockedRecommendation, ss as organizationJoinLinkErrorResponseSchema, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as resetCurrentCommandCheckState, ti as resolveServiceReadinessFromServiceStatus, tn as readBundledOpenMeldCliSkillDocumentByPath, to as setProfileDefaultView, tr as assertDispatchOwnedRuntimePublicWriteAllowed, ts as cliBinaryDeltaPatchSchema, tt as runAgentsShow, u as runSpacePassword, ua as resolveDaemonServiceManager, ui as syncProfileWorkspaceState, un as runAuthMenu, ur as createDoctorFailedGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as fetchLatestCliBinaryRelease, vi as setOpenMeldManagedProfileWorkspace, vn as requestDeviceToken, vo as formatOpenMeldCliCommands, vr as createSpaceLeaveGuideError, vt as runDaemonInstall, w as buildFormalDispatchResultReadPayload, wa as resolveCurrentDaemonExpectedVersion, wi as listAgentTargetStates, wn as resolveCreateProfileName, wo as syncLocalAgentActivity, wr as createSpaceTargetGuideError, wt as runDaemonStop, x as loadSpaceIdentityDirectoryOrNull, xa as writeVersionState, xi as syncDeviceRuntimeStateProjection, xn as revokeAuthAccessToken, xo as formatProfileAwareOpenMeldCliCommands, xr as createSpaceRemoveMembersGuideError, xt as runDaemonRunAfterEntryChecks, y as emitHumanReadSignalsTextProjection, ya as fetchLatestPackageInfo, yi as validateCustomProfileWorkspacePath, yn as resolveDeviceAuthClientId, yo as formatOpenMeldCliLine, yr as createSpaceMenuGuideError, yt as runDaemonInterrupt, z as buildReplyReadinessGuidance, za as deleteOpenMeldProfile, zi as resolveNativeAgentControllerPermissionModeForController, zn as upsertSpaceConfig, zo as listProjectConnectionsWithStatus, zr as DualViewGuideError, zt as readGatewayJsonResponse } from "./command-Xal0ngrZ.js";
5
+ import { At as submitFeedbackIssueRequestSchema, D as toStructuredApiClientFailure, Et as authProfileManagedRoleSchema, F as OPENMELD_HEADER_PROFILE_ID, G as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Ht as agentActivityProviderSchema, J as spaceDispatchTraceAttemptStatusSchema, K as projectSpaceDispatchTraceFinalVisibleOutcome, Q as projectObservabilityWakeCorrelation, R as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Tt as authProfileKindSchema, Ut as agentActivitySessionStatusSchema, V as sleep, Wt as agentActivitySnapshotQuerySchema, X as spaceDispatchTraceResponseSchema, Y as spaceDispatchTraceDispatchStatusSchema, Z as observabilityWakeTraceSelectorSchema, _ as createOrganizationSkillsApi, _n as startReplyReadinessSummarySchema, b as createProjectsApi, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, en as agentActivityInventorySessionOriginSchema, et as ownerComputerDiagnosticsSchema, f as createFeedbackApi, g as createOrganizationApi, gn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, hn as START_ISO_DATE_TIME_SCHEMA, in as localAgentSessionProviderSchema, it as agentProfileCreationConfigurationSchema, l as createCenterAgentApi, mn as START_BOUNDED_VERSION_SCHEMA, nn as agentActivitySessionInventoryQuerySchema, nt as summarizeComputerFileAccessPolicy, pn as START_BOUNDED_ID_SCHEMA, q as resolveSpaceDispatchTraceRootCause, rt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, s as createAgentActivityApi, tn as agentActivityInventorySessionStatusSchema, tt as projectOwnerComputerLocalRuntimes, u as createComputerFileAccessApi, v as createPrepareReadinessApi, vn as localAgentCatalogSchema, vt as organizationSkillBundleSchema, x as createRoutinesApi, xt as stringifyOrganizationSkillBundleCanonicalJson } from "./dist-D2XcIIBd.js";
6
+ import { Ar as clientMessageIdSchema, Dn as messageEnvelopeSchema, Er as unknown, Ft as spaceStatusSchema, Ht as isSpaceFileTextEditable, It as centerAgentInteractionSourceSchema, Kt as resolveSpaceFileMimeType, Sr as string, Tr as union, Zr as openMeldProfileIdSchema, br as record, di as trimmedStringFromUnknown, dr as enumFactory, fr as int, gr as nullFactory, hn as spaceContractSchema, li as nonEmptyTrimmedStringFromUnknown, ln as dispatchExecutionSchema, lr as discriminatedUnion, mn as spaceContractFieldsSchema, mr as literal, ni as openMeldRuntimeProfileIdSchema, or as array, pr as iso, sr as boolean, un as spaceThreadContextSchema, vr as object, xr as strictObject } from "./runtime-transport-QslOj6uZ.js";
7
7
  import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
8
8
  import { j as getDaemonStatus } from "./daemon-runtime-lease-6DIprlJy.js";
9
- import { _ as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, c as getAuthSessionMetadata, d as getInterruptedComputerAuthSessionRecovery, f as markInterruptedComputerAuthSessionRecovery, g as updateAuthSessionActiveOrganization, l as getAuthSessionState, m as recordInterruptedComputerAuthSessionRecoveryFailure, n as AuthSessionRecoveryInProgressError, o as clearAuthSession, p as normalizeStoredActiveOrganization, s as completeInterruptedComputerAuthSessionRecovery, t as AuthSessionChangedBeforeTransitionError, u as getCurrentAuthOwnerUserId, v as isBinaryDistribution, y as resolveOpenMeldDistribution } from "./auth-session-B06nfwnD.js";
10
- import { c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, l as buildRequestAuthHeaders, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout } from "./api-client-foundation-BPmXnsr9.js";
9
+ import { _ as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, c as getAuthSessionMetadata, d as getInterruptedComputerAuthSessionRecovery, f as markInterruptedComputerAuthSessionRecovery, g as updateAuthSessionActiveOrganization, l as getAuthSessionState, m as recordInterruptedComputerAuthSessionRecoveryFailure, n as AuthSessionRecoveryInProgressError, o as clearAuthSession, p as normalizeStoredActiveOrganization, s as completeInterruptedComputerAuthSessionRecovery, t as AuthSessionChangedBeforeTransitionError, u as getCurrentAuthOwnerUserId, v as isBinaryDistribution, y as resolveOpenMeldDistribution } from "./auth-session-BFa5tO5y.js";
10
+ import { c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, l as buildRequestAuthHeaders, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout } from "./api-client-foundation-DxsyMj_G.js";
11
11
  import { Command, Option } from "commander";
12
12
  import os, { homedir, hostname, release, tmpdir } from "node:os";
13
13
  import * as z$1 from "zod/v4";
@@ -2620,6 +2620,36 @@ function applyEntryCheckResult(input) {
2620
2620
  return false;
2621
2621
  }
2622
2622
  //#endregion
2623
+ //#region src/local-service/maintenance/openmeld-tools-update-join.ts
2624
+ const DEFAULT_UPDATE_JOIN_POLL_INTERVAL_MS = 500;
2625
+ async function resolveExternalOpenMeldToolsUpdate(input = {}) {
2626
+ const toolsAttempt = await readPendingOpenMeldToolsUpdateAttempt(input);
2627
+ const serviceJob = await readPendingDaemonServiceUpdate(input);
2628
+ if (serviceJob && serviceJob.jobId !== (input.currentOperationId ?? null)) return {
2629
+ operationId: serviceJob.jobId,
2630
+ phase: serviceJob.phase,
2631
+ requestSource: serviceJob.requestSource,
2632
+ requestedAt: serviceJob.requestedAt,
2633
+ targetVersion: serviceJob.targetVersion,
2634
+ updatedAt: serviceJob.updatedAt,
2635
+ urgency: serviceJob.urgency
2636
+ };
2637
+ if (toolsAttempt && toolsAttempt.operation.operationId !== (input.currentOperationId ?? null)) return toolsAttempt.operation;
2638
+ return null;
2639
+ }
2640
+ async function waitForExternalOpenMeldToolsUpdate(input = {}) {
2641
+ let reportedOperationId = null;
2642
+ while (true) {
2643
+ const operation = await resolveExternalOpenMeldToolsUpdate(input);
2644
+ if (!operation) return;
2645
+ if (reportedOperationId !== operation.operationId) {
2646
+ reportedOperationId = operation.operationId;
2647
+ await input.onWaiting?.(operation);
2648
+ }
2649
+ await setTimeout$1(Math.max(1, input.pollIntervalMs ?? DEFAULT_UPDATE_JOIN_POLL_INTERVAL_MS));
2650
+ }
2651
+ }
2652
+ //#endregion
2623
2653
  //#region src/runtime/cli-binary-delta.ts
2624
2654
  function reconstructCliBinaryDelta(input) {
2625
2655
  verifyBytes({
@@ -3041,6 +3071,18 @@ async function runUpgrade(input) {
3041
3071
  presenter,
3042
3072
  command: "upgrade"
3043
3073
  });
3074
+ const currentUpdate = readOpenMeldToolsUpdateContextFromEnv();
3075
+ if (!input.check) {
3076
+ const existingUpdate = await resolveExternalOpenMeldToolsUpdate({ currentOperationId: currentUpdate?.operationId });
3077
+ if (existingUpdate) {
3078
+ emitUpgradeAlreadyRunning({
3079
+ operation: existingUpdate,
3080
+ presenter,
3081
+ resolvedView: runtime.resolvedView
3082
+ });
3083
+ return;
3084
+ }
3085
+ }
3044
3086
  if (input.internalAlignService) {
3045
3087
  await runInternalUpgradeServiceAlignment({
3046
3088
  presenter,
@@ -3130,6 +3172,27 @@ async function runUpgrade(input) {
3130
3172
  presenter
3131
3173
  });
3132
3174
  }
3175
+ function emitUpgradeAlreadyRunning(input) {
3176
+ if (input.resolvedView === "agent") {
3177
+ input.presenter.data({
3178
+ code: "upgrade.already_running",
3179
+ payload: {
3180
+ status: "already_running",
3181
+ operation: input.operation
3182
+ }
3183
+ });
3184
+ return;
3185
+ }
3186
+ input.presenter.line({
3187
+ code: "upgrade.already_running",
3188
+ text: "An OpenMeld update is already in progress. OpenMeld will keep working in the background, so this command did not start another update. You can close this Terminal.",
3189
+ data: {
3190
+ operationId: input.operation.operationId,
3191
+ phase: input.operation.phase,
3192
+ targetVersion: input.operation.targetVersion
3193
+ }
3194
+ });
3195
+ }
3133
3196
  function emitUpgradeCheckStatus(input) {
3134
3197
  if (input.resolvedView === "agent") {
3135
3198
  input.presenter.data({
@@ -5510,7 +5573,7 @@ const CHOOSE_PROFILE = "__command_entry_choose_profile__";
5510
5573
  const CREATE_PROFILE = "__command_entry_create_profile__";
5511
5574
  const CANCEL_PROFILE = "__command_entry_cancel_profile__";
5512
5575
  async function runSelectedProfileCheck(input) {
5513
- const explicitProfileArg = normalizeOptionalString$17(input.context.profileArg);
5576
+ const explicitProfileArg = normalizeOptionalString$18(input.context.profileArg);
5514
5577
  const hasExplicitProfileArg = explicitProfileArg !== null;
5515
5578
  const requiresConfirmation = input.requirement.mode === "confirm" && input.context.runtime.resolvedView === "human" && input.context.allowPrompt && !hasExplicitProfileArg;
5516
5579
  const currentState = getCurrentCommandCheckState();
@@ -5683,7 +5746,7 @@ function ensureCurrentProfileIsVisible(input) {
5683
5746
  function resolveProfileConfirmationMessage(entryName) {
5684
5747
  return entryName === "space.join" ? SPACE_JOIN_PROFILE_SELECTION_MESSAGE : SPACE_COMMAND_PROFILE_SELECTION_MESSAGE;
5685
5748
  }
5686
- function normalizeOptionalString$17(value) {
5749
+ function normalizeOptionalString$18(value) {
5687
5750
  const normalized = String(value ?? "").trim();
5688
5751
  return normalized.length > 0 ? normalized : null;
5689
5752
  }
@@ -6402,7 +6465,7 @@ async function runCommandWithEntryChecks(input) {
6402
6465
  allowPrompt: runtime.interactive,
6403
6466
  environmentTarget,
6404
6467
  gatewayUrl: normalizedGatewayUrl,
6405
- profileArg: normalizeOptionalString$16(input.profile),
6468
+ profileArg: normalizeOptionalString$17(input.profile),
6406
6469
  jsonOutput
6407
6470
  }),
6408
6471
  jsonOutput
@@ -6411,7 +6474,7 @@ async function runCommandWithEntryChecks(input) {
6411
6474
  finishCurrentCommandCheckScope();
6412
6475
  }
6413
6476
  }
6414
- function normalizeOptionalString$16(value) {
6477
+ function normalizeOptionalString$17(value) {
6415
6478
  const normalized = String(value ?? "").trim();
6416
6479
  return normalized.length > 0 ? normalized : null;
6417
6480
  }
@@ -7114,8 +7177,8 @@ function normalizeOrganizationSelectionPayload(payload) {
7114
7177
  message: "OpenMeld auth returned an invalid Organization selection."
7115
7178
  });
7116
7179
  return {
7117
- activeOrganizationId: normalizeOptionalString$15(payload.session.activeOrganizationId),
7118
- lastSelectedOrganizationId: normalizeOptionalString$15(payload.user.lastSelectedOrganizationId)
7180
+ activeOrganizationId: normalizeOptionalString$16(payload.session.activeOrganizationId),
7181
+ lastSelectedOrganizationId: normalizeOptionalString$16(payload.user.lastSelectedOrganizationId)
7119
7182
  };
7120
7183
  }
7121
7184
  function normalizeOrganizationListPayload(payload) {
@@ -7147,7 +7210,7 @@ function normalizeOrganizationFromPayload(payload) {
7147
7210
  if (!isRecord(payload)) return null;
7148
7211
  const organization = normalizeStoredActiveOrganization(payload.organization);
7149
7212
  if (!organization) return null;
7150
- const role = normalizeOptionalString$15(payload.role) ?? (isRecord(payload.member) ? normalizeOptionalString$15(payload.member.role) : null);
7213
+ const role = normalizeOptionalString$16(payload.role) ?? (isRecord(payload.member) ? normalizeOptionalString$16(payload.member.role) : null);
7151
7214
  return {
7152
7215
  ...organization,
7153
7216
  ...role ? { role } : {}
@@ -7217,13 +7280,13 @@ function parseJsonOrNull(raw) {
7217
7280
  }
7218
7281
  function readRequestId(payload) {
7219
7282
  if (!isRecord(payload)) return null;
7220
- return normalizeOptionalString$15(payload.requestId) ?? (isRecord(payload.error) ? normalizeOptionalString$15(payload.error.requestId) : null);
7283
+ return normalizeOptionalString$16(payload.requestId) ?? (isRecord(payload.error) ? normalizeOptionalString$16(payload.error.requestId) : null);
7221
7284
  }
7222
7285
  function readErrorMessage(payload) {
7223
7286
  if (!isRecord(payload)) return null;
7224
- return normalizeOptionalString$15(payload.message) ?? (isRecord(payload.error) ? normalizeOptionalString$15(payload.error.message) : null);
7287
+ return normalizeOptionalString$16(payload.message) ?? (isRecord(payload.error) ? normalizeOptionalString$16(payload.error.message) : null);
7225
7288
  }
7226
- function normalizeOptionalString$15(value) {
7289
+ function normalizeOptionalString$16(value) {
7227
7290
  const normalized = String(value ?? "").trim();
7228
7291
  return normalized.length > 0 ? normalized : null;
7229
7292
  }
@@ -7631,7 +7694,7 @@ async function createCenterAgentApiClient(input) {
7631
7694
  const CODEX_THREAD_ID_ENV = "CODEX_THREAD_ID";
7632
7695
  const CLAUDE_CODE_SESSION_ID_ENV = "CLAUDE_CODE_SESSION_ID";
7633
7696
  function detectLocalAgentEnvironment(env) {
7634
- const claudeSessionId = normalizeOptionalString$14(env[CLAUDE_CODE_SESSION_ID_ENV]);
7697
+ const claudeSessionId = normalizeOptionalString$15(env[CLAUDE_CODE_SESSION_ID_ENV]);
7635
7698
  if (claudeSessionId) return {
7636
7699
  kind: "agent",
7637
7700
  agentControllerConversationId: claudeSessionId,
@@ -7639,7 +7702,7 @@ function detectLocalAgentEnvironment(env) {
7639
7702
  conversationKind: "session",
7640
7703
  label: "Claude Code"
7641
7704
  };
7642
- const codexThreadId = normalizeOptionalString$14(env[CODEX_THREAD_ID_ENV]);
7705
+ const codexThreadId = normalizeOptionalString$15(env[CODEX_THREAD_ID_ENV]);
7643
7706
  if (codexThreadId) return {
7644
7707
  kind: "agent",
7645
7708
  agentControllerConversationId: codexThreadId,
@@ -7651,9 +7714,9 @@ function detectLocalAgentEnvironment(env) {
7651
7714
  return { kind: "human" };
7652
7715
  }
7653
7716
  function isCodexLikeEnvironment(env) {
7654
- return Boolean(normalizeOptionalString$14(env.CODEX_SHELL) || normalizeOptionalString$14(env.CODEX_CI) || normalizeOptionalString$14(env.CODEX_SESSION_ID) || normalizeOptionalString$14(env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE));
7717
+ return Boolean(normalizeOptionalString$15(env.CODEX_SHELL) || normalizeOptionalString$15(env.CODEX_CI) || normalizeOptionalString$15(env.CODEX_SESSION_ID) || normalizeOptionalString$15(env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE));
7655
7718
  }
7656
- function normalizeOptionalString$14(value) {
7719
+ function normalizeOptionalString$15(value) {
7657
7720
  if (typeof value !== "string") return null;
7658
7721
  const normalized = value.trim();
7659
7722
  return normalized.length > 0 ? normalized : null;
@@ -9057,7 +9120,7 @@ async function exchangeComputerAuthorizationGrant(input) {
9057
9120
  });
9058
9121
  throw new Error(`computer authorization could not verify its OpenMeld account: ${toErrorMessage$8(error)}${formatCleanupFailure(cleanup)}`, { cause: error });
9059
9122
  }
9060
- const userId = normalizeOptionalString$13(user?.id);
9123
+ const userId = normalizeOptionalString$14(user?.id);
9061
9124
  if (!userId) {
9062
9125
  const cleanup = await revokeAuthAccessToken({
9063
9126
  accessToken: tokenResult.data.access_token,
@@ -9067,7 +9130,7 @@ async function exchangeComputerAuthorizationGrant(input) {
9067
9130
  throw new Error(`computer authorization account response did not include a user id${formatCleanupFailure(cleanup)}`);
9068
9131
  }
9069
9132
  const expiresAt = resolveDeviceTokenExpiresAt(tokenResult.data.expires_in);
9070
- const scope = normalizeOptionalString$13(tokenResult.data.scope);
9133
+ const scope = normalizeOptionalString$14(tokenResult.data.scope);
9071
9134
  return {
9072
9135
  accessToken: tokenResult.data.access_token,
9073
9136
  tokenType: tokenResult.data.token_type,
@@ -9093,11 +9156,11 @@ function toErrorMessage$8(error) {
9093
9156
  return error instanceof Error && error.message.trim() ? error.message.trim() : String(error ?? "unknown error");
9094
9157
  }
9095
9158
  function normalizeRequiredString(value, message) {
9096
- const normalized = normalizeOptionalString$13(value);
9159
+ const normalized = normalizeOptionalString$14(value);
9097
9160
  if (!normalized) throw new Error(message);
9098
9161
  return normalized;
9099
9162
  }
9100
- function normalizeOptionalString$13(value) {
9163
+ function normalizeOptionalString$14(value) {
9101
9164
  const normalized = String(value ?? "").trim();
9102
9165
  return normalized.length > 0 ? normalized : null;
9103
9166
  }
@@ -9107,9 +9170,9 @@ const UNUSED_SETUP_SESSION_CLEANUP_SUFFIX = " OpenMeld also could not revoke the
9107
9170
  async function recoverInterruptedComputerAuthHandoff(input) {
9108
9171
  const recovery = await getInterruptedComputerAuthSessionRecovery();
9109
9172
  if (!recovery) return "none";
9110
- const previousOwnerUserId = normalizeOptionalString$12(recovery.previousSession?.user?.id);
9173
+ const previousOwnerUserId = normalizeOptionalString$13(recovery.previousSession?.user?.id);
9111
9174
  if (!recovery.serviceReconciled) {
9112
- const stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
9175
+ const stopped = await stopCurrentLaneDaemonServiceAfterToolsUpdate(input);
9113
9176
  if (stopped.status === "warning") {
9114
9177
  const error = new Error(stopped.errorMessage ?? "OpenMeld could not stop the incomplete Computer connection.");
9115
9178
  await recordInterruptedComputerAuthSessionRecoveryFailure({
@@ -9186,6 +9249,34 @@ async function recoverInterruptedComputerAuthHandoff(input) {
9186
9249
  }
9187
9250
  return await completeInterruptedComputerAuthSessionRecovery(recovery.id) ? "completed" : "deferred";
9188
9251
  }
9252
+ async function stopCurrentLaneDaemonServiceAfterToolsUpdate(input) {
9253
+ await waitForOpenMeldToolsUpdateBeforeComputerHandoff(input);
9254
+ let stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
9255
+ let retriedAfterUpdateDisappeared = false;
9256
+ while (stopped.status === "warning") {
9257
+ if (await resolveExternalOpenMeldToolsUpdate({ currentOperationId: readOpenMeldToolsUpdateContextFromEnv()?.operationId })) await waitForOpenMeldToolsUpdateBeforeComputerHandoff(input);
9258
+ else if (retriedAfterUpdateDisappeared) break;
9259
+ else retriedAfterUpdateDisappeared = true;
9260
+ stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
9261
+ }
9262
+ return stopped;
9263
+ }
9264
+ async function waitForOpenMeldToolsUpdateBeforeComputerHandoff(input) {
9265
+ await waitForExternalOpenMeldToolsUpdate({
9266
+ currentOperationId: readOpenMeldToolsUpdateContextFromEnv()?.operationId,
9267
+ onWaiting: (operation) => {
9268
+ input.presenter.line({
9269
+ code: "setup.openmeld_tools_update.waiting",
9270
+ text: "OpenMeld is finishing an update already in progress. Setup will continue automatically when the update finishes.",
9271
+ data: {
9272
+ operationId: operation.operationId,
9273
+ phase: operation.phase,
9274
+ targetVersion: operation.targetVersion
9275
+ }
9276
+ });
9277
+ }
9278
+ });
9279
+ }
9189
9280
  function logDeferredComputerAuthHandoffRecovery(input) {
9190
9281
  console.warn("[openmeld.auth.computer_handoff_recovery_deferred]", {
9191
9282
  ...input.endpoint ? { endpoint: input.endpoint } : {},
@@ -9211,7 +9302,7 @@ function formatComputerAuthCleanupFailureSuffix(result) {
9211
9302
  const status = result.error.status === null ? "network error" : `HTTP ${result.error.status}`;
9212
9303
  return `${UNUSED_SETUP_SESSION_CLEANUP_SUFFIX} Cleanup endpoint ${result.error.endpoint} returned ${status}: ${result.error.message}`;
9213
9304
  }
9214
- function normalizeOptionalString$12(value) {
9305
+ function normalizeOptionalString$13(value) {
9215
9306
  if (typeof value !== "string") return null;
9216
9307
  const normalized = value.trim();
9217
9308
  return normalized.length > 0 ? normalized : null;
@@ -10376,11 +10467,11 @@ function resolveDaemonRouteSkipMessage(input) {
10376
10467
  return `Reply route checks were skipped because the OpenMeld profile check failed: ${input.openMeldProfileMessage}`;
10377
10468
  }
10378
10469
  function resolveFeedbackInboxKey(input) {
10379
- const fromCli = normalizeOptionalString$11(input.cliValue);
10470
+ const fromCli = normalizeOptionalString$12(input.cliValue);
10380
10471
  if (fromCli) return fromCli;
10381
- return normalizeOptionalString$11((input.env ?? process.env).OPENMELD_FEEDBACK_INBOX_KEY) ?? "feedback_key_8oDRg9Aq-Q4crzVGV6hUqhKT2dQpKkBn4bKg9bjXLcE";
10472
+ return normalizeOptionalString$12((input.env ?? process.env).OPENMELD_FEEDBACK_INBOX_KEY) ?? "feedback_key_8oDRg9Aq-Q4crzVGV6hUqhKT2dQpKkBn4bKg9bjXLcE";
10382
10473
  }
10383
- function normalizeOptionalString$11(value) {
10474
+ function normalizeOptionalString$12(value) {
10384
10475
  const normalized = String(value ?? "").trim();
10385
10476
  return normalized.length > 0 ? normalized : null;
10386
10477
  }
@@ -10721,7 +10812,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
10721
10812
  value: input.agentControllerPermissionModeInput
10722
10813
  });
10723
10814
  if (!agentControllerPermissionMode) return { hasAnyAgentControllerPermissionModeInput: false };
10724
- const agentControllerRef = normalizeOptionalString$10(input.agentControllerRef);
10815
+ const agentControllerRef = normalizeOptionalString$11(input.agentControllerRef);
10725
10816
  assertAgentControllerPermissionModeSupported({
10726
10817
  agentControllerPermissionMode,
10727
10818
  agentControllerRef,
@@ -10742,7 +10833,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
10742
10833
  };
10743
10834
  }
10744
10835
  function normalizeAgentControllerPermissionModeCliInput(input) {
10745
- const raw = normalizeOptionalString$10(input.value);
10836
+ const raw = normalizeOptionalString$11(input.value);
10746
10837
  if (!raw) return null;
10747
10838
  const options = listAgentControllerPermissionModeOptions(input.agentControllerRef ? { agentControllerRef: input.agentControllerRef } : void 0);
10748
10839
  for (const option of options) if (raw === option.value) return option.value;
@@ -10845,6 +10936,23 @@ const AGENT_CONTROLLER_PERMISSION_MODE_BY_CLI_VALUE = {
10845
10936
  "run-everything": "cursor:force",
10846
10937
  runeverything: "cursor:force"
10847
10938
  };
10939
+ function normalizeOptionalString$11(value) {
10940
+ const normalized = String(value ?? "").trim();
10941
+ return normalized.length > 0 ? normalized : null;
10942
+ }
10943
+ //#endregion
10944
+ //#region src/profile/model-selection-input.ts
10945
+ function normalizeModelSelectionInput(input) {
10946
+ const modelId = normalizeOptionalString$10(input.model);
10947
+ const reasoningLevel = normalizeOptionalString$10(input.reasoningEffort);
10948
+ if (!(modelId || reasoningLevel)) return { hasAnyModelSelectionInput: false };
10949
+ if (!modelId) throw new Error("--reasoning-effort requires --model.");
10950
+ return {
10951
+ hasAnyModelSelectionInput: true,
10952
+ modelId,
10953
+ ...reasoningLevel ? { reasoningLevel } : {}
10954
+ };
10955
+ }
10848
10956
  function normalizeOptionalString$10(value) {
10849
10957
  const normalized = String(value ?? "").trim();
10850
10958
  return normalized.length > 0 ? normalized : null;
@@ -12871,17 +12979,6 @@ function normalizeWorkspaceModeInput(value) {
12871
12979
  if (normalized === "openmeld_managed" || normalized === "custom") return normalized;
12872
12980
  throw new Error("--workspace-mode must be openmeld-managed|custom");
12873
12981
  }
12874
- function normalizeModelSelectionInput(input) {
12875
- const modelId = normalizeOptionalString$9(input.model);
12876
- const reasoningLevel = normalizeOptionalString$9(input.reasoningEffort);
12877
- if (!(modelId || reasoningLevel)) return { hasAnyModelSelectionInput: false };
12878
- if (!modelId) throw new Error("--reasoning-effort requires --model.");
12879
- return {
12880
- hasAnyModelSelectionInput: true,
12881
- modelId,
12882
- ...reasoningLevel ? { reasoningLevel } : {}
12883
- };
12884
- }
12885
12982
  async function ensureProfileCommandAuthenticationOrCancel(input) {
12886
12983
  if (input.runtime.resolvedView !== "human") return true;
12887
12984
  const evaluated = await evaluateCommandAuthentication();
@@ -13383,7 +13480,7 @@ async function fetchSpaceDispatchTrace(input) {
13383
13480
  requestContext: input.requestContext,
13384
13481
  spacePassword: input.password
13385
13482
  }),
13386
- [SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER]: String(2)
13483
+ [SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER]: String(3)
13387
13484
  } }
13388
13485
  });
13389
13486
  const raw = await response.text();
@@ -18090,6 +18187,7 @@ function runOneTimeTokenComputerHandoff(input) {
18090
18187
  });
18091
18188
  }
18092
18189
  async function runPreparedComputerAuthHandoff(input) {
18190
+ await waitForOpenMeldToolsUpdateBeforeComputerHandoff({ presenter: input.presenter });
18093
18191
  if (await recoverInterruptedComputerAuthHandoff({
18094
18192
  presenter: input.presenter,
18095
18193
  runtime: input.runtime,
@@ -27175,6 +27273,10 @@ function normalizeOptionalString$1(value) {
27175
27273
  //#region src/space/add-me-command.ts
27176
27274
  const SHELL_SAFE_ARG_REGEX = /^[A-Za-z0-9_./:=@%+-]+$/u;
27177
27275
  async function runSpaceAddMe(input) {
27276
+ const modelSelection = normalizeModelSelectionInput({
27277
+ model: input.model,
27278
+ reasoningEffort: input.reasoningEffort
27279
+ });
27178
27280
  const target = parseSpaceAddMeTarget(input.space, { baseUrl: input.baseUrl });
27179
27281
  const profile = resolveSpaceAddMeActingProfileId({
27180
27282
  cliProfileId: input.profile,
@@ -27206,6 +27308,7 @@ async function runSpaceAddMe(input) {
27206
27308
  if (detectedSubject.kind === "codex_missing_thread") throw new Error("This looks like Codex, but OpenMeld cannot find CODEX_THREAD_ID. `openmeld space add-me` will not pretend to bind an unknown Codex thread. Open this task in a Codex Desktop session that exposes CODEX_THREAD_ID, or run the command from a non-Codex shell to use the Human Profile path.");
27207
27309
  const addMembers = input.addMembers ?? runDefaultSpaceAddMeMembership;
27208
27310
  if (detectedSubject.kind === "human") {
27311
+ if (modelSelection.hasAnyModelSelectionInput) throw new Error("--model is only used when OpenMeld detects a local agent controller. Human Profile membership does not use a model selection.");
27209
27312
  if (collectProjectFolderCandidates(input.projectFolders).length > 0) throw new Error("--project-folder is only used when OpenMeld detects a local agent controller. Human Profile membership does not use a Project folder.");
27210
27313
  if (actorProfile.profileKind !== "human") throw new Error(`No current local agent controller was detected, so add-me is using the Human Profile path. Profile ${actorProfile.openMeldProfileId} is an Agent Profile; pass a Human Profile with --profile or run from a supported agent controller.`);
27211
27314
  const status = await addMembers({
@@ -27263,6 +27366,7 @@ async function runSpaceAddMe(input) {
27263
27366
  baseUrl: resolvedBaseUrl,
27264
27367
  controllerPermissionMode: controllerPermissionMode.agentControllerPermissionMode ?? null,
27265
27368
  detectedSubject,
27369
+ modelSelection,
27266
27370
  projectFolder,
27267
27371
  spaceId: target.spaceId
27268
27372
  })
@@ -27357,13 +27461,14 @@ async function ensureCurrentAgentProfile(input) {
27357
27461
  profile: match.profile,
27358
27462
  projectFolder: input.projectFolder.path
27359
27463
  });
27360
- if (input.controllerPermissionMode) await updateAgentProfilePrimaryBindingAgentControllerPermissionMode({
27361
- agentControllerPermissionMode: input.controllerPermissionMode,
27464
+ const bindingUpdate = await updateExistingAgentProfileBinding({
27465
+ controllerPermissionMode: input.controllerPermissionMode,
27466
+ modelSelection: input.modelSelection,
27362
27467
  profile: match.profile
27363
27468
  });
27364
27469
  return {
27365
- bindingOutcome: input.controllerPermissionMode ? "updated" : "reused",
27366
- bindingStatus: match.report.bindingState,
27470
+ bindingOutcome: bindingUpdate.updated ? "updated" : "reused",
27471
+ bindingStatus: bindingUpdate.status ?? match.report.bindingState,
27367
27472
  profile: match.profile,
27368
27473
  profileAction: "reused",
27369
27474
  projectFolderAction
@@ -27389,6 +27494,10 @@ async function ensureCurrentAgentProfile(input) {
27389
27494
  const binding = await ensureAgentProfileRuntimeBinding({
27390
27495
  agentControllerConversationId: input.detectedSubject.agentControllerConversationId,
27391
27496
  ...input.controllerPermissionMode ? { agentControllerPermissionMode: input.controllerPermissionMode } : {},
27497
+ ...input.modelSelection.modelId ? {
27498
+ modelId: input.modelSelection.modelId,
27499
+ ...input.modelSelection.reasoningLevel ? { reasoningLevel: input.modelSelection.reasoningLevel } : {}
27500
+ } : {},
27392
27501
  confirmLocalExecutionEvidence: false,
27393
27502
  profile,
27394
27503
  runtimeReportSubmission
@@ -27402,6 +27511,26 @@ async function ensureCurrentAgentProfile(input) {
27402
27511
  projectFolderAction: "created"
27403
27512
  };
27404
27513
  }
27514
+ async function updateExistingAgentProfileBinding(input) {
27515
+ if (input.controllerPermissionMode) await updateAgentProfilePrimaryBindingAgentControllerPermissionMode({
27516
+ agentControllerPermissionMode: input.controllerPermissionMode,
27517
+ profile: input.profile
27518
+ });
27519
+ if (!input.modelSelection.modelId) return {
27520
+ status: null,
27521
+ updated: Boolean(input.controllerPermissionMode)
27522
+ };
27523
+ const binding = await updateAgentProfilePrimaryBindingModelSelection({
27524
+ modelId: input.modelSelection.modelId,
27525
+ profile: input.profile,
27526
+ reasoningLevel: input.modelSelection.reasoningLevel
27527
+ });
27528
+ if (binding.status !== "accepted") throw new Error(`Agent Profile Binding model update failed: ${binding.reasonCodes.join(", ")}`);
27529
+ return {
27530
+ status: binding.status,
27531
+ updated: true
27532
+ };
27533
+ }
27405
27534
  async function findAgentProfileByControllerConversation(input) {
27406
27535
  const profiles = (await listOpenMeldProfiles()).filter((profile) => profile.profileKind === "agent" && profile.status === "active");
27407
27536
  const bindingReads = createPrimaryBindingReadSession({ baseUrl: input.baseUrl });
@@ -27566,7 +27695,7 @@ function normalizeOptionalString(value) {
27566
27695
  return normalized.length > 0 ? normalized : null;
27567
27696
  }
27568
27697
  async function runDefaultSpaceAddMeMembership(input) {
27569
- const { runSpaceAddMeMembership } = await import("./add-me-membership-CZUHkjnP.js");
27698
+ const { runSpaceAddMeMembership } = await import("./add-me-membership-Dy6hr0KO.js");
27570
27699
  return await runSpaceAddMeMembership(input);
27571
27700
  }
27572
27701
  //#endregion
@@ -32433,10 +32562,10 @@ serviceCmd.command("trace").description("Read a Space delivery trace for debuggi
32433
32562
  profile: opts.profile,
32434
32563
  gatewayUrl: opts.gatewayUrl,
32435
32564
  run: async () => {
32436
- const dispatchId = normalizeOptionalString$16(opts.dispatch);
32437
- const sourceSignalId = normalizeOptionalString$16(opts.sourceSignal);
32438
- const clientMessageId = normalizeOptionalString$16(opts.clientMessage);
32439
- const targetProfileId = normalizeOptionalString$16(opts.targetProfile);
32565
+ const dispatchId = normalizeOptionalString$17(opts.dispatch);
32566
+ const sourceSignalId = normalizeOptionalString$17(opts.sourceSignal);
32567
+ const clientMessageId = normalizeOptionalString$17(opts.clientMessage);
32568
+ const targetProfileId = normalizeOptionalString$17(opts.targetProfile);
32440
32569
  if (Number(dispatchId !== null) + Number(sourceSignalId !== null) + Number(clientMessageId !== null) !== 1) throw new Error("exactly one of --dispatch, --source-signal, or --client-message is required");
32441
32570
  await runServiceTrace({
32442
32571
  profile: opts.profile,
@@ -32628,7 +32757,7 @@ spaceActionCmd.command("help").description("Show OpenMeld Space Action help.").a
32628
32757
  withSpaceProfileOption(spaceCmd.command("create").description("Create a new space and print its space ID.").option("--name <name>", "Space name (<=80 chars; prompted in human interactive mode)").option("--visibility <public|private>", "Organization visibility for this space").option("--guide <text>", "Optional space guide").option("--password <value>", "Optional space password (minimum 6 characters; numbers/letters/symbols accepted)").option("--join", "Join immediately after create").option("--no-join", "Do not ask to join after create").option("--output <mode>", "Output mode when auto-joining: ndjson|text", "text")).action(async (opts, command) => {
32629
32758
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
32630
32759
  const view = getGlobalViewOption();
32631
- if (view === "agent" && (normalizeOptionalString$16(opts.name) === null || normalizeOptionalString$16(opts.visibility) === null)) {
32760
+ if (view === "agent" && (normalizeOptionalString$17(opts.name) === null || normalizeOptionalString$17(opts.visibility) === null)) {
32632
32761
  await runSpaceCreate({
32633
32762
  profile: cliOptions.profile,
32634
32763
  baseUrl: cliOptions.gatewayUrl,
@@ -32688,7 +32817,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
32688
32817
  const localEcho = opts.noLocalEcho !== true;
32689
32818
  const view = getGlobalViewOption();
32690
32819
  if (opts.selfServe === true) {
32691
- const spaceValue = normalizeOptionalString$16(space);
32820
+ const spaceValue = normalizeOptionalString$17(space);
32692
32821
  if (!spaceValue) throw Object.assign(/* @__PURE__ */ new Error("space join --self-serve requires an explicit public Organization Space ID"), { code: "space.join.self_serve.space_required" });
32693
32822
  await runCommandWithEntryChecks({
32694
32823
  routeTokens: [
@@ -32712,7 +32841,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
32712
32841
  });
32713
32842
  return;
32714
32843
  }
32715
- if (view === "agent" && normalizeOptionalString$16(space) === null) {
32844
+ if (view === "agent" && normalizeOptionalString$17(space) === null) {
32716
32845
  await runSpaceJoin({
32717
32846
  profile: cliOptions.profile,
32718
32847
  baseUrl: cliOptions.gatewayUrl,
@@ -32764,8 +32893,8 @@ withSpaceProfileOption(spaceCmd.command("wake-progress").description("Read live
32764
32893
  profile: cliOptions.profile,
32765
32894
  baseUrl: cliOptions.gatewayUrl,
32766
32895
  space: String(space),
32767
- clientMessageId: normalizeOptionalString$16(opts.clientMessage) ?? void 0,
32768
- targetProfileId: normalizeOptionalString$16(opts.targetProfile) ?? void 0,
32896
+ clientMessageId: normalizeOptionalString$17(opts.clientMessage) ?? void 0,
32897
+ targetProfileId: normalizeOptionalString$17(opts.targetProfile) ?? void 0,
32769
32898
  password: cliOptions.password,
32770
32899
  view,
32771
32900
  entryChecksHandled: true
@@ -32786,10 +32915,10 @@ withSpaceProfileOption(spaceCmd.command("wake-stop").description("Request Stop f
32786
32915
  profile: cliOptions.profile,
32787
32916
  baseUrl: cliOptions.gatewayUrl,
32788
32917
  space: String(space),
32789
- clientMessageId: normalizeOptionalString$16(opts.clientMessage) ?? void 0,
32790
- sourceSignalId: normalizeOptionalString$16(opts.sourceSignal) ?? void 0,
32918
+ clientMessageId: normalizeOptionalString$17(opts.clientMessage) ?? void 0,
32919
+ sourceSignalId: normalizeOptionalString$17(opts.sourceSignal) ?? void 0,
32791
32920
  targetProfileId: String(opts.targetProfile),
32792
- reason: normalizeOptionalString$16(opts.reason) ?? void 0,
32921
+ reason: normalizeOptionalString$17(opts.reason) ?? void 0,
32793
32922
  password: cliOptions.password,
32794
32923
  view,
32795
32924
  entryChecksHandled: true
@@ -32797,7 +32926,7 @@ withSpaceProfileOption(spaceCmd.command("wake-stop").description("Request Stop f
32797
32926
  }
32798
32927
  });
32799
32928
  });
32800
- withSpaceProfileOption(spaceCmd.command("add-me").description("Add me to this Space.").argument("<space>", "Space URL or Space ID").option("--password <value>", "Space password for protected access").option("--project-folder <path>", "Project folder for this agent profile", collectRepeatedOptionValue).option("--workspace-path <path>", "Alias for --project-folder", collectRepeatedOptionValue).option("--working-directory <path>", "Alias for --project-folder", collectRepeatedOptionValue).option("--cwd <path>", "Alias for --project-folder", collectRepeatedOptionValue).option("--agent-controller-permission-mode <policy>", formatAgentControllerPermissionModeHelp()).option("--confirm-dangerous-agent-controller-permission-mode", "Confirm a dangerous Agent Controller Permission Mode without prompting", false).option("--details", "Print detailed add-me diagnostics").option("--json", "Print machine-readable add-me diagnostics", false)).action(async (space, opts, command) => {
32929
+ withSpaceProfileOption(spaceCmd.command("add-me").description("Add me to this Space.").argument("<space>", "Space URL or Space ID").option("--password <value>", "Space password for protected access").option("--project-folder <path>", "Project folder for this agent profile", collectRepeatedOptionValue).option("--workspace-path <path>", "Alias for --project-folder", collectRepeatedOptionValue).option("--working-directory <path>", "Alias for --project-folder", collectRepeatedOptionValue).option("--cwd <path>", "Alias for --project-folder", collectRepeatedOptionValue).option("--agent-controller-permission-mode <policy>", formatAgentControllerPermissionModeHelp()).option("--model <model>", "Model for this Agent Profile Binding").option("--reasoning-effort <level>", "Reasoning effort for the selected model").option("--confirm-dangerous-agent-controller-permission-mode", "Confirm a dangerous Agent Controller Permission Mode without prompting", false).option("--details", "Print detailed add-me diagnostics").option("--json", "Print machine-readable add-me diagnostics", false)).action(async (space, opts, command) => {
32801
32930
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
32802
32931
  const view = getGlobalViewOption();
32803
32932
  await runCommandWithEntryChecks({
@@ -32821,6 +32950,8 @@ withSpaceProfileOption(spaceCmd.command("add-me").description("Add me to this Sp
32821
32950
  confirmDangerousAgentControllerPermissionMode: opts.confirmDangerousAgentControllerPermissionMode === true,
32822
32951
  details: opts.details === true,
32823
32952
  json: opts.json === true,
32953
+ model: opts.model,
32954
+ reasoningEffort: opts.reasoningEffort,
32824
32955
  view,
32825
32956
  entryChecksHandled: true
32826
32957
  });
@@ -33316,8 +33447,8 @@ withSpaceProfileOption(spaceCmd.command("updates").description("Read formal upda
33316
33447
  withSpaceProfileOption(spaceCmd.command("result").description("Read one formal dispatch result scoped to this space.").argument("[space]", "Space ID (64-character hex)").option("--dispatch <dispatch-id>", "Lookup by dispatch ID").option("--result-ref <result-ref>", "Lookup by dispatch result ref").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
33317
33448
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
33318
33449
  const spaceValue = String(space ?? "").trim();
33319
- const dispatchId = normalizeOptionalString$16(opts.dispatch);
33320
- const resultRef = normalizeOptionalString$16(opts.resultRef);
33450
+ const dispatchId = normalizeOptionalString$17(opts.dispatch);
33451
+ const resultRef = normalizeOptionalString$17(opts.resultRef);
33321
33452
  const selectorCount = Number(dispatchId !== null) + Number(resultRef !== null);
33322
33453
  const outputView = await resolveEffectiveViewForOutput();
33323
33454
  if ((spaceValue.length === 0 || selectorCount !== 1) && outputView === "agent") throw createSpaceResultGuideError();