openmeld 0.3.146 → 0.3.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-me-membership-qgbz9HyG.js → add-me-membership-C9IpIjBD.js} +2 -2
- package/dist/{add-me-membership-qgbz9HyG.js.map → add-me-membership-C9IpIjBD.js.map} +1 -1
- package/dist/{api-client-foundation-BXB-m4ub.js → api-client-foundation-BngNFCww.js} +2 -2
- package/dist/{api-client-foundation-BXB-m4ub.js.map → api-client-foundation-BngNFCww.js.map} +1 -1
- package/dist/{command-DH6wJoZy.js → command-DaXUm8Zj.js} +64 -12
- package/dist/{command-DH6wJoZy.js.map → command-DaXUm8Zj.js.map} +1 -1
- package/dist/{dist-Cl9HGiaA.js → dist-yUGk9-aD.js} +52 -2
- package/dist/dist-yUGk9-aD.js.map +1 -0
- package/dist/openmeld.js +379 -125
- package/dist/openmeld.js.map +1 -1
- package/package.json +1 -1
- package/skills/openmeld-cli/SKILL.md +26 -2
- package/skills/openmeld-cli/playbooks/space-ops.md +32 -3
- package/skills/openmeld-cli/references/commands.md +21 -0
- package/dist/dist-Cl9HGiaA.js.map +0 -1
package/dist/openmeld.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { $ as resolveOpenMeldOrphanedLockIssue, $t as systemDir, A as toSpaceContractUrl, Bt as organizationSkillReleaseDir, Ct as accountProfileViewPath, D as normalizeBaseUrl, E as updateConfiguredStartV1OnboardingState, F as toSpaceDispatchTraceUrl, Ft as openMeldManagedBinaryPath, G as acquireLock, Gt as resolveOpenMeldCliEntryNameFromArgv, Ht as profileViewPath, It as openMeldManagedVersionBinaryPath, J as isOpenMeldOrphanedLockError, Jt as resolveOpenMeldRootDir, K as buildOpenMeldOrphanedLockAction, Kt as resolveOpenMeldEnvPreset, Nt as openMeldBackupsDir, P as toSpaceDispatchLookupUrl, Q as repairOrphanedLegacyLocks, Qt as spacesDir, Rt as openMeldRootDir, S as setConfiguredSkillsConfig, St as accountProfileSpaceCacheDir, Tt as accountsDir, V as toSpaceResultUrl, Vt as profileDir, Z as releaseLockSync, Zt as skillsDir, _t as toRecognizedLocalMachineFailureError, a as resolveBaseUrl, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, dt as LocalMachineFailureError, en as formatLocalMachineIssueMessage, et as runWithHeldLock, g as getConfiguredSkillsConfig, gt as isLocalMachineFailureError, ht as createOrphanedSetupConcurrencyIssue, jt as normalizeAccountKey, k as toSpaceBoardUrl, lt as formatLaneScopeSentence, m as getConfiguredOnboardingDisclaimerAcceptedAt, nt as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, o as resolveBaseUrlOrNull, ot as resolveCliContext, pt as createActiveSetupConcurrencyIssue, q as isOpenMeldLockError, rt as OPENMELD_CLI_CONTEXT_ENV_KEY, sn as agentControllerConversationRefSchema, u as alignRuntimeConfigStorage, ut as resolveOpenMeldLaneDescriptor, w as updateConfiguredOnboardingConfig } from "./base-url-CY_j4bLH.js";
|
|
4
|
-
import { $ as runAgentsManage, $a as resolveAuthenticationGuidanceFromMessage, $i as getCurrentCommandCheckState, $n as assessCliUpdate, $o as outJsonLine, $r as resolveDaemonDeviceId, $t as runSkillsUpdate, A as parseEnvelope, Aa as formatMessage, Ai as createAgentExecutionStatusDisplayRows, An as computeRetryDelayMs, Ao as resolveObservedAgentActivityBinding, Ar as getCommandHintsFromContract, At as emitDaemonAgentOverview, B as resolveHumanControllerDisplayName, Ba as listOpenMeldProfiles, Bn as assertNoRemovedCcSpaceAddressingSyntax, Bo as migrateProjectBindingStore, Br as formatDualViewGuideForDisplay, Bt as readGatewayTextResponse, C as toSpaceMetaUpsertInput, Ca as toStartBackgroundHelperExecutionCompatibility, Ci as resolveAgentProfilePrimaryAgentControllerReport, Cn as resolveCreateProfileKind, Co as resolveUserFacingCliEntryCommand, Cr as createSpaceSubcommandTargetGuideError, Ct as runDaemonStatusFlow, D as formatHumanReadTargetList, Da as renderHumanErrorCard, Di as notifyDaemonRouteCatalogChanged, Dn as formatServiceParticipationReadinessLabel, Do as readAgentActivityContextForPath, Dr as createStartAuthenticationGuideError, Dt as buildProfileWorkspacePresentation, E as buildHumanReplyContextSummary, Ea as buildHumanErrorCopy, Ei as listBuiltinAgentsRegistryEntries, En as ensureAgentProfileRuntimeBinding, Eo as upsertDaemonServiceContract, Er as createStartAgentIdentityGuideError, Et as runDaemonUninstall, F as resolveOpenMeldProfileForSpaceCommand, Fa as requireOpenMeldProfile, Fi as resolveAgentControllerPermissionModeForController, Fn as resolveLocalAgentControllerBlockerReasonCodes, Fo as readAgentActivityOutboxHealth, Fr as registerDaemonControlTargetOptions, Ft as fetchSpaceUpdates, G as runAgentsCustomAdd, Ga as clearSelectedOpenMeldProfileId, Gi as resolveDaemonServiceAlignmentDecision, Gn as buildSpaceRoundReadProjection, Go as canonicalizeLocalProjectPath, Gr as areAllowedActionsEquivalent, Gt as resolveDaemonServiceParticipationStatus, H as resolveAgentProfileSetup, Ha as resolveOpenMeldProfile, Hi as buildOnboardingPlan, Hn as buildDispatchResultReplyWorkflowProjection, Ho as runIfAgentActivityBindingGenerationIsCurrent, Hr as formatAgentOverviewPayload, Ht as parseJsonResponse, I as emitSpaceAgentOverview, Ia as resolveOpenMeldProfileOrNull, Ii as resolveAgentExecutionStatus, In as resolveLocalAgentControllerLaunchability, Io as removeProjectOutbox, Ir as registerAuthLoginRequestOptions, It as createCliSpaceApi, J as runAgentsCustomUpdate, Ja as buildAgentAuthenticationGuide, Ji as resolveServiceUpdateUrgency, Jn as formatRemovedCcRelationMessage, Jo as renderInfoCard, Jr as readPendingOpenMeldToolsUpdateAttempt, Jt as collectSkillsReadinessSnapshot, K as runAgentsCustomList, Ka as getSelectedOpenMeldProfileId, Ki as classifyDaemonServiceRunStartability, Kn as buildUpdatesReplyWorkflowProjection, Ko as enqueueControllerTaskLifecycleEventWhileLocked, Kr as buildAgentFacingPublicationModeGuideLines, Kt as runDaemonServiceParticipationGate, L as emitSpaceCliAgentOverview, La as createOpenMeldAgentProfile, Li as resolveAgentProfileEditCapabilities, Ln as resolveLocalAgentControllerReportDecision, Lo as bindProject, Lr as registerBuiltinAgentSelectionOptions, Lt as fetchSpaceMeta, M as assertFullSignalIdArgument, Ma as resolveRuntimeContext, Mi as getAgentControllerPermissionModeFieldLabel, Mn as submitRuntimeAgentControllerReport, Mo as readCodexSessionTitles, Mr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Mt as shouldEmitAgentOverview, N as assertValidSpaceIdTarget, Na as resolveViewProfileKey, Ni as listAgentControllerPermissionModeOptions, Nn as submitRuntimeAgentControllerReports, No as enqueueAgentActivityHookEvent, Nr as registerSkillsTargetSelectionOptions, Nt as runDaemonStartupPreflight, O as resolveLinkAccessLabel, Oa as renderHumanTextErrorCard, Oi as resolveLocalRegistryAgentIdFromAgentControllerRef, On as resolveServiceParticipationReadiness, Oo as removeAgentActivityContextCache, Or as createUpgradeConfirmationGuideError, Ot as buildProfileWorkspaceRows, P as prepareAuthenticatedSpaceCommandContext, Pa as isSelectedOpenMeldProfileRequiredError, Pi as parseAgentControllerRef, Pn as collectLocalAgentControllerInventory, Po as removeProjectInbox, Pr as getCliVersionInfo, Pt as readDaemonStartFailureLogTailLines, Q as runAgentsList, Qa as resolveAuthenticationGuidanceFromError, Qi as finishCurrentCommandCheckScope, Qn as runInteractivePrompt, Qo as errLine, Qr as ensureDaemonRuntimePaths, Qt as runSkillsUninstall, R as prepareLocalAgentReadiness, Ra as createOpenMeldHumanProfile, Ri as resolveEvidenceSyncHealth, Rn as inspectSpaceCacheFile, Ro as listProjectBindings, Rr as buildAgentOverviewFromContract, Rt as updateSpaceMeta, S as loadSpaceSignalIndexOrNull, Sa as resolveDaemonRuntimeContractCompatibility, Si as createPrimaryBindingReadSession, Sn as createProfileByKind, So as resolveSetupFollowUpCliEntryCommand, Sr as createSpaceResultGuideError, St as runDaemonSnapshot, T as buildFormalSignalReadPayload, Ta as OPENMELD_VERSION, Ti as reconcileNewRunnableBuiltinAgentsForSetup, Tn as promptTextEntry, To as readDaemonServiceContract, Tr as createSpaceUpdatesGuideError, Tt as runDaemonTeardownStrict, U as runAgents, Ua as updateOpenMeldProfile, Ui as getSetupFlowCopy, Un as buildSignalIndex, Uo as setDefaultProjectConnection, Ur as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ut as resolveLocalComponentsStatus, V as persistAgentTransportSelection, Va as primeOpenMeldProfilesSessionCache, Vi as buildDaemonRouteObservationPresentation$1, Vn as buildDispatchResultMessageReadProjection, Vo as removeProjectConnection, Vr as buildDualViewGuideMessage, Vt as toStructuredGatewayFailure, W as runAgentsConfig, Wa as alignSelectedOpenMeldProfileStorage, Wi as buildDaemonServiceTargetSpec, Wn as buildSignalMessageReadProjection, Wo as unbindProject, Wr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Wt as writeInstalledLocalComponentsSnapshot, X as runAgentsDisable, Xa as createAuthenticationError, Xi as resolveOpenMeldEnvironmentTarget, Xn as promptSearchSelect, Xo as sanitizeTerminalDisplayText, Xr as runPendingDaemonServiceUpdate, Xt as runSkillsEnsure, Y as runAgentsDetect, Ya as buildHumanAuthenticationCard, Yi as assessServerRequiredVersion, Yn as promptSearchMultiselect, Yo as renderTextInfoCard, Yr as readOpenMeldToolsUpdateContextFromEnv, Yt as runSkillsCheck$1, Z as runAgentsEnable, Za as resolveAuthenticationGuidance, Zi as resolveAuthBaseUrl, Zn as isReturnKeypress, Zo as emitCliJsonEnvelope, Zr as scheduleDaemonServiceUpdate, Zt as runSkillsInstall, _ as runSpaceWriteWithPasswordRetry, _a as ensureVersionStateReady, _i as setCustomProfileWorkspace, _n as fetchAuthUserSnapshot, _o as formatOpenMeldCliCommand, _r as createSpaceContractSetGuideError, _t as runDaemonCancel, a as runSpaceDelete, aa as readCurrentDaemonRuntimeContext, ai as formatDeviceReplyReadinessLabel, an as buildCommandAuthenticationPromptMessage, ao as requestLocalAgentActivitySync, ar as formatElapsedTime, as as cliJsonSkillsShowEnvelopeSchema, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as readVersionState, bi as describeProfileWorkspacePathValidationFailure, bn as resolveDeviceTokenExpiresAt, bo as formatOpenMeldCliTextBlock, br as createSpacePublicationSetGuideError, bt as runDaemonReinstall, c as runSpaceLeave, ca as isDaemonServiceJobNeverSpawned, ci as resolveGatewayChainReadiness, cn as runAuthLogin, co as resolveAgentActivityRouteForPath, cr as formatDaemonServiceMissingRecommendation, cs as revokeOrganizationJoinLinkResponseSchema, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as readRecentDaemonLifecycleEvents, di as createModelCatalogReadSession, dn as runAuthStatus, do as defaultManagedIntegrationPaths, dr as createProfileActionGuideError, dt as resolveSpaceWebGatewayOrigin, ea as isCurrentCommandCheckScopeActive, ei as formatDaemonFailureContextText, en as ensureLocalSkills, eo as getProfileDefaultView, er as isCliUpdateCheckApplicable, es as outLine, et as runAgentsRepair, f as runSpaceSend, fa as buildInstallSelfJsonPayload, fi as resolveProfileWorkspaceRuntime, fn as exchangeOneTimeTokenAuthSession, fo as installAgentActivityIntegrations, fr as createProfileCreateGuideError, ft as resolveSpaceSendText, g as runSpaceReadWithPasswordRetry, ga as compareSemver, gi as resolveConfiguredProfileWorkspacePath, gn as extractAuthApiErrorMessage, go as formatInlineOpenMeldCliCommands, gr as createSpaceAliasTargetGuideError, gt as runDaemonBackgroundStartForDecision, h as uploadPreparedSpaceFiles, ha as buildNextVersionState, hi as readProfileWorkspaceConfig, hn as formatActiveOrganizationLabel, ho as uninstallAgentActivityIntegrations, hr as createSpaceAddMembersGuideError, ht as runDaemonAutostart, i as runSpaceCreate, ia as resolveVersionChangeDirection, ii as formatAgentReplyReadinessLabel, in as connectWebSocket, io as LocalDaemonControlPlaneClientError, ir as writeDispatchSpaceActionRecord, is as cliJsonSkillsLoadEnvelopeSchema, it as colorizeDisplayProfileLabel, j as isSpaceCommandOutputHandledError, ja as parseCliViewMode, ji as getAgentControllerPermissionModeDisplayMetadata, jn as submitProfileRuntimeAgentControllerReport, jo as normalizeSharedSessionTitle, jr as registerSpaceMemberSelectionOptions, jt as createDelayedSpinner, k as resolveOrganizationVisibilityLabel, ka as createPresenter, ki as buildAgentControllerRef, kn as assessActionParticipationCandidate, ko as buildAgentActivityEvent, kr as getCommandEntryContract, kt as reconcileCliVersionView, l as runSpaceList, la as readDaemonServiceJobCrashExitCode, li as resolveOpenClawLocalDiagnosticsValue, ln as runAuthLogout, lo as unregisterAgentActivityRoute, lr as canUseInteractivePrompts, ls as compareAgentControllerRefsForDisplay, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as readPendingDaemonServiceUpdate, mi as normalizeCustomProfileWorkspacePath, mn as buildAuthStatusSnapshot, mo as resolveAgentActivityDispatcherCommand, mr as createResetConfirmationGuideError, mt as runDaemon, n as promptAndConfirmSpacePassword, na as startCurrentCommandCheckScope, ni as resolveDaemonServiceFreshnessWarning, nn as readRuntimeReportingHealthState, no as LocalProjectConnectionError, nr as readDispatchOwnedRuntimeGuard, ns as cliJsonOutputEnvelopeSchema, nt as formatTransportModeDisplay, o as runSpaceHistory, oa as readCurrentObservedDaemonRuntimeStatus, oi as formatHumanReplyReadinessReason$1, on as ensureCommandAuthenticationOrCancel, oo as isAgentActivityRouteRegistered, or as resolveElapsedTimeMs, os as getOrganizationJoinLinkResponseSchema, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as performManagedInstall, pi as ensureOpenMeldManagedProfileWorkspace, pn as buildAuthStatusRows, po as readAgentActivityIntegrationStatus, pr as createProfileMenuGuideError, pt as bestEffortStopCurrentLaneDaemonService, q as runAgentsCustomRemove, qa as setSelectedOpenMeldProfileId, qi as classifyDaemonServiceWakeability, qn as createSpaceMemberIdentityIndex, qo as readControllerTaskLifecycleOutboxHealth, qr as canonicalizeAllowedActions, qt as runDaemonStartDecisionPrompt, r as runSpaceAddMembers, ra as inspectDaemonServiceInventory, ri as resolveCurrentReplyReadinessSnapshot, rn as readRecentDaemonDispatchJournalEvents, ro as validateLocalProjectConnectionPath, rr as readDispatchSpaceActionContextFromEnv, rs as cliJsonSkillsListEnvelopeSchema, rt as colorizeAgentLabel, s as runSpaceJoin, sa as getDaemonSystemServiceLogPath, si as mapAgentReplyReadinessToLegacyAutoReply, sn as evaluateCommandAuthentication, so as registerAgentActivityRoute, sr as formatDaemonServiceDowngradeBlockedRecommendation, ss as organizationJoinLinkErrorResponseSchema, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as resetCurrentCommandCheckState, ti as resolveServiceReadinessFromServiceStatus, tn as readBundledOpenMeldCliSkillDocumentByPath, to as setProfileDefaultView, tr as assertDispatchOwnedRuntimePublicWriteAllowed, ts as cliBinaryDeltaPatchSchema, tt as runAgentsShow, u as runSpacePassword, ua as resolveDaemonServiceManager, ui as syncProfileWorkspaceState, un as runAuthMenu, ur as createDoctorFailedGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as fetchLatestCliBinaryRelease, vi as setOpenMeldManagedProfileWorkspace, vn as requestDeviceToken, vo as formatOpenMeldCliCommands, vr as createSpaceLeaveGuideError, vt as runDaemonInstall, w as buildFormalDispatchResultReadPayload, wa as resolveCurrentDaemonExpectedVersion, wi as listAgentTargetStates, wn as resolveCreateProfileName, wo as syncLocalAgentActivity, wr as createSpaceTargetGuideError, wt as runDaemonStop, x as loadSpaceIdentityDirectoryOrNull, xa as writeVersionState, xi as syncDeviceRuntimeStateProjection, xn as revokeAuthAccessToken, xo as formatProfileAwareOpenMeldCliCommands, xr as createSpaceRemoveMembersGuideError, xt as runDaemonRunAfterEntryChecks, y as emitHumanReadSignalsTextProjection, ya as fetchLatestPackageInfo, yi as validateCustomProfileWorkspacePath, yn as resolveDeviceAuthClientId, yo as formatOpenMeldCliLine, yr as createSpaceMenuGuideError, yt as runDaemonInterrupt, z as buildReplyReadinessGuidance, za as deleteOpenMeldProfile, zi as resolveNativeAgentControllerPermissionModeForController, zn as upsertSpaceConfig, zo as listProjectConnectionsWithStatus, zr as DualViewGuideError, zt as readGatewayJsonResponse } from "./command-DH6wJoZy.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
|
|
4
|
+
import { $ as runAgentsManage, $a as resolveAuthenticationGuidanceFromMessage, $i as getCurrentCommandCheckState, $n as assessCliUpdate, $o as outJsonLine, $r as resolveDaemonDeviceId, $t as runSkillsUpdate, A as parseEnvelope, Aa as formatMessage, Ai as createAgentExecutionStatusDisplayRows, An as computeRetryDelayMs, Ao as resolveObservedAgentActivityBinding, Ar as getCommandHintsFromContract, At as emitDaemonAgentOverview, B as resolveHumanControllerDisplayName, Ba as listOpenMeldProfiles, Bn as assertNoRemovedCcSpaceAddressingSyntax, Bo as migrateProjectBindingStore, Br as formatDualViewGuideForDisplay, Bt as readGatewayTextResponse, C as toSpaceMetaUpsertInput, Ca as toStartBackgroundHelperExecutionCompatibility, Ci as resolveAgentProfilePrimaryAgentControllerReport, Cn as resolveCreateProfileKind, Co as resolveUserFacingCliEntryCommand, Cr as createSpaceSubcommandTargetGuideError, Ct as runDaemonStatusFlow, D as formatHumanReadTargetList, Da as renderHumanErrorCard, Di as notifyDaemonRouteCatalogChanged, Dn as formatServiceParticipationReadinessLabel, Do as readAgentActivityContextForPath, Dr as createStartAuthenticationGuideError, Dt as buildProfileWorkspacePresentation, E as buildHumanReplyContextSummary, Ea as buildHumanErrorCopy, Ei as listBuiltinAgentsRegistryEntries, En as ensureAgentProfileRuntimeBinding, Eo as upsertDaemonServiceContract, Er as createStartAgentIdentityGuideError, Et as runDaemonUninstall, F as resolveOpenMeldProfileForSpaceCommand, Fa as requireOpenMeldProfile, Fi as resolveAgentControllerPermissionModeForController, Fn as resolveLocalAgentControllerBlockerReasonCodes, Fo as readAgentActivityOutboxHealth, Fr as registerDaemonControlTargetOptions, Ft as fetchSpaceUpdates, G as runAgentsCustomAdd, Ga as clearSelectedOpenMeldProfileId, Gi as resolveDaemonServiceAlignmentDecision, Gn as buildSpaceRoundReadProjection, Go as canonicalizeLocalProjectPath, Gr as areAllowedActionsEquivalent, Gt as resolveDaemonServiceParticipationStatus, H as resolveAgentProfileSetup, Ha as resolveOpenMeldProfile, Hi as buildOnboardingPlan, Hn as buildDispatchResultReplyWorkflowProjection, Ho as runIfAgentActivityBindingGenerationIsCurrent, Hr as formatAgentOverviewPayload, Ht as parseJsonResponse, I as emitSpaceAgentOverview, Ia as resolveOpenMeldProfileOrNull, Ii as resolveAgentExecutionStatus, In as resolveLocalAgentControllerLaunchability, Io as removeProjectOutbox, Ir as registerAuthLoginRequestOptions, It as createCliSpaceApi, J as runAgentsCustomUpdate, Ja as buildAgentAuthenticationGuide, Ji as resolveServiceUpdateUrgency, Jn as formatRemovedCcRelationMessage, Jo as renderInfoCard, Jr as readPendingOpenMeldToolsUpdateAttempt, Jt as collectSkillsReadinessSnapshot, K as runAgentsCustomList, Ka as getSelectedOpenMeldProfileId, Ki as classifyDaemonServiceRunStartability, Kn as buildUpdatesReplyWorkflowProjection, Ko as enqueueControllerTaskLifecycleEventWhileLocked, Kr as buildAgentFacingPublicationModeGuideLines, Kt as runDaemonServiceParticipationGate, L as emitSpaceCliAgentOverview, La as createOpenMeldAgentProfile, Li as resolveAgentProfileEditCapabilities, Ln as resolveLocalAgentControllerReportDecision, Lo as bindProject, Lr as registerBuiltinAgentSelectionOptions, Lt as fetchSpaceMeta, M as assertFullSignalIdArgument, Ma as resolveRuntimeContext, Mi as getAgentControllerPermissionModeFieldLabel, Mn as submitRuntimeAgentControllerReport, Mo as readCodexSessionTitles, Mr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Mt as shouldEmitAgentOverview, N as assertValidSpaceIdTarget, Na as resolveViewProfileKey, Ni as listAgentControllerPermissionModeOptions, Nn as submitRuntimeAgentControllerReports, No as enqueueAgentActivityHookEvent, Nr as registerSkillsTargetSelectionOptions, Nt as runDaemonStartupPreflight, O as resolveLinkAccessLabel, Oa as renderHumanTextErrorCard, Oi as resolveLocalRegistryAgentIdFromAgentControllerRef, On as resolveServiceParticipationReadiness, Oo as removeAgentActivityContextCache, Or as createUpgradeConfirmationGuideError, Ot as buildProfileWorkspaceRows, P as prepareAuthenticatedSpaceCommandContext, Pa as isSelectedOpenMeldProfileRequiredError, Pi as parseAgentControllerRef, Pn as collectLocalAgentControllerInventory, Po as removeProjectInbox, Pr as getCliVersionInfo, Pt as readDaemonStartFailureLogTailLines, Q as runAgentsList, Qa as resolveAuthenticationGuidanceFromError, Qi as finishCurrentCommandCheckScope, Qn as runInteractivePrompt, Qo as errLine, Qr as ensureDaemonRuntimePaths, Qt as runSkillsUninstall, R as prepareLocalAgentReadiness, Ra as createOpenMeldHumanProfile, Ri as resolveEvidenceSyncHealth, Rn as inspectSpaceCacheFile, Ro as listProjectBindings, Rr as buildAgentOverviewFromContract, Rt as updateSpaceMeta, S as loadSpaceSignalIndexOrNull, Sa as resolveDaemonRuntimeContractCompatibility, Si as createPrimaryBindingReadSession, Sn as createProfileByKind, So as resolveSetupFollowUpCliEntryCommand, Sr as createSpaceResultGuideError, St as runDaemonSnapshot, T as buildFormalSignalReadPayload, Ta as OPENMELD_VERSION, Ti as reconcileNewRunnableBuiltinAgentsForSetup, Tn as promptTextEntry, To as readDaemonServiceContract, Tr as createSpaceUpdatesGuideError, Tt as runDaemonTeardownStrict, U as runAgents, Ua as updateOpenMeldProfile, Ui as getSetupFlowCopy, Un as buildSignalIndex, Uo as setDefaultProjectConnection, Ur as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ut as resolveLocalComponentsStatus, V as persistAgentTransportSelection, Va as primeOpenMeldProfilesSessionCache, Vi as buildDaemonRouteObservationPresentation$1, Vn as buildDispatchResultMessageReadProjection, Vo as removeProjectConnection, Vr as buildDualViewGuideMessage, Vt as toStructuredGatewayFailure, W as runAgentsConfig, Wa as alignSelectedOpenMeldProfileStorage, Wi as buildDaemonServiceTargetSpec, Wn as buildSignalMessageReadProjection, Wo as unbindProject, Wr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Wt as writeInstalledLocalComponentsSnapshot, X as runAgentsDisable, Xa as createAuthenticationError, Xi as resolveOpenMeldEnvironmentTarget, Xn as promptSearchSelect, Xo as sanitizeTerminalDisplayText, Xr as runPendingDaemonServiceUpdate, Xt as runSkillsEnsure, Y as runAgentsDetect, Ya as buildHumanAuthenticationCard, Yi as assessServerRequiredVersion, Yn as promptSearchMultiselect, Yo as renderTextInfoCard, Yr as readOpenMeldToolsUpdateContextFromEnv, Yt as runSkillsCheck$1, Z as runAgentsEnable, Za as resolveAuthenticationGuidance, Zi as resolveAuthBaseUrl, Zn as isReturnKeypress, Zo as emitCliJsonEnvelope, Zr as scheduleDaemonServiceUpdate, Zt as runSkillsInstall, _ as runSpaceWriteWithPasswordRetry, _a as ensureVersionStateReady, _i as setCustomProfileWorkspace, _n as fetchAuthUserSnapshot, _o as formatOpenMeldCliCommand, _r as createSpaceContractSetGuideError, _t as runDaemonCancel, a as runSpaceDelete, aa as readCurrentDaemonRuntimeContext, ai as formatDeviceReplyReadinessLabel, an as buildCommandAuthenticationPromptMessage, ao as requestLocalAgentActivitySync, ar as formatElapsedTime, as as cliJsonSkillsShowEnvelopeSchema, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as readVersionState, bi as describeProfileWorkspacePathValidationFailure, bn as resolveDeviceTokenExpiresAt, bo as formatOpenMeldCliTextBlock, br as createSpacePublicationSetGuideError, bt as runDaemonReinstall, c as runSpaceLeave, ca as isDaemonServiceJobNeverSpawned, ci as resolveGatewayChainReadiness, cn as runAuthLogin, co as resolveAgentActivityRouteForPath, cr as formatDaemonServiceMissingRecommendation, cs as revokeOrganizationJoinLinkResponseSchema, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as readRecentDaemonLifecycleEvents, di as createModelCatalogReadSession, dn as runAuthStatus, do as defaultManagedIntegrationPaths, dr as createProfileActionGuideError, dt as resolveSpaceWebGatewayOrigin, ea as isCurrentCommandCheckScopeActive, ei as formatDaemonFailureContextText, en as ensureLocalSkills, eo as getProfileDefaultView, er as isCliUpdateCheckApplicable, es as outLine, et as runAgentsRepair, f as runSpaceSend, fa as buildInstallSelfJsonPayload, fi as resolveProfileWorkspaceRuntime, fn as exchangeOneTimeTokenAuthSession, fo as installAgentActivityIntegrations, fr as createProfileCreateGuideError, ft as resolveSpaceSendText, g as runSpaceReadWithPasswordRetry, ga as compareSemver, gi as resolveConfiguredProfileWorkspacePath, gn as extractAuthApiErrorMessage, go as formatInlineOpenMeldCliCommands, gr as createSpaceAliasTargetGuideError, gt as runDaemonBackgroundStartForDecision, h as uploadPreparedSpaceFiles, ha as buildNextVersionState, hi as readProfileWorkspaceConfig, hn as formatActiveOrganizationLabel, ho as uninstallAgentActivityIntegrations, hr as createSpaceAddMembersGuideError, ht as runDaemonAutostart, i as runSpaceCreate, ia as resolveVersionChangeDirection, ii as formatAgentReplyReadinessLabel, in as connectWebSocket, io as LocalDaemonControlPlaneClientError, ir as writeDispatchSpaceActionRecord, is as cliJsonSkillsLoadEnvelopeSchema, it as colorizeDisplayProfileLabel, j as isSpaceCommandOutputHandledError, ja as parseCliViewMode, ji as getAgentControllerPermissionModeDisplayMetadata, jn as submitProfileRuntimeAgentControllerReport, jo as normalizeSharedSessionTitle, jr as registerSpaceMemberSelectionOptions, jt as createDelayedSpinner, k as resolveOrganizationVisibilityLabel, ka as createPresenter, ki as buildAgentControllerRef, kn as assessActionParticipationCandidate, ko as buildAgentActivityEvent, kr as getCommandEntryContract, kt as reconcileCliVersionView, l as runSpaceList, la as readDaemonServiceJobCrashExitCode, li as resolveOpenClawLocalDiagnosticsValue, ln as runAuthLogout, lo as unregisterAgentActivityRoute, lr as canUseInteractivePrompts, ls as compareAgentControllerRefsForDisplay, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as readPendingDaemonServiceUpdate, mi as normalizeCustomProfileWorkspacePath, mn as buildAuthStatusSnapshot, mo as resolveAgentActivityDispatcherCommand, mr as createResetConfirmationGuideError, mt as runDaemon, n as promptAndConfirmSpacePassword, na as startCurrentCommandCheckScope, ni as resolveDaemonServiceFreshnessWarning, nn as readRuntimeReportingHealthState, no as LocalProjectConnectionError, nr as readDispatchOwnedRuntimeGuard, ns as cliJsonOutputEnvelopeSchema, nt as formatTransportModeDisplay, o as runSpaceHistory, oa as readCurrentObservedDaemonRuntimeStatus, oi as formatHumanReplyReadinessReason$1, on as ensureCommandAuthenticationOrCancel, oo as isAgentActivityRouteRegistered, or as resolveElapsedTimeMs, os as getOrganizationJoinLinkResponseSchema, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as performManagedInstall, pi as ensureOpenMeldManagedProfileWorkspace, pn as buildAuthStatusRows, po as readAgentActivityIntegrationStatus, pr as createProfileMenuGuideError, pt as bestEffortStopCurrentLaneDaemonService, q as runAgentsCustomRemove, qa as setSelectedOpenMeldProfileId, qi as classifyDaemonServiceWakeability, qn as createSpaceMemberIdentityIndex, qo as readControllerTaskLifecycleOutboxHealth, qr as canonicalizeAllowedActions, qt as runDaemonStartDecisionPrompt, r as runSpaceAddMembers, ra as inspectDaemonServiceInventory, ri as resolveCurrentReplyReadinessSnapshot, rn as readRecentDaemonDispatchJournalEvents, ro as validateLocalProjectConnectionPath, rr as readDispatchSpaceActionContextFromEnv, rs as cliJsonSkillsListEnvelopeSchema, rt as colorizeAgentLabel, s as runSpaceJoin, sa as getDaemonSystemServiceLogPath, si as mapAgentReplyReadinessToLegacyAutoReply, sn as evaluateCommandAuthentication, so as registerAgentActivityRoute, sr as formatDaemonServiceDowngradeBlockedRecommendation, ss as organizationJoinLinkErrorResponseSchema, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as resetCurrentCommandCheckState, ti as resolveServiceReadinessFromServiceStatus, tn as readBundledOpenMeldCliSkillDocumentByPath, to as setProfileDefaultView, tr as assertDispatchOwnedRuntimePublicWriteAllowed, ts as cliBinaryDeltaPatchSchema, tt as runAgentsShow, u as runSpacePassword, ua as resolveDaemonServiceManager, ui as syncProfileWorkspaceState, un as runAuthMenu, ur as createDoctorFailedGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as fetchLatestCliBinaryRelease, vi as setOpenMeldManagedProfileWorkspace, vn as requestDeviceToken, vo as formatOpenMeldCliCommands, vr as createSpaceLeaveGuideError, vt as runDaemonInstall, w as buildFormalDispatchResultReadPayload, wa as resolveCurrentDaemonExpectedVersion, wi as listAgentTargetStates, wn as resolveCreateProfileName, wo as syncLocalAgentActivity, wr as createSpaceTargetGuideError, wt as runDaemonStop, x as loadSpaceIdentityDirectoryOrNull, xa as writeVersionState, xi as syncDeviceRuntimeStateProjection, xn as revokeAuthAccessToken, xo as formatProfileAwareOpenMeldCliCommands, xr as createSpaceRemoveMembersGuideError, xt as runDaemonRunAfterEntryChecks, y as emitHumanReadSignalsTextProjection, ya as fetchLatestPackageInfo, yi as validateCustomProfileWorkspacePath, yn as resolveDeviceAuthClientId, yo as formatOpenMeldCliLine, yr as createSpaceMenuGuideError, yt as runDaemonInterrupt, z as buildReplyReadinessGuidance, za as deleteOpenMeldProfile, zi as resolveNativeAgentControllerPermissionModeForController, zn as upsertSpaceConfig, zo as listProjectConnectionsWithStatus, zr as DualViewGuideError, zt as readGatewayJsonResponse } from "./command-DaXUm8Zj.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 START_BOUNDED_VERSION_SCHEMA, an as agentActivitySessionInventoryQuerySchema, b as createProjectsApi, bn as startReplyReadinessSummarySchema, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, et as ownerComputerDiagnosticsSchema, f as createFeedbackApi, g as createOrganizationApi, gn as START_BOUNDED_ID_SCHEMA, in as agentActivityInventorySessionStatusSchema, it as agentProfileCreationConfigurationSchema, l as createCenterAgentApi, nt as summarizeComputerFileAccessPolicy, q as resolveSpaceDispatchTraceRootCause, rn as agentActivityInventorySessionOriginSchema, rt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, s as createAgentActivityApi, sn as localAgentSessionProviderSchema, tt as projectOwnerComputerLocalRuntimes, u as createComputerFileAccessApi, v as createPrepareReadinessApi, vn as START_ISO_DATE_TIME_SCHEMA, vt as organizationSkillBundleSchema, x as createRoutinesApi, xn as localAgentCatalogSchema, xt as stringifyOrganizationSkillBundleCanonicalJson, yn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA } from "./dist-yUGk9-aD.js";
|
|
6
6
|
import { Ar as clientMessageIdSchema, Dn as messageEnvelopeSchema, Er as unknown, Ft as spaceStatusSchema, Ht as isSpaceFileTextEditable, It as centerAgentInteractionSourceSchema, Kt as resolveSpaceFileMimeType, Sr as string, Tr as union, Zr as openMeldProfileIdSchema, br as record, di as trimmedStringFromUnknown, dr as enumFactory, fr as int, gr as nullFactory, hn as spaceContractSchema, li as nonEmptyTrimmedStringFromUnknown, ln as dispatchExecutionSchema, lr as discriminatedUnion, mn as spaceContractFieldsSchema, mr as literal, ni as openMeldRuntimeProfileIdSchema, or as array, pr as iso, sr as boolean, un as spaceThreadContextSchema, vr as object, xr as strictObject } from "./runtime-transport-QslOj6uZ.js";
|
|
7
7
|
import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
|
|
8
8
|
import { j as getDaemonStatus } from "./daemon-runtime-lease-6DIprlJy.js";
|
|
9
9
|
import { _ as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, c as getAuthSessionMetadata, d as getInterruptedComputerAuthSessionRecovery, f as markInterruptedComputerAuthSessionRecovery, g as updateAuthSessionActiveOrganization, l as getAuthSessionState, m as recordInterruptedComputerAuthSessionRecoveryFailure, n as AuthSessionRecoveryInProgressError, o as clearAuthSession, p as normalizeStoredActiveOrganization, s as completeInterruptedComputerAuthSessionRecovery, t as AuthSessionChangedBeforeTransitionError, u as getCurrentAuthOwnerUserId, v as isBinaryDistribution, y as resolveOpenMeldDistribution } from "./auth-session-BFa5tO5y.js";
|
|
10
|
-
import { c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, l as buildRequestAuthHeaders, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout } from "./api-client-foundation-
|
|
10
|
+
import { c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, l as buildRequestAuthHeaders, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout } from "./api-client-foundation-BngNFCww.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";
|
|
@@ -2317,6 +2317,7 @@ const COMMAND_CHECK_REQUIREMENTS = Object.freeze({
|
|
|
2317
2317
|
whoami: buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE),
|
|
2318
2318
|
"profile.menu": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN),
|
|
2319
2319
|
"profile.create": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN),
|
|
2320
|
+
"profile.current-session": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
|
|
2320
2321
|
"profile.list": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
|
|
2321
2322
|
"profile.set": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN),
|
|
2322
2323
|
"profile.show": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN),
|
|
@@ -2548,6 +2549,8 @@ const COMMAND_ENTRY_NAME_BY_ROUTE = {
|
|
|
2548
2549
|
profile: "profile.menu",
|
|
2549
2550
|
"profiles create": "profile.create",
|
|
2550
2551
|
"profile create": "profile.create",
|
|
2552
|
+
"profiles current-session": "profile.current-session",
|
|
2553
|
+
"profile current-session": "profile.current-session",
|
|
2551
2554
|
"profiles list": "profile.list",
|
|
2552
2555
|
"profiles ls": "profile.list",
|
|
2553
2556
|
"profile list": "profile.list",
|
|
@@ -4659,6 +4662,12 @@ const COMMAND_ENTRY_COPY_BY_NAME = Object.freeze({
|
|
|
4659
4662
|
cliUpdateAction: "creating a profile",
|
|
4660
4663
|
serviceAction: null
|
|
4661
4664
|
},
|
|
4665
|
+
"profile.current-session": {
|
|
4666
|
+
signInAction: "finding this Agent session's profile",
|
|
4667
|
+
profileAction: null,
|
|
4668
|
+
cliUpdateAction: "finding this Agent session's profile",
|
|
4669
|
+
serviceAction: null
|
|
4670
|
+
},
|
|
4662
4671
|
"profile.list": {
|
|
4663
4672
|
signInAction: "listing profiles",
|
|
4664
4673
|
profileAction: null,
|
|
@@ -5576,7 +5585,7 @@ const CHOOSE_PROFILE = "__command_entry_choose_profile__";
|
|
|
5576
5585
|
const CREATE_PROFILE = "__command_entry_create_profile__";
|
|
5577
5586
|
const CANCEL_PROFILE = "__command_entry_cancel_profile__";
|
|
5578
5587
|
async function runSelectedProfileCheck(input) {
|
|
5579
|
-
const explicitProfileArg = normalizeOptionalString$
|
|
5588
|
+
const explicitProfileArg = normalizeOptionalString$19(input.context.profileArg);
|
|
5580
5589
|
const hasExplicitProfileArg = explicitProfileArg !== null;
|
|
5581
5590
|
const requiresConfirmation = input.requirement.mode === "confirm" && input.context.runtime.resolvedView === "human" && input.context.allowPrompt && !hasExplicitProfileArg;
|
|
5582
5591
|
const currentState = getCurrentCommandCheckState();
|
|
@@ -5749,7 +5758,7 @@ function ensureCurrentProfileIsVisible(input) {
|
|
|
5749
5758
|
function resolveProfileConfirmationMessage(entryName) {
|
|
5750
5759
|
return entryName === "space.join" ? SPACE_JOIN_PROFILE_SELECTION_MESSAGE : SPACE_COMMAND_PROFILE_SELECTION_MESSAGE;
|
|
5751
5760
|
}
|
|
5752
|
-
function normalizeOptionalString$
|
|
5761
|
+
function normalizeOptionalString$19(value) {
|
|
5753
5762
|
const normalized = String(value ?? "").trim();
|
|
5754
5763
|
return normalized.length > 0 ? normalized : null;
|
|
5755
5764
|
}
|
|
@@ -6384,7 +6393,12 @@ function parseLeadingCommandTokensFromArgv(argv, maxTokens = 2) {
|
|
|
6384
6393
|
return tokens;
|
|
6385
6394
|
}
|
|
6386
6395
|
function isPassiveCliQueryArgv(argv) {
|
|
6396
|
+
if (isCliMetadataQueryArgv(argv)) return true;
|
|
6397
|
+
return PASSIVE_CLI_QUERY_COMMANDS.has(parseLeadingCommandTokensFromArgv(argv, 2).join(" "));
|
|
6398
|
+
}
|
|
6399
|
+
function isCliMetadataQueryArgv(argv) {
|
|
6387
6400
|
const args = argv.slice(2);
|
|
6401
|
+
if (parseLeadingCommandTokensFromArgv(argv, 1)[0] === "help") return true;
|
|
6388
6402
|
for (let i = 0; i < args.length; i += 1) {
|
|
6389
6403
|
const arg = args[i];
|
|
6390
6404
|
if (typeof arg !== "string") continue;
|
|
@@ -6394,9 +6408,9 @@ function isPassiveCliQueryArgv(argv) {
|
|
|
6394
6408
|
continue;
|
|
6395
6409
|
}
|
|
6396
6410
|
if (arg.startsWith("--view=") || arg.startsWith("--service-auto-install=")) continue;
|
|
6397
|
-
if (
|
|
6411
|
+
if (PASSIVE_CLI_QUERY_FLAGS.has(arg)) return true;
|
|
6398
6412
|
}
|
|
6399
|
-
return
|
|
6413
|
+
return false;
|
|
6400
6414
|
}
|
|
6401
6415
|
function hasJsonOutputArgv(argv) {
|
|
6402
6416
|
for (let i = 2; i < argv.length; i += 1) {
|
|
@@ -6468,7 +6482,7 @@ async function runCommandWithEntryChecks(input) {
|
|
|
6468
6482
|
allowPrompt: runtime.interactive,
|
|
6469
6483
|
environmentTarget,
|
|
6470
6484
|
gatewayUrl: normalizedGatewayUrl,
|
|
6471
|
-
profileArg: normalizeOptionalString$
|
|
6485
|
+
profileArg: normalizeOptionalString$18(input.profile),
|
|
6472
6486
|
jsonOutput
|
|
6473
6487
|
}),
|
|
6474
6488
|
jsonOutput
|
|
@@ -6477,7 +6491,7 @@ async function runCommandWithEntryChecks(input) {
|
|
|
6477
6491
|
finishCurrentCommandCheckScope();
|
|
6478
6492
|
}
|
|
6479
6493
|
}
|
|
6480
|
-
function normalizeOptionalString$
|
|
6494
|
+
function normalizeOptionalString$18(value) {
|
|
6481
6495
|
const normalized = String(value ?? "").trim();
|
|
6482
6496
|
return normalized.length > 0 ? normalized : null;
|
|
6483
6497
|
}
|
|
@@ -7180,8 +7194,8 @@ function normalizeOrganizationSelectionPayload(payload) {
|
|
|
7180
7194
|
message: "OpenMeld auth returned an invalid Organization selection."
|
|
7181
7195
|
});
|
|
7182
7196
|
return {
|
|
7183
|
-
activeOrganizationId: normalizeOptionalString$
|
|
7184
|
-
lastSelectedOrganizationId: normalizeOptionalString$
|
|
7197
|
+
activeOrganizationId: normalizeOptionalString$17(payload.session.activeOrganizationId),
|
|
7198
|
+
lastSelectedOrganizationId: normalizeOptionalString$17(payload.user.lastSelectedOrganizationId)
|
|
7185
7199
|
};
|
|
7186
7200
|
}
|
|
7187
7201
|
function normalizeOrganizationListPayload(payload) {
|
|
@@ -7213,7 +7227,7 @@ function normalizeOrganizationFromPayload(payload) {
|
|
|
7213
7227
|
if (!isRecord(payload)) return null;
|
|
7214
7228
|
const organization = normalizeStoredActiveOrganization(payload.organization);
|
|
7215
7229
|
if (!organization) return null;
|
|
7216
|
-
const role = normalizeOptionalString$
|
|
7230
|
+
const role = normalizeOptionalString$17(payload.role) ?? (isRecord(payload.member) ? normalizeOptionalString$17(payload.member.role) : null);
|
|
7217
7231
|
return {
|
|
7218
7232
|
...organization,
|
|
7219
7233
|
...role ? { role } : {}
|
|
@@ -7283,13 +7297,13 @@ function parseJsonOrNull(raw) {
|
|
|
7283
7297
|
}
|
|
7284
7298
|
function readRequestId(payload) {
|
|
7285
7299
|
if (!isRecord(payload)) return null;
|
|
7286
|
-
return normalizeOptionalString$
|
|
7300
|
+
return normalizeOptionalString$17(payload.requestId) ?? (isRecord(payload.error) ? normalizeOptionalString$17(payload.error.requestId) : null);
|
|
7287
7301
|
}
|
|
7288
7302
|
function readErrorMessage(payload) {
|
|
7289
7303
|
if (!isRecord(payload)) return null;
|
|
7290
|
-
return normalizeOptionalString$
|
|
7304
|
+
return normalizeOptionalString$17(payload.message) ?? (isRecord(payload.error) ? normalizeOptionalString$17(payload.error.message) : null);
|
|
7291
7305
|
}
|
|
7292
|
-
function normalizeOptionalString$
|
|
7306
|
+
function normalizeOptionalString$17(value) {
|
|
7293
7307
|
const normalized = String(value ?? "").trim();
|
|
7294
7308
|
return normalized.length > 0 ? normalized : null;
|
|
7295
7309
|
}
|
|
@@ -7697,7 +7711,7 @@ async function createCenterAgentApiClient(input) {
|
|
|
7697
7711
|
const CODEX_THREAD_ID_ENV = "CODEX_THREAD_ID";
|
|
7698
7712
|
const CLAUDE_CODE_SESSION_ID_ENV = "CLAUDE_CODE_SESSION_ID";
|
|
7699
7713
|
function detectLocalAgentEnvironment(env) {
|
|
7700
|
-
const claudeSessionId = normalizeOptionalString$
|
|
7714
|
+
const claudeSessionId = normalizeOptionalString$16(env[CLAUDE_CODE_SESSION_ID_ENV]);
|
|
7701
7715
|
if (claudeSessionId) return {
|
|
7702
7716
|
kind: "agent",
|
|
7703
7717
|
agentControllerConversationId: claudeSessionId,
|
|
@@ -7705,7 +7719,7 @@ function detectLocalAgentEnvironment(env) {
|
|
|
7705
7719
|
conversationKind: "session",
|
|
7706
7720
|
label: "Claude Code"
|
|
7707
7721
|
};
|
|
7708
|
-
const codexThreadId = normalizeOptionalString$
|
|
7722
|
+
const codexThreadId = normalizeOptionalString$16(env[CODEX_THREAD_ID_ENV]);
|
|
7709
7723
|
if (codexThreadId) return {
|
|
7710
7724
|
kind: "agent",
|
|
7711
7725
|
agentControllerConversationId: codexThreadId,
|
|
@@ -7717,9 +7731,9 @@ function detectLocalAgentEnvironment(env) {
|
|
|
7717
7731
|
return { kind: "human" };
|
|
7718
7732
|
}
|
|
7719
7733
|
function isCodexLikeEnvironment(env) {
|
|
7720
|
-
return Boolean(normalizeOptionalString$
|
|
7734
|
+
return Boolean(normalizeOptionalString$16(env.CODEX_SHELL) || normalizeOptionalString$16(env.CODEX_CI) || normalizeOptionalString$16(env.CODEX_SESSION_ID) || normalizeOptionalString$16(env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE));
|
|
7721
7735
|
}
|
|
7722
|
-
function normalizeOptionalString$
|
|
7736
|
+
function normalizeOptionalString$16(value) {
|
|
7723
7737
|
if (typeof value !== "string") return null;
|
|
7724
7738
|
const normalized = value.trim();
|
|
7725
7739
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -8966,6 +8980,25 @@ async function runComputerCurrent(input) {
|
|
|
8966
8980
|
});
|
|
8967
8981
|
const response = await currentDeviceApi.listLocalRuntimes({ includeUsageLimits: "true" });
|
|
8968
8982
|
const currentComputer = findLocalRuntime(response, deviceId);
|
|
8983
|
+
if (input.brief) {
|
|
8984
|
+
const readiness = await currentDeviceApi.getCurrentLocalRuntimeReplyReadiness();
|
|
8985
|
+
const payload = buildCurrentComputerBrief({
|
|
8986
|
+
currentComputer,
|
|
8987
|
+
readiness
|
|
8988
|
+
});
|
|
8989
|
+
if (presenter.view === "agent") {
|
|
8990
|
+
presenter.data({
|
|
8991
|
+
code: "computer.current.brief",
|
|
8992
|
+
payload
|
|
8993
|
+
});
|
|
8994
|
+
return;
|
|
8995
|
+
}
|
|
8996
|
+
presenter.line({
|
|
8997
|
+
code: "computer.current.brief",
|
|
8998
|
+
text: `${currentComputer.deviceDisplayName}: ${readiness.message}${readiness.nextAction === "none" ? "" : ` Next: ${readiness.localComponents.agentSetupCommand}`}`
|
|
8999
|
+
});
|
|
9000
|
+
return;
|
|
9001
|
+
}
|
|
8969
9002
|
if (presenter.view === "agent") {
|
|
8970
9003
|
const diagnostics = await readCurrentComputerDiagnostics({
|
|
8971
9004
|
apiClient,
|
|
@@ -8988,6 +9021,49 @@ async function runComputerCurrent(input) {
|
|
|
8988
9021
|
text: formatComputerHumanLine(currentComputer)
|
|
8989
9022
|
});
|
|
8990
9023
|
}
|
|
9024
|
+
function buildCurrentComputerBrief(input) {
|
|
9025
|
+
const { currentComputer, readiness } = input;
|
|
9026
|
+
return {
|
|
9027
|
+
computer: {
|
|
9028
|
+
deviceId: currentComputer.deviceId,
|
|
9029
|
+
deviceDisplayName: currentComputer.deviceDisplayName,
|
|
9030
|
+
platformFamily: currentComputer.platformFamily,
|
|
9031
|
+
isCurrent: currentComputer.isCurrent
|
|
9032
|
+
},
|
|
9033
|
+
wake: {
|
|
9034
|
+
canReplyFromThisComputer: readiness.canReplyFromThisComputer,
|
|
9035
|
+
status: readiness.status,
|
|
9036
|
+
primaryBlocker: readiness.primaryBlocker,
|
|
9037
|
+
nextAction: readiness.nextAction,
|
|
9038
|
+
message: readiness.message
|
|
9039
|
+
},
|
|
9040
|
+
updates: {
|
|
9041
|
+
setupAction: readiness.localComponents.setupAction,
|
|
9042
|
+
setupActionLabel: readiness.localComponents.setupActionLabel,
|
|
9043
|
+
agentSetupCommand: readiness.localComponents.agentSetupCommand,
|
|
9044
|
+
maintenance: readiness.localComponents.maintenance,
|
|
9045
|
+
updateOperation: readiness.localComponents.updateOperation,
|
|
9046
|
+
cli: readiness.localComponents.cli,
|
|
9047
|
+
service: readiness.localComponents.service,
|
|
9048
|
+
skills: readiness.localComponents.skills
|
|
9049
|
+
},
|
|
9050
|
+
localAgents: currentComputer.executionTargets.map((target) => ({
|
|
9051
|
+
runtimeLane: target.runtimeLane,
|
|
9052
|
+
status: target.status,
|
|
9053
|
+
reasonCodes: target.reasonCodes,
|
|
9054
|
+
agents: target.capabilities.map((capability) => {
|
|
9055
|
+
const usageLimits = capability.agentControllerInterface?.usageLimits;
|
|
9056
|
+
return {
|
|
9057
|
+
agentControllerRef: capability.agentControllerRef,
|
|
9058
|
+
enabled: capability.enabled,
|
|
9059
|
+
status: capability.status,
|
|
9060
|
+
reasonCodes: capability.reasonCodes,
|
|
9061
|
+
...usageLimits ? { usageLimits } : {}
|
|
9062
|
+
};
|
|
9063
|
+
})
|
|
9064
|
+
}))
|
|
9065
|
+
};
|
|
9066
|
+
}
|
|
8991
9067
|
async function readCurrentComputerDiagnostics(input) {
|
|
8992
9068
|
const [currentLocalRuntimeReplyReadiness, currentComputerFileAccess] = await Promise.all([input.currentDeviceApi.getCurrentLocalRuntimeReplyReadiness(), readCurrentComputerFileAccessSummary({
|
|
8993
9069
|
apiClient: input.apiClient,
|
|
@@ -9123,7 +9199,7 @@ async function exchangeComputerAuthorizationGrant(input) {
|
|
|
9123
9199
|
});
|
|
9124
9200
|
throw new Error(`computer authorization could not verify its OpenMeld account: ${toErrorMessage$8(error)}${formatCleanupFailure(cleanup)}`, { cause: error });
|
|
9125
9201
|
}
|
|
9126
|
-
const userId = normalizeOptionalString$
|
|
9202
|
+
const userId = normalizeOptionalString$15(user?.id);
|
|
9127
9203
|
if (!userId) {
|
|
9128
9204
|
const cleanup = await revokeAuthAccessToken({
|
|
9129
9205
|
accessToken: tokenResult.data.access_token,
|
|
@@ -9133,7 +9209,7 @@ async function exchangeComputerAuthorizationGrant(input) {
|
|
|
9133
9209
|
throw new Error(`computer authorization account response did not include a user id${formatCleanupFailure(cleanup)}`);
|
|
9134
9210
|
}
|
|
9135
9211
|
const expiresAt = resolveDeviceTokenExpiresAt(tokenResult.data.expires_in);
|
|
9136
|
-
const scope = normalizeOptionalString$
|
|
9212
|
+
const scope = normalizeOptionalString$15(tokenResult.data.scope);
|
|
9137
9213
|
return {
|
|
9138
9214
|
accessToken: tokenResult.data.access_token,
|
|
9139
9215
|
tokenType: tokenResult.data.token_type,
|
|
@@ -9159,11 +9235,11 @@ function toErrorMessage$8(error) {
|
|
|
9159
9235
|
return error instanceof Error && error.message.trim() ? error.message.trim() : String(error ?? "unknown error");
|
|
9160
9236
|
}
|
|
9161
9237
|
function normalizeRequiredString(value, message) {
|
|
9162
|
-
const normalized = normalizeOptionalString$
|
|
9238
|
+
const normalized = normalizeOptionalString$15(value);
|
|
9163
9239
|
if (!normalized) throw new Error(message);
|
|
9164
9240
|
return normalized;
|
|
9165
9241
|
}
|
|
9166
|
-
function normalizeOptionalString$
|
|
9242
|
+
function normalizeOptionalString$15(value) {
|
|
9167
9243
|
const normalized = String(value ?? "").trim();
|
|
9168
9244
|
return normalized.length > 0 ? normalized : null;
|
|
9169
9245
|
}
|
|
@@ -9173,7 +9249,7 @@ const UNUSED_SETUP_SESSION_CLEANUP_SUFFIX = " OpenMeld also could not revoke the
|
|
|
9173
9249
|
async function recoverInterruptedComputerAuthHandoff(input) {
|
|
9174
9250
|
const recovery = await getInterruptedComputerAuthSessionRecovery();
|
|
9175
9251
|
if (!recovery) return "none";
|
|
9176
|
-
const previousOwnerUserId = normalizeOptionalString$
|
|
9252
|
+
const previousOwnerUserId = normalizeOptionalString$14(recovery.previousSession?.user?.id);
|
|
9177
9253
|
if (!recovery.serviceReconciled) {
|
|
9178
9254
|
const stopped = await stopCurrentLaneDaemonServiceAfterToolsUpdate(input);
|
|
9179
9255
|
if (stopped.status === "warning") {
|
|
@@ -9305,7 +9381,7 @@ function formatComputerAuthCleanupFailureSuffix(result) {
|
|
|
9305
9381
|
const status = result.error.status === null ? "network error" : `HTTP ${result.error.status}`;
|
|
9306
9382
|
return `${UNUSED_SETUP_SESSION_CLEANUP_SUFFIX} Cleanup endpoint ${result.error.endpoint} returned ${status}: ${result.error.message}`;
|
|
9307
9383
|
}
|
|
9308
|
-
function normalizeOptionalString$
|
|
9384
|
+
function normalizeOptionalString$14(value) {
|
|
9309
9385
|
if (typeof value !== "string") return null;
|
|
9310
9386
|
const normalized = value.trim();
|
|
9311
9387
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -10470,11 +10546,11 @@ function resolveDaemonRouteSkipMessage(input) {
|
|
|
10470
10546
|
return `Reply route checks were skipped because the OpenMeld profile check failed: ${input.openMeldProfileMessage}`;
|
|
10471
10547
|
}
|
|
10472
10548
|
function resolveFeedbackInboxKey(input) {
|
|
10473
|
-
const fromCli = normalizeOptionalString$
|
|
10549
|
+
const fromCli = normalizeOptionalString$13(input.cliValue);
|
|
10474
10550
|
if (fromCli) return fromCli;
|
|
10475
|
-
return normalizeOptionalString$
|
|
10551
|
+
return normalizeOptionalString$13((input.env ?? process.env).OPENMELD_FEEDBACK_INBOX_KEY) ?? "feedback_key_8oDRg9Aq-Q4crzVGV6hUqhKT2dQpKkBn4bKg9bjXLcE";
|
|
10476
10552
|
}
|
|
10477
|
-
function normalizeOptionalString$
|
|
10553
|
+
function normalizeOptionalString$13(value) {
|
|
10478
10554
|
const normalized = String(value ?? "").trim();
|
|
10479
10555
|
return normalized.length > 0 ? normalized : null;
|
|
10480
10556
|
}
|
|
@@ -10815,7 +10891,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
|
|
|
10815
10891
|
value: input.agentControllerPermissionModeInput
|
|
10816
10892
|
});
|
|
10817
10893
|
if (!agentControllerPermissionMode) return { hasAnyAgentControllerPermissionModeInput: false };
|
|
10818
|
-
const agentControllerRef = normalizeOptionalString$
|
|
10894
|
+
const agentControllerRef = normalizeOptionalString$12(input.agentControllerRef);
|
|
10819
10895
|
assertAgentControllerPermissionModeSupported({
|
|
10820
10896
|
agentControllerPermissionMode,
|
|
10821
10897
|
agentControllerRef,
|
|
@@ -10836,7 +10912,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
|
|
|
10836
10912
|
};
|
|
10837
10913
|
}
|
|
10838
10914
|
function normalizeAgentControllerPermissionModeCliInput(input) {
|
|
10839
|
-
const raw = normalizeOptionalString$
|
|
10915
|
+
const raw = normalizeOptionalString$12(input.value);
|
|
10840
10916
|
if (!raw) return null;
|
|
10841
10917
|
const options = listAgentControllerPermissionModeOptions(input.agentControllerRef ? { agentControllerRef: input.agentControllerRef } : void 0);
|
|
10842
10918
|
for (const option of options) if (raw === option.value) return option.value;
|
|
@@ -10939,15 +11015,15 @@ const AGENT_CONTROLLER_PERMISSION_MODE_BY_CLI_VALUE = {
|
|
|
10939
11015
|
"run-everything": "cursor:force",
|
|
10940
11016
|
runeverything: "cursor:force"
|
|
10941
11017
|
};
|
|
10942
|
-
function normalizeOptionalString$
|
|
11018
|
+
function normalizeOptionalString$12(value) {
|
|
10943
11019
|
const normalized = String(value ?? "").trim();
|
|
10944
11020
|
return normalized.length > 0 ? normalized : null;
|
|
10945
11021
|
}
|
|
10946
11022
|
//#endregion
|
|
10947
11023
|
//#region src/profile/model-selection-input.ts
|
|
10948
11024
|
function normalizeModelSelectionInput(input) {
|
|
10949
|
-
const modelId = normalizeOptionalString$
|
|
10950
|
-
const reasoningLevel = normalizeOptionalString$
|
|
11025
|
+
const modelId = normalizeOptionalString$11(input.model);
|
|
11026
|
+
const reasoningLevel = normalizeOptionalString$11(input.reasoningEffort);
|
|
10951
11027
|
if (!(modelId || reasoningLevel)) return { hasAnyModelSelectionInput: false };
|
|
10952
11028
|
if (!modelId) throw new Error("--reasoning-effort requires --model.");
|
|
10953
11029
|
return {
|
|
@@ -10956,7 +11032,7 @@ function normalizeModelSelectionInput(input) {
|
|
|
10956
11032
|
...reasoningLevel ? { reasoningLevel } : {}
|
|
10957
11033
|
};
|
|
10958
11034
|
}
|
|
10959
|
-
function normalizeOptionalString$
|
|
11035
|
+
function normalizeOptionalString$11(value) {
|
|
10960
11036
|
const normalized = String(value ?? "").trim();
|
|
10961
11037
|
return normalized.length > 0 ? normalized : null;
|
|
10962
11038
|
}
|
|
@@ -11320,7 +11396,7 @@ async function runProfileShow(input) {
|
|
|
11320
11396
|
}
|
|
11321
11397
|
const presenter = createPresenter(runtime);
|
|
11322
11398
|
const allowPrompt = canUseInteractivePrompts(runtime);
|
|
11323
|
-
const explicitProfileId = normalizeOptionalString$
|
|
11399
|
+
const explicitProfileId = normalizeOptionalString$10(input.profile);
|
|
11324
11400
|
const visibleProfiles = explicitProfileId ? [] : await listVisibleProfilesForListByView(runtime.resolvedView);
|
|
11325
11401
|
const current = explicitProfileId ? null : await resolveCurrentProfileId({
|
|
11326
11402
|
profiles: visibleProfiles,
|
|
@@ -11814,7 +11890,7 @@ async function runProfileUpdate(input) {
|
|
|
11814
11890
|
}
|
|
11815
11891
|
const presenter = createPresenter(runtime);
|
|
11816
11892
|
const allowPrompt = canUseInteractivePrompts(runtime);
|
|
11817
|
-
const explicitProfileId = normalizeOptionalString$
|
|
11893
|
+
const explicitProfileId = normalizeOptionalString$10(input.profile);
|
|
11818
11894
|
const visibleProfiles = explicitProfileId ? [] : await listVisibleProfilesForListByView(runtime.resolvedView);
|
|
11819
11895
|
const current = explicitProfileId ? null : await resolveCurrentProfileId({
|
|
11820
11896
|
profiles: visibleProfiles,
|
|
@@ -12084,7 +12160,7 @@ function emitProfileUpdateCandidatesForHuman(input) {
|
|
|
12084
12160
|
}
|
|
12085
12161
|
}
|
|
12086
12162
|
async function resolveProfileUpdatePayload(input) {
|
|
12087
|
-
const profileName = normalizeOptionalString$
|
|
12163
|
+
const profileName = normalizeOptionalString$10(input.profileName);
|
|
12088
12164
|
const explicitAgentController = await resolveExplicitAgentControllerPatchForProfile({
|
|
12089
12165
|
agentController: input.agentController,
|
|
12090
12166
|
agentControllerConversationId: input.agentControllerConversationId,
|
|
@@ -12129,7 +12205,7 @@ async function resolveProfileUpdatePayload(input) {
|
|
|
12129
12205
|
}
|
|
12130
12206
|
function resolveExplicitWorkspacePatchForProfile(input) {
|
|
12131
12207
|
const normalizedMode = normalizeWorkspaceModeInput(input.workspaceMode);
|
|
12132
|
-
const normalizedWorkspacePath = normalizeOptionalString$
|
|
12208
|
+
const normalizedWorkspacePath = normalizeOptionalString$10(input.workspacePath);
|
|
12133
12209
|
if (!(normalizedMode || normalizedWorkspacePath)) return null;
|
|
12134
12210
|
if (input.profile.profileKind !== "agent") throw new Error("Workspace can only be configured for agent profiles.");
|
|
12135
12211
|
if (!normalizedMode) throw new Error("--workspace-path can only be used with --workspace-mode custom.");
|
|
@@ -12162,7 +12238,7 @@ function resolveExplicitModelSelectionPatchForProfile(input) {
|
|
|
12162
12238
|
};
|
|
12163
12239
|
}
|
|
12164
12240
|
async function resolveExplicitAgentControllerPermissionModePatchForProfile(input) {
|
|
12165
|
-
if (!normalizeOptionalString$
|
|
12241
|
+
if (!normalizeOptionalString$10(input.agentControllerPermissionModeInput)) return null;
|
|
12166
12242
|
if (input.profile.profileKind !== "agent") throw new Error("Agent Controller Permission Mode can only be configured for agent profiles.");
|
|
12167
12243
|
const currentBinding = input.agentControllerRef ? null : await resolveAgentProfilePrimaryAgentControllerReport({ profile: input.profile });
|
|
12168
12244
|
const agentControllerRef = input.agentControllerRef ?? currentBinding?.agentControllerRef ?? null;
|
|
@@ -12181,8 +12257,8 @@ async function resolveExplicitAgentControllerPermissionModePatchForProfile(input
|
|
|
12181
12257
|
};
|
|
12182
12258
|
}
|
|
12183
12259
|
async function resolveExplicitAgentControllerPatchForProfile(input) {
|
|
12184
|
-
const agentController = normalizeOptionalString$
|
|
12185
|
-
const agentControllerConversationId = normalizeOptionalString$
|
|
12260
|
+
const agentController = normalizeOptionalString$10(input.agentController);
|
|
12261
|
+
const agentControllerConversationId = normalizeOptionalString$10(input.agentControllerConversationId);
|
|
12186
12262
|
if (!(agentController || agentControllerConversationId)) return null;
|
|
12187
12263
|
if (input.profile.profileKind !== "agent") throw new Error("Agent controller can only be configured for agent profiles.");
|
|
12188
12264
|
if (!agentController) throw new Error("--agent-controller-conversation-id requires --agent-controller.");
|
|
@@ -12196,7 +12272,7 @@ async function resolveExplicitAgentControllerPatchForProfile(input) {
|
|
|
12196
12272
|
};
|
|
12197
12273
|
}
|
|
12198
12274
|
async function applyAgentProfileControllerBinding(input) {
|
|
12199
|
-
const agentControllerRef = normalizeOptionalString$
|
|
12275
|
+
const agentControllerRef = normalizeOptionalString$10(input.agentControllerRef);
|
|
12200
12276
|
const hasModelSelectionPatch = input.modelId !== void 0;
|
|
12201
12277
|
if (!(agentControllerRef || hasModelSelectionPatch)) return;
|
|
12202
12278
|
if (input.profile.profileKind !== "agent") throw new Error("Agent controller can only be configured for agent profiles.");
|
|
@@ -12334,7 +12410,7 @@ async function promptWorkspacePayload(profile) {
|
|
|
12334
12410
|
});
|
|
12335
12411
|
if (workspacePath.status === "cancelled") return { status: "cancelled" };
|
|
12336
12412
|
if (workspacePath.status === "back") continue;
|
|
12337
|
-
const customWorkspacePath = normalizeOptionalString$
|
|
12413
|
+
const customWorkspacePath = normalizeOptionalString$10(workspacePath.value);
|
|
12338
12414
|
if (!customWorkspacePath) throw new Error("Custom workspace path is required.");
|
|
12339
12415
|
return {
|
|
12340
12416
|
status: "submitted",
|
|
@@ -12439,7 +12515,7 @@ async function promptModelSelectionPayload(profile) {
|
|
|
12439
12515
|
});
|
|
12440
12516
|
if (isCancel(selectedReasoningLevel)) return { status: "cancelled" };
|
|
12441
12517
|
if (selectedReasoningLevel === BACK_UPDATE_FIELD_SELECTION) return { status: "back" };
|
|
12442
|
-
const reasoningLevel = normalizeOptionalString$
|
|
12518
|
+
const reasoningLevel = normalizeOptionalString$10(selectedReasoningLevel);
|
|
12443
12519
|
return {
|
|
12444
12520
|
status: "submitted",
|
|
12445
12521
|
value: {
|
|
@@ -12507,7 +12583,7 @@ async function promptProfileNamePayload(currentProfileName) {
|
|
|
12507
12583
|
});
|
|
12508
12584
|
if (nextName.status === "cancelled") return { status: "cancelled" };
|
|
12509
12585
|
if (nextName.status === "back") return { status: "back" };
|
|
12510
|
-
const profileName = normalizeOptionalString$
|
|
12586
|
+
const profileName = normalizeOptionalString$10(nextName.value);
|
|
12511
12587
|
if (!profileName) throw new Error("profileName is required");
|
|
12512
12588
|
return {
|
|
12513
12589
|
status: "submitted",
|
|
@@ -12763,11 +12839,11 @@ function buildProfileSearchItem(input) {
|
|
|
12763
12839
|
function buildProfileSearchText(profile) {
|
|
12764
12840
|
return [
|
|
12765
12841
|
profile.openMeldProfileId,
|
|
12766
|
-
normalizeOptionalString$
|
|
12842
|
+
normalizeOptionalString$10(profile.profileName),
|
|
12767
12843
|
profile.profileKind,
|
|
12768
|
-
normalizeOptionalString$
|
|
12769
|
-
normalizeOptionalString$
|
|
12770
|
-
normalizeOptionalString$
|
|
12844
|
+
normalizeOptionalString$10(profile.ownerUserId),
|
|
12845
|
+
normalizeOptionalString$10(profile.ownerName),
|
|
12846
|
+
normalizeOptionalString$10(profile.source)
|
|
12771
12847
|
].filter((value) => typeof value === "string").join("\n");
|
|
12772
12848
|
}
|
|
12773
12849
|
function resolveProfileSelectLabel(input) {
|
|
@@ -12818,7 +12894,7 @@ function normalizeProfileDisplayName(profile) {
|
|
|
12818
12894
|
}
|
|
12819
12895
|
function normalizeAgentControllerArgumentInput(input) {
|
|
12820
12896
|
const agentController = String(input.agentController ?? "").trim();
|
|
12821
|
-
const agentControllerConversationId = normalizeOptionalString$
|
|
12897
|
+
const agentControllerConversationId = normalizeOptionalString$10(input.agentControllerConversationId);
|
|
12822
12898
|
const hasControllerEnabled = typeof input.controllerEnabled === "boolean";
|
|
12823
12899
|
const hasAnyAgentControllerInput = Boolean(agentController) || Boolean(agentControllerConversationId) || hasControllerEnabled;
|
|
12824
12900
|
return {
|
|
@@ -13026,7 +13102,7 @@ function resolveProfileUpdateCommandExamples() {
|
|
|
13026
13102
|
function toProfileActionGuideExamples(_input) {
|
|
13027
13103
|
return {};
|
|
13028
13104
|
}
|
|
13029
|
-
function normalizeOptionalString$
|
|
13105
|
+
function normalizeOptionalString$10(value) {
|
|
13030
13106
|
const normalized = String(value ?? "").trim();
|
|
13031
13107
|
return normalized.length > 0 ? normalized : null;
|
|
13032
13108
|
}
|
|
@@ -14039,10 +14115,10 @@ function resolveDaemonDispatchJournalEvidence(dispatchId) {
|
|
|
14039
14115
|
};
|
|
14040
14116
|
}
|
|
14041
14117
|
async function resolveDispatchTraceSelection(input) {
|
|
14042
|
-
const dispatchSelector = normalizeOptionalString$
|
|
14043
|
-
const sourceSignalSelector = normalizeOptionalString$
|
|
14044
|
-
const clientMessageSelector = normalizeOptionalString$
|
|
14045
|
-
const targetProfileSelector = normalizeOptionalString$
|
|
14118
|
+
const dispatchSelector = normalizeOptionalString$9(input.dispatchId);
|
|
14119
|
+
const sourceSignalSelector = normalizeOptionalString$9(input.sourceSignalId);
|
|
14120
|
+
const clientMessageSelector = normalizeOptionalString$9(input.clientMessageId);
|
|
14121
|
+
const targetProfileSelector = normalizeOptionalString$9(input.targetProfileId);
|
|
14046
14122
|
if (Number(dispatchSelector !== null) + Number(sourceSignalSelector !== null) + Number(clientMessageSelector !== null) !== 1) throw new Error("exactly one of dispatchId, sourceSignalId, or clientMessageId is required");
|
|
14047
14123
|
if (dispatchSelector) return {
|
|
14048
14124
|
dispatchId: dispatchSelector,
|
|
@@ -14549,7 +14625,7 @@ function parenthesizedDetail(value, label) {
|
|
|
14549
14625
|
return detail.length > 0 ? detail : null;
|
|
14550
14626
|
}
|
|
14551
14627
|
async function resolveServiceTraceActorProfile(input) {
|
|
14552
|
-
if (normalizeOptionalString$
|
|
14628
|
+
if (normalizeOptionalString$9(input.explicitProfileId) || !canUseInteractivePrompts(input.runtime)) return input.actingProfile;
|
|
14553
14629
|
while (true) {
|
|
14554
14630
|
const selectedAction = await select({
|
|
14555
14631
|
message: `Use ${input.actingProfile.profileName} (${input.actingProfile.openMeldProfileId}) to read this dispatch trace?`,
|
|
@@ -15430,7 +15506,7 @@ function truncateText(text, maxLength) {
|
|
|
15430
15506
|
if (text.length <= maxLength) return text;
|
|
15431
15507
|
return `${text.slice(0, maxLength)}...`;
|
|
15432
15508
|
}
|
|
15433
|
-
function normalizeOptionalString$
|
|
15509
|
+
function normalizeOptionalString$9(value) {
|
|
15434
15510
|
const normalized = String(value ?? "").trim();
|
|
15435
15511
|
return normalized.length > 0 ? normalized : null;
|
|
15436
15512
|
}
|
|
@@ -16258,7 +16334,7 @@ async function acquireSetupCommandLockWithTakeover(input) {
|
|
|
16258
16334
|
pid,
|
|
16259
16335
|
startedAtLabel
|
|
16260
16336
|
};
|
|
16261
|
-
if (!(normalizeOptionalString$
|
|
16337
|
+
if (!(normalizeOptionalString$8(input.startSession) !== null && pid !== null && pid !== deps.selfPid && deps.probePid(pid) === "alive")) return {
|
|
16262
16338
|
status: "contended",
|
|
16263
16339
|
...contendedBase,
|
|
16264
16340
|
takeoverAttempted: false
|
|
@@ -16495,7 +16571,7 @@ function getErrorCode(error) {
|
|
|
16495
16571
|
const code = error.code;
|
|
16496
16572
|
return typeof code === "string" ? code : void 0;
|
|
16497
16573
|
}
|
|
16498
|
-
function normalizeOptionalString$
|
|
16574
|
+
function normalizeOptionalString$8(value) {
|
|
16499
16575
|
const normalized = String(value ?? "").trim();
|
|
16500
16576
|
return normalized.length > 0 ? normalized : null;
|
|
16501
16577
|
}
|
|
@@ -18335,7 +18411,7 @@ async function resolveCurrentComputerSession(candidate) {
|
|
|
18335
18411
|
}
|
|
18336
18412
|
if (currentState.state === "missing" || currentState.session) return currentState.session;
|
|
18337
18413
|
const revoked = await revokePreparedAuthSession(candidate);
|
|
18338
|
-
const detail = normalizeOptionalString$
|
|
18414
|
+
const detail = normalizeOptionalString$7(currentState.errorMessage) ?? normalizeOptionalString$7(currentState.reasonCode);
|
|
18339
18415
|
throw new Error(`OpenMeld could not inspect the current Computer sign-in. The current Computer connection was not changed.${detail ? ` ${detail}` : ""}${formatComputerAuthCleanupFailureSuffix(revoked)}`);
|
|
18340
18416
|
}
|
|
18341
18417
|
async function beginComputerSessionTransition(input) {
|
|
@@ -18367,15 +18443,15 @@ function attachComputerAuthCleanupFailure(input) {
|
|
|
18367
18443
|
} });
|
|
18368
18444
|
}
|
|
18369
18445
|
async function confirmComputerAccountSwitch(input) {
|
|
18370
|
-
const currentUserId = normalizeOptionalString$
|
|
18446
|
+
const currentUserId = normalizeOptionalString$7(input.currentSession?.user?.id);
|
|
18371
18447
|
if (!input.currentSession) return true;
|
|
18372
18448
|
if (!currentUserId) {
|
|
18373
18449
|
const revoked = await revokePreparedAuthSession(input.candidate);
|
|
18374
18450
|
throw new Error(`OpenMeld could not verify the account currently connected to this Computer. The current Computer connection was not changed.${formatComputerAuthCleanupFailureSuffix(revoked)}`);
|
|
18375
18451
|
}
|
|
18376
18452
|
if (currentUserId === input.candidate.user.id) return true;
|
|
18377
|
-
const currentAccount = normalizeOptionalString$
|
|
18378
|
-
const nextAccount = normalizeOptionalString$
|
|
18453
|
+
const currentAccount = normalizeOptionalString$7(input.currentSession?.user?.email) ?? "the current account";
|
|
18454
|
+
const nextAccount = normalizeOptionalString$7(input.candidate.user.email) ?? "another account";
|
|
18379
18455
|
if (!input.interactive || input.resolvedView !== "human") {
|
|
18380
18456
|
const revoked = await revokePreparedAuthSession(input.candidate);
|
|
18381
18457
|
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)}`);
|
|
@@ -18405,7 +18481,7 @@ async function restorePreviousComputerAfterFailedHandoff(input) {
|
|
|
18405
18481
|
async function restoreLegacyComputerAuthTransition(input) {
|
|
18406
18482
|
const revoked = await revokePreparedAuthSession(input.candidate);
|
|
18407
18483
|
if (!revoked.ok) emitUnusedSetupSessionCleanupWarning(input.presenter, revoked.error);
|
|
18408
|
-
const previousOwnerUserId = normalizeOptionalString$
|
|
18484
|
+
const previousOwnerUserId = normalizeOptionalString$7(input.transition.previousSession?.user?.id);
|
|
18409
18485
|
if (!previousOwnerUserId) {
|
|
18410
18486
|
const stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
|
|
18411
18487
|
if (stopped.status === "warning") throw new Error(stopped.errorMessage ?? "OpenMeld could not stop the incomplete Computer connection.");
|
|
@@ -18427,7 +18503,7 @@ async function restoreLegacyComputerAuthTransition(input) {
|
|
|
18427
18503
|
});
|
|
18428
18504
|
if (restored.status !== "aligned") throw new Error(restored.errorMessage ?? "OpenMeld could not reconnect the previous Computer account.");
|
|
18429
18505
|
}
|
|
18430
|
-
function normalizeOptionalString$
|
|
18506
|
+
function normalizeOptionalString$7(value) {
|
|
18431
18507
|
if (typeof value !== "string") return null;
|
|
18432
18508
|
const normalized = value.trim();
|
|
18433
18509
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -18453,7 +18529,7 @@ async function runSetupLocalAgentConnection(input) {
|
|
|
18453
18529
|
view: runtime.resolvedView
|
|
18454
18530
|
});
|
|
18455
18531
|
if (input.humanProfile) throw new Error(RETIRED_HUMAN_PROFILE_SETUP_MESSAGE);
|
|
18456
|
-
const deviceCode = normalizeOptionalString$
|
|
18532
|
+
const deviceCode = normalizeOptionalString$6(input.deviceCode);
|
|
18457
18533
|
if (input.startSession && deviceCode) return buildPrepareSessionSetupResult(await runComputerAuthorizationHandoff({
|
|
18458
18534
|
deviceCode,
|
|
18459
18535
|
interactive,
|
|
@@ -18463,7 +18539,7 @@ async function runSetupLocalAgentConnection(input) {
|
|
|
18463
18539
|
startSession: input.startSession,
|
|
18464
18540
|
view: input.view
|
|
18465
18541
|
}));
|
|
18466
|
-
const oneTimeToken = normalizeOptionalString$
|
|
18542
|
+
const oneTimeToken = normalizeOptionalString$6(input.ott);
|
|
18467
18543
|
if (input.startSession && oneTimeToken) return buildPrepareSessionSetupResult(await runOneTimeTokenComputerHandoff({
|
|
18468
18544
|
oneTimeToken,
|
|
18469
18545
|
interactive,
|
|
@@ -18562,7 +18638,7 @@ async function runSetupLocalAgentConnection(input) {
|
|
|
18562
18638
|
};
|
|
18563
18639
|
}
|
|
18564
18640
|
async function resolveExplicitSetupProfile(profileId) {
|
|
18565
|
-
const normalizedProfileId = normalizeOptionalString$
|
|
18641
|
+
const normalizedProfileId = normalizeOptionalString$6(profileId);
|
|
18566
18642
|
if (!normalizedProfileId) return {
|
|
18567
18643
|
profile: null,
|
|
18568
18644
|
resolved: false
|
|
@@ -18616,8 +18692,8 @@ function emitSetupLocalAgentConnectionHeader(input) {
|
|
|
18616
18692
|
}
|
|
18617
18693
|
function assertValidSetupLocalAgentConnectionInput(input) {
|
|
18618
18694
|
const facts = resolveSetupLocalAgentConnectionInputFacts(input);
|
|
18619
|
-
if (normalizeOptionalString$
|
|
18620
|
-
if (normalizeOptionalString$
|
|
18695
|
+
if (normalizeOptionalString$6(input.deviceCode) && !facts.hasStartSession) throw new Error("--device-code requires --start-session.");
|
|
18696
|
+
if (normalizeOptionalString$6(input.deviceCode) && normalizeOptionalString$6(input.ott)) throw new Error("use either --device-code or --ott, not both");
|
|
18621
18697
|
if (facts.hasStartSession && (facts.hasProfile || facts.hasHumanProfile || facts.hasLocalAgentPreparation)) throw new Error("--start-session cannot be combined with --profile, --human-profile, or --agent.");
|
|
18622
18698
|
if (!facts.hasStartSession && facts.hasPrepareSessionLocalAgentMode) throw new Error("--local-agents requires --start-session.");
|
|
18623
18699
|
assertValidLocalAgentSelectionInput({
|
|
@@ -18629,14 +18705,14 @@ function assertValidSetupLocalAgentConnectionInput(input) {
|
|
|
18629
18705
|
if (facts.hasProfile && facts.hasLocalAgentPreparation) throw new Error("use either --profile <id> or --agent <id...>, not both");
|
|
18630
18706
|
}
|
|
18631
18707
|
function resolveStandaloneProfileLocalAgentId(input) {
|
|
18632
|
-
if (!normalizeOptionalString$
|
|
18708
|
+
if (!normalizeOptionalString$6(input.profile)) return null;
|
|
18633
18709
|
return normalizeLocalAgentIds(input.localAgent)[0] ?? null;
|
|
18634
18710
|
}
|
|
18635
18711
|
function normalizeLocalAgentIds(localAgent) {
|
|
18636
|
-
return Array.from(new Set((localAgent ?? []).map((agentId) => normalizeOptionalString$
|
|
18712
|
+
return Array.from(new Set((localAgent ?? []).map((agentId) => normalizeOptionalString$6(agentId)).filter((agentId) => agentId !== null)));
|
|
18637
18713
|
}
|
|
18638
18714
|
function resolvePrepareSessionLocalAgentSelection(input) {
|
|
18639
|
-
const localAgentMode = normalizeOptionalString$
|
|
18715
|
+
const localAgentMode = normalizeOptionalString$6(input.localAgents);
|
|
18640
18716
|
if (localAgentMode === "all" || localAgentMode === "none") return { mode: localAgentMode };
|
|
18641
18717
|
const localAgentIds = normalizeLocalAgentIds(input.localAgent);
|
|
18642
18718
|
if (localAgentIds.length > 0) return {
|
|
@@ -18663,7 +18739,7 @@ async function runSetupLocalAgentConnectionServiceGate(input) {
|
|
|
18663
18739
|
throw new Error("OpenMeld Service is still reconnecting. Run `openmeld setup` again after OpenMeld Service finishes refreshing.");
|
|
18664
18740
|
}
|
|
18665
18741
|
async function maybeLogInWithOneTimeToken$1(input) {
|
|
18666
|
-
const oneTimeToken = normalizeOptionalString$
|
|
18742
|
+
const oneTimeToken = normalizeOptionalString$6(input.ott);
|
|
18667
18743
|
if (!oneTimeToken) return;
|
|
18668
18744
|
if (await runAuthLogin({
|
|
18669
18745
|
ott: oneTimeToken,
|
|
@@ -18672,7 +18748,7 @@ async function maybeLogInWithOneTimeToken$1(input) {
|
|
|
18672
18748
|
}) !== "completed") throw new Error("OpenMeld sign-in was cancelled before local preparation ran.");
|
|
18673
18749
|
}
|
|
18674
18750
|
function resolveSetupLocalAgentConnectionInputFacts(input) {
|
|
18675
|
-
const localAgentMode = normalizeOptionalString$
|
|
18751
|
+
const localAgentMode = normalizeOptionalString$6(input.localAgents);
|
|
18676
18752
|
return {
|
|
18677
18753
|
hasHumanProfile: typeof input.humanProfile === "string" && input.humanProfile.trim().length > 0,
|
|
18678
18754
|
hasLocalAgentIds: Array.isArray(input.localAgent) && input.localAgent.length > 0,
|
|
@@ -18760,7 +18836,7 @@ function collectReadinessReasonCodes(input) {
|
|
|
18760
18836
|
for (const reasonCode of input.agentReplyReadiness?.reasonCodes ?? []) if (!reasonCodes.includes(reasonCode)) reasonCodes.push(reasonCode);
|
|
18761
18837
|
return reasonCodes;
|
|
18762
18838
|
}
|
|
18763
|
-
function normalizeOptionalString$
|
|
18839
|
+
function normalizeOptionalString$6(value) {
|
|
18764
18840
|
const normalized = String(value ?? "").trim();
|
|
18765
18841
|
return normalized.length > 0 ? normalized : null;
|
|
18766
18842
|
}
|
|
@@ -19350,10 +19426,10 @@ async function runSetupStartupLocalStateRepair() {
|
|
|
19350
19426
|
await runLocalStateAlignment({ mode: "repair" });
|
|
19351
19427
|
}
|
|
19352
19428
|
function shouldUseSetupLocalAgentConnection(input) {
|
|
19353
|
-
return Boolean(normalizeOptionalString$
|
|
19429
|
+
return Boolean(normalizeOptionalString$5(input.startSession) ?? normalizeOptionalString$5(input.humanProfile) ?? normalizeOptionalString$5(input.profile) ?? (input.agent && input.agent.length > 0 ? "agent" : null));
|
|
19354
19430
|
}
|
|
19355
19431
|
async function maybeLogInWithOneTimeToken(input) {
|
|
19356
|
-
const oneTimeToken = normalizeOptionalString$
|
|
19432
|
+
const oneTimeToken = normalizeOptionalString$5(input.ott);
|
|
19357
19433
|
if (!oneTimeToken) return;
|
|
19358
19434
|
if (await runAuthLogin({
|
|
19359
19435
|
ott: oneTimeToken,
|
|
@@ -19362,7 +19438,7 @@ async function maybeLogInWithOneTimeToken(input) {
|
|
|
19362
19438
|
}) !== "completed") throw new Error("OpenMeld sign-in was cancelled before setup ran.");
|
|
19363
19439
|
}
|
|
19364
19440
|
function resolveSetupLocalAgentIds(input) {
|
|
19365
|
-
const localAgentMode = normalizeOptionalString$
|
|
19441
|
+
const localAgentMode = normalizeOptionalString$5(input.localAgents);
|
|
19366
19442
|
const localAgentIds = [...new Set((input.localAgent ?? []).map((agentId) => agentId.trim()).filter((agentId) => agentId.length > 0))];
|
|
19367
19443
|
if (localAgentMode && localAgentMode !== "all" && localAgentMode !== "none") throw new Error("--local-agents must be either all or none.");
|
|
19368
19444
|
if (localAgentMode && localAgentIds.length > 0) throw new Error("use either --local-agents <all|none> or --local-agent <id...>, not both");
|
|
@@ -19379,7 +19455,7 @@ function resolveSetupLocalAgentIds(input) {
|
|
|
19379
19455
|
return [...selectableById.keys()].sort((left, right) => left.localeCompare(right));
|
|
19380
19456
|
}
|
|
19381
19457
|
async function confirmZeroLocalAgentSetupIfNeeded(input) {
|
|
19382
|
-
if (input.selectedLocalAgentIds.length > 0 || normalizeOptionalString$
|
|
19458
|
+
if (input.selectedLocalAgentIds.length > 0 || normalizeOptionalString$5(input.localAgentsMode) === "none") return;
|
|
19383
19459
|
if (input.explicitSelection) {
|
|
19384
19460
|
emitSetupNoLocalAgentsWarning(input);
|
|
19385
19461
|
return;
|
|
@@ -19587,7 +19663,7 @@ function resolveRuntimeIdentityFromSetupSession(snapshot) {
|
|
|
19587
19663
|
};
|
|
19588
19664
|
}
|
|
19589
19665
|
function hasExplicitLocalAgentSelection(input) {
|
|
19590
|
-
return Boolean(normalizeOptionalString$
|
|
19666
|
+
return Boolean(normalizeOptionalString$5(input.localAgents) ?? (input.localAgent && input.localAgent.length > 0 ? "local-agent" : null));
|
|
19591
19667
|
}
|
|
19592
19668
|
function emitDefaultLocalAgentsNoticeIfNeeded(input) {
|
|
19593
19669
|
if (input.explicitSelection || input.interactive || input.selectedLocalAgentIds.length === 0) return;
|
|
@@ -19853,7 +19929,7 @@ function toErrorMessage$1(error) {
|
|
|
19853
19929
|
if (typeof error === "string" && error.trim().length > 0) return error.trim();
|
|
19854
19930
|
return "Unknown error.";
|
|
19855
19931
|
}
|
|
19856
|
-
function normalizeOptionalString$
|
|
19932
|
+
function normalizeOptionalString$5(value) {
|
|
19857
19933
|
const normalized = String(value ?? "").trim();
|
|
19858
19934
|
return normalized.length > 0 ? normalized : null;
|
|
19859
19935
|
}
|
|
@@ -21818,7 +21894,7 @@ function buildStartRecapItems() {
|
|
|
21818
21894
|
//#endregion
|
|
21819
21895
|
//#region src/start-shell/notices.ts
|
|
21820
21896
|
function renderStartWelcome(input) {
|
|
21821
|
-
const email = normalizeOptionalString$
|
|
21897
|
+
const email = normalizeOptionalString$4(input.session.user?.email) ?? "(unknown)";
|
|
21822
21898
|
if (input.runtime.resolvedView === "agent") {
|
|
21823
21899
|
input.presenter.data({
|
|
21824
21900
|
code: "start.welcome",
|
|
@@ -21832,10 +21908,10 @@ function renderStartWelcome(input) {
|
|
|
21832
21908
|
note([`Signed In: ${email}`, `Gateway: ${input.gatewayUrl}`].join("\n"), "Welcome");
|
|
21833
21909
|
}
|
|
21834
21910
|
function emitStartCompatibilityNotice(input) {
|
|
21835
|
-
const normalizedSkillsMode = normalizeOptionalString$
|
|
21911
|
+
const normalizedSkillsMode = normalizeOptionalString$4(input.input.skillsMode)?.toLowerCase();
|
|
21836
21912
|
const ignoredFlags = [
|
|
21837
|
-
normalizeOptionalString$
|
|
21838
|
-
normalizeOptionalString$
|
|
21913
|
+
normalizeOptionalString$4(input.input.agentModel) ? "--agent-model" : null,
|
|
21914
|
+
normalizeOptionalString$4(input.input.agentOwner) ? "--agent-owner" : null,
|
|
21839
21915
|
normalizedSkillsMode && normalizedSkillsMode !== "auto" ? "--skills-mode" : null
|
|
21840
21916
|
].filter((value) => value !== null);
|
|
21841
21917
|
if (ignoredFlags.length === 0) return;
|
|
@@ -21886,7 +21962,7 @@ function emitStartSetupHint(input) {
|
|
|
21886
21962
|
text: formatInlineOpenMeldCliCommands("If this computer needs local service or agent setup, run `openmeld setup`.")
|
|
21887
21963
|
});
|
|
21888
21964
|
}
|
|
21889
|
-
function normalizeOptionalString$
|
|
21965
|
+
function normalizeOptionalString$4(value) {
|
|
21890
21966
|
if (typeof value !== "string") return null;
|
|
21891
21967
|
const normalized = value.trim();
|
|
21892
21968
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -22329,7 +22405,7 @@ function ensureStartAgentIdentityPreflight(input) {
|
|
|
22329
22405
|
}
|
|
22330
22406
|
function shouldEnsureDefaultHumanProfile(input) {
|
|
22331
22407
|
if (input.resolvedView !== "human") return false;
|
|
22332
|
-
if (normalizeOptionalString$
|
|
22408
|
+
if (normalizeOptionalString$3(input.profileId) ?? normalizeOptionalString$3(input.profile)) return false;
|
|
22333
22409
|
return resolveCreateProfileInputFromArgs(input) === null;
|
|
22334
22410
|
}
|
|
22335
22411
|
function renderDefaultHumanProfileCard(input) {
|
|
@@ -22427,9 +22503,9 @@ async function resolveStartSelectedProfileFromArguments(input) {
|
|
|
22427
22503
|
return { handled: false };
|
|
22428
22504
|
}
|
|
22429
22505
|
function resolveExplicitStartProfile(input) {
|
|
22430
|
-
const explicitProfileId = normalizeOptionalString$
|
|
22506
|
+
const explicitProfileId = normalizeOptionalString$3(input.profileId);
|
|
22431
22507
|
if (explicitProfileId) return resolveOpenMeldProfile({ openMeldProfileId: explicitProfileId });
|
|
22432
|
-
const explicitProfile = normalizeOptionalString$
|
|
22508
|
+
const explicitProfile = normalizeOptionalString$3(input.profile);
|
|
22433
22509
|
if (!explicitProfile) return Promise.resolve(null);
|
|
22434
22510
|
return resolveOpenMeldProfile({ openMeldProfileId: explicitProfile }).catch(async () => {
|
|
22435
22511
|
const matched = (await listOpenMeldProfiles()).find((profile) => profile.profileName.toLowerCase() === explicitProfile.toLowerCase());
|
|
@@ -22539,7 +22615,7 @@ async function resolveInteractiveStartProfileSearchSelection(input) {
|
|
|
22539
22615
|
}
|
|
22540
22616
|
function resolveCreateProfileInputFromArgs(input) {
|
|
22541
22617
|
const kind = parseStartProfileKind(input.kind);
|
|
22542
|
-
const profileName = normalizeOptionalString$
|
|
22618
|
+
const profileName = normalizeOptionalString$3(input.profileName) ?? (kind === "agent" ? normalizeOptionalString$3(input.agentName) : null);
|
|
22543
22619
|
if (!(kind && profileName)) return null;
|
|
22544
22620
|
return {
|
|
22545
22621
|
kind,
|
|
@@ -22547,11 +22623,11 @@ function resolveCreateProfileInputFromArgs(input) {
|
|
|
22547
22623
|
};
|
|
22548
22624
|
}
|
|
22549
22625
|
function inspectStartAgentIdentityInput(input) {
|
|
22550
|
-
if (normalizeOptionalString$
|
|
22551
|
-
const rawKind = normalizeOptionalString$
|
|
22626
|
+
if (normalizeOptionalString$3(input.profileId) ?? normalizeOptionalString$3(input.profile)) return { status: "valid" };
|
|
22627
|
+
const rawKind = normalizeOptionalString$3(input.kind);
|
|
22552
22628
|
const parsedKind = parseStartProfileKind(input.kind);
|
|
22553
|
-
const rawProfileName = normalizeOptionalString$
|
|
22554
|
-
const rawAgentName = normalizeOptionalString$
|
|
22629
|
+
const rawProfileName = normalizeOptionalString$3(input.profileName);
|
|
22630
|
+
const rawAgentName = normalizeOptionalString$3(input.agentName);
|
|
22555
22631
|
if (parsedKind === "human") return {
|
|
22556
22632
|
status: "error",
|
|
22557
22633
|
summary: "agent view cannot create human profiles. use --kind agent, or switch to human view."
|
|
@@ -22751,7 +22827,7 @@ function throwStartAgentIdentityGuide(input) {
|
|
|
22751
22827
|
function formatStartProfileKindLabel(profileKind) {
|
|
22752
22828
|
return profileKind === "agent" ? "AI agent" : "human";
|
|
22753
22829
|
}
|
|
22754
|
-
function normalizeOptionalString$
|
|
22830
|
+
function normalizeOptionalString$3(value) {
|
|
22755
22831
|
const normalized = String(value ?? "").trim();
|
|
22756
22832
|
return normalized.length > 0 ? normalized : null;
|
|
22757
22833
|
}
|
|
@@ -24360,6 +24436,69 @@ function shortDigest(digest) {
|
|
|
24360
24436
|
return `${digest.slice(0, 12)}…`;
|
|
24361
24437
|
}
|
|
24362
24438
|
//#endregion
|
|
24439
|
+
//#region src/profile/current-session-command.ts
|
|
24440
|
+
const SUPPORTED_PROVIDERS = /* @__PURE__ */ new Set(["claude-code", "codex"]);
|
|
24441
|
+
async function runProfileCurrentSession(input) {
|
|
24442
|
+
const runtime = await resolveRuntimeContext({ view: input.view });
|
|
24443
|
+
const presenter = createPresenter(runtime);
|
|
24444
|
+
const session = resolveCurrentSessionInput(input);
|
|
24445
|
+
const result = await createAgentProfileBindingApi(createCliApiClientFoundation(await resolveBaseUrl())).getCurrentSession({
|
|
24446
|
+
agentControllerConversationId: session.agentControllerConversationId,
|
|
24447
|
+
agentControllerRef: session.agentControllerRef
|
|
24448
|
+
});
|
|
24449
|
+
if (runtime.resolvedView === "agent") {
|
|
24450
|
+
presenter.data({
|
|
24451
|
+
code: "profile.current_session",
|
|
24452
|
+
payload: result
|
|
24453
|
+
});
|
|
24454
|
+
return;
|
|
24455
|
+
}
|
|
24456
|
+
if (result.status === "not_found") {
|
|
24457
|
+
presenter.line({
|
|
24458
|
+
code: "profile.current_session.not_found",
|
|
24459
|
+
text: `No Agent Profile is bound to this ${session.conversationLabel} in the current account.`
|
|
24460
|
+
});
|
|
24461
|
+
return;
|
|
24462
|
+
}
|
|
24463
|
+
if (result.status === "unavailable") {
|
|
24464
|
+
presenter.line({
|
|
24465
|
+
code: "profile.current_session.unavailable",
|
|
24466
|
+
text: `OpenMeld found a Binding for this ${session.conversationLabel}, but its Agent Profile identity is unavailable (${result.reasonCode}).`
|
|
24467
|
+
});
|
|
24468
|
+
return;
|
|
24469
|
+
}
|
|
24470
|
+
presenter.line({
|
|
24471
|
+
code: "profile.current_session.found",
|
|
24472
|
+
text: result.sameOrganization ? `${result.profile.profileName} (${result.profile.profileId}) is bound to this ${session.conversationLabel} in the current Organization.` : `${result.profile.profileName} (${result.profile.profileId}) is bound to this ${session.conversationLabel}, but it belongs to Organization ${result.profile.profileOrganizationId}, not the current Organization ${result.currentOrganizationId}.`
|
|
24473
|
+
});
|
|
24474
|
+
}
|
|
24475
|
+
function resolveCurrentSessionInput(input) {
|
|
24476
|
+
const explicitProvider = normalizeOptionalString$2(input.provider)?.toLowerCase();
|
|
24477
|
+
const explicitSessionId = normalizeOptionalString$2(input.nativeSessionId);
|
|
24478
|
+
if (explicitProvider || explicitSessionId) {
|
|
24479
|
+
if (!(explicitProvider && explicitSessionId)) throw new Error("Pass both --provider and --native-session, or omit both to inspect the current Codex or Claude Code session.");
|
|
24480
|
+
if (!SUPPORTED_PROVIDERS.has(explicitProvider)) throw new Error("--provider must be codex or claude-code.");
|
|
24481
|
+
return {
|
|
24482
|
+
agentControllerConversationId: explicitSessionId,
|
|
24483
|
+
agentControllerRef: `builtin:${explicitProvider}`,
|
|
24484
|
+
conversationLabel: explicitProvider === "codex" ? "thread" : "session"
|
|
24485
|
+
};
|
|
24486
|
+
}
|
|
24487
|
+
const detected = detectLocalAgentEnvironment(process.env);
|
|
24488
|
+
if (detected.kind === "agent") return {
|
|
24489
|
+
agentControllerConversationId: detected.agentControllerConversationId,
|
|
24490
|
+
agentControllerRef: detected.agentControllerRef,
|
|
24491
|
+
conversationLabel: detected.conversationKind
|
|
24492
|
+
};
|
|
24493
|
+
if (detected.kind === "codex_missing_thread") throw new Error("This looks like Codex, but CODEX_THREAD_ID is unavailable. Pass --provider codex --native-session <thread-id>.");
|
|
24494
|
+
throw new Error("OpenMeld could not detect a current Codex or Claude Code session. Pass --provider and --native-session explicitly.");
|
|
24495
|
+
}
|
|
24496
|
+
function normalizeOptionalString$2(value) {
|
|
24497
|
+
if (typeof value !== "string") return null;
|
|
24498
|
+
const normalized = value.trim();
|
|
24499
|
+
return normalized.length > 0 ? normalized : null;
|
|
24500
|
+
}
|
|
24501
|
+
//#endregion
|
|
24363
24502
|
//#region src/profile/profile-update-cli-options.ts
|
|
24364
24503
|
function hasExplicitProfileUpdateField(input) {
|
|
24365
24504
|
return typeof input.name === "string" || typeof input.agentController === "string" || typeof input.agentControllerConversationId === "string" || typeof input.agentControllerPermissionMode === "string" || typeof input.model === "string" || typeof input.reasoningEffort === "string" || typeof input.workspaceMode === "string" || typeof input.workspacePath === "string";
|
|
@@ -27882,7 +28021,7 @@ function normalizeOptionalString(value) {
|
|
|
27882
28021
|
return normalized.length > 0 ? normalized : null;
|
|
27883
28022
|
}
|
|
27884
28023
|
async function runDefaultSpaceAddMeMembership(input) {
|
|
27885
|
-
const { runSpaceAddMeMembership } = await import("./add-me-membership-
|
|
28024
|
+
const { runSpaceAddMeMembership } = await import("./add-me-membership-C9IpIjBD.js");
|
|
27886
28025
|
return await runSpaceAddMeMembership(input);
|
|
27887
28026
|
}
|
|
27888
28027
|
//#endregion
|
|
@@ -29332,6 +29471,7 @@ function formatMemberAddressing(member) {
|
|
|
29332
29471
|
}
|
|
29333
29472
|
//#endregion
|
|
29334
29473
|
//#region src/space/members-command.ts
|
|
29474
|
+
const LEADING_MENTION_MARKER_PATTERN = /^@/;
|
|
29335
29475
|
async function runSpaceMembers(input) {
|
|
29336
29476
|
const context = await prepareAuthenticatedSpaceCommandContext({
|
|
29337
29477
|
profile: input.profile,
|
|
@@ -29356,33 +29496,124 @@ async function runSpaceMembers(input) {
|
|
|
29356
29496
|
initialPassword: input.password,
|
|
29357
29497
|
interactive: interactive && runtime.resolvedView === "human" && !input.json,
|
|
29358
29498
|
presenter,
|
|
29359
|
-
execute: async (password) =>
|
|
29360
|
-
|
|
29361
|
-
|
|
29362
|
-
|
|
29363
|
-
|
|
29499
|
+
execute: async (password) => {
|
|
29500
|
+
const request = {
|
|
29501
|
+
spaceId: input.space,
|
|
29502
|
+
requestContext,
|
|
29503
|
+
...password === void 0 ? {} : { spacePassword: password }
|
|
29504
|
+
};
|
|
29505
|
+
if (input.brief || input.target) {
|
|
29506
|
+
const [directory, snapshot] = await Promise.all([spaceApi.getMemberDirectory(request), spaceApi.getMembersSnapshot(request)]);
|
|
29507
|
+
return {
|
|
29508
|
+
directory,
|
|
29509
|
+
snapshot
|
|
29510
|
+
};
|
|
29511
|
+
}
|
|
29512
|
+
return {
|
|
29513
|
+
directory: await spaceApi.getMemberDirectory(request),
|
|
29514
|
+
snapshot: null
|
|
29515
|
+
};
|
|
29516
|
+
}
|
|
29364
29517
|
});
|
|
29365
29518
|
if (directoryRead.status === "cancelled") return;
|
|
29519
|
+
if (input.brief || input.target) {
|
|
29520
|
+
const brief = buildSpaceMembersBrief({
|
|
29521
|
+
directory: directoryRead.result.directory,
|
|
29522
|
+
snapshot: directoryRead.result.snapshot,
|
|
29523
|
+
target: input.target
|
|
29524
|
+
});
|
|
29525
|
+
if (input.json) {
|
|
29526
|
+
emitCliJsonEnvelope({
|
|
29527
|
+
schemaVersion: 1,
|
|
29528
|
+
type: "space.members.brief",
|
|
29529
|
+
...brief
|
|
29530
|
+
});
|
|
29531
|
+
return;
|
|
29532
|
+
}
|
|
29533
|
+
if (runtime.resolvedView === "agent") {
|
|
29534
|
+
presenter.data({
|
|
29535
|
+
code: "space.members.brief",
|
|
29536
|
+
payload: brief
|
|
29537
|
+
});
|
|
29538
|
+
return;
|
|
29539
|
+
}
|
|
29540
|
+
presenter.line({
|
|
29541
|
+
code: "space.members.brief",
|
|
29542
|
+
text: brief.members.map((member) => formatBriefMemberForHuman(member)).join("\n")
|
|
29543
|
+
});
|
|
29544
|
+
return;
|
|
29545
|
+
}
|
|
29366
29546
|
if (input.json) {
|
|
29367
29547
|
emitCliJsonEnvelope({
|
|
29368
29548
|
schemaVersion: 1,
|
|
29369
29549
|
type: "space.members",
|
|
29370
|
-
...directoryRead.result
|
|
29550
|
+
...directoryRead.result.directory
|
|
29371
29551
|
});
|
|
29372
29552
|
return;
|
|
29373
29553
|
}
|
|
29374
29554
|
if (runtime.resolvedView === "agent") {
|
|
29375
29555
|
emitSpaceMembersAgentOutput({
|
|
29376
|
-
directory: directoryRead.result,
|
|
29556
|
+
directory: directoryRead.result.directory,
|
|
29377
29557
|
presenter
|
|
29378
29558
|
});
|
|
29379
29559
|
return;
|
|
29380
29560
|
}
|
|
29381
29561
|
emitSpaceMembersHumanOutput({
|
|
29382
|
-
directory: directoryRead.result,
|
|
29562
|
+
directory: directoryRead.result.directory,
|
|
29383
29563
|
presenter
|
|
29384
29564
|
});
|
|
29385
29565
|
}
|
|
29566
|
+
function buildSpaceMembersBrief(input) {
|
|
29567
|
+
const selected = input.target ? [resolveUniqueMember(input.directory.members, input.target)] : input.directory.members;
|
|
29568
|
+
const agentsById = new Map((input.snapshot?.agents ?? []).map((agent) => [agent.profileId, agent]));
|
|
29569
|
+
return {
|
|
29570
|
+
spaceId: input.directory.spaceId,
|
|
29571
|
+
generatedAt: input.snapshot?.generatedAt ?? input.directory.generatedAt,
|
|
29572
|
+
members: selected.map((member) => {
|
|
29573
|
+
const readiness = agentsById.get(member.profileId)?.agentWakeAvailability;
|
|
29574
|
+
return {
|
|
29575
|
+
profileId: member.profileId,
|
|
29576
|
+
displayName: member.displayName,
|
|
29577
|
+
profileKind: member.profileKind,
|
|
29578
|
+
primaryMentionLabel: member.primaryMentionLabel,
|
|
29579
|
+
allowedRelations: member.allowedRelations,
|
|
29580
|
+
...readiness ? {
|
|
29581
|
+
wakeAvailability: {
|
|
29582
|
+
action: readiness.action,
|
|
29583
|
+
phase: readiness.phase,
|
|
29584
|
+
reasonCode: readiness.reasonCode,
|
|
29585
|
+
status: readiness.status,
|
|
29586
|
+
summary: readiness.summary
|
|
29587
|
+
},
|
|
29588
|
+
canWakeNow: readiness.status === "available_for_wake"
|
|
29589
|
+
} : {}
|
|
29590
|
+
};
|
|
29591
|
+
})
|
|
29592
|
+
};
|
|
29593
|
+
}
|
|
29594
|
+
function resolveUniqueMember(members, target) {
|
|
29595
|
+
const normalized = normalizeLookupToken(target);
|
|
29596
|
+
const matches = members.filter((member) => [
|
|
29597
|
+
member.profileId,
|
|
29598
|
+
member.profileIdShort,
|
|
29599
|
+
member.displayName,
|
|
29600
|
+
member.primaryMentionLabel,
|
|
29601
|
+
member.mentionAlias,
|
|
29602
|
+
...member.mentionLabels,
|
|
29603
|
+
...member.lookupTokens
|
|
29604
|
+
].some((candidate) => normalizeLookupToken(candidate) === normalized));
|
|
29605
|
+
if (matches.length === 1 && matches[0]) return matches[0];
|
|
29606
|
+
if (matches.length > 1) throw new Error(`Space member target ${target} is ambiguous. Use the exact profile ID.`);
|
|
29607
|
+
throw new Error(`Space member target ${target} was not found in this Space.`);
|
|
29608
|
+
}
|
|
29609
|
+
function normalizeLookupToken(value) {
|
|
29610
|
+
return String(value ?? "").trim().replace(LEADING_MENTION_MARKER_PATTERN, "").toLowerCase();
|
|
29611
|
+
}
|
|
29612
|
+
function formatBriefMemberForHuman(member) {
|
|
29613
|
+
let wake = "human member";
|
|
29614
|
+
if (member.profileKind === "agent") wake = member.canWakeNow ? "ready to Wake" : `not ready to Wake${member.wakeAvailability ? ` (${member.wakeAvailability.status})` : ""}`;
|
|
29615
|
+
return `${member.displayName} (${member.profileId}) — @${member.primaryMentionLabel}; ${wake}.`;
|
|
29616
|
+
}
|
|
29386
29617
|
//#endregion
|
|
29387
29618
|
//#region src/space/menu.ts
|
|
29388
29619
|
async function runSpaceMenu(input) {
|
|
@@ -32244,13 +32475,16 @@ computerCmd.command("list").description("List computers on your account.").actio
|
|
|
32244
32475
|
}
|
|
32245
32476
|
});
|
|
32246
32477
|
});
|
|
32247
|
-
computerCmd.command("current").description("Show this computer and its current OpenMeld diagnostics.").action(async () => {
|
|
32478
|
+
computerCmd.command("current").description("Show this computer and its current OpenMeld diagnostics.").option("--brief", "Print compact Wake, update, and local-agent readiness", false).action(async (opts) => {
|
|
32248
32479
|
const view = getGlobalViewOption();
|
|
32249
32480
|
await runCommandWithEntryChecks({
|
|
32250
32481
|
routeTokens: ["computer", "current"],
|
|
32251
32482
|
view,
|
|
32252
32483
|
run: async () => {
|
|
32253
|
-
await runComputerCurrent({
|
|
32484
|
+
await runComputerCurrent({
|
|
32485
|
+
view,
|
|
32486
|
+
brief: opts.brief === true
|
|
32487
|
+
});
|
|
32254
32488
|
}
|
|
32255
32489
|
});
|
|
32256
32490
|
});
|
|
@@ -32749,10 +32983,10 @@ serviceCmd.command("trace").description("Read a Space delivery trace for debuggi
|
|
|
32749
32983
|
profile: opts.profile,
|
|
32750
32984
|
gatewayUrl: opts.gatewayUrl,
|
|
32751
32985
|
run: async () => {
|
|
32752
|
-
const dispatchId = normalizeOptionalString$
|
|
32753
|
-
const sourceSignalId = normalizeOptionalString$
|
|
32754
|
-
const clientMessageId = normalizeOptionalString$
|
|
32755
|
-
const targetProfileId = normalizeOptionalString$
|
|
32986
|
+
const dispatchId = normalizeOptionalString$18(opts.dispatch);
|
|
32987
|
+
const sourceSignalId = normalizeOptionalString$18(opts.sourceSignal);
|
|
32988
|
+
const clientMessageId = normalizeOptionalString$18(opts.clientMessage);
|
|
32989
|
+
const targetProfileId = normalizeOptionalString$18(opts.targetProfile);
|
|
32756
32990
|
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");
|
|
32757
32991
|
await runServiceTrace({
|
|
32758
32992
|
profile: opts.profile,
|
|
@@ -32944,7 +33178,7 @@ spaceActionCmd.command("help").description("Show OpenMeld Space Action help.").a
|
|
|
32944
33178
|
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) => {
|
|
32945
33179
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
32946
33180
|
const view = getGlobalViewOption();
|
|
32947
|
-
if (view === "agent" && (normalizeOptionalString$
|
|
33181
|
+
if (view === "agent" && (normalizeOptionalString$18(opts.name) === null || normalizeOptionalString$18(opts.visibility) === null)) {
|
|
32948
33182
|
await runSpaceCreate({
|
|
32949
33183
|
profile: cliOptions.profile,
|
|
32950
33184
|
baseUrl: cliOptions.gatewayUrl,
|
|
@@ -33004,7 +33238,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
|
|
|
33004
33238
|
const localEcho = opts.noLocalEcho !== true;
|
|
33005
33239
|
const view = getGlobalViewOption();
|
|
33006
33240
|
if (opts.selfServe === true) {
|
|
33007
|
-
const spaceValue = normalizeOptionalString$
|
|
33241
|
+
const spaceValue = normalizeOptionalString$18(space);
|
|
33008
33242
|
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" });
|
|
33009
33243
|
await runCommandWithEntryChecks({
|
|
33010
33244
|
routeTokens: [
|
|
@@ -33028,7 +33262,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
|
|
|
33028
33262
|
});
|
|
33029
33263
|
return;
|
|
33030
33264
|
}
|
|
33031
|
-
if (view === "agent" && normalizeOptionalString$
|
|
33265
|
+
if (view === "agent" && normalizeOptionalString$18(space) === null) {
|
|
33032
33266
|
await runSpaceJoin({
|
|
33033
33267
|
profile: cliOptions.profile,
|
|
33034
33268
|
baseUrl: cliOptions.gatewayUrl,
|
|
@@ -33080,8 +33314,8 @@ withSpaceProfileOption(spaceCmd.command("wake-progress").description("Read live
|
|
|
33080
33314
|
profile: cliOptions.profile,
|
|
33081
33315
|
baseUrl: cliOptions.gatewayUrl,
|
|
33082
33316
|
space: String(space),
|
|
33083
|
-
clientMessageId: normalizeOptionalString$
|
|
33084
|
-
targetProfileId: normalizeOptionalString$
|
|
33317
|
+
clientMessageId: normalizeOptionalString$18(opts.clientMessage) ?? void 0,
|
|
33318
|
+
targetProfileId: normalizeOptionalString$18(opts.targetProfile) ?? void 0,
|
|
33085
33319
|
password: cliOptions.password,
|
|
33086
33320
|
view,
|
|
33087
33321
|
entryChecksHandled: true
|
|
@@ -33102,10 +33336,10 @@ withSpaceProfileOption(spaceCmd.command("wake-stop").description("Request Stop f
|
|
|
33102
33336
|
profile: cliOptions.profile,
|
|
33103
33337
|
baseUrl: cliOptions.gatewayUrl,
|
|
33104
33338
|
space: String(space),
|
|
33105
|
-
clientMessageId: normalizeOptionalString$
|
|
33106
|
-
sourceSignalId: normalizeOptionalString$
|
|
33339
|
+
clientMessageId: normalizeOptionalString$18(opts.clientMessage) ?? void 0,
|
|
33340
|
+
sourceSignalId: normalizeOptionalString$18(opts.sourceSignal) ?? void 0,
|
|
33107
33341
|
targetProfileId: String(opts.targetProfile),
|
|
33108
|
-
reason: normalizeOptionalString$
|
|
33342
|
+
reason: normalizeOptionalString$18(opts.reason) ?? void 0,
|
|
33109
33343
|
password: cliOptions.password,
|
|
33110
33344
|
view,
|
|
33111
33345
|
entryChecksHandled: true
|
|
@@ -33482,7 +33716,7 @@ withSpaceProfileOption(spaceCmd.command("board").description("Read the current S
|
|
|
33482
33716
|
}
|
|
33483
33717
|
});
|
|
33484
33718
|
});
|
|
33485
|
-
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) => {
|
|
33719
|
+
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("--brief", "Print compact member identities and Core-owned Wake availability", false).option("--target <member>", "Return one exact Space member by ID, name, or mention label").option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
|
|
33486
33720
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
33487
33721
|
const target = resolveSpaceReadCommandTarget({
|
|
33488
33722
|
baseUrl: cliOptions.gatewayUrl,
|
|
@@ -33502,6 +33736,8 @@ withSpaceProfileOption(spaceCmd.command("members").description("List the people
|
|
|
33502
33736
|
space: target.space,
|
|
33503
33737
|
password: cliOptions.password,
|
|
33504
33738
|
json: cliOptions.json === true,
|
|
33739
|
+
brief: opts.brief === true,
|
|
33740
|
+
target: opts.target,
|
|
33505
33741
|
view,
|
|
33506
33742
|
entryChecksHandled: true
|
|
33507
33743
|
});
|
|
@@ -33635,8 +33871,8 @@ withSpaceProfileOption(spaceCmd.command("updates").description("Read formal upda
|
|
|
33635
33871
|
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) => {
|
|
33636
33872
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
33637
33873
|
const spaceValue = String(space ?? "").trim();
|
|
33638
|
-
const dispatchId = normalizeOptionalString$
|
|
33639
|
-
const resultRef = normalizeOptionalString$
|
|
33874
|
+
const dispatchId = normalizeOptionalString$18(opts.dispatch);
|
|
33875
|
+
const resultRef = normalizeOptionalString$18(opts.resultRef);
|
|
33640
33876
|
const selectorCount = Number(dispatchId !== null) + Number(resultRef !== null);
|
|
33641
33877
|
const outputView = await resolveEffectiveViewForOutput();
|
|
33642
33878
|
if ((spaceValue.length === 0 || selectorCount !== 1) && outputView === "agent") throw createSpaceResultGuideError();
|
|
@@ -33993,6 +34229,20 @@ function shouldUseProfileCreationRequest(input) {
|
|
|
33993
34229
|
function assertSupportedProfileCreationRequestSessionInput(input) {
|
|
33994
34230
|
if (input.usesCreationRequest && typeof input.agentControllerConversationId === "string") throw createProfileCreateGuideError("--agent-controller-conversation-id cannot be combined with owner-request options because that legacy flag would lose the requested session. Use --session resume --native-session <id> instead.");
|
|
33995
34231
|
}
|
|
34232
|
+
profileCmd.command("current-session").description("Find the Agent Profile bound to this exact local Agent session without scanning profiles.").option("--provider <provider>", "Provider: codex or claude-code").option("--native-session <id>", "Exact provider thread or session ID").action(async (opts) => {
|
|
34233
|
+
const view = getGlobalViewOption();
|
|
34234
|
+
await runCommandWithEntryChecks({
|
|
34235
|
+
routeTokens: ["profile", "current-session"],
|
|
34236
|
+
view,
|
|
34237
|
+
run: async () => {
|
|
34238
|
+
await runProfileCurrentSession({
|
|
34239
|
+
nativeSessionId: opts.nativeSession,
|
|
34240
|
+
provider: opts.provider,
|
|
34241
|
+
view
|
|
34242
|
+
});
|
|
34243
|
+
}
|
|
34244
|
+
});
|
|
34245
|
+
});
|
|
33996
34246
|
profileCmd.command("list").alias("ls").description("List OpenMeld profiles.").action(async () => {
|
|
33997
34247
|
const view = getGlobalViewOption();
|
|
33998
34248
|
await runCommandWithEntryChecks({
|
|
@@ -34237,7 +34487,7 @@ async function maybeRunAgentViewRecoveryAfterSuccess(input) {
|
|
|
34237
34487
|
emitAgentViewHumanRecoveryHint();
|
|
34238
34488
|
}
|
|
34239
34489
|
async function handlePreParseStandaloneCommand(argv) {
|
|
34240
|
-
if (
|
|
34490
|
+
if (handleExplicitHelpCommand(argv)) return true;
|
|
34241
34491
|
if (isPassiveCliQueryArgv(argv)) {
|
|
34242
34492
|
await program.parseAsync(argv);
|
|
34243
34493
|
return true;
|
|
@@ -34275,6 +34525,10 @@ function isDispatchSpaceActionToolServerArgv(argv) {
|
|
|
34275
34525
|
}
|
|
34276
34526
|
async function runLocalCli(argv) {
|
|
34277
34527
|
try {
|
|
34528
|
+
if (isCliMetadataQueryArgv(argv)) {
|
|
34529
|
+
await handlePreParseStandaloneCommand(argv);
|
|
34530
|
+
return;
|
|
34531
|
+
}
|
|
34278
34532
|
await ensureSystemLayout();
|
|
34279
34533
|
const [startupCommand, startupSubcommand] = parseLeadingCommandTokensFromArgv(argv, 2);
|
|
34280
34534
|
if (!(isPassiveCliQueryArgv(argv) || startupCommand === "service" && startupSubcommand === "run")) await recoverInterruptedComputerAuthHandoff({
|
|
@@ -34398,11 +34652,11 @@ async function shouldPrintTagline(argv, effectiveView) {
|
|
|
34398
34652
|
if (!token) return false;
|
|
34399
34653
|
return TAGLINE_COMMANDS.has(token);
|
|
34400
34654
|
}
|
|
34401
|
-
|
|
34655
|
+
function handleExplicitHelpCommand(argv) {
|
|
34402
34656
|
const args = stripViewArgs(argv.slice(2));
|
|
34403
34657
|
if (args.length === 0 || args[0] !== "help") return false;
|
|
34404
34658
|
const targetTokens = parseHelpTargetTokens(args.slice(1));
|
|
34405
|
-
const effectiveView =
|
|
34659
|
+
const effectiveView = parseViewFromArgv(argv, { allowMissingValue: true }) === "agent" ? "agent" : "human";
|
|
34406
34660
|
if (targetTokens.length === 0) {
|
|
34407
34661
|
if (effectiveView === "agent") {
|
|
34408
34662
|
emitTopLevelCliAgentOverview("root");
|