openmeld 0.3.136 → 0.3.138

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.
Files changed (31) hide show
  1. package/dist/{add-me-membership-BNNtDZYW.js → add-me-membership-BZ9GEg6y.js} +2 -2
  2. package/dist/{add-me-membership-BNNtDZYW.js.map → add-me-membership-BZ9GEg6y.js.map} +1 -1
  3. package/dist/{api-client-foundation-CabWpjFe.js → api-client-foundation-tvnD_7HW.js} +4 -7
  4. package/dist/api-client-foundation-tvnD_7HW.js.map +1 -0
  5. package/dist/{auth-session-Bj8n8YwV.js → auth-session-hdKG6Oqe.js} +3 -6
  6. package/dist/auth-session-hdKG6Oqe.js.map +1 -0
  7. package/dist/{base-url-BtqW4aLS.js → base-url-CY_j4bLH.js} +13 -6
  8. package/dist/base-url-CY_j4bLH.js.map +1 -0
  9. package/dist/{command-BGqFPMwd.js → command-BV6ylBgU.js} +920 -703
  10. package/dist/{command-BGqFPMwd.js.map → command-BV6ylBgU.js.map} +1 -1
  11. package/dist/{daemon-runtime-lease-D82uDZ5s.js → daemon-runtime-lease-6DIprlJy.js} +2 -2
  12. package/dist/{daemon-runtime-lease-D82uDZ5s.js.map → daemon-runtime-lease-6DIprlJy.js.map} +1 -1
  13. package/dist/{dist-0qM_CVk2.js → dist-DEiXhSkt.js} +217 -39
  14. package/dist/dist-DEiXhSkt.js.map +1 -0
  15. package/dist/openmeld-dev.js +1 -1
  16. package/dist/openmeld.js +462 -237
  17. package/dist/openmeld.js.map +1 -1
  18. package/dist/{runtime-transport-BiQfJGnw.js → runtime-transport-CFM93Yqy.js} +58 -22
  19. package/dist/runtime-transport-CFM93Yqy.js.map +1 -0
  20. package/package.json +2 -2
  21. package/skills/README.md +5 -2
  22. package/skills/openmeld-cli/SKILL.md +109 -1151
  23. package/skills/openmeld-cli/playbooks/space-ops.md +38 -16
  24. package/skills/openmeld-cli/playbooks/space-reads.md +123 -0
  25. package/skills/openmeld-cli/references/commands.md +19 -9
  26. package/skills/openmeld-cli/references/runtime-resolution.md +21 -2
  27. package/dist/api-client-foundation-CabWpjFe.js.map +0 -1
  28. package/dist/auth-session-Bj8n8YwV.js.map +0 -1
  29. package/dist/base-url-BtqW4aLS.js.map +0 -1
  30. package/dist/dist-0qM_CVk2.js.map +0 -1
  31. package/dist/runtime-transport-BiQfJGnw.js.map +0 -1
package/dist/openmeld.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { $ as runWithHeldLock, $t as formatLocalMachineIssueMessage, A as toSpaceContractUrl, At as normalizeAccountKey, Bt as profileDir, D as normalizeBaseUrl, E as updateConfiguredStartV1OnboardingState, F as toSpaceDispatchTraceUrl, Ft as openMeldManagedVersionBinaryPath, G as buildOpenMeldOrphanedLockAction, Gt as resolveOpenMeldEnvPreset, K as isOpenMeldLockError, Lt as openMeldRootDir, Mt as openMeldBackupsDir, P as toSpaceDispatchLookupUrl, Pt as openMeldManagedBinaryPath, Q as resolveOpenMeldOrphanedLockIssue, Qt as systemDir, S as setConfiguredSkillsConfig, St as accountProfileViewPath, V as toSpaceResultUrl, Vt as profileViewPath, W as acquireLock, Wt as resolveOpenMeldCliEntryNameFromArgv, X as releaseLockSync, Xt as skillsDir, Z as repairOrphanedLegacyLocks, Zt as spacesDir, a as resolveBaseUrl, at as resolveCliContext, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, ct as formatLaneScopeSentence, ft as createActiveSetupConcurrencyIssue, g as getConfiguredSkillsConfig, gt as toRecognizedLocalMachineFailureError, ht as isLocalMachineFailureError, k as toSpaceBoardUrl, lt as resolveOpenMeldLaneDescriptor, m as getConfiguredOnboardingDisclaimerAcceptedAt, mt as createOrphanedSetupConcurrencyIssue, nt as OPENMELD_CLI_CONTEXT_ENV_KEY, o as resolveBaseUrlOrNull, on as agentControllerConversationRefSchema, q as isOpenMeldOrphanedLockError, qt as resolveOpenMeldRootDir, tt as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, u as alignRuntimeConfigStorage, ut as LocalMachineFailureError, w as updateConfiguredOnboardingConfig, wt as accountsDir, xt as accountProfileSpaceCacheDir, zt as organizationSkillReleaseDir } from "./base-url-BtqW4aLS.js";
4
- import { $ as runAgentsManage, $a as LocalProjectConnectionError, $i as resetCurrentCommandCheckState, $n as isCliUpdateCheckApplicable, $o as cliJsonOutputEnvelopeSchema, $r as resolveServiceReadinessFromServiceStatus, $t as ensureLocalSkills, A as parseEnvelope, Aa as resolveViewProfileKey, Ai as getAgentControllerPermissionModeFieldLabel, An as submitProfileRuntimeAgentControllerReport, Ao as enqueueAgentActivityHookEvent, Ar as registerSpaceMemberSelectionOptions, At as createDelayedSpinner, B as resolveHumanControllerDisplayName, Ba as updateOpenMeldProfile, Bi as buildOnboardingPlan, Bn as buildDispatchResultMessageReadProjection, Bo as setDefaultProjectConnection, Br as buildDualViewGuideMessage, Bt as toStructuredGatewayFailure, C as toSpaceMetaUpsertInput, Ca as buildHumanErrorCopy, Ci as reconcileNewRunnableBuiltinAgentsForSetup, Cn as resolveCreateProfileName, Co as upsertDaemonServiceContract, Cr as createSpaceTargetGuideError, Ct as runDaemonStop, D as formatHumanReadTargetList, Da as formatMessage, Di as buildAgentControllerRef, Dn as resolveServiceParticipationReadiness, Do as resolveObservedAgentActivityBinding, Dr as createUpgradeConfirmationGuideError, Dt as buildProfileWorkspaceRows, E as buildHumanReplyContextSummary, Ea as createPresenter, Ei as resolveLocalRegistryAgentIdFromAgentControllerRef, En as formatServiceParticipationReadinessLabel, Eo as buildAgentActivityEvent, Er as createStartAuthenticationGuideError, Et as buildProfileWorkspacePresentation, F as resolveOpenMeldProfileForSpaceCommand, Fa as createOpenMeldHumanProfile, Fi as resolveAgentProfileEditCapabilities, Fn as resolveLocalAgentControllerLaunchability, Fo as listProjectBindings, Fr as registerAuthLoginRequestOptions, Ft as createCliSpaceApi, G as runAgentsCustomAdd, Ga as buildAgentAuthenticationGuide, Gi as classifyDaemonServiceWakeability, Gn as buildUpdatesReplyWorkflowProjection, Go as renderInfoCard, Gr as buildAgentFacingPublicationModeGuideLines, Gt as runDaemonServiceParticipationGate, H as resolveAgentProfileSetup, Ha as clearSelectedOpenMeldProfileId, Hi as buildDaemonServiceTargetSpec, Hn as buildSignalIndex, Ho as canonicalizeLocalProjectPath, Hr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ht as resolveLocalComponentsStatus, I as emitSpaceAgentOverview, Ia as deleteOpenMeldProfile, Ii as resolveEvidenceSyncHealth, In as resolveLocalAgentControllerReportDecision, Io as listProjectConnectionsWithStatus, Ir as registerBuiltinAgentSelectionOptions, It as fetchSpaceMeta, J as runAgentsCustomUpdate, Ja as resolveAuthenticationGuidance, Ji as resolveOpenMeldEnvironmentTarget, Jn as promptSearchMultiselect, Jo as emitCliJsonEnvelope, Jr as runPendingDaemonServiceUpdate, Jt as runSkillsCheck$1, K as runAgentsCustomList, Ka as buildHumanAuthenticationCard, Ki as resolveServiceUpdateUrgency, Kn as createSpaceMemberIdentityIndex, Ko as renderTextInfoCard, Kr as canonicalizeAllowedActions, Kt as runDaemonStartDecisionPrompt, L as emitSpaceCliAgentOverview, La as listOpenMeldProfiles, Li as resolveNativeAgentControllerPermissionModeForController, Ln as inspectSpaceCacheFile, Lo as migrateProjectBindingStore, Lr as buildAgentOverviewFromContract, Lt as updateSpaceMeta, M as assertFullSignalIdArgument, Ma as requireOpenMeldProfile, Mi as parseAgentControllerRef, Mn as submitRuntimeAgentControllerReports, Mo as readAgentActivityOutboxHealth, Mr as registerSkillsTargetSelectionOptions, Mt as runDaemonStartupPreflight, N as assertValidSpaceIdTarget, Na as resolveOpenMeldProfileOrNull, Ni as resolveAgentControllerPermissionModeForController, Nn as collectLocalAgentControllerInventory, No as removeProjectOutbox, Nr as getCliVersionInfo, Nt as readDaemonStartFailureLogTailLines, O as resolveLinkAccessLabel, Oa as parseCliViewMode, Oi as createAgentExecutionStatusDisplayRows, On as assessActionParticipationCandidate, Oo as normalizeSharedSessionTitle, Or as getCommandEntryContract, Ot as reconcileCliVersionView, P as prepareAuthenticatedSpaceCommandContext, Pa as createOpenMeldAgentProfile, Pi as resolveAgentExecutionStatus, Pn as resolveLocalAgentControllerBlockerReasonCodes, Po as bindProject, Pr as registerDaemonControlTargetOptions, Pt as fetchSpaceUpdates, Q as runAgentsList, Qa as setProfileDefaultView, Qi as isCurrentCommandCheckScopeActive, Qn as assessCliUpdate, Qo as cliBinaryDeltaPatchSchema, Qr as formatDaemonFailureContextText, Qt as runSkillsUpdate, R as prepareLocalAgentReadiness, Ra as primeOpenMeldProfilesSessionCache, Rn as upsertSpaceConfig, Ro as removeProjectConnection, Rr as DualViewGuideError, Rt as readGatewayJsonResponse, S as loadSpaceSignalIndexOrNull, Sa as OPENMELD_VERSION, Si as listAgentTargetStates, Sn as resolveCreateProfileKind, So as readDaemonServiceContract, Sr as createSpaceSubcommandTargetGuideError, St as runDaemonStatusFlow, T as buildFormalSignalReadPayload, Ta as renderHumanTextErrorCard, Ti as notifyDaemonRouteCatalogChanged, Tn as ensureAgentProfileRuntimeBinding, To as removeAgentActivityContextCache, Tr as createStartAgentIdentityGuideError, Tt as runDaemonUninstall, U as runAgents, Ua as getSelectedOpenMeldProfileId, Ui as resolveDaemonServiceAlignmentDecision, Un as buildSignalMessageReadProjection, Uo as enqueueControllerTaskLifecycleEventWhileLocked, Ur as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Ut as writeInstalledLocalComponentsSnapshot, V as persistAgentTransportSelection, Va as alignSelectedOpenMeldProfileStorage, Vi as getSetupFlowCopy, Vn as buildDispatchResultReplyWorkflowProjection, Vo as unbindProject, Vr as formatAgentOverviewPayload, Vt as parseJsonResponse, W as runAgentsConfig, Wa as setSelectedOpenMeldProfileId, Wi as classifyDaemonServiceRunStartability, Wn as buildSpaceRoundReadProjection, Wo as readControllerTaskLifecycleOutboxHealth, Wr as areAllowedActionsEquivalent, Wt as resolveDaemonServiceParticipationStatus, X as runAgentsDisable, Xa as resolveAuthenticationGuidanceFromMessage, Xi as finishCurrentCommandCheckScope, Xn as isReturnKeypress, Xo as outJsonLine, Xr as ensureDaemonRuntimePaths, Xt as runSkillsInstall, Y as runAgentsDetect, Ya as resolveAuthenticationGuidanceFromError, Yi as resolveAuthBaseUrl, Yn as promptSearchSelect, Yo as errLine, Yr as scheduleDaemonServiceUpdate, Yt as runSkillsEnsure, Z as runAgentsEnable, Za as getProfileDefaultView, Zi as getCurrentCommandCheckState, Zn as runInteractivePrompt, Zo as outLine, Zr as resolveDaemonDeviceId, Zt as runSkillsUninstall, _ as runSpaceWriteWithPasswordRetry, _a as readVersionState, _i as validateCustomProfileWorkspacePath, _n as requestDeviceToken, _o as formatOpenMeldCliTextBlock, _r as createSpaceLeaveGuideError, _t as runDaemonInstall, a as runSpaceDelete, aa as getDaemonSystemServiceLogPath, ai as mapAgentReplyReadinessToLegacyAutoReply, an as ensureCommandAuthenticationOrCancel, ao as resolveAgentActivityRouteForPath, ar as resolveElapsedTimeMs, as as revokeOrganizationJoinLinkResponseSchema, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as toStartBackgroundHelperExecutionCompatibility, bi as createPrimaryBindingReadSession, bn as revokeAuthAccessToken, bo as resolveUserFacingCliEntryCommand, br as createSpaceRemoveMembersGuideError, bt as runDaemonRunAfterEntryChecks, c as runSpaceLeave, ca as resolveDaemonServiceManager, ci as syncProfileWorkspaceState, cn as runAuthLogout, co as defaultManagedIntegrationPaths, cr as canUseInteractivePrompts, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as performManagedInstall, di as ensureOpenMeldManagedProfileWorkspace, dn as exchangeOneTimeTokenAuthSession, do as resolveAgentActivityDispatcherCommand, dr as createProfileCreateGuideError, dt as resolveSpaceSendText, ea as startCurrentCommandCheckScope, ei as resolveDaemonServiceFreshnessWarning, en as readBundledOpenMeldCliSkillDocumentByPath, eo as validateLocalProjectConnectionPath, er as assertDispatchOwnedRuntimePublicWriteAllowed, es as cliJsonSkillsListEnvelopeSchema, et as runAgentsRepair, f as runSpaceSend, fa as buildNextVersionState, fi as normalizeCustomProfileWorkspacePath, fn as buildAuthStatusRows, fo as uninstallAgentActivityIntegrations, fr as createProfileMenuGuideError, ft as bestEffortStopCurrentLaneDaemonService, g as runSpaceReadWithPasswordRetry, ga as fetchLatestPackageInfo, gi as setOpenMeldManagedProfileWorkspace, gn as fetchAuthUserSnapshot, go as formatOpenMeldCliLine, gr as createSpaceContractSetGuideError, gt as runDaemonCancel, h as uploadPreparedSpaceFiles, ha as fetchLatestCliBinaryRelease, hi as setCustomProfileWorkspace, hn as extractAuthApiErrorMessage, ho as formatOpenMeldCliCommands, hr as createSpaceAliasTargetGuideError, ht as runDaemonBackgroundStartForDecision, i as runSpaceCreate, ia as readCurrentObservedDaemonRuntimeStatus, ii as formatHumanReplyReadinessReason$1, in as buildCommandAuthenticationPromptMessage, io as registerAgentActivityRoute, ir as formatElapsedTime, is as organizationJoinLinkErrorResponseSchema, it as colorizeDisplayProfileLabel, j as isSpaceCommandOutputHandledError, ja as isSelectedOpenMeldProfileRequiredError, ji as listAgentControllerPermissionModeOptions, jn as submitRuntimeAgentControllerReport, jo as removeProjectInbox, jr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, jt as shouldEmitAgentOverview, k as resolveOrganizationVisibilityLabel, ka as resolveRuntimeContext, ki as getAgentControllerPermissionModeDisplayMetadata, kn as computeRetryDelayMs, ko as readCodexSessionTitles, kr as getCommandHintsFromContract, kt as emitDaemonAgentOverview, l as runSpaceList, la as readRecentDaemonLifecycleEvents, li as createModelCatalogReadSession, ln as runAuthMenu, lo as installAgentActivityIntegrations, lr as createDoctorFailedGuideError, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as ensureVersionStateReady, mi as resolveConfiguredProfileWorkspacePath, mn as formatActiveOrganizationLabel, mo as formatOpenMeldCliCommand, mr as createSpaceAddMembersGuideError, mt as runDaemonAutostart, n as promptAndConfirmSpacePassword, na as resolveVersionChangeDirection, ni as formatAgentReplyReadinessLabel, nn as readRecentDaemonDispatchJournalEvents, no as requestLocalAgentActivitySync, nr as readDispatchSpaceActionContextFromEnv, ns as cliJsonSkillsShowEnvelopeSchema, nt as formatTransportModeDisplay, o as runSpaceHistory, oa as isDaemonServiceJobNeverSpawned, oi as resolveGatewayChainReadiness, on as evaluateCommandAuthentication, oo as unregisterAgentActivityRoute, or as formatDaemonServiceDowngradeBlockedRecommendation, os as compareAgentControllerRefsForDisplay, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as compareSemver, pi as readProfileWorkspaceConfig, pn as buildAuthStatusSnapshot, po as formatInlineOpenMeldCliCommands, pr as createResetConfirmationGuideError, pt as runDaemon, q as runAgentsCustomRemove, qa as createAuthenticationError, qi as assessServerRequiredVersion, qn as formatRemovedCcRelationMessage, qo as sanitizeTerminalDisplayText, qr as readOpenMeldToolsUpdateContextFromEnv, qt as collectSkillsReadinessSnapshot, r as runSpaceAddMembers, ra as readCurrentDaemonRuntimeContext, ri as formatDeviceReplyReadinessLabel, rn as connectWebSocket, ro as isAgentActivityRouteRegistered, rr as writeDispatchSpaceActionRecord, rs as getOrganizationJoinLinkResponseSchema, rt as colorizeAgentLabel, s as runSpaceJoin, sa as readDaemonServiceJobCrashExitCode, si as resolveOpenClawLocalDiagnosticsValue, sn as runAuthLogin, sr as formatDaemonServiceMissingRecommendation, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as inspectDaemonServiceInventory, ti as resolveCurrentReplyReadinessSnapshot, tn as readRuntimeReportingHealthState, to as LocalDaemonControlPlaneClientError, tr as readDispatchOwnedRuntimeGuard, ts as cliJsonSkillsLoadEnvelopeSchema, tt as runAgentsShow, u as runSpacePassword, ua as buildInstallSelfJsonPayload, ui as resolveProfileWorkspaceRuntime, un as runAuthStatus, uo as readAgentActivityIntegrationStatus, ur as createProfileActionGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as writeVersionState, vi as describeProfileWorkspacePathValidationFailure, vn as resolveDeviceAuthClientId, vo as formatProfileAwareOpenMeldCliCommands, vr as createSpaceMenuGuideError, vt as runDaemonInterrupt, w as buildFormalDispatchResultReadPayload, wa as renderHumanErrorCard, wi as listBuiltinAgentsRegistryEntries, wn as promptTextEntry, wo as readAgentActivityContextForPath, wr as createSpaceUpdatesGuideError, wt as runDaemonTeardownStrict, x as loadSpaceIdentityDirectoryOrNull, xa as resolveCurrentDaemonExpectedVersion, xi as resolveAgentProfilePrimaryAgentControllerReport, xn as createProfileByKind, xo as syncLocalAgentActivity, xr as createSpaceResultGuideError, xt as runDaemonSnapshot, y as emitHumanReadSignalsTextProjection, ya as resolveDaemonRuntimeContractCompatibility, yi as syncDeviceRuntimeStateProjection, yn as resolveDeviceTokenExpiresAt, yo as resolveSetupFollowUpCliEntryCommand, yr as createSpacePublicationSetGuideError, yt as runDaemonReinstall, z as buildReplyReadinessGuidance, za as resolveOpenMeldProfile, zi as buildDaemonRouteObservationPresentation$1, zn as assertNoRemovedCcSpaceAddressingSyntax, zo as runIfAgentActivityBindingGenerationIsCurrent, zr as formatDualViewGuideForDisplay, zt as readGatewayTextResponse } from "./command-BGqFPMwd.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-0qM_CVk2.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-BiQfJGnw.js";
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-BV6ylBgU.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-DEiXhSkt.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-CFM93Yqy.js";
7
7
  import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
8
- import { j as getDaemonStatus } from "./daemon-runtime-lease-D82uDZ5s.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-Bj8n8YwV.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-CabWpjFe.js";
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-hdKG6Oqe.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-tvnD_7HW.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";
@@ -5510,7 +5510,7 @@ const CHOOSE_PROFILE = "__command_entry_choose_profile__";
5510
5510
  const CREATE_PROFILE = "__command_entry_create_profile__";
5511
5511
  const CANCEL_PROFILE = "__command_entry_cancel_profile__";
5512
5512
  async function runSelectedProfileCheck(input) {
5513
- const explicitProfileArg = normalizeOptionalString$16(input.context.profileArg);
5513
+ const explicitProfileArg = normalizeOptionalString$18(input.context.profileArg);
5514
5514
  const hasExplicitProfileArg = explicitProfileArg !== null;
5515
5515
  const requiresConfirmation = input.requirement.mode === "confirm" && input.context.runtime.resolvedView === "human" && input.context.allowPrompt && !hasExplicitProfileArg;
5516
5516
  const currentState = getCurrentCommandCheckState();
@@ -5683,7 +5683,7 @@ function ensureCurrentProfileIsVisible(input) {
5683
5683
  function resolveProfileConfirmationMessage(entryName) {
5684
5684
  return entryName === "space.join" ? SPACE_JOIN_PROFILE_SELECTION_MESSAGE : SPACE_COMMAND_PROFILE_SELECTION_MESSAGE;
5685
5685
  }
5686
- function normalizeOptionalString$16(value) {
5686
+ function normalizeOptionalString$18(value) {
5687
5687
  const normalized = String(value ?? "").trim();
5688
5688
  return normalized.length > 0 ? normalized : null;
5689
5689
  }
@@ -5941,7 +5941,10 @@ async function runSignInCheck(input) {
5941
5941
  if (hasValidCurrentSignIn(getCurrentCommandCheckState().signIn, input.context.gatewayUrl)) return { status: "continue" };
5942
5942
  const evaluated = await evaluateCommandAuthentication({ ...input.context.gatewayUrl ? { gatewayUrl: input.context.gatewayUrl } : {} });
5943
5943
  setCurrentSignInStatus(evaluated.status, input.context.gatewayUrl);
5944
- if (evaluated.status === "valid") return { status: "continue" };
5944
+ if (evaluated.status === "valid") {
5945
+ if (evaluated.session) primeOpenMeldProfilesSessionCache(evaluated.session);
5946
+ return { status: "continue" };
5947
+ }
5945
5948
  const copy = getCommandEntryCopy(input.context.entryName);
5946
5949
  const guidance = buildSignInGuidance({
5947
5950
  status: evaluated.status,
@@ -5999,7 +6002,8 @@ async function runRequiredSignInCheck(input) {
5999
6002
  ...input.context.gatewayUrl ? { gatewayUrl: input.context.gatewayUrl } : {},
6000
6003
  promptMessage: buildCommandAuthenticationPromptMessage(input.action ?? void 0),
6001
6004
  allowPrompt: true,
6002
- evaluated: input.evaluated
6005
+ evaluated: input.evaluated,
6006
+ onAuthenticatedSession: primeOpenMeldProfilesSessionCache
6003
6007
  })) return { status: "cancelled" };
6004
6008
  setCurrentSignInStatus("valid", input.context.gatewayUrl);
6005
6009
  return { status: "continue" };
@@ -6073,7 +6077,10 @@ async function runOptionalSignInLogin(input) {
6073
6077
  });
6074
6078
  const afterLogin = await evaluateCommandAuthentication({ ...input.context.gatewayUrl ? { gatewayUrl: input.context.gatewayUrl } : {} });
6075
6079
  setCurrentSignInStatus(afterLogin.status, input.context.gatewayUrl);
6076
- if (afterLogin.status === "valid") return { status: "continue" };
6080
+ if (afterLogin.status === "valid") {
6081
+ if (afterLogin.session) primeOpenMeldProfilesSessionCache(afterLogin.session);
6082
+ return { status: "continue" };
6083
+ }
6077
6084
  emitSignInStatus({
6078
6085
  context: input.context,
6079
6086
  guidance: buildSignInGuidance({
@@ -6241,6 +6248,12 @@ const PASSIVE_CLI_QUERY_COMMANDS = /* @__PURE__ */ new Set([
6241
6248
  "service trace",
6242
6249
  "whoami"
6243
6250
  ]);
6251
+ const COMMAND_ROUTE_OPTIONS_WITH_VALUES = /* @__PURE__ */ new Set([
6252
+ "--gateway-url",
6253
+ "--profile",
6254
+ "--service-auto-install",
6255
+ "--view"
6256
+ ]);
6244
6257
  function isStandaloneViewQueryArgv(argv) {
6245
6258
  const args = argv.slice(2);
6246
6259
  return args.length === 1 && args[0] === "--view";
@@ -6294,12 +6307,12 @@ function parseLeadingCommandTokensFromArgv(argv, maxTokens = 2) {
6294
6307
  const tokens = [];
6295
6308
  for (let i = 0; i < args.length; i += 1) {
6296
6309
  if (collectTokensAfterTerminator(args, i, tokens, maxTokens)) return tokens;
6297
- if (shouldSkipKnownGlobalFlag(args, i)) {
6310
+ if (shouldSkipKnownCommandRouteOption(args, i)) {
6298
6311
  i += 1;
6299
6312
  continue;
6300
6313
  }
6301
6314
  const arg = args[i];
6302
- if (typeof arg !== "string" || shouldSkipInlineGlobalFlag(arg)) continue;
6315
+ if (typeof arg !== "string" || shouldSkipInlineCommandRouteOption(arg)) continue;
6303
6316
  if (pushLeadingCommandToken(arg, tokens, maxTokens)) return tokens;
6304
6317
  }
6305
6318
  return tokens;
@@ -6310,7 +6323,7 @@ function isPassiveCliQueryArgv(argv) {
6310
6323
  const arg = args[i];
6311
6324
  if (typeof arg !== "string") continue;
6312
6325
  if (arg === "--") return false;
6313
- if (isKnownGlobalFlagExpectValue(arg) && isGlobalFlagValueCandidate(args[i + 1])) {
6326
+ if (isKnownCommandRouteOptionExpectValue(arg) && isGlobalFlagValueCandidate(args[i + 1])) {
6314
6327
  i += 1;
6315
6328
  continue;
6316
6329
  }
@@ -6333,8 +6346,8 @@ function shouldUseAgentViewForNonInteractiveStart(argv, interactive) {
6333
6346
  if (parseViewFromArgv(argv, { allowMissingValue: true }) !== null) return false;
6334
6347
  return parseFirstCommandTokenFromArgv(argv) === "start";
6335
6348
  }
6336
- function isKnownGlobalFlagExpectValue(value) {
6337
- return value === "--view" || value === "--service-auto-install";
6349
+ function isKnownCommandRouteOptionExpectValue(value) {
6350
+ return COMMAND_ROUTE_OPTIONS_WITH_VALUES.has(value);
6338
6351
  }
6339
6352
  function isGlobalFlagValueCandidate(value) {
6340
6353
  return typeof value === "string" && value.length > 0 && !value.startsWith("-");
@@ -6349,11 +6362,11 @@ function collectTokensAfterTerminator(args, index, tokens, maxTokens) {
6349
6362
  }
6350
6363
  return true;
6351
6364
  }
6352
- function shouldSkipKnownGlobalFlag(args, index) {
6353
- return isKnownGlobalFlagExpectValue(args[index] ?? "") && isGlobalFlagValueCandidate(args[index + 1]);
6365
+ function shouldSkipKnownCommandRouteOption(args, index) {
6366
+ return isKnownCommandRouteOptionExpectValue(args[index] ?? "") && isGlobalFlagValueCandidate(args[index + 1]);
6354
6367
  }
6355
- function shouldSkipInlineGlobalFlag(value) {
6356
- return value.startsWith("--view=") || value.startsWith("--service-auto-install=");
6368
+ function shouldSkipInlineCommandRouteOption(value) {
6369
+ return [...COMMAND_ROUTE_OPTIONS_WITH_VALUES].some((option) => value.startsWith(`${option}=`));
6357
6370
  }
6358
6371
  function pushLeadingCommandToken(value, tokens, maxTokens) {
6359
6372
  if (value.startsWith("-")) return false;
@@ -6389,7 +6402,7 @@ async function runCommandWithEntryChecks(input) {
6389
6402
  allowPrompt: runtime.interactive,
6390
6403
  environmentTarget,
6391
6404
  gatewayUrl: normalizedGatewayUrl,
6392
- profileArg: normalizeOptionalString$15(input.profile),
6405
+ profileArg: normalizeOptionalString$17(input.profile),
6393
6406
  jsonOutput
6394
6407
  }),
6395
6408
  jsonOutput
@@ -6398,7 +6411,7 @@ async function runCommandWithEntryChecks(input) {
6398
6411
  finishCurrentCommandCheckScope();
6399
6412
  }
6400
6413
  }
6401
- function normalizeOptionalString$15(value) {
6414
+ function normalizeOptionalString$17(value) {
6402
6415
  const normalized = String(value ?? "").trim();
6403
6416
  return normalized.length > 0 ? normalized : null;
6404
6417
  }
@@ -7101,8 +7114,8 @@ function normalizeOrganizationSelectionPayload(payload) {
7101
7114
  message: "OpenMeld auth returned an invalid Organization selection."
7102
7115
  });
7103
7116
  return {
7104
- activeOrganizationId: normalizeOptionalString$14(payload.session.activeOrganizationId),
7105
- lastSelectedOrganizationId: normalizeOptionalString$14(payload.user.lastSelectedOrganizationId)
7117
+ activeOrganizationId: normalizeOptionalString$16(payload.session.activeOrganizationId),
7118
+ lastSelectedOrganizationId: normalizeOptionalString$16(payload.user.lastSelectedOrganizationId)
7106
7119
  };
7107
7120
  }
7108
7121
  function normalizeOrganizationListPayload(payload) {
@@ -7134,7 +7147,7 @@ function normalizeOrganizationFromPayload(payload) {
7134
7147
  if (!isRecord(payload)) return null;
7135
7148
  const organization = normalizeStoredActiveOrganization(payload.organization);
7136
7149
  if (!organization) return null;
7137
- const role = normalizeOptionalString$14(payload.role) ?? (isRecord(payload.member) ? normalizeOptionalString$14(payload.member.role) : null);
7150
+ const role = normalizeOptionalString$16(payload.role) ?? (isRecord(payload.member) ? normalizeOptionalString$16(payload.member.role) : null);
7138
7151
  return {
7139
7152
  ...organization,
7140
7153
  ...role ? { role } : {}
@@ -7204,13 +7217,13 @@ function parseJsonOrNull(raw) {
7204
7217
  }
7205
7218
  function readRequestId(payload) {
7206
7219
  if (!isRecord(payload)) return null;
7207
- return normalizeOptionalString$14(payload.requestId) ?? (isRecord(payload.error) ? normalizeOptionalString$14(payload.error.requestId) : null);
7220
+ return normalizeOptionalString$16(payload.requestId) ?? (isRecord(payload.error) ? normalizeOptionalString$16(payload.error.requestId) : null);
7208
7221
  }
7209
7222
  function readErrorMessage(payload) {
7210
7223
  if (!isRecord(payload)) return null;
7211
- return normalizeOptionalString$14(payload.message) ?? (isRecord(payload.error) ? normalizeOptionalString$14(payload.error.message) : null);
7224
+ return normalizeOptionalString$16(payload.message) ?? (isRecord(payload.error) ? normalizeOptionalString$16(payload.error.message) : null);
7212
7225
  }
7213
- function normalizeOptionalString$14(value) {
7226
+ function normalizeOptionalString$16(value) {
7214
7227
  const normalized = String(value ?? "").trim();
7215
7228
  return normalized.length > 0 ? normalized : null;
7216
7229
  }
@@ -7618,7 +7631,7 @@ async function createCenterAgentApiClient(input) {
7618
7631
  const CODEX_THREAD_ID_ENV = "CODEX_THREAD_ID";
7619
7632
  const CLAUDE_CODE_SESSION_ID_ENV = "CLAUDE_CODE_SESSION_ID";
7620
7633
  function detectLocalAgentEnvironment(env) {
7621
- const claudeSessionId = normalizeOptionalString$13(env[CLAUDE_CODE_SESSION_ID_ENV]);
7634
+ const claudeSessionId = normalizeOptionalString$15(env[CLAUDE_CODE_SESSION_ID_ENV]);
7622
7635
  if (claudeSessionId) return {
7623
7636
  kind: "agent",
7624
7637
  agentControllerConversationId: claudeSessionId,
@@ -7626,7 +7639,7 @@ function detectLocalAgentEnvironment(env) {
7626
7639
  conversationKind: "session",
7627
7640
  label: "Claude Code"
7628
7641
  };
7629
- const codexThreadId = normalizeOptionalString$13(env[CODEX_THREAD_ID_ENV]);
7642
+ const codexThreadId = normalizeOptionalString$15(env[CODEX_THREAD_ID_ENV]);
7630
7643
  if (codexThreadId) return {
7631
7644
  kind: "agent",
7632
7645
  agentControllerConversationId: codexThreadId,
@@ -7638,9 +7651,9 @@ function detectLocalAgentEnvironment(env) {
7638
7651
  return { kind: "human" };
7639
7652
  }
7640
7653
  function isCodexLikeEnvironment(env) {
7641
- return Boolean(normalizeOptionalString$13(env.CODEX_SHELL) || normalizeOptionalString$13(env.CODEX_CI) || normalizeOptionalString$13(env.CODEX_SESSION_ID) || normalizeOptionalString$13(env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE));
7654
+ 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));
7642
7655
  }
7643
- function normalizeOptionalString$13(value) {
7656
+ function normalizeOptionalString$15(value) {
7644
7657
  if (typeof value !== "string") return null;
7645
7658
  const normalized = value.trim();
7646
7659
  return normalized.length > 0 ? normalized : null;
@@ -9044,7 +9057,7 @@ async function exchangeComputerAuthorizationGrant(input) {
9044
9057
  });
9045
9058
  throw new Error(`computer authorization could not verify its OpenMeld account: ${toErrorMessage$8(error)}${formatCleanupFailure(cleanup)}`, { cause: error });
9046
9059
  }
9047
- const userId = normalizeOptionalString$12(user?.id);
9060
+ const userId = normalizeOptionalString$14(user?.id);
9048
9061
  if (!userId) {
9049
9062
  const cleanup = await revokeAuthAccessToken({
9050
9063
  accessToken: tokenResult.data.access_token,
@@ -9054,7 +9067,7 @@ async function exchangeComputerAuthorizationGrant(input) {
9054
9067
  throw new Error(`computer authorization account response did not include a user id${formatCleanupFailure(cleanup)}`);
9055
9068
  }
9056
9069
  const expiresAt = resolveDeviceTokenExpiresAt(tokenResult.data.expires_in);
9057
- const scope = normalizeOptionalString$12(tokenResult.data.scope);
9070
+ const scope = normalizeOptionalString$14(tokenResult.data.scope);
9058
9071
  return {
9059
9072
  accessToken: tokenResult.data.access_token,
9060
9073
  tokenType: tokenResult.data.token_type,
@@ -9080,11 +9093,11 @@ function toErrorMessage$8(error) {
9080
9093
  return error instanceof Error && error.message.trim() ? error.message.trim() : String(error ?? "unknown error");
9081
9094
  }
9082
9095
  function normalizeRequiredString(value, message) {
9083
- const normalized = normalizeOptionalString$12(value);
9096
+ const normalized = normalizeOptionalString$14(value);
9084
9097
  if (!normalized) throw new Error(message);
9085
9098
  return normalized;
9086
9099
  }
9087
- function normalizeOptionalString$12(value) {
9100
+ function normalizeOptionalString$14(value) {
9088
9101
  const normalized = String(value ?? "").trim();
9089
9102
  return normalized.length > 0 ? normalized : null;
9090
9103
  }
@@ -9094,7 +9107,7 @@ const UNUSED_SETUP_SESSION_CLEANUP_SUFFIX = " OpenMeld also could not revoke the
9094
9107
  async function recoverInterruptedComputerAuthHandoff(input) {
9095
9108
  const recovery = await getInterruptedComputerAuthSessionRecovery();
9096
9109
  if (!recovery) return "none";
9097
- const previousOwnerUserId = normalizeOptionalString$11(recovery.previousSession?.user?.id);
9110
+ const previousOwnerUserId = normalizeOptionalString$13(recovery.previousSession?.user?.id);
9098
9111
  if (!recovery.serviceReconciled) {
9099
9112
  const stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
9100
9113
  if (stopped.status === "warning") {
@@ -9198,7 +9211,7 @@ function formatComputerAuthCleanupFailureSuffix(result) {
9198
9211
  const status = result.error.status === null ? "network error" : `HTTP ${result.error.status}`;
9199
9212
  return `${UNUSED_SETUP_SESSION_CLEANUP_SUFFIX} Cleanup endpoint ${result.error.endpoint} returned ${status}: ${result.error.message}`;
9200
9213
  }
9201
- function normalizeOptionalString$11(value) {
9214
+ function normalizeOptionalString$13(value) {
9202
9215
  if (typeof value !== "string") return null;
9203
9216
  const normalized = value.trim();
9204
9217
  return normalized.length > 0 ? normalized : null;
@@ -10363,11 +10376,11 @@ function resolveDaemonRouteSkipMessage(input) {
10363
10376
  return `Reply route checks were skipped because the OpenMeld profile check failed: ${input.openMeldProfileMessage}`;
10364
10377
  }
10365
10378
  function resolveFeedbackInboxKey(input) {
10366
- const fromCli = normalizeOptionalString$10(input.cliValue);
10379
+ const fromCli = normalizeOptionalString$12(input.cliValue);
10367
10380
  if (fromCli) return fromCli;
10368
- return normalizeOptionalString$10((input.env ?? process.env).OPENMELD_FEEDBACK_INBOX_KEY) ?? "feedback_key_8oDRg9Aq-Q4crzVGV6hUqhKT2dQpKkBn4bKg9bjXLcE";
10381
+ return normalizeOptionalString$12((input.env ?? process.env).OPENMELD_FEEDBACK_INBOX_KEY) ?? "feedback_key_8oDRg9Aq-Q4crzVGV6hUqhKT2dQpKkBn4bKg9bjXLcE";
10369
10382
  }
10370
- function normalizeOptionalString$10(value) {
10383
+ function normalizeOptionalString$12(value) {
10371
10384
  const normalized = String(value ?? "").trim();
10372
10385
  return normalized.length > 0 ? normalized : null;
10373
10386
  }
@@ -10708,7 +10721,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
10708
10721
  value: input.agentControllerPermissionModeInput
10709
10722
  });
10710
10723
  if (!agentControllerPermissionMode) return { hasAnyAgentControllerPermissionModeInput: false };
10711
- const agentControllerRef = normalizeOptionalString$9(input.agentControllerRef);
10724
+ const agentControllerRef = normalizeOptionalString$11(input.agentControllerRef);
10712
10725
  assertAgentControllerPermissionModeSupported({
10713
10726
  agentControllerPermissionMode,
10714
10727
  agentControllerRef,
@@ -10729,7 +10742,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
10729
10742
  };
10730
10743
  }
10731
10744
  function normalizeAgentControllerPermissionModeCliInput(input) {
10732
- const raw = normalizeOptionalString$9(input.value);
10745
+ const raw = normalizeOptionalString$11(input.value);
10733
10746
  if (!raw) return null;
10734
10747
  const options = listAgentControllerPermissionModeOptions(input.agentControllerRef ? { agentControllerRef: input.agentControllerRef } : void 0);
10735
10748
  for (const option of options) if (raw === option.value) return option.value;
@@ -10832,7 +10845,24 @@ const AGENT_CONTROLLER_PERMISSION_MODE_BY_CLI_VALUE = {
10832
10845
  "run-everything": "cursor:force",
10833
10846
  runeverything: "cursor:force"
10834
10847
  };
10835
- function normalizeOptionalString$9(value) {
10848
+ function normalizeOptionalString$11(value) {
10849
+ const normalized = String(value ?? "").trim();
10850
+ return normalized.length > 0 ? normalized : null;
10851
+ }
10852
+ //#endregion
10853
+ //#region src/profile/model-selection-input.ts
10854
+ function normalizeModelSelectionInput(input) {
10855
+ const modelId = normalizeOptionalString$10(input.model);
10856
+ const reasoningLevel = normalizeOptionalString$10(input.reasoningEffort);
10857
+ if (!(modelId || reasoningLevel)) return { hasAnyModelSelectionInput: false };
10858
+ if (!modelId) throw new Error("--reasoning-effort requires --model.");
10859
+ return {
10860
+ hasAnyModelSelectionInput: true,
10861
+ modelId,
10862
+ ...reasoningLevel ? { reasoningLevel } : {}
10863
+ };
10864
+ }
10865
+ function normalizeOptionalString$10(value) {
10836
10866
  const normalized = String(value ?? "").trim();
10837
10867
  return normalized.length > 0 ? normalized : null;
10838
10868
  }
@@ -11196,7 +11226,7 @@ async function runProfileShow(input) {
11196
11226
  }
11197
11227
  const presenter = createPresenter(runtime);
11198
11228
  const allowPrompt = canUseInteractivePrompts(runtime);
11199
- const explicitProfileId = normalizeOptionalString$8(input.profile);
11229
+ const explicitProfileId = normalizeOptionalString$9(input.profile);
11200
11230
  const visibleProfiles = explicitProfileId ? [] : await listVisibleProfilesForListByView(runtime.resolvedView);
11201
11231
  const current = explicitProfileId ? null : await resolveCurrentProfileId({
11202
11232
  profiles: visibleProfiles,
@@ -11678,7 +11708,7 @@ async function runProfileUpdate(input) {
11678
11708
  }
11679
11709
  const presenter = createPresenter(runtime);
11680
11710
  const allowPrompt = canUseInteractivePrompts(runtime);
11681
- const explicitProfileId = normalizeOptionalString$8(input.profile);
11711
+ const explicitProfileId = normalizeOptionalString$9(input.profile);
11682
11712
  const visibleProfiles = explicitProfileId ? [] : await listVisibleProfilesForListByView(runtime.resolvedView);
11683
11713
  const current = explicitProfileId ? null : await resolveCurrentProfileId({
11684
11714
  profiles: visibleProfiles,
@@ -11906,7 +11936,7 @@ function emitProfileUpdateCandidatesForHuman(input) {
11906
11936
  }
11907
11937
  }
11908
11938
  async function resolveProfileUpdatePayload(input) {
11909
- const profileName = normalizeOptionalString$8(input.profileName);
11939
+ const profileName = normalizeOptionalString$9(input.profileName);
11910
11940
  const explicitAgentController = await resolveExplicitAgentControllerPatchForProfile({
11911
11941
  agentController: input.agentController,
11912
11942
  agentControllerConversationId: input.agentControllerConversationId,
@@ -11951,7 +11981,7 @@ async function resolveProfileUpdatePayload(input) {
11951
11981
  }
11952
11982
  function resolveExplicitWorkspacePatchForProfile(input) {
11953
11983
  const normalizedMode = normalizeWorkspaceModeInput(input.workspaceMode);
11954
- const normalizedWorkspacePath = normalizeOptionalString$8(input.workspacePath);
11984
+ const normalizedWorkspacePath = normalizeOptionalString$9(input.workspacePath);
11955
11985
  if (!(normalizedMode || normalizedWorkspacePath)) return null;
11956
11986
  if (input.profile.profileKind !== "agent") throw new Error("Workspace can only be configured for agent profiles.");
11957
11987
  if (!normalizedMode) throw new Error("--workspace-path can only be used with --workspace-mode custom.");
@@ -11984,7 +12014,7 @@ function resolveExplicitModelSelectionPatchForProfile(input) {
11984
12014
  };
11985
12015
  }
11986
12016
  async function resolveExplicitAgentControllerPermissionModePatchForProfile(input) {
11987
- if (!normalizeOptionalString$8(input.agentControllerPermissionModeInput)) return null;
12017
+ if (!normalizeOptionalString$9(input.agentControllerPermissionModeInput)) return null;
11988
12018
  if (input.profile.profileKind !== "agent") throw new Error("Agent Controller Permission Mode can only be configured for agent profiles.");
11989
12019
  const currentBinding = input.agentControllerRef ? null : await resolveAgentProfilePrimaryAgentControllerReport({ profile: input.profile });
11990
12020
  const agentControllerRef = input.agentControllerRef ?? currentBinding?.agentControllerRef ?? null;
@@ -12003,8 +12033,8 @@ async function resolveExplicitAgentControllerPermissionModePatchForProfile(input
12003
12033
  };
12004
12034
  }
12005
12035
  async function resolveExplicitAgentControllerPatchForProfile(input) {
12006
- const agentController = normalizeOptionalString$8(input.agentController);
12007
- const agentControllerConversationId = normalizeOptionalString$8(input.agentControllerConversationId);
12036
+ const agentController = normalizeOptionalString$9(input.agentController);
12037
+ const agentControllerConversationId = normalizeOptionalString$9(input.agentControllerConversationId);
12008
12038
  if (!(agentController || agentControllerConversationId)) return null;
12009
12039
  if (input.profile.profileKind !== "agent") throw new Error("Agent controller can only be configured for agent profiles.");
12010
12040
  if (!agentController) throw new Error("--agent-controller-conversation-id requires --agent-controller.");
@@ -12018,7 +12048,7 @@ async function resolveExplicitAgentControllerPatchForProfile(input) {
12018
12048
  };
12019
12049
  }
12020
12050
  async function applyAgentProfileControllerBinding(input) {
12021
- const agentControllerRef = normalizeOptionalString$8(input.agentControllerRef);
12051
+ const agentControllerRef = normalizeOptionalString$9(input.agentControllerRef);
12022
12052
  const hasModelSelectionPatch = input.modelId !== void 0;
12023
12053
  if (!(agentControllerRef || hasModelSelectionPatch)) return;
12024
12054
  if (input.profile.profileKind !== "agent") throw new Error("Agent controller can only be configured for agent profiles.");
@@ -12156,7 +12186,7 @@ async function promptWorkspacePayload(profile) {
12156
12186
  });
12157
12187
  if (workspacePath.status === "cancelled") return { status: "cancelled" };
12158
12188
  if (workspacePath.status === "back") continue;
12159
- const customWorkspacePath = normalizeOptionalString$8(workspacePath.value);
12189
+ const customWorkspacePath = normalizeOptionalString$9(workspacePath.value);
12160
12190
  if (!customWorkspacePath) throw new Error("Custom workspace path is required.");
12161
12191
  return {
12162
12192
  status: "submitted",
@@ -12261,7 +12291,7 @@ async function promptModelSelectionPayload(profile) {
12261
12291
  });
12262
12292
  if (isCancel(selectedReasoningLevel)) return { status: "cancelled" };
12263
12293
  if (selectedReasoningLevel === BACK_UPDATE_FIELD_SELECTION) return { status: "back" };
12264
- const reasoningLevel = normalizeOptionalString$8(selectedReasoningLevel);
12294
+ const reasoningLevel = normalizeOptionalString$9(selectedReasoningLevel);
12265
12295
  return {
12266
12296
  status: "submitted",
12267
12297
  value: {
@@ -12329,7 +12359,7 @@ async function promptProfileNamePayload(currentProfileName) {
12329
12359
  });
12330
12360
  if (nextName.status === "cancelled") return { status: "cancelled" };
12331
12361
  if (nextName.status === "back") return { status: "back" };
12332
- const profileName = normalizeOptionalString$8(nextName.value);
12362
+ const profileName = normalizeOptionalString$9(nextName.value);
12333
12363
  if (!profileName) throw new Error("profileName is required");
12334
12364
  return {
12335
12365
  status: "submitted",
@@ -12585,11 +12615,11 @@ function buildProfileSearchItem(input) {
12585
12615
  function buildProfileSearchText(profile) {
12586
12616
  return [
12587
12617
  profile.openMeldProfileId,
12588
- normalizeOptionalString$8(profile.profileName),
12618
+ normalizeOptionalString$9(profile.profileName),
12589
12619
  profile.profileKind,
12590
- normalizeOptionalString$8(profile.ownerUserId),
12591
- normalizeOptionalString$8(profile.ownerName),
12592
- normalizeOptionalString$8(profile.source)
12620
+ normalizeOptionalString$9(profile.ownerUserId),
12621
+ normalizeOptionalString$9(profile.ownerName),
12622
+ normalizeOptionalString$9(profile.source)
12593
12623
  ].filter((value) => typeof value === "string").join("\n");
12594
12624
  }
12595
12625
  function resolveProfileSelectLabel(input) {
@@ -12640,7 +12670,7 @@ function normalizeProfileDisplayName(profile) {
12640
12670
  }
12641
12671
  function normalizeAgentControllerArgumentInput(input) {
12642
12672
  const agentController = String(input.agentController ?? "").trim();
12643
- const agentControllerConversationId = normalizeOptionalString$8(input.agentControllerConversationId);
12673
+ const agentControllerConversationId = normalizeOptionalString$9(input.agentControllerConversationId);
12644
12674
  const hasControllerEnabled = typeof input.controllerEnabled === "boolean";
12645
12675
  const hasAnyAgentControllerInput = Boolean(agentController) || Boolean(agentControllerConversationId) || hasControllerEnabled;
12646
12676
  return {
@@ -12848,7 +12878,7 @@ function resolveProfileUpdateCommandExamples() {
12848
12878
  function toProfileActionGuideExamples(_input) {
12849
12879
  return {};
12850
12880
  }
12851
- function normalizeOptionalString$8(value) {
12881
+ function normalizeOptionalString$9(value) {
12852
12882
  const normalized = String(value ?? "").trim();
12853
12883
  return normalized.length > 0 ? normalized : null;
12854
12884
  }
@@ -12858,17 +12888,6 @@ function normalizeWorkspaceModeInput(value) {
12858
12888
  if (normalized === "openmeld_managed" || normalized === "custom") return normalized;
12859
12889
  throw new Error("--workspace-mode must be openmeld-managed|custom");
12860
12890
  }
12861
- function normalizeModelSelectionInput(input) {
12862
- const modelId = normalizeOptionalString$8(input.model);
12863
- const reasoningLevel = normalizeOptionalString$8(input.reasoningEffort);
12864
- if (!(modelId || reasoningLevel)) return { hasAnyModelSelectionInput: false };
12865
- if (!modelId) throw new Error("--reasoning-effort requires --model.");
12866
- return {
12867
- hasAnyModelSelectionInput: true,
12868
- modelId,
12869
- ...reasoningLevel ? { reasoningLevel } : {}
12870
- };
12871
- }
12872
12891
  async function ensureProfileCommandAuthenticationOrCancel(input) {
12873
12892
  if (input.runtime.resolvedView !== "human") return true;
12874
12893
  const evaluated = await evaluateCommandAuthentication();
@@ -12961,7 +12980,7 @@ const PROMPT_GUIDE_CATALOG = {
12961
12980
  "Use canonical `<space-id>` targets instead of space names.",
12962
12981
  "Keep `--profile <profile-id>` explicit in agent or multi-process workflows.",
12963
12982
  "If a protected Space blocks access, first confirm the active account/profile. Join once with the Space password only when the account has not joined yet.",
12964
- "For structured Space replies, leave `activationTargets` and `referenceTargets` empty unless you intentionally address another profile."
12983
+ "For structured Space replies, leave `activationTargets`, `referenceTargets`, and `mentionTargets` empty unless you intentionally address another profile."
12965
12984
  ],
12966
12985
  agentCommands: [
12967
12986
  "openmeld space create --profile <profile-id> --name <space-name> --view agent",
@@ -12976,8 +12995,9 @@ const PROMPT_GUIDE_CATALOG = {
12976
12995
  notes: [
12977
12996
  ...buildAgentFacingPublicationModeGuideLines(),
12978
12997
  "`activationTargets` is only for waking another Agent Profile in the Space. It is not the sender, reply recipient, or human mention target.",
12979
- "For a normal reply to the current Wake, use `post_message` with empty `activationTargets` and `referenceTargets`.",
12980
- "Use `openmeld space send --plain` only when canonical mention syntax should be quoted as text instead of resolved as Wake or Reference addressing.",
12998
+ "`referenceTargets` is only for Agent Reference context; `mentionTargets` is only for Human Mentions that should notify a person.",
12999
+ "For a normal reply to the current Wake, use `post_message` with empty `activationTargets`, `referenceTargets`, and `mentionTargets`.",
13000
+ "Use `openmeld space send --plain` only when canonical Agent Wake, Agent Reference, or Human Mention syntax should be quoted as literal text instead of resolved as Space addressing.",
12981
13001
  "Use `openmeld space contract`, `status`, `updates`, and `result` for formal read-side inspection."
12982
13002
  ]
12983
13003
  }
@@ -12993,7 +13013,8 @@ const PROMPT_GUIDE_CATALOG = {
12993
13013
  "Run the one final action named at the top of the current dispatch prompt before reading optional forms.",
12994
13014
  "Use `reply` for the normal final answer.",
12995
13015
  "Use `wake` or `reply --wake` only when handing off work to another Agent Profile.",
12996
- "Use `--reference` when another profile should be included as context without starting work.",
13016
+ "Use `--reference` when another Agent Profile should be included as context without starting work.",
13017
+ "Use `--mention` when a Human Profile should receive attention without starting Agent work.",
12997
13018
  "Keep each reply aligned to the source message it answers. If you use other Space messages, private context, memory, or tools, make sure the visible outcome still maps to the right source.",
12998
13019
  "Use `status` only for final-safe status outcomes, not ongoing progress.",
12999
13020
  "Answer text never becomes a Space Action. Call the dispatch-scoped CLI command for every controlled visible outcome."
@@ -13002,6 +13023,7 @@ const PROMPT_GUIDE_CATALOG = {
13002
13023
  "<DISPATCH_ACTION_CLI> space action reply \"message\"",
13003
13024
  "<DISPATCH_ACTION_CLI> space action wake \"@Agent Name\" \"summary and request\"",
13004
13025
  "<DISPATCH_ACTION_CLI> space action reply --wake \"@Agent Name\" \"message\"",
13026
+ "<DISPATCH_ACTION_CLI> space action reply --mention \"@Person Name\" \"message\"",
13005
13027
  "<DISPATCH_ACTION_CLI> space action status done \"short completion update\"",
13006
13028
  "<DISPATCH_ACTION_CLI> space action silent --reason \"No public reply is needed.\"",
13007
13029
  "<DISPATCH_ACTION_CLI> space action targets",
@@ -13013,7 +13035,7 @@ const PROMPT_GUIDE_CATALOG = {
13013
13035
  "If a Space Action CLI command fails, do not print JSON or prose as a substitute. Let OpenMeld preserve and report the tool failure.",
13014
13036
  "Wake targets must be active Agent Profile members in the current Space.",
13015
13037
  "If a user asks you to deliver work to another Agent Profile, a plain reply is not enough; use `wake` or `reply --wake` so executable work is created.",
13016
- "Bare @names in prose are not execution targets in the agent path; use target flags for Wake or Reference semantics.",
13038
+ "Bare @names in prose are not addressing targets in the agent path; use target flags for Agent Wake, Agent Reference, or Human Mention semantics.",
13017
13039
  "OpenMeld metadata is infrastructure context, not proof of what a human or agent is doing. Use Space context, private context, memory, and tools when appropriate; avoid exposing secrets, credentials, private files, or high-risk sensitive data unless the owner clearly authorizes it.",
13018
13040
  "`working` is not accepted here because status actions are final visible outcomes in the current contract."
13019
13041
  ]
@@ -13367,7 +13389,7 @@ async function fetchSpaceDispatchTrace(input) {
13367
13389
  requestContext: input.requestContext,
13368
13390
  spacePassword: input.password
13369
13391
  }),
13370
- [SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER]: String(2)
13392
+ [SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER]: String(3)
13371
13393
  } }
13372
13394
  });
13373
13395
  const raw = await response.text();
@@ -13869,10 +13891,10 @@ function resolveDaemonDispatchJournalEvidence(dispatchId) {
13869
13891
  };
13870
13892
  }
13871
13893
  async function resolveDispatchTraceSelection(input) {
13872
- const dispatchSelector = normalizeOptionalString$7(input.dispatchId);
13873
- const sourceSignalSelector = normalizeOptionalString$7(input.sourceSignalId);
13874
- const clientMessageSelector = normalizeOptionalString$7(input.clientMessageId);
13875
- const targetProfileSelector = normalizeOptionalString$7(input.targetProfileId);
13894
+ const dispatchSelector = normalizeOptionalString$8(input.dispatchId);
13895
+ const sourceSignalSelector = normalizeOptionalString$8(input.sourceSignalId);
13896
+ const clientMessageSelector = normalizeOptionalString$8(input.clientMessageId);
13897
+ const targetProfileSelector = normalizeOptionalString$8(input.targetProfileId);
13876
13898
  if (Number(dispatchSelector !== null) + Number(sourceSignalSelector !== null) + Number(clientMessageSelector !== null) !== 1) throw new Error("exactly one of dispatchId, sourceSignalId, or clientMessageId is required");
13877
13899
  if (dispatchSelector) return {
13878
13900
  dispatchId: dispatchSelector,
@@ -14379,7 +14401,7 @@ function parenthesizedDetail(value, label) {
14379
14401
  return detail.length > 0 ? detail : null;
14380
14402
  }
14381
14403
  async function resolveServiceTraceActorProfile(input) {
14382
- if (normalizeOptionalString$7(input.explicitProfileId) || !canUseInteractivePrompts(input.runtime)) return input.actingProfile;
14404
+ if (normalizeOptionalString$8(input.explicitProfileId) || !canUseInteractivePrompts(input.runtime)) return input.actingProfile;
14383
14405
  while (true) {
14384
14406
  const selectedAction = await select({
14385
14407
  message: `Use ${input.actingProfile.profileName} (${input.actingProfile.openMeldProfileId}) to read this dispatch trace?`,
@@ -15260,7 +15282,7 @@ function truncateText(text, maxLength) {
15260
15282
  if (text.length <= maxLength) return text;
15261
15283
  return `${text.slice(0, maxLength)}...`;
15262
15284
  }
15263
- function normalizeOptionalString$7(value) {
15285
+ function normalizeOptionalString$8(value) {
15264
15286
  const normalized = String(value ?? "").trim();
15265
15287
  return normalized.length > 0 ? normalized : null;
15266
15288
  }
@@ -16088,7 +16110,7 @@ async function acquireSetupCommandLockWithTakeover(input) {
16088
16110
  pid,
16089
16111
  startedAtLabel
16090
16112
  };
16091
- if (!(normalizeOptionalString$6(input.startSession) !== null && pid !== null && pid !== deps.selfPid && deps.probePid(pid) === "alive")) return {
16113
+ if (!(normalizeOptionalString$7(input.startSession) !== null && pid !== null && pid !== deps.selfPid && deps.probePid(pid) === "alive")) return {
16092
16114
  status: "contended",
16093
16115
  ...contendedBase,
16094
16116
  takeoverAttempted: false
@@ -16325,7 +16347,7 @@ function getErrorCode(error) {
16325
16347
  const code = error.code;
16326
16348
  return typeof code === "string" ? code : void 0;
16327
16349
  }
16328
- function normalizeOptionalString$6(value) {
16350
+ function normalizeOptionalString$7(value) {
16329
16351
  const normalized = String(value ?? "").trim();
16330
16352
  return normalized.length > 0 ? normalized : null;
16331
16353
  }
@@ -16377,6 +16399,86 @@ function shouldForceSetupServiceRefresh() {
16377
16399
  return process.env.OPENMELD_SETUP_FORCE_SERVICE_REFRESH === "1";
16378
16400
  }
16379
16401
  //#endregion
16402
+ //#region src/ui/confirm.ts
16403
+ const PROMPT_SYMBOL_ACTIVE = pc.green("◇");
16404
+ const PROMPT_SYMBOL_CANCELLED = pc.red("■");
16405
+ const BAR_SYMBOL = pc.dim("│");
16406
+ const SELECTED_SYMBOL = pc.green("●");
16407
+ const UNSELECTED_SYMBOL = pc.dim("○");
16408
+ function promptConfirm(input, streams) {
16409
+ return runInteractivePrompt({
16410
+ initialState: {
16411
+ activeLabel: input.activeLabel ?? "Yes",
16412
+ inactiveLabel: input.inactiveLabel ?? "No",
16413
+ message: input.message,
16414
+ value: input.initialValue ?? true
16415
+ },
16416
+ fallbackResult: "cancelled",
16417
+ renderLines: renderConfirmPromptLines,
16418
+ handleKeypress: handleConfirmPromptKeypress
16419
+ }, streams);
16420
+ }
16421
+ function renderConfirmPromptLines(state, status) {
16422
+ const lines = [`${status === "cancelled" ? PROMPT_SYMBOL_CANCELLED : PROMPT_SYMBOL_ACTIVE} ${pc.bold(state.message)}`];
16423
+ if (status === "cancelled") {
16424
+ lines.push(`${BAR_SYMBOL} ${pc.strikethrough(pc.dim("Cancelled"))}`);
16425
+ return lines;
16426
+ }
16427
+ if (status === "submitted") {
16428
+ lines.push(`${BAR_SYMBOL} ${pc.dim(state.value ? state.activeLabel : state.inactiveLabel)}`);
16429
+ return lines;
16430
+ }
16431
+ lines.push(`${BAR_SYMBOL} ${renderConfirmOption(state.activeLabel, state.value)} / ${renderConfirmOption(state.inactiveLabel, !state.value)}`, pc.dim("└"));
16432
+ return lines;
16433
+ }
16434
+ function handleConfirmPromptKeypress(input) {
16435
+ if (isReturnKeypress({
16436
+ key: input.key,
16437
+ str: input.str
16438
+ })) return {
16439
+ type: "result",
16440
+ result: input.state.value ? "confirmed" : "declined",
16441
+ status: "submitted",
16442
+ state: input.state
16443
+ };
16444
+ if (input.key.name === "escape" || input.key.ctrl === true && input.key.name === "c") return {
16445
+ type: "result",
16446
+ result: "cancelled",
16447
+ status: "cancelled",
16448
+ state: input.state
16449
+ };
16450
+ if (input.key.name === "up" || input.key.name === "down" || input.key.name === "left" || input.key.name === "right" || input.key.name === "tab" || input.key.name === "space") return {
16451
+ type: "state",
16452
+ state: {
16453
+ ...input.state,
16454
+ value: !input.state.value
16455
+ }
16456
+ };
16457
+ const normalized = String(input.str ?? "").trim().toLowerCase();
16458
+ if (normalized === "y") return {
16459
+ type: "result",
16460
+ result: "confirmed",
16461
+ status: "submitted",
16462
+ state: {
16463
+ ...input.state,
16464
+ value: true
16465
+ }
16466
+ };
16467
+ if (normalized === "n") return {
16468
+ type: "result",
16469
+ result: "declined",
16470
+ status: "submitted",
16471
+ state: {
16472
+ ...input.state,
16473
+ value: false
16474
+ }
16475
+ };
16476
+ return { type: "ignore" };
16477
+ }
16478
+ function renderConfirmOption(label, selected) {
16479
+ return `${selected ? SELECTED_SYMBOL : UNSELECTED_SYMBOL} ${label}`;
16480
+ }
16481
+ //#endregion
16380
16482
  //#region src/runtime/cli-output-handled-error.ts
16381
16483
  var CliOutputHandledError = class extends Error {
16382
16484
  constructor(message) {
@@ -18084,7 +18186,7 @@ async function resolveCurrentComputerSession(candidate) {
18084
18186
  }
18085
18187
  if (currentState.state === "missing" || currentState.session) return currentState.session;
18086
18188
  const revoked = await revokePreparedAuthSession(candidate);
18087
- const detail = normalizeOptionalString$5(currentState.errorMessage) ?? normalizeOptionalString$5(currentState.reasonCode);
18189
+ const detail = normalizeOptionalString$6(currentState.errorMessage) ?? normalizeOptionalString$6(currentState.reasonCode);
18088
18190
  throw new Error(`OpenMeld could not inspect the current Computer sign-in. The current Computer connection was not changed.${detail ? ` ${detail}` : ""}${formatComputerAuthCleanupFailureSuffix(revoked)}`);
18089
18191
  }
18090
18192
  async function beginComputerSessionTransition(input) {
@@ -18116,24 +18218,25 @@ function attachComputerAuthCleanupFailure(input) {
18116
18218
  } });
18117
18219
  }
18118
18220
  async function confirmComputerAccountSwitch(input) {
18119
- const currentUserId = normalizeOptionalString$5(input.currentSession?.user?.id);
18221
+ const currentUserId = normalizeOptionalString$6(input.currentSession?.user?.id);
18120
18222
  if (!input.currentSession) return true;
18121
18223
  if (!currentUserId) {
18122
18224
  const revoked = await revokePreparedAuthSession(input.candidate);
18123
18225
  throw new Error(`OpenMeld could not verify the account currently connected to this Computer. The current Computer connection was not changed.${formatComputerAuthCleanupFailureSuffix(revoked)}`);
18124
18226
  }
18125
18227
  if (currentUserId === input.candidate.user.id) return true;
18126
- const currentAccount = normalizeOptionalString$5(input.currentSession?.user?.email) ?? "the current account";
18127
- const nextAccount = normalizeOptionalString$5(input.candidate.user.email) ?? "another account";
18228
+ const currentAccount = normalizeOptionalString$6(input.currentSession?.user?.email) ?? "the current account";
18229
+ const nextAccount = normalizeOptionalString$6(input.candidate.user.email) ?? "another account";
18128
18230
  if (!input.interactive || input.resolvedView !== "human") {
18129
18231
  const revoked = await revokePreparedAuthSession(input.candidate);
18130
18232
  throw new Error(`This computer is signed in as ${currentAccount}, but the setup command uses ${nextAccount}. Run the setup command in an interactive Terminal to review and confirm the account switch. The current Computer connection was not changed.${formatComputerAuthCleanupFailureSuffix(revoked)}`);
18131
18233
  }
18132
- const confirmed = await confirm({
18234
+ if (await promptConfirm({
18235
+ activeLabel: "Switch account",
18236
+ inactiveLabel: "Keep current account",
18133
18237
  initialValue: false,
18134
18238
  message: `Switch this computer from ${currentAccount} to ${nextAccount}?`
18135
- });
18136
- if (isCancel(confirmed) || !confirmed) {
18239
+ }) !== "confirmed") {
18137
18240
  input.presenter.line({
18138
18241
  code: "setup.account_switch.cancelled",
18139
18242
  text: "Account switch canceled. The current Computer connection was not changed."
@@ -18153,7 +18256,7 @@ async function restorePreviousComputerAfterFailedHandoff(input) {
18153
18256
  async function restoreLegacyComputerAuthTransition(input) {
18154
18257
  const revoked = await revokePreparedAuthSession(input.candidate);
18155
18258
  if (!revoked.ok) emitUnusedSetupSessionCleanupWarning(input.presenter, revoked.error);
18156
- const previousOwnerUserId = normalizeOptionalString$5(input.transition.previousSession?.user?.id);
18259
+ const previousOwnerUserId = normalizeOptionalString$6(input.transition.previousSession?.user?.id);
18157
18260
  if (!previousOwnerUserId) {
18158
18261
  const stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
18159
18262
  if (stopped.status === "warning") throw new Error(stopped.errorMessage ?? "OpenMeld could not stop the incomplete Computer connection.");
@@ -18175,7 +18278,7 @@ async function restoreLegacyComputerAuthTransition(input) {
18175
18278
  });
18176
18279
  if (restored.status !== "aligned") throw new Error(restored.errorMessage ?? "OpenMeld could not reconnect the previous Computer account.");
18177
18280
  }
18178
- function normalizeOptionalString$5(value) {
18281
+ function normalizeOptionalString$6(value) {
18179
18282
  if (typeof value !== "string") return null;
18180
18283
  const normalized = value.trim();
18181
18284
  return normalized.length > 0 ? normalized : null;
@@ -18201,7 +18304,7 @@ async function runSetupLocalAgentConnection(input) {
18201
18304
  view: runtime.resolvedView
18202
18305
  });
18203
18306
  if (input.humanProfile) throw new Error(RETIRED_HUMAN_PROFILE_SETUP_MESSAGE);
18204
- const deviceCode = normalizeOptionalString$4(input.deviceCode);
18307
+ const deviceCode = normalizeOptionalString$5(input.deviceCode);
18205
18308
  if (input.startSession && deviceCode) return buildPrepareSessionSetupResult(await runComputerAuthorizationHandoff({
18206
18309
  deviceCode,
18207
18310
  interactive,
@@ -18211,7 +18314,7 @@ async function runSetupLocalAgentConnection(input) {
18211
18314
  startSession: input.startSession,
18212
18315
  view: input.view
18213
18316
  }));
18214
- const oneTimeToken = normalizeOptionalString$4(input.ott);
18317
+ const oneTimeToken = normalizeOptionalString$5(input.ott);
18215
18318
  if (input.startSession && oneTimeToken) return buildPrepareSessionSetupResult(await runOneTimeTokenComputerHandoff({
18216
18319
  oneTimeToken,
18217
18320
  interactive,
@@ -18310,7 +18413,7 @@ async function runSetupLocalAgentConnection(input) {
18310
18413
  };
18311
18414
  }
18312
18415
  async function resolveExplicitSetupProfile(profileId) {
18313
- const normalizedProfileId = normalizeOptionalString$4(profileId);
18416
+ const normalizedProfileId = normalizeOptionalString$5(profileId);
18314
18417
  if (!normalizedProfileId) return {
18315
18418
  profile: null,
18316
18419
  resolved: false
@@ -18364,8 +18467,8 @@ function emitSetupLocalAgentConnectionHeader(input) {
18364
18467
  }
18365
18468
  function assertValidSetupLocalAgentConnectionInput(input) {
18366
18469
  const facts = resolveSetupLocalAgentConnectionInputFacts(input);
18367
- if (normalizeOptionalString$4(input.deviceCode) && !facts.hasStartSession) throw new Error("--device-code requires --start-session.");
18368
- if (normalizeOptionalString$4(input.deviceCode) && normalizeOptionalString$4(input.ott)) throw new Error("use either --device-code or --ott, not both");
18470
+ if (normalizeOptionalString$5(input.deviceCode) && !facts.hasStartSession) throw new Error("--device-code requires --start-session.");
18471
+ if (normalizeOptionalString$5(input.deviceCode) && normalizeOptionalString$5(input.ott)) throw new Error("use either --device-code or --ott, not both");
18369
18472
  if (facts.hasStartSession && (facts.hasProfile || facts.hasHumanProfile || facts.hasLocalAgentPreparation)) throw new Error("--start-session cannot be combined with --profile, --human-profile, or --agent.");
18370
18473
  if (!facts.hasStartSession && facts.hasPrepareSessionLocalAgentMode) throw new Error("--local-agents requires --start-session.");
18371
18474
  assertValidLocalAgentSelectionInput({
@@ -18377,14 +18480,14 @@ function assertValidSetupLocalAgentConnectionInput(input) {
18377
18480
  if (facts.hasProfile && facts.hasLocalAgentPreparation) throw new Error("use either --profile <id> or --agent <id...>, not both");
18378
18481
  }
18379
18482
  function resolveStandaloneProfileLocalAgentId(input) {
18380
- if (!normalizeOptionalString$4(input.profile)) return null;
18483
+ if (!normalizeOptionalString$5(input.profile)) return null;
18381
18484
  return normalizeLocalAgentIds(input.localAgent)[0] ?? null;
18382
18485
  }
18383
18486
  function normalizeLocalAgentIds(localAgent) {
18384
- return Array.from(new Set((localAgent ?? []).map((agentId) => normalizeOptionalString$4(agentId)).filter((agentId) => agentId !== null)));
18487
+ return Array.from(new Set((localAgent ?? []).map((agentId) => normalizeOptionalString$5(agentId)).filter((agentId) => agentId !== null)));
18385
18488
  }
18386
18489
  function resolvePrepareSessionLocalAgentSelection(input) {
18387
- const localAgentMode = normalizeOptionalString$4(input.localAgents);
18490
+ const localAgentMode = normalizeOptionalString$5(input.localAgents);
18388
18491
  if (localAgentMode === "all" || localAgentMode === "none") return { mode: localAgentMode };
18389
18492
  const localAgentIds = normalizeLocalAgentIds(input.localAgent);
18390
18493
  if (localAgentIds.length > 0) return {
@@ -18411,7 +18514,7 @@ async function runSetupLocalAgentConnectionServiceGate(input) {
18411
18514
  throw new Error("OpenMeld Service is still reconnecting. Run `openmeld setup` again after OpenMeld Service finishes refreshing.");
18412
18515
  }
18413
18516
  async function maybeLogInWithOneTimeToken$1(input) {
18414
- const oneTimeToken = normalizeOptionalString$4(input.ott);
18517
+ const oneTimeToken = normalizeOptionalString$5(input.ott);
18415
18518
  if (!oneTimeToken) return;
18416
18519
  if (await runAuthLogin({
18417
18520
  ott: oneTimeToken,
@@ -18420,7 +18523,7 @@ async function maybeLogInWithOneTimeToken$1(input) {
18420
18523
  }) !== "completed") throw new Error("OpenMeld sign-in was cancelled before local preparation ran.");
18421
18524
  }
18422
18525
  function resolveSetupLocalAgentConnectionInputFacts(input) {
18423
- const localAgentMode = normalizeOptionalString$4(input.localAgents);
18526
+ const localAgentMode = normalizeOptionalString$5(input.localAgents);
18424
18527
  return {
18425
18528
  hasHumanProfile: typeof input.humanProfile === "string" && input.humanProfile.trim().length > 0,
18426
18529
  hasLocalAgentIds: Array.isArray(input.localAgent) && input.localAgent.length > 0,
@@ -18508,7 +18611,7 @@ function collectReadinessReasonCodes(input) {
18508
18611
  for (const reasonCode of input.agentReplyReadiness?.reasonCodes ?? []) if (!reasonCodes.includes(reasonCode)) reasonCodes.push(reasonCode);
18509
18612
  return reasonCodes;
18510
18613
  }
18511
- function normalizeOptionalString$4(value) {
18614
+ function normalizeOptionalString$5(value) {
18512
18615
  const normalized = String(value ?? "").trim();
18513
18616
  return normalized.length > 0 ? normalized : null;
18514
18617
  }
@@ -19098,10 +19201,10 @@ async function runSetupStartupLocalStateRepair() {
19098
19201
  await runLocalStateAlignment({ mode: "repair" });
19099
19202
  }
19100
19203
  function shouldUseSetupLocalAgentConnection(input) {
19101
- return Boolean(normalizeOptionalString$3(input.startSession) ?? normalizeOptionalString$3(input.humanProfile) ?? normalizeOptionalString$3(input.profile) ?? (input.agent && input.agent.length > 0 ? "agent" : null));
19204
+ return Boolean(normalizeOptionalString$4(input.startSession) ?? normalizeOptionalString$4(input.humanProfile) ?? normalizeOptionalString$4(input.profile) ?? (input.agent && input.agent.length > 0 ? "agent" : null));
19102
19205
  }
19103
19206
  async function maybeLogInWithOneTimeToken(input) {
19104
- const oneTimeToken = normalizeOptionalString$3(input.ott);
19207
+ const oneTimeToken = normalizeOptionalString$4(input.ott);
19105
19208
  if (!oneTimeToken) return;
19106
19209
  if (await runAuthLogin({
19107
19210
  ott: oneTimeToken,
@@ -19110,7 +19213,7 @@ async function maybeLogInWithOneTimeToken(input) {
19110
19213
  }) !== "completed") throw new Error("OpenMeld sign-in was cancelled before setup ran.");
19111
19214
  }
19112
19215
  function resolveSetupLocalAgentIds(input) {
19113
- const localAgentMode = normalizeOptionalString$3(input.localAgents);
19216
+ const localAgentMode = normalizeOptionalString$4(input.localAgents);
19114
19217
  const localAgentIds = [...new Set((input.localAgent ?? []).map((agentId) => agentId.trim()).filter((agentId) => agentId.length > 0))];
19115
19218
  if (localAgentMode && localAgentMode !== "all" && localAgentMode !== "none") throw new Error("--local-agents must be either all or none.");
19116
19219
  if (localAgentMode && localAgentIds.length > 0) throw new Error("use either --local-agents <all|none> or --local-agent <id...>, not both");
@@ -19127,7 +19230,7 @@ function resolveSetupLocalAgentIds(input) {
19127
19230
  return [...selectableById.keys()].sort((left, right) => left.localeCompare(right));
19128
19231
  }
19129
19232
  async function confirmZeroLocalAgentSetupIfNeeded(input) {
19130
- if (input.selectedLocalAgentIds.length > 0 || normalizeOptionalString$3(input.localAgentsMode) === "none") return;
19233
+ if (input.selectedLocalAgentIds.length > 0 || normalizeOptionalString$4(input.localAgentsMode) === "none") return;
19131
19234
  if (input.explicitSelection) {
19132
19235
  emitSetupNoLocalAgentsWarning(input);
19133
19236
  return;
@@ -19335,7 +19438,7 @@ function resolveRuntimeIdentityFromSetupSession(snapshot) {
19335
19438
  };
19336
19439
  }
19337
19440
  function hasExplicitLocalAgentSelection(input) {
19338
- return Boolean(normalizeOptionalString$3(input.localAgents) ?? (input.localAgent && input.localAgent.length > 0 ? "local-agent" : null));
19441
+ return Boolean(normalizeOptionalString$4(input.localAgents) ?? (input.localAgent && input.localAgent.length > 0 ? "local-agent" : null));
19339
19442
  }
19340
19443
  function emitDefaultLocalAgentsNoticeIfNeeded(input) {
19341
19444
  if (input.explicitSelection || input.interactive || input.selectedLocalAgentIds.length === 0) return;
@@ -19601,7 +19704,7 @@ function toErrorMessage$1(error) {
19601
19704
  if (typeof error === "string" && error.trim().length > 0) return error.trim();
19602
19705
  return "Unknown error.";
19603
19706
  }
19604
- function normalizeOptionalString$3(value) {
19707
+ function normalizeOptionalString$4(value) {
19605
19708
  const normalized = String(value ?? "").trim();
19606
19709
  return normalized.length > 0 ? normalized : null;
19607
19710
  }
@@ -21566,7 +21669,7 @@ function buildStartRecapItems() {
21566
21669
  //#endregion
21567
21670
  //#region src/start-shell/notices.ts
21568
21671
  function renderStartWelcome(input) {
21569
- const email = normalizeOptionalString$2(input.session.user?.email) ?? "(unknown)";
21672
+ const email = normalizeOptionalString$3(input.session.user?.email) ?? "(unknown)";
21570
21673
  if (input.runtime.resolvedView === "agent") {
21571
21674
  input.presenter.data({
21572
21675
  code: "start.welcome",
@@ -21580,10 +21683,10 @@ function renderStartWelcome(input) {
21580
21683
  note([`Signed In: ${email}`, `Gateway: ${input.gatewayUrl}`].join("\n"), "Welcome");
21581
21684
  }
21582
21685
  function emitStartCompatibilityNotice(input) {
21583
- const normalizedSkillsMode = normalizeOptionalString$2(input.input.skillsMode)?.toLowerCase();
21686
+ const normalizedSkillsMode = normalizeOptionalString$3(input.input.skillsMode)?.toLowerCase();
21584
21687
  const ignoredFlags = [
21585
- normalizeOptionalString$2(input.input.agentModel) ? "--agent-model" : null,
21586
- normalizeOptionalString$2(input.input.agentOwner) ? "--agent-owner" : null,
21688
+ normalizeOptionalString$3(input.input.agentModel) ? "--agent-model" : null,
21689
+ normalizeOptionalString$3(input.input.agentOwner) ? "--agent-owner" : null,
21587
21690
  normalizedSkillsMode && normalizedSkillsMode !== "auto" ? "--skills-mode" : null
21588
21691
  ].filter((value) => value !== null);
21589
21692
  if (ignoredFlags.length === 0) return;
@@ -21634,7 +21737,7 @@ function emitStartSetupHint(input) {
21634
21737
  text: formatInlineOpenMeldCliCommands("If this computer needs local service or agent setup, run `openmeld setup`.")
21635
21738
  });
21636
21739
  }
21637
- function normalizeOptionalString$2(value) {
21740
+ function normalizeOptionalString$3(value) {
21638
21741
  if (typeof value !== "string") return null;
21639
21742
  const normalized = value.trim();
21640
21743
  return normalized.length > 0 ? normalized : null;
@@ -22077,7 +22180,7 @@ function ensureStartAgentIdentityPreflight(input) {
22077
22180
  }
22078
22181
  function shouldEnsureDefaultHumanProfile(input) {
22079
22182
  if (input.resolvedView !== "human") return false;
22080
- if (normalizeOptionalString$1(input.profileId) ?? normalizeOptionalString$1(input.profile)) return false;
22183
+ if (normalizeOptionalString$2(input.profileId) ?? normalizeOptionalString$2(input.profile)) return false;
22081
22184
  return resolveCreateProfileInputFromArgs(input) === null;
22082
22185
  }
22083
22186
  function renderDefaultHumanProfileCard(input) {
@@ -22175,9 +22278,9 @@ async function resolveStartSelectedProfileFromArguments(input) {
22175
22278
  return { handled: false };
22176
22279
  }
22177
22280
  function resolveExplicitStartProfile(input) {
22178
- const explicitProfileId = normalizeOptionalString$1(input.profileId);
22281
+ const explicitProfileId = normalizeOptionalString$2(input.profileId);
22179
22282
  if (explicitProfileId) return resolveOpenMeldProfile({ openMeldProfileId: explicitProfileId });
22180
- const explicitProfile = normalizeOptionalString$1(input.profile);
22283
+ const explicitProfile = normalizeOptionalString$2(input.profile);
22181
22284
  if (!explicitProfile) return Promise.resolve(null);
22182
22285
  return resolveOpenMeldProfile({ openMeldProfileId: explicitProfile }).catch(async () => {
22183
22286
  const matched = (await listOpenMeldProfiles()).find((profile) => profile.profileName.toLowerCase() === explicitProfile.toLowerCase());
@@ -22287,7 +22390,7 @@ async function resolveInteractiveStartProfileSearchSelection(input) {
22287
22390
  }
22288
22391
  function resolveCreateProfileInputFromArgs(input) {
22289
22392
  const kind = parseStartProfileKind(input.kind);
22290
- const profileName = normalizeOptionalString$1(input.profileName) ?? (kind === "agent" ? normalizeOptionalString$1(input.agentName) : null);
22393
+ const profileName = normalizeOptionalString$2(input.profileName) ?? (kind === "agent" ? normalizeOptionalString$2(input.agentName) : null);
22291
22394
  if (!(kind && profileName)) return null;
22292
22395
  return {
22293
22396
  kind,
@@ -22295,11 +22398,11 @@ function resolveCreateProfileInputFromArgs(input) {
22295
22398
  };
22296
22399
  }
22297
22400
  function inspectStartAgentIdentityInput(input) {
22298
- if (normalizeOptionalString$1(input.profileId) ?? normalizeOptionalString$1(input.profile)) return { status: "valid" };
22299
- const rawKind = normalizeOptionalString$1(input.kind);
22401
+ if (normalizeOptionalString$2(input.profileId) ?? normalizeOptionalString$2(input.profile)) return { status: "valid" };
22402
+ const rawKind = normalizeOptionalString$2(input.kind);
22300
22403
  const parsedKind = parseStartProfileKind(input.kind);
22301
- const rawProfileName = normalizeOptionalString$1(input.profileName);
22302
- const rawAgentName = normalizeOptionalString$1(input.agentName);
22404
+ const rawProfileName = normalizeOptionalString$2(input.profileName);
22405
+ const rawAgentName = normalizeOptionalString$2(input.agentName);
22303
22406
  if (parsedKind === "human") return {
22304
22407
  status: "error",
22305
22408
  summary: "agent view cannot create human profiles. use --kind agent, or switch to human view."
@@ -22499,7 +22602,7 @@ function throwStartAgentIdentityGuide(input) {
22499
22602
  function formatStartProfileKindLabel(profileKind) {
22500
22603
  return profileKind === "agent" ? "AI agent" : "human";
22501
22604
  }
22502
- function normalizeOptionalString$1(value) {
22605
+ function normalizeOptionalString$2(value) {
22503
22606
  const normalized = String(value ?? "").trim();
22504
22607
  return normalized.length > 0 ? normalized : null;
22505
22608
  }
@@ -22973,6 +23076,11 @@ function buildHints(argv, message, error) {
22973
23076
  if (resolveAuthenticationGuidanceFromError(error) !== null || resolveAuthenticationGuidanceFromMessage(message) !== null) return [];
22974
23077
  if (error instanceof DualViewGuideError) return [];
22975
23078
  const contractEntryName = resolveCommandEntryNameFromTokens(parseLeadingCommandTokensFromArgv(argv, 3));
23079
+ const invalidSpaceReadTargetHints = resolveInvalidSpaceReadTargetHints({
23080
+ entryName: resolveCommandEntryNameFromTokens(parseLeadingCommandTokensFromArgv(argv, 2)),
23081
+ message
23082
+ });
23083
+ if (invalidSpaceReadTargetHints) return invalidSpaceReadTargetHints;
22976
23084
  if (contractEntryName) {
22977
23085
  const contractHints = getCommandHintsFromContract({
22978
23086
  context: { agentExampleArg: DEFAULT_AGENT_EXAMPLE_PAIR },
@@ -23003,6 +23111,23 @@ function buildHints(argv, message, error) {
23003
23111
  ];
23004
23112
  return [];
23005
23113
  }
23114
+ function resolveInvalidSpaceReadTargetHints(input) {
23115
+ if (!isInvalidSpaceTargetMessage(input.message)) return null;
23116
+ const command = resolveSpaceReadCommandName(input.entryName);
23117
+ return command ? [`openmeld space ${command} <space-id-or-url>`] : null;
23118
+ }
23119
+ function resolveSpaceReadCommandName(entryName) {
23120
+ switch (entryName) {
23121
+ case "space.board": return "board";
23122
+ case "space.history": return "history";
23123
+ case "space.members": return "members";
23124
+ case "space.status": return "status";
23125
+ default: return null;
23126
+ }
23127
+ }
23128
+ function isInvalidSpaceTargetMessage(message) {
23129
+ return message.includes("invalid space target") || message.includes("Space target must be a 64-character Space ID") || message.includes("Space URL must include /o/<org-slug>/spaces/<space-id>") || message.includes("Space URL must use a trusted OpenMeld Web origin");
23130
+ }
23006
23131
  function isSpaceCommandToken(token) {
23007
23132
  return token === "space" || token === "spaces";
23008
23133
  }
@@ -26564,7 +26689,7 @@ const FINAL_SAFE_STATUSES = /* @__PURE__ */ new Set([
26564
26689
  "needs_input"
26565
26690
  ]);
26566
26691
  const LEADING_AT_PATTERN = /^@/u;
26567
- const TRAILING_RELATION_PATTERN = /\((wake|reference)\)$/iu;
26692
+ const TRAILING_RELATION_PATTERN = /\((wake|reference|mention)\)$/iu;
26568
26693
  const WHITESPACE_PATTERN = /\s+/g;
26569
26694
  const DISPATCH_ACTION_CLI_PLACEHOLDER = "<DISPATCH_ACTION_CLI>";
26570
26695
  const SPACE_ACTION_REPLY_TIMING_EVENT = "openmeld.space_action.reply_timing";
@@ -26573,6 +26698,7 @@ function runSpaceActionReply(input) {
26573
26698
  const result = recordDispatchSpaceReply({
26574
26699
  filePaths: input.filePaths,
26575
26700
  messagePartCount: input.messageParts.length,
26701
+ mentionTargets: input.mentionTargets,
26576
26702
  referenceTargets: input.referenceTargets,
26577
26703
  text,
26578
26704
  wakeTargets: input.wakeTargets
@@ -26586,6 +26712,7 @@ function recordDispatchSpaceReply(input) {
26586
26712
  const timing = createSpaceActionReplyTiming();
26587
26713
  timing.emit("command_start", void 0, {
26588
26714
  messagePartCount: input.messagePartCount ?? 0,
26715
+ mentionTargetCount: input.mentionTargets?.length ?? 0,
26589
26716
  referenceTargetCount: input.referenceTargets?.length ?? 0,
26590
26717
  wakeTargetCount: input.wakeTargets?.length ?? 0
26591
26718
  });
@@ -26596,12 +26723,14 @@ function recordDispatchSpaceReply(input) {
26596
26723
  assertNoRemovedCcSpaceAddressingSyntax(text);
26597
26724
  const targetIds = resolveMessageEnvelopeTargetIds({
26598
26725
  context,
26726
+ mentionTargets: input.mentionTargets ?? [],
26599
26727
  wakeTargets: input.wakeTargets ?? [],
26600
26728
  referenceTargets: input.referenceTargets ?? []
26601
26729
  });
26602
26730
  timing.emit("targets_resolved", context, {
26603
26731
  activationTargetCount: targetIds.activationTargets.length,
26604
26732
  messageLength: text.length,
26733
+ mentionTargetCount: targetIds.mentionTargets.length,
26605
26734
  referenceTargetCount: targetIds.referenceTargets.length
26606
26735
  });
26607
26736
  const filePaths = input.filePaths ?? [];
@@ -26644,6 +26773,7 @@ function writeSpaceActionReplyRecord(input) {
26644
26773
  ...input.files.length > 0 ? { files: [...input.files] } : {},
26645
26774
  messageEnvelope: {
26646
26775
  activationTargets: input.targetIds.activationTargets,
26776
+ mentionTargets: input.targetIds.mentionTargets,
26647
26777
  referenceTargets: input.targetIds.referenceTargets,
26648
26778
  ...input.context.replyToSignalId ? { replyToSignalId: input.context.replyToSignalId } : {},
26649
26779
  text: input.text
@@ -26684,6 +26814,7 @@ function runSpaceActionWake(input) {
26684
26814
  relation: "wake",
26685
26815
  targets: [input.target]
26686
26816
  }),
26817
+ mentionTargets: [],
26687
26818
  referenceTargets: [],
26688
26819
  ...context.replyToSignalId ? { replyToSignalId: context.replyToSignalId } : {},
26689
26820
  text
@@ -26731,10 +26862,15 @@ function runSpaceActionTargets() {
26731
26862
  const targetReference = requireLoadedTargets(readDispatchSpaceActionContextFromEnv().sendTargetReference);
26732
26863
  const wakeTargets = targetReference.projection.filter((target) => target.allowedRelations.wake);
26733
26864
  const referenceTargets = targetReference.projection.filter((target) => target.allowedRelations.reference);
26865
+ const mentionTargets = targetReference.projection.filter((target) => target.allowedRelations.mention);
26734
26866
  outLine("Wake targets:");
26735
26867
  if (wakeTargets.length === 0) outLine("- none");
26736
26868
  else for (const target of wakeTargets) outLine(`- ${formatTargetLine(target, "wake")}`);
26737
26869
  outLine("");
26870
+ outLine("Mention targets:");
26871
+ if (mentionTargets.length === 0) outLine("- none");
26872
+ else for (const target of mentionTargets) outLine(`- ${formatTargetLine(target, "mention")}`);
26873
+ outLine("");
26738
26874
  outLine("Reference targets:");
26739
26875
  if (referenceTargets.length === 0) outLine("- none");
26740
26876
  else for (const target of referenceTargets) outLine(`- ${formatTargetLine(target, "reference")}`);
@@ -26750,7 +26886,8 @@ function runSpaceActionHelp() {
26750
26886
  outLine(formatSpaceActionHelpExample("Reply", "reply \"message\"", context));
26751
26887
  outLine(formatSpaceActionHelpExample("Handoff and wake another agent", "wake \"@Agent Name\" \"summary and request\"", context));
26752
26888
  outLine(formatSpaceActionHelpExample("Reply and also wake another agent", "reply --wake \"@Agent Name\" \"message\"", context));
26753
- outLine(formatSpaceActionHelpExample("Reply and reference another profile", "reply --reference \"@Agent Name\" \"message\"", context));
26889
+ outLine(formatSpaceActionHelpExample("Reply and reference another agent", "reply --reference \"@Agent Name\" \"message\"", context));
26890
+ outLine(formatSpaceActionHelpExample("Reply and mention a person", "reply --mention \"@Person Name\" \"message\"", context));
26754
26891
  outLine(formatSpaceActionHelpExample("Final status", "status done \"short completion update\"", context));
26755
26892
  outLine(formatSpaceActionHelpExample("Stay silent", "silent --reason \"No public reply is needed.\"", context));
26756
26893
  outLine(formatSpaceActionHelpExample("Current targets", "targets", context));
@@ -26811,6 +26948,11 @@ function resolveMessageEnvelopeTargetIds(input) {
26811
26948
  relation: "wake",
26812
26949
  targets: input.wakeTargets
26813
26950
  }),
26951
+ mentionTargets: resolveTargetProfileIds({
26952
+ context: input.context,
26953
+ relation: "mention",
26954
+ targets: input.mentionTargets
26955
+ }),
26814
26956
  referenceTargets: resolveTargetProfileIds({
26815
26957
  context: input.context,
26816
26958
  relation: "reference",
@@ -26822,7 +26964,11 @@ function resolveMessageEnvelopeTargetIds(input) {
26822
26964
  }
26823
26965
  function assertDistinctMessageEnvelopeTargets(input) {
26824
26966
  const seen = /* @__PURE__ */ new Map();
26825
- const relationTargets = [["wake", input.activationTargets], ["reference", input.referenceTargets]];
26967
+ const relationTargets = [
26968
+ ["wake", input.activationTargets],
26969
+ ["reference", input.referenceTargets],
26970
+ ["mention", input.mentionTargets]
26971
+ ];
26826
26972
  for (const [relation, profileIds] of relationTargets) for (const profileId of profileIds) {
26827
26973
  const existingRelation = seen.get(profileId);
26828
26974
  if (!existingRelation) {
@@ -26914,9 +27060,10 @@ function createSpaceActionMcpServer() {
26914
27060
  }, { instructions: "Choose exactly one final OpenMeld Space Action for the current Wake. Use reply for the exact public message, status for a final visible status, or stay_silent when no public message is needed. Private assistant output is not posted to the Space." });
26915
27061
  server.registerTool("reply", {
26916
27062
  title: "Reply in the current OpenMeld Space",
26917
- description: "Record the exact final public reply for the active OpenMeld Wake. Use real newline characters for paragraph breaks. Optionally wake or reference current Space targets by mention label or profile ID.",
27063
+ description: "Record the exact final public reply for the active OpenMeld Wake. Use real newline characters for paragraph breaks. Optionally wake or reference an Agent, or mention a person, by mention label or profile ID.",
26918
27064
  inputSchema: {
26919
27065
  message: z.string().min(1),
27066
+ mentionTargets: z.array(z.string().min(1)).optional(),
26920
27067
  referenceTargets: z.array(z.string().min(1)).optional(),
26921
27068
  wakeTargets: z.array(z.string().min(1)).optional()
26922
27069
  },
@@ -26926,7 +27073,8 @@ function createSpaceActionMcpServer() {
26926
27073
  openWorldHint: false,
26927
27074
  readOnlyHint: false
26928
27075
  }
26929
- }, async ({ message, referenceTargets, wakeTargets }) => executeSpaceAction(() => recordDispatchSpaceReply({
27076
+ }, async ({ mentionTargets, message, referenceTargets, wakeTargets }) => executeSpaceAction(() => recordDispatchSpaceReply({
27077
+ mentionTargets,
26930
27078
  referenceTargets,
26931
27079
  text: message,
26932
27080
  wakeTargets
@@ -26982,17 +27130,67 @@ async function executeSpaceAction(action) {
26982
27130
  }
26983
27131
  }
26984
27132
  //#endregion
26985
- //#region src/space/add-me-command.ts
27133
+ //#region src/space/space-target.ts
26986
27134
  const SPACE_ID_HEX_REGEX = /^[0-9a-f]{64}$/i;
27135
+ const INVALID_SPACE_TARGET_MESSAGE = "Space target must be a 64-character Space ID or an OpenMeld Space URL.";
27136
+ function parseSpaceTarget(value, options) {
27137
+ const explicitBaseUrl = normalizeOptionalString$1(options?.baseUrl);
27138
+ return {
27139
+ ...parseSpaceTargetValue(value, !explicitBaseUrl),
27140
+ ...explicitBaseUrl ? { baseUrl: explicitBaseUrl } : {}
27141
+ };
27142
+ }
27143
+ function parseSpaceTargetValue(value, deriveBaseUrl) {
27144
+ const raw = normalizeOptionalString$1(value);
27145
+ if (!raw) throw new Error(INVALID_SPACE_TARGET_MESSAGE);
27146
+ if (SPACE_ID_HEX_REGEX.test(raw)) return { spaceId: raw };
27147
+ const isPathOnly = raw.startsWith("/");
27148
+ let url;
27149
+ let segments;
27150
+ try {
27151
+ url = isPathOnly ? new URL(raw, "https://openmeld.ai") : new URL(raw);
27152
+ segments = url.pathname.split("/").map((segment) => decodeURIComponent(segment.trim())).filter((segment) => segment.length > 0);
27153
+ } catch {
27154
+ throw new Error(INVALID_SPACE_TARGET_MESSAGE);
27155
+ }
27156
+ const spacesIndex = segments.indexOf("spaces");
27157
+ const spaceId = spacesIndex >= 0 ? segments[spacesIndex + 1] : void 0;
27158
+ if (!(spaceId && SPACE_ID_HEX_REGEX.test(spaceId))) throw new Error("Space URL must include /o/<org-slug>/spaces/<space-id> with a full 64-character Space ID. Legacy /spaces/<space-id> and /app/spaces/<space-id> inputs are still accepted.");
27159
+ const profileId = normalizeOptionalString$1(url.searchParams.get("profileId"));
27160
+ return {
27161
+ spaceId,
27162
+ ...profileId ? { profileId } : {},
27163
+ ...isPathOnly || !deriveBaseUrl ? {} : { baseUrl: resolveSpaceWebGatewayOrigin(url) }
27164
+ };
27165
+ }
27166
+ function resolveSpaceReadCommandTarget(input) {
27167
+ const target = parseSpaceTarget(input.space, { baseUrl: input.baseUrl });
27168
+ const profile = normalizeOptionalString$1(input.profile) ?? target.profileId;
27169
+ return {
27170
+ space: target.spaceId,
27171
+ ...target.baseUrl ? { baseUrl: target.baseUrl } : {},
27172
+ ...profile ? { profile } : {}
27173
+ };
27174
+ }
27175
+ function normalizeOptionalString$1(value) {
27176
+ if (typeof value !== "string") return null;
27177
+ const normalized = value.trim();
27178
+ return normalized.length > 0 ? normalized : null;
27179
+ }
27180
+ //#endregion
27181
+ //#region src/space/add-me-command.ts
26987
27182
  const SHELL_SAFE_ARG_REGEX = /^[A-Za-z0-9_./:=@%+-]+$/u;
26988
- const TRAILING_SLASH_REGEX = /\/$/u;
26989
27183
  async function runSpaceAddMe(input) {
26990
- const target = parseSpaceAddMeTarget(input.space);
27184
+ const modelSelection = normalizeModelSelectionInput({
27185
+ model: input.model,
27186
+ reasoningEffort: input.reasoningEffort
27187
+ });
27188
+ const target = parseSpaceAddMeTarget(input.space, { baseUrl: input.baseUrl });
26991
27189
  const profile = resolveSpaceAddMeActingProfileId({
26992
27190
  cliProfileId: input.profile,
26993
27191
  urlProfileId: target.profileId
26994
27192
  });
26995
- const baseUrl = input.baseUrl ?? target.baseUrl;
27193
+ const baseUrl = target.baseUrl;
26996
27194
  const hasExplicitBaseUrlInput = normalizeOptionalString(baseUrl) !== null;
26997
27195
  const context = await prepareAuthenticatedSpaceCommandContext({
26998
27196
  profile,
@@ -27018,6 +27216,7 @@ async function runSpaceAddMe(input) {
27018
27216
  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.");
27019
27217
  const addMembers = input.addMembers ?? runDefaultSpaceAddMeMembership;
27020
27218
  if (detectedSubject.kind === "human") {
27219
+ 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.");
27021
27220
  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.");
27022
27221
  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.`);
27023
27222
  const status = await addMembers({
@@ -27075,6 +27274,7 @@ async function runSpaceAddMe(input) {
27075
27274
  baseUrl: resolvedBaseUrl,
27076
27275
  controllerPermissionMode: controllerPermissionMode.agentControllerPermissionMode ?? null,
27077
27276
  detectedSubject,
27277
+ modelSelection,
27078
27278
  projectFolder,
27079
27279
  spaceId: target.spaceId
27080
27280
  })
@@ -27117,28 +27317,7 @@ async function runSpaceAddMe(input) {
27117
27317
  });
27118
27318
  return "completed";
27119
27319
  }
27120
- function parseSpaceAddMeTarget(value) {
27121
- const raw = normalizeOptionalString(value);
27122
- if (!raw) throw new Error("Space ID or Space URL is required.");
27123
- if (SPACE_ID_HEX_REGEX.test(raw)) return { spaceId: raw };
27124
- const isPathOnly = raw.startsWith("/");
27125
- let url;
27126
- try {
27127
- url = isPathOnly ? new URL(raw, "https://openmeld.ai") : new URL(raw);
27128
- } catch {
27129
- throw new Error("Space target must be a 64-character Space ID or an OpenMeld Space URL.");
27130
- }
27131
- const segments = url.pathname.split("/").map((segment) => decodeURIComponent(segment.trim())).filter((segment) => segment.length > 0);
27132
- const spacesIndex = segments.indexOf("spaces");
27133
- const spaceId = spacesIndex >= 0 ? segments[spacesIndex + 1] : void 0;
27134
- if (!(spaceId && SPACE_ID_HEX_REGEX.test(spaceId))) throw new Error("Space URL must include /o/<org-slug>/spaces/<space-id> with a full 64-character Space ID. Legacy /spaces/<space-id> and /app/spaces/<space-id> inputs are still accepted.");
27135
- const profileId = normalizeOptionalString(url.searchParams.get("profileId"));
27136
- return {
27137
- spaceId,
27138
- ...profileId ? { profileId } : {},
27139
- ...isPathOnly ? {} : { baseUrl: deriveGatewayUrlFromSpaceUrl(url) }
27140
- };
27141
- }
27320
+ const parseSpaceAddMeTarget = parseSpaceTarget;
27142
27321
  function resolveSpaceAddMeActingProfileId(input) {
27143
27322
  const cliProfileId = normalizeOptionalString(input.cliProfileId);
27144
27323
  const urlProfileId = normalizeOptionalString(input.urlProfileId);
@@ -27190,13 +27369,14 @@ async function ensureCurrentAgentProfile(input) {
27190
27369
  profile: match.profile,
27191
27370
  projectFolder: input.projectFolder.path
27192
27371
  });
27193
- if (input.controllerPermissionMode) await updateAgentProfilePrimaryBindingAgentControllerPermissionMode({
27194
- agentControllerPermissionMode: input.controllerPermissionMode,
27372
+ const bindingUpdate = await updateExistingAgentProfileBinding({
27373
+ controllerPermissionMode: input.controllerPermissionMode,
27374
+ modelSelection: input.modelSelection,
27195
27375
  profile: match.profile
27196
27376
  });
27197
27377
  return {
27198
- bindingOutcome: input.controllerPermissionMode ? "updated" : "reused",
27199
- bindingStatus: match.report.bindingState,
27378
+ bindingOutcome: bindingUpdate.updated ? "updated" : "reused",
27379
+ bindingStatus: bindingUpdate.status ?? match.report.bindingState,
27200
27380
  profile: match.profile,
27201
27381
  profileAction: "reused",
27202
27382
  projectFolderAction
@@ -27222,6 +27402,10 @@ async function ensureCurrentAgentProfile(input) {
27222
27402
  const binding = await ensureAgentProfileRuntimeBinding({
27223
27403
  agentControllerConversationId: input.detectedSubject.agentControllerConversationId,
27224
27404
  ...input.controllerPermissionMode ? { agentControllerPermissionMode: input.controllerPermissionMode } : {},
27405
+ ...input.modelSelection.modelId ? {
27406
+ modelId: input.modelSelection.modelId,
27407
+ ...input.modelSelection.reasoningLevel ? { reasoningLevel: input.modelSelection.reasoningLevel } : {}
27408
+ } : {},
27225
27409
  confirmLocalExecutionEvidence: false,
27226
27410
  profile,
27227
27411
  runtimeReportSubmission
@@ -27235,6 +27419,26 @@ async function ensureCurrentAgentProfile(input) {
27235
27419
  projectFolderAction: "created"
27236
27420
  };
27237
27421
  }
27422
+ async function updateExistingAgentProfileBinding(input) {
27423
+ if (input.controllerPermissionMode) await updateAgentProfilePrimaryBindingAgentControllerPermissionMode({
27424
+ agentControllerPermissionMode: input.controllerPermissionMode,
27425
+ profile: input.profile
27426
+ });
27427
+ if (!input.modelSelection.modelId) return {
27428
+ status: null,
27429
+ updated: Boolean(input.controllerPermissionMode)
27430
+ };
27431
+ const binding = await updateAgentProfilePrimaryBindingModelSelection({
27432
+ modelId: input.modelSelection.modelId,
27433
+ profile: input.profile,
27434
+ reasoningLevel: input.modelSelection.reasoningLevel
27435
+ });
27436
+ if (binding.status !== "accepted") throw new Error(`Agent Profile Binding model update failed: ${binding.reasonCodes.join(", ")}`);
27437
+ return {
27438
+ status: binding.status,
27439
+ updated: true
27440
+ };
27441
+ }
27238
27442
  async function findAgentProfileByControllerConversation(input) {
27239
27443
  const profiles = (await listOpenMeldProfiles()).filter((profile) => profile.profileKind === "agent" && profile.status === "active");
27240
27444
  const bindingReads = createPrimaryBindingReadSession({ baseUrl: input.baseUrl });
@@ -27393,28 +27597,13 @@ function buildAgentProfileName(input) {
27393
27597
  const projectName = basename(input.projectFolder) || input.projectFolder;
27394
27598
  return `${input.detectedSubject.label} - ${projectName}`;
27395
27599
  }
27396
- function deriveGatewayUrlFromSpaceUrl(url) {
27397
- const gatewayUrl = new URL(url.toString());
27398
- gatewayUrl.pathname = "/";
27399
- gatewayUrl.search = "";
27400
- gatewayUrl.hash = "";
27401
- if (gatewayUrl.hostname === "openmeld.ai") {
27402
- gatewayUrl.hostname = "gateway.openmeld.ai";
27403
- gatewayUrl.protocol = "https:";
27404
- gatewayUrl.port = "";
27405
- } else if (isLoopbackHostname(gatewayUrl.hostname) && gatewayUrl.port === "3000") gatewayUrl.port = "8080";
27406
- return gatewayUrl.toString().replace(TRAILING_SLASH_REGEX, "");
27407
- }
27408
- function isLoopbackHostname(hostname) {
27409
- return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1";
27410
- }
27411
27600
  function normalizeOptionalString(value) {
27412
27601
  if (typeof value !== "string") return null;
27413
27602
  const normalized = value.trim();
27414
27603
  return normalized.length > 0 ? normalized : null;
27415
27604
  }
27416
27605
  async function runDefaultSpaceAddMeMembership(input) {
27417
- const { runSpaceAddMeMembership } = await import("./add-me-membership-BNNtDZYW.js");
27606
+ const { runSpaceAddMeMembership } = await import("./add-me-membership-BZ9GEg6y.js");
27418
27607
  return await runSpaceAddMeMembership(input);
27419
27608
  }
27420
27609
  //#endregion
@@ -28855,7 +29044,11 @@ function emitSpaceMembersAgentOutput(input) {
28855
29044
  }
28856
29045
  function formatMemberAddressing(member) {
28857
29046
  const mentionLabel = sanitizeTerminalDisplayText(member.primaryMentionLabel, "single-line");
28858
- const relations = [...member.allowedRelations.wake ? [`@${mentionLabel}(wake)`] : [], ...member.allowedRelations.reference ? [`@${mentionLabel}(reference)`] : []];
29047
+ const relations = [
29048
+ ...member.allowedRelations.wake ? [`@${mentionLabel}(wake)`] : [],
29049
+ ...member.allowedRelations.reference ? [`@${mentionLabel}(reference)`] : [],
29050
+ ...member.allowedRelations.mention ? [`@${mentionLabel}(mention)`] : []
29051
+ ];
28859
29052
  return relations.length > 0 ? relations.join(", ") : "no message addressing available";
28860
29053
  }
28861
29054
  //#endregion
@@ -29129,9 +29322,9 @@ async function promptSpaceMenuGuide() {
29129
29322
  value: value.length > 0 ? value : void 0
29130
29323
  };
29131
29324
  }
29132
- async function promptSpaceMenuCreatePassword() {
29325
+ async function promptSpaceMenuCreatePassword(visibility) {
29133
29326
  for (;;) {
29134
- const promptConfig = buildCreateSpacePasswordPromptConfig();
29327
+ const promptConfig = buildCreateSpacePasswordPromptConfig(visibility);
29135
29328
  const action = await select({
29136
29329
  message: promptConfig.message,
29137
29330
  options: [
@@ -29243,7 +29436,7 @@ async function promptSpaceMenuCreateDetails(input) {
29243
29436
  }
29244
29437
  async function promptSpaceMenuCreateOptions(input) {
29245
29438
  for (;;) {
29246
- const password = await promptSpaceMenuCreatePassword();
29439
+ const password = await promptSpaceMenuCreatePassword(input.visibility);
29247
29440
  if (password.status === "cancelled") return cancelSpaceMenuFlow();
29248
29441
  if (password.status === "back") return { status: "back" };
29249
29442
  const join = await promptSpaceMenuJoinAfterCreate();
@@ -29552,11 +29745,14 @@ async function fetchSpaceDispatchResult(input) {
29552
29745
  const raw = await readGatewayTextResponse({ response: await fetchSpaceRequestWithTimeout({
29553
29746
  url: endpoint.toString(),
29554
29747
  operation: "space.result.read",
29555
- init: { headers: await buildOpenMeldRequestContextHeadersWithAuth({
29556
- requestUrl: endpoint.toString(),
29557
- requestContext: input.requestContext,
29558
- spacePassword: input.password
29559
- }) }
29748
+ init: { headers: {
29749
+ ...await buildOpenMeldRequestContextHeadersWithAuth({
29750
+ requestUrl: endpoint.toString(),
29751
+ requestContext: input.requestContext,
29752
+ spacePassword: input.password
29753
+ }),
29754
+ [OPENMELD_HEADER_SPACE_ADDRESSING_VERSION]: "1"
29755
+ } }
29560
29756
  }) });
29561
29757
  const parsed = getSpaceDispatchResultResponseSchema.safeParse(parseJsonResponse(raw));
29562
29758
  if (!parsed.success) throw new Error("invalid space dispatch result response");
@@ -29726,13 +29922,20 @@ function buildSpaceDispatchResultCardRows(input) {
29726
29922
  ];
29727
29923
  }
29728
29924
  function buildDispatchResultRelationRows(messageReadProjection) {
29729
- return [...messageReadProjection.wakeTargets.length > 0 ? [{
29730
- label: pc.dim("Wake"),
29731
- value: pc.bold(formatHumanReadTargetList(messageReadProjection.wakeTargets))
29732
- }] : [], ...messageReadProjection.referenceTargets.length > 0 ? [{
29733
- label: pc.dim("Reference"),
29734
- value: pc.bold(formatHumanReadTargetList(messageReadProjection.referenceTargets))
29735
- }] : []];
29925
+ return [
29926
+ ...messageReadProjection.wakeTargets.length > 0 ? [{
29927
+ label: pc.dim("Wake"),
29928
+ value: pc.bold(formatHumanReadTargetList(messageReadProjection.wakeTargets))
29929
+ }] : [],
29930
+ ...messageReadProjection.referenceTargets.length > 0 ? [{
29931
+ label: pc.dim("Reference"),
29932
+ value: pc.bold(formatHumanReadTargetList(messageReadProjection.referenceTargets))
29933
+ }] : [],
29934
+ ...messageReadProjection.mentionTargets.length > 0 ? [{
29935
+ label: pc.dim("Mention"),
29936
+ value: pc.bold(formatHumanReadTargetList(messageReadProjection.mentionTargets))
29937
+ }] : []
29938
+ ];
29736
29939
  }
29737
29940
  function emitSpaceDispatchResultTextBlock(input) {
29738
29941
  const normalizedText = sanitizeTerminalDisplayText(input.text, "multi-line");
@@ -32267,10 +32470,10 @@ serviceCmd.command("trace").description("Read a Space delivery trace for debuggi
32267
32470
  profile: opts.profile,
32268
32471
  gatewayUrl: opts.gatewayUrl,
32269
32472
  run: async () => {
32270
- const dispatchId = normalizeOptionalString$15(opts.dispatch);
32271
- const sourceSignalId = normalizeOptionalString$15(opts.sourceSignal);
32272
- const clientMessageId = normalizeOptionalString$15(opts.clientMessage);
32273
- const targetProfileId = normalizeOptionalString$15(opts.targetProfile);
32473
+ const dispatchId = normalizeOptionalString$17(opts.dispatch);
32474
+ const sourceSignalId = normalizeOptionalString$17(opts.sourceSignal);
32475
+ const clientMessageId = normalizeOptionalString$17(opts.clientMessage);
32476
+ const targetProfileId = normalizeOptionalString$17(opts.targetProfile);
32274
32477
  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");
32275
32478
  await runServiceTrace({
32276
32479
  profile: opts.profile,
@@ -32428,11 +32631,12 @@ registerSpaceFilesCommands(spaceCmd);
32428
32631
  const spaceActionCmd = spaceCmd.command("action").description("Record a dispatch-scoped OpenMeld Space Action.").action(async () => {
32429
32632
  await runSpaceActionHelp();
32430
32633
  });
32431
- spaceActionCmd.command("reply").description("Record a final Space reply for the current dispatch.").argument("[message...]", "Reply message").option("--message-file <path>", "Read the UTF-8 reply message from a file; use - for stdin").option("--wake <target>", "Wake another Agent Profile with this reply", collectRepeatedOptionValue, []).option("--reference <target>", "Reference a Human or Agent Profile", collectRepeatedOptionValue, []).option("--file <path>", "Share a local file in this Space reply", collectRepeatedOptionValue, []).action(async (messageParts, opts) => {
32634
+ spaceActionCmd.command("reply").description("Record a final Space reply for the current dispatch.").argument("[message...]", "Reply message").option("--message-file <path>", "Read the UTF-8 reply message from a file; use - for stdin").option("--wake <target>", "Wake another Agent Profile with this reply", collectRepeatedOptionValue, []).option("--reference <target>", "Reference an Agent Profile", collectRepeatedOptionValue, []).option("--mention <target>", "Mention a Human Profile", collectRepeatedOptionValue, []).option("--file <path>", "Share a local file in this Space reply", collectRepeatedOptionValue, []).action(async (messageParts, opts) => {
32432
32635
  await runSpaceActionReply({
32433
32636
  filePaths: Array.isArray(opts.file) ? opts.file : [],
32434
32637
  messageFilePath: typeof opts.messageFile === "string" ? opts.messageFile : void 0,
32435
32638
  messageParts: Array.isArray(messageParts) ? messageParts : [],
32639
+ mentionTargets: Array.isArray(opts.mention) ? opts.mention : [],
32436
32640
  wakeTargets: Array.isArray(opts.wake) ? opts.wake : [],
32437
32641
  referenceTargets: Array.isArray(opts.reference) ? opts.reference : []
32438
32642
  });
@@ -32461,7 +32665,7 @@ spaceActionCmd.command("help").description("Show OpenMeld Space Action help.").a
32461
32665
  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) => {
32462
32666
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
32463
32667
  const view = getGlobalViewOption();
32464
- if (view === "agent" && (normalizeOptionalString$15(opts.name) === null || normalizeOptionalString$15(opts.visibility) === null)) {
32668
+ if (view === "agent" && (normalizeOptionalString$17(opts.name) === null || normalizeOptionalString$17(opts.visibility) === null)) {
32465
32669
  await runSpaceCreate({
32466
32670
  profile: cliOptions.profile,
32467
32671
  baseUrl: cliOptions.gatewayUrl,
@@ -32521,7 +32725,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
32521
32725
  const localEcho = opts.noLocalEcho !== true;
32522
32726
  const view = getGlobalViewOption();
32523
32727
  if (opts.selfServe === true) {
32524
- const spaceValue = normalizeOptionalString$15(space);
32728
+ const spaceValue = normalizeOptionalString$17(space);
32525
32729
  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" });
32526
32730
  await runCommandWithEntryChecks({
32527
32731
  routeTokens: [
@@ -32545,7 +32749,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
32545
32749
  });
32546
32750
  return;
32547
32751
  }
32548
- if (view === "agent" && normalizeOptionalString$15(space) === null) {
32752
+ if (view === "agent" && normalizeOptionalString$17(space) === null) {
32549
32753
  await runSpaceJoin({
32550
32754
  profile: cliOptions.profile,
32551
32755
  baseUrl: cliOptions.gatewayUrl,
@@ -32597,8 +32801,8 @@ withSpaceProfileOption(spaceCmd.command("wake-progress").description("Read live
32597
32801
  profile: cliOptions.profile,
32598
32802
  baseUrl: cliOptions.gatewayUrl,
32599
32803
  space: String(space),
32600
- clientMessageId: normalizeOptionalString$15(opts.clientMessage) ?? void 0,
32601
- targetProfileId: normalizeOptionalString$15(opts.targetProfile) ?? void 0,
32804
+ clientMessageId: normalizeOptionalString$17(opts.clientMessage) ?? void 0,
32805
+ targetProfileId: normalizeOptionalString$17(opts.targetProfile) ?? void 0,
32602
32806
  password: cliOptions.password,
32603
32807
  view,
32604
32808
  entryChecksHandled: true
@@ -32619,10 +32823,10 @@ withSpaceProfileOption(spaceCmd.command("wake-stop").description("Request Stop f
32619
32823
  profile: cliOptions.profile,
32620
32824
  baseUrl: cliOptions.gatewayUrl,
32621
32825
  space: String(space),
32622
- clientMessageId: normalizeOptionalString$15(opts.clientMessage) ?? void 0,
32623
- sourceSignalId: normalizeOptionalString$15(opts.sourceSignal) ?? void 0,
32826
+ clientMessageId: normalizeOptionalString$17(opts.clientMessage) ?? void 0,
32827
+ sourceSignalId: normalizeOptionalString$17(opts.sourceSignal) ?? void 0,
32624
32828
  targetProfileId: String(opts.targetProfile),
32625
- reason: normalizeOptionalString$15(opts.reason) ?? void 0,
32829
+ reason: normalizeOptionalString$17(opts.reason) ?? void 0,
32626
32830
  password: cliOptions.password,
32627
32831
  view,
32628
32832
  entryChecksHandled: true
@@ -32630,7 +32834,7 @@ withSpaceProfileOption(spaceCmd.command("wake-stop").description("Request Stop f
32630
32834
  }
32631
32835
  });
32632
32836
  });
32633
- 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) => {
32837
+ 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) => {
32634
32838
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
32635
32839
  const view = getGlobalViewOption();
32636
32840
  await runCommandWithEntryChecks({
@@ -32654,6 +32858,8 @@ withSpaceProfileOption(spaceCmd.command("add-me").description("Add me to this Sp
32654
32858
  confirmDangerousAgentControllerPermissionMode: opts.confirmDangerousAgentControllerPermissionMode === true,
32655
32859
  details: opts.details === true,
32656
32860
  json: opts.json === true,
32861
+ model: opts.model,
32862
+ reasoningEffort: opts.reasoningEffort,
32657
32863
  view,
32658
32864
  entryChecksHandled: true
32659
32865
  });
@@ -32840,7 +33046,7 @@ withSpaceProfileOption(spaceCmd.command("watch").description("Watch a space in r
32840
33046
  }
32841
33047
  });
32842
33048
  });
32843
- withSpaceProfileOption(spaceCmd.command("send").description("Send one message to a Space.").argument("[space]", "Space ID (64-character hex)").argument("[text...]", "Text to send").option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(reference) mentions", false).option("--reply-to <signal-id>", "Reply into the thread of a message (creates the thread if it does not exist yet)").option("--password <value>", "Space password for protected access")).action(async (space, textParts, opts, command) => {
33049
+ withSpaceProfileOption(spaceCmd.command("send").description("Send one message to a Space.").argument("[space]", "Space ID (64-character hex)").argument("[text...]", "Text to send").option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake), @Name(reference), or @Name(mention) addressing", false).option("--reply-to <signal-id>", "Reply into the thread of a message (creates the thread if it does not exist yet)").option("--password <value>", "Space password for protected access")).action(async (space, textParts, opts, command) => {
32844
33050
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
32845
33051
  const spaceValue = String(space ?? "").trim();
32846
33052
  const outputView = await resolveEffectiveViewForOutput();
@@ -32873,7 +33079,7 @@ withSpaceProfileOption(spaceCmd.command("send").description("Send one message to
32873
33079
  }
32874
33080
  });
32875
33081
  });
32876
- withSpaceProfileOption(spaceCmd.command("history").description("Read recent or anchored space history.").argument("[space]", "Space ID (64-character hex)").option("--limit <n>", "Max items (default: 20)").option("--after-signal <signal-id>", "Read history strictly after one signal").option("--around-signal <signal-id>", "Read a local context window around one signal").option("--before <n>", "Context items before --around-signal anchor (requires --around-signal)").option("--after <n>", "Context items after --around-signal anchor (requires --around-signal)").option("--from-profile <profile-id>", "Filter history to one sender profile ID (repeatable)", collectRepeatedOptionValue, []).option("--kind <text|status|system_notice>", "Filter history to one public signal kind (repeatable)", (value, previous = []) => {
33082
+ withSpaceProfileOption(spaceCmd.command("history").description("Read recent or anchored space history.").argument("[space]", "Space URL or 64-character Space ID").option("--limit <n>", "Max items (default: 20)").option("--after-signal <signal-id>", "Read history strictly after one signal").option("--around-signal <signal-id>", "Read a local context window around one signal").option("--before <n>", "Context items before --around-signal anchor (requires --around-signal)").option("--after <n>", "Context items after --around-signal anchor (requires --around-signal)").option("--from-profile <profile-id>", "Filter history to one sender profile ID (repeatable)", collectRepeatedOptionValue, []).option("--kind <text|status|system_notice>", "Filter history to one public signal kind (repeatable)", (value, previous = []) => {
32877
33083
  return [...previous, parseSpaceHistoryKindOption(value)];
32878
33084
  }, []).option("--brief", "Print compact message-only JSON for quick agent checks", false).option("--json", "Print raw JSON envelopes (ndjson)", false).option("--raw-stream", AGENT_RAW_STREAM_OPTION_DESCRIPTION, false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
32879
33085
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
@@ -32883,6 +33089,11 @@ withSpaceProfileOption(spaceCmd.command("history").description("Read recent or a
32883
33089
  if (outputView === "agent") throw createSpaceSubcommandTargetGuideError("history");
32884
33090
  throw new Error("missing required 'space' argument for openmeld space history");
32885
33091
  }
33092
+ const target = resolveSpaceReadCommandTarget({
33093
+ baseUrl: cliOptions.gatewayUrl,
33094
+ profile: cliOptions.profile,
33095
+ space: spaceValue
33096
+ });
32886
33097
  const limit = parseNonNegativeIntegerOption(opts.limit, "limit");
32887
33098
  const beforeCount = parseNonNegativeIntegerOption(opts.before, "before");
32888
33099
  const afterCount = parseNonNegativeIntegerOption(opts.after, "after");
@@ -32891,13 +33102,13 @@ withSpaceProfileOption(spaceCmd.command("history").description("Read recent or a
32891
33102
  await runCommandWithEntryChecks({
32892
33103
  routeTokens: ["space", "history"],
32893
33104
  view,
32894
- profile: cliOptions.profile,
32895
- gatewayUrl: cliOptions.gatewayUrl,
33105
+ profile: target.profile,
33106
+ gatewayUrl: target.baseUrl,
32896
33107
  run: async () => {
32897
33108
  await runSpaceHistory({
32898
- profile: cliOptions.profile,
32899
- baseUrl: cliOptions.gatewayUrl,
32900
- space: spaceValue,
33109
+ profile: target.profile,
33110
+ baseUrl: target.baseUrl,
33111
+ space: target.space,
32901
33112
  password: cliOptions.password,
32902
33113
  limit: limit ?? 20,
32903
33114
  brief: Boolean(opts.brief),
@@ -32965,20 +33176,24 @@ spaceContractCmd.action(async (space, opts, command) => {
32965
33176
  }
32966
33177
  });
32967
33178
  });
32968
- withSpaceProfileOption(spaceCmd.command("board").description("Read the current Space Board.").argument("<space>", "Space ID (64-character hex)").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
33179
+ withSpaceProfileOption(spaceCmd.command("board").description("Read the current Space Board.").argument("<space>", "Space URL or 64-character Space ID").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
32969
33180
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
32970
- const spaceValue = String(space).trim();
33181
+ const target = resolveSpaceReadCommandTarget({
33182
+ baseUrl: cliOptions.gatewayUrl,
33183
+ profile: cliOptions.profile,
33184
+ space: String(space).trim()
33185
+ });
32971
33186
  const view = getGlobalViewOption();
32972
33187
  await runCommandWithEntryChecks({
32973
33188
  routeTokens: ["space", "board"],
32974
33189
  view,
32975
- profile: cliOptions.profile,
32976
- gatewayUrl: cliOptions.gatewayUrl,
33190
+ profile: target.profile,
33191
+ gatewayUrl: target.baseUrl,
32977
33192
  run: async () => {
32978
33193
  await runSpaceBoard({
32979
- profile: cliOptions.profile,
32980
- baseUrl: cliOptions.gatewayUrl,
32981
- space: spaceValue,
33194
+ profile: target.profile,
33195
+ baseUrl: target.baseUrl,
33196
+ space: target.space,
32982
33197
  password: cliOptions.password,
32983
33198
  json: Boolean(opts.json),
32984
33199
  view,
@@ -32987,19 +33202,24 @@ withSpaceProfileOption(spaceCmd.command("board").description("Read the current S
32987
33202
  }
32988
33203
  });
32989
33204
  });
32990
- withSpaceProfileOption(spaceCmd.command("members").description("List the people and agents in a Space.").argument("<space>", "Space ID (64-character hex)").option("--json", "Print the versioned machine-readable envelope", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
33205
+ withSpaceProfileOption(spaceCmd.command("members").description("List the people and agents in a Space.").argument("<space>", "Space URL or 64-character Space ID").option("--json", "Print the versioned machine-readable envelope", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
32991
33206
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
33207
+ const target = resolveSpaceReadCommandTarget({
33208
+ baseUrl: cliOptions.gatewayUrl,
33209
+ profile: cliOptions.profile,
33210
+ space: String(space).trim()
33211
+ });
32992
33212
  const view = getGlobalViewOption();
32993
33213
  await runCommandWithEntryChecks({
32994
33214
  routeTokens: ["space", "members"],
32995
33215
  view,
32996
- profile: cliOptions.profile,
32997
- gatewayUrl: cliOptions.gatewayUrl,
33216
+ profile: target.profile,
33217
+ gatewayUrl: target.baseUrl,
32998
33218
  run: async () => {
32999
33219
  await runSpaceMembers({
33000
- profile: cliOptions.profile,
33001
- baseUrl: cliOptions.gatewayUrl,
33002
- space: String(space).trim(),
33220
+ profile: target.profile,
33221
+ baseUrl: target.baseUrl,
33222
+ space: target.space,
33003
33223
  password: cliOptions.password,
33004
33224
  json: cliOptions.json === true,
33005
33225
  view,
@@ -33075,22 +33295,27 @@ withSpaceProfileOption(spaceCmd.command("publication").description("Manage how a
33075
33295
  }
33076
33296
  });
33077
33297
  });
33078
- withSpaceProfileOption(spaceCmd.command("status").description("Read Organization visibility, link access, and current Space status.").argument("[space]", "Space ID (64-character hex)").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
33298
+ withSpaceProfileOption(spaceCmd.command("status").description("Read Organization visibility, link access, and current Space status.").argument("[space]", "Space URL or 64-character Space ID").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
33079
33299
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
33080
33300
  const spaceValue = String(space ?? "").trim();
33081
33301
  const outputView = await resolveEffectiveViewForOutput();
33082
33302
  if (!spaceValue && outputView === "agent") throw createSpaceTargetGuideError("status");
33303
+ const target = resolveSpaceReadCommandTarget({
33304
+ baseUrl: cliOptions.gatewayUrl,
33305
+ profile: cliOptions.profile,
33306
+ space: spaceValue
33307
+ });
33083
33308
  const view = getGlobalViewOption();
33084
33309
  await runCommandWithEntryChecks({
33085
33310
  routeTokens: ["space", "status"],
33086
33311
  view,
33087
- profile: cliOptions.profile,
33088
- gatewayUrl: cliOptions.gatewayUrl,
33312
+ profile: target.profile,
33313
+ gatewayUrl: target.baseUrl,
33089
33314
  run: async () => {
33090
33315
  await runSpaceStatus({
33091
- profile: cliOptions.profile,
33092
- baseUrl: cliOptions.gatewayUrl,
33093
- space: spaceValue,
33316
+ profile: target.profile,
33317
+ baseUrl: target.baseUrl,
33318
+ space: target.space,
33094
33319
  password: cliOptions.password,
33095
33320
  json: Boolean(opts.json),
33096
33321
  view,
@@ -33130,8 +33355,8 @@ withSpaceProfileOption(spaceCmd.command("updates").description("Read formal upda
33130
33355
  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) => {
33131
33356
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
33132
33357
  const spaceValue = String(space ?? "").trim();
33133
- const dispatchId = normalizeOptionalString$15(opts.dispatch);
33134
- const resultRef = normalizeOptionalString$15(opts.resultRef);
33358
+ const dispatchId = normalizeOptionalString$17(opts.dispatch);
33359
+ const resultRef = normalizeOptionalString$17(opts.resultRef);
33135
33360
  const selectorCount = Number(dispatchId !== null) + Number(resultRef !== null);
33136
33361
  const outputView = await resolveEffectiveViewForOutput();
33137
33362
  if ((spaceValue.length === 0 || selectorCount !== 1) && outputView === "agent") throw createSpaceResultGuideError();
@@ -33227,7 +33452,7 @@ withSpaceProfileOption(spaceCmd.command("password").description("Set, change, or
33227
33452
  }
33228
33453
  });
33229
33454
  });
33230
- program.command("send").description("Alias for `openmeld space send`.").argument("[text...]", "Text to send").option("--profile <id>", "OpenMeld profile ID").option("--base-url <url>", "OpenMeld gateway URL").option("--space <space>", "Space ID (64-character hex)").option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(reference) mentions", false).option("--password <value>", "Space password for protected access").action(async (textParts, opts) => {
33455
+ program.command("send").description("Alias for `openmeld space send`.").argument("[text...]", "Text to send").option("--profile <id>", "OpenMeld profile ID").option("--base-url <url>", "OpenMeld gateway URL").option("--space <space>", "Space ID (64-character hex)").option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake), @Name(reference), or @Name(mention) addressing", false).option("--password <value>", "Space password for protected access").action(async (textParts, opts) => {
33231
33456
  const space = String(opts.space ?? "").trim();
33232
33457
  if (!space) throw createSpaceAliasTargetGuideError("send");
33233
33458
  const view = getGlobalViewOption();