openmeld 0.3.136 → 0.3.137
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-BNNtDZYW.js → add-me-membership-CZUHkjnP.js} +2 -2
- package/dist/{add-me-membership-BNNtDZYW.js.map → add-me-membership-CZUHkjnP.js.map} +1 -1
- package/dist/{api-client-foundation-CabWpjFe.js → api-client-foundation-BPmXnsr9.js} +4 -7
- package/dist/api-client-foundation-BPmXnsr9.js.map +1 -0
- package/dist/{auth-session-Bj8n8YwV.js → auth-session-B06nfwnD.js} +3 -6
- package/dist/auth-session-B06nfwnD.js.map +1 -0
- package/dist/{base-url-BtqW4aLS.js → base-url-CY_j4bLH.js} +13 -6
- package/dist/base-url-CY_j4bLH.js.map +1 -0
- package/dist/{command-BGqFPMwd.js → command-CU_3raCS.js} +309 -157
- package/dist/{command-BGqFPMwd.js.map → command-CU_3raCS.js.map} +1 -1
- package/dist/{daemon-runtime-lease-D82uDZ5s.js → daemon-runtime-lease-6DIprlJy.js} +2 -2
- package/dist/{daemon-runtime-lease-D82uDZ5s.js.map → daemon-runtime-lease-6DIprlJy.js.map} +1 -1
- package/dist/{dist-0qM_CVk2.js → dist-NJH-sDDB.js} +150 -35
- package/dist/dist-NJH-sDDB.js.map +1 -0
- package/dist/openmeld-dev.js +1 -1
- package/dist/openmeld.js +408 -222
- package/dist/openmeld.js.map +1 -1
- package/dist/{runtime-transport-BiQfJGnw.js → runtime-transport-DYzU1lHC.js} +30 -11
- package/dist/runtime-transport-DYzU1lHC.js.map +1 -0
- package/package.json +2 -2
- package/skills/README.md +5 -2
- package/skills/openmeld-cli/SKILL.md +109 -1151
- package/skills/openmeld-cli/playbooks/space-ops.md +34 -16
- package/skills/openmeld-cli/playbooks/space-reads.md +123 -0
- package/skills/openmeld-cli/references/commands.md +14 -9
- package/skills/openmeld-cli/references/runtime-resolution.md +21 -2
- package/dist/api-client-foundation-CabWpjFe.js.map +0 -1
- package/dist/auth-session-Bj8n8YwV.js.map +0 -1
- package/dist/base-url-BtqW4aLS.js.map +0 -1
- package/dist/dist-0qM_CVk2.js.map +0 -1
- package/dist/runtime-transport-BiQfJGnw.js.map +0 -1
package/dist/openmeld.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { $ as
|
|
4
|
-
import { $ as runAgentsManage, $a as LocalProjectConnectionError, $i as resetCurrentCommandCheckState, $n as isCliUpdateCheckApplicable, $o as cliJsonOutputEnvelopeSchema, $r as resolveServiceReadinessFromServiceStatus, $t as ensureLocalSkills, A as parseEnvelope, Aa as resolveViewProfileKey, Ai as getAgentControllerPermissionModeFieldLabel, An as submitProfileRuntimeAgentControllerReport, Ao as enqueueAgentActivityHookEvent, Ar as registerSpaceMemberSelectionOptions, At as createDelayedSpinner, B as resolveHumanControllerDisplayName, Ba as updateOpenMeldProfile, Bi as buildOnboardingPlan, Bn as buildDispatchResultMessageReadProjection, Bo as setDefaultProjectConnection, Br as buildDualViewGuideMessage, Bt as toStructuredGatewayFailure, C as toSpaceMetaUpsertInput, Ca as buildHumanErrorCopy, Ci as reconcileNewRunnableBuiltinAgentsForSetup, Cn as resolveCreateProfileName, Co as upsertDaemonServiceContract, Cr as createSpaceTargetGuideError, Ct as runDaemonStop, D as formatHumanReadTargetList, Da as formatMessage, Di as buildAgentControllerRef, Dn as resolveServiceParticipationReadiness, Do as resolveObservedAgentActivityBinding, Dr as createUpgradeConfirmationGuideError, Dt as buildProfileWorkspaceRows, E as buildHumanReplyContextSummary, Ea as createPresenter, Ei as resolveLocalRegistryAgentIdFromAgentControllerRef, En as formatServiceParticipationReadinessLabel, Eo as buildAgentActivityEvent, Er as createStartAuthenticationGuideError, Et as buildProfileWorkspacePresentation, F as resolveOpenMeldProfileForSpaceCommand, Fa as createOpenMeldHumanProfile, Fi as resolveAgentProfileEditCapabilities, Fn as resolveLocalAgentControllerLaunchability, Fo as listProjectBindings, Fr as registerAuthLoginRequestOptions, Ft as createCliSpaceApi, G as runAgentsCustomAdd, Ga as buildAgentAuthenticationGuide, Gi as classifyDaemonServiceWakeability, Gn as buildUpdatesReplyWorkflowProjection, Go as renderInfoCard, Gr as buildAgentFacingPublicationModeGuideLines, Gt as runDaemonServiceParticipationGate, H as resolveAgentProfileSetup, Ha as clearSelectedOpenMeldProfileId, Hi as buildDaemonServiceTargetSpec, Hn as buildSignalIndex, Ho as canonicalizeLocalProjectPath, Hr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ht as resolveLocalComponentsStatus, I as emitSpaceAgentOverview, Ia as deleteOpenMeldProfile, Ii as resolveEvidenceSyncHealth, In as resolveLocalAgentControllerReportDecision, Io as listProjectConnectionsWithStatus, Ir as registerBuiltinAgentSelectionOptions, It as fetchSpaceMeta, J as runAgentsCustomUpdate, Ja as resolveAuthenticationGuidance, Ji as resolveOpenMeldEnvironmentTarget, Jn as promptSearchMultiselect, Jo as emitCliJsonEnvelope, Jr as runPendingDaemonServiceUpdate, Jt as runSkillsCheck$1, K as runAgentsCustomList, Ka as buildHumanAuthenticationCard, Ki as resolveServiceUpdateUrgency, Kn as createSpaceMemberIdentityIndex, Ko as renderTextInfoCard, Kr as canonicalizeAllowedActions, Kt as runDaemonStartDecisionPrompt, L as emitSpaceCliAgentOverview, La as listOpenMeldProfiles, Li as resolveNativeAgentControllerPermissionModeForController, Ln as inspectSpaceCacheFile, Lo as migrateProjectBindingStore, Lr as buildAgentOverviewFromContract, Lt as updateSpaceMeta, M as assertFullSignalIdArgument, Ma as requireOpenMeldProfile, Mi as parseAgentControllerRef, Mn as submitRuntimeAgentControllerReports, Mo as readAgentActivityOutboxHealth, Mr as registerSkillsTargetSelectionOptions, Mt as runDaemonStartupPreflight, N as assertValidSpaceIdTarget, Na as resolveOpenMeldProfileOrNull, Ni as resolveAgentControllerPermissionModeForController, Nn as collectLocalAgentControllerInventory, No as removeProjectOutbox, Nr as getCliVersionInfo, Nt as readDaemonStartFailureLogTailLines, O as resolveLinkAccessLabel, Oa as parseCliViewMode, Oi as createAgentExecutionStatusDisplayRows, On as assessActionParticipationCandidate, Oo as normalizeSharedSessionTitle, Or as getCommandEntryContract, Ot as reconcileCliVersionView, P as prepareAuthenticatedSpaceCommandContext, Pa as createOpenMeldAgentProfile, Pi as resolveAgentExecutionStatus, Pn as resolveLocalAgentControllerBlockerReasonCodes, Po as bindProject, Pr as registerDaemonControlTargetOptions, Pt as fetchSpaceUpdates, Q as runAgentsList, Qa as setProfileDefaultView, Qi as isCurrentCommandCheckScopeActive, Qn as assessCliUpdate, Qo as cliBinaryDeltaPatchSchema, Qr as formatDaemonFailureContextText, Qt as runSkillsUpdate, R as prepareLocalAgentReadiness, Ra as primeOpenMeldProfilesSessionCache, Rn as upsertSpaceConfig, Ro as removeProjectConnection, Rr as DualViewGuideError, Rt as readGatewayJsonResponse, S as loadSpaceSignalIndexOrNull, Sa as OPENMELD_VERSION, Si as listAgentTargetStates, Sn as resolveCreateProfileKind, So as readDaemonServiceContract, Sr as createSpaceSubcommandTargetGuideError, St as runDaemonStatusFlow, T as buildFormalSignalReadPayload, Ta as renderHumanTextErrorCard, Ti as notifyDaemonRouteCatalogChanged, Tn as ensureAgentProfileRuntimeBinding, To as removeAgentActivityContextCache, Tr as createStartAgentIdentityGuideError, Tt as runDaemonUninstall, U as runAgents, Ua as getSelectedOpenMeldProfileId, Ui as resolveDaemonServiceAlignmentDecision, Un as buildSignalMessageReadProjection, Uo as enqueueControllerTaskLifecycleEventWhileLocked, Ur as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Ut as writeInstalledLocalComponentsSnapshot, V as persistAgentTransportSelection, Va as alignSelectedOpenMeldProfileStorage, Vi as getSetupFlowCopy, Vn as buildDispatchResultReplyWorkflowProjection, Vo as unbindProject, Vr as formatAgentOverviewPayload, Vt as parseJsonResponse, W as runAgentsConfig, Wa as setSelectedOpenMeldProfileId, Wi as classifyDaemonServiceRunStartability, Wn as buildSpaceRoundReadProjection, Wo as readControllerTaskLifecycleOutboxHealth, Wr as areAllowedActionsEquivalent, Wt as resolveDaemonServiceParticipationStatus, X as runAgentsDisable, Xa as resolveAuthenticationGuidanceFromMessage, Xi as finishCurrentCommandCheckScope, Xn as isReturnKeypress, Xo as outJsonLine, Xr as ensureDaemonRuntimePaths, Xt as runSkillsInstall, Y as runAgentsDetect, Ya as resolveAuthenticationGuidanceFromError, Yi as resolveAuthBaseUrl, Yn as promptSearchSelect, Yo as errLine, Yr as scheduleDaemonServiceUpdate, Yt as runSkillsEnsure, Z as runAgentsEnable, Za as getProfileDefaultView, Zi as getCurrentCommandCheckState, Zn as runInteractivePrompt, Zo as outLine, Zr as resolveDaemonDeviceId, Zt as runSkillsUninstall, _ as runSpaceWriteWithPasswordRetry, _a as readVersionState, _i as validateCustomProfileWorkspacePath, _n as requestDeviceToken, _o as formatOpenMeldCliTextBlock, _r as createSpaceLeaveGuideError, _t as runDaemonInstall, a as runSpaceDelete, aa as getDaemonSystemServiceLogPath, ai as mapAgentReplyReadinessToLegacyAutoReply, an as ensureCommandAuthenticationOrCancel, ao as resolveAgentActivityRouteForPath, ar as resolveElapsedTimeMs, as as revokeOrganizationJoinLinkResponseSchema, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as toStartBackgroundHelperExecutionCompatibility, bi as createPrimaryBindingReadSession, bn as revokeAuthAccessToken, bo as resolveUserFacingCliEntryCommand, br as createSpaceRemoveMembersGuideError, bt as runDaemonRunAfterEntryChecks, c as runSpaceLeave, ca as resolveDaemonServiceManager, ci as syncProfileWorkspaceState, cn as runAuthLogout, co as defaultManagedIntegrationPaths, cr as canUseInteractivePrompts, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as performManagedInstall, di as ensureOpenMeldManagedProfileWorkspace, dn as exchangeOneTimeTokenAuthSession, do as resolveAgentActivityDispatcherCommand, dr as createProfileCreateGuideError, dt as resolveSpaceSendText, ea as startCurrentCommandCheckScope, ei as resolveDaemonServiceFreshnessWarning, en as readBundledOpenMeldCliSkillDocumentByPath, eo as validateLocalProjectConnectionPath, er as assertDispatchOwnedRuntimePublicWriteAllowed, es as cliJsonSkillsListEnvelopeSchema, et as runAgentsRepair, f as runSpaceSend, fa as buildNextVersionState, fi as normalizeCustomProfileWorkspacePath, fn as buildAuthStatusRows, fo as uninstallAgentActivityIntegrations, fr as createProfileMenuGuideError, ft as bestEffortStopCurrentLaneDaemonService, g as runSpaceReadWithPasswordRetry, ga as fetchLatestPackageInfo, gi as setOpenMeldManagedProfileWorkspace, gn as fetchAuthUserSnapshot, go as formatOpenMeldCliLine, gr as createSpaceContractSetGuideError, gt as runDaemonCancel, h as uploadPreparedSpaceFiles, ha as fetchLatestCliBinaryRelease, hi as setCustomProfileWorkspace, hn as extractAuthApiErrorMessage, ho as formatOpenMeldCliCommands, hr as createSpaceAliasTargetGuideError, ht as runDaemonBackgroundStartForDecision, i as runSpaceCreate, ia as readCurrentObservedDaemonRuntimeStatus, ii as formatHumanReplyReadinessReason$1, in as buildCommandAuthenticationPromptMessage, io as registerAgentActivityRoute, ir as formatElapsedTime, is as organizationJoinLinkErrorResponseSchema, it as colorizeDisplayProfileLabel, j as isSpaceCommandOutputHandledError, ja as isSelectedOpenMeldProfileRequiredError, ji as listAgentControllerPermissionModeOptions, jn as submitRuntimeAgentControllerReport, jo as removeProjectInbox, jr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, jt as shouldEmitAgentOverview, k as resolveOrganizationVisibilityLabel, ka as resolveRuntimeContext, ki as getAgentControllerPermissionModeDisplayMetadata, kn as computeRetryDelayMs, ko as readCodexSessionTitles, kr as getCommandHintsFromContract, kt as emitDaemonAgentOverview, l as runSpaceList, la as readRecentDaemonLifecycleEvents, li as createModelCatalogReadSession, ln as runAuthMenu, lo as installAgentActivityIntegrations, lr as createDoctorFailedGuideError, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as ensureVersionStateReady, mi as resolveConfiguredProfileWorkspacePath, mn as formatActiveOrganizationLabel, mo as formatOpenMeldCliCommand, mr as createSpaceAddMembersGuideError, mt as runDaemonAutostart, n as promptAndConfirmSpacePassword, na as resolveVersionChangeDirection, ni as formatAgentReplyReadinessLabel, nn as readRecentDaemonDispatchJournalEvents, no as requestLocalAgentActivitySync, nr as readDispatchSpaceActionContextFromEnv, ns as cliJsonSkillsShowEnvelopeSchema, nt as formatTransportModeDisplay, o as runSpaceHistory, oa as isDaemonServiceJobNeverSpawned, oi as resolveGatewayChainReadiness, on as evaluateCommandAuthentication, oo as unregisterAgentActivityRoute, or as formatDaemonServiceDowngradeBlockedRecommendation, os as compareAgentControllerRefsForDisplay, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as compareSemver, pi as readProfileWorkspaceConfig, pn as buildAuthStatusSnapshot, po as formatInlineOpenMeldCliCommands, pr as createResetConfirmationGuideError, pt as runDaemon, q as runAgentsCustomRemove, qa as createAuthenticationError, qi as assessServerRequiredVersion, qn as formatRemovedCcRelationMessage, qo as sanitizeTerminalDisplayText, qr as readOpenMeldToolsUpdateContextFromEnv, qt as collectSkillsReadinessSnapshot, r as runSpaceAddMembers, ra as readCurrentDaemonRuntimeContext, ri as formatDeviceReplyReadinessLabel, rn as connectWebSocket, ro as isAgentActivityRouteRegistered, rr as writeDispatchSpaceActionRecord, rs as getOrganizationJoinLinkResponseSchema, rt as colorizeAgentLabel, s as runSpaceJoin, sa as readDaemonServiceJobCrashExitCode, si as resolveOpenClawLocalDiagnosticsValue, sn as runAuthLogin, sr as formatDaemonServiceMissingRecommendation, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as inspectDaemonServiceInventory, ti as resolveCurrentReplyReadinessSnapshot, tn as readRuntimeReportingHealthState, to as LocalDaemonControlPlaneClientError, tr as readDispatchOwnedRuntimeGuard, ts as cliJsonSkillsLoadEnvelopeSchema, tt as runAgentsShow, u as runSpacePassword, ua as buildInstallSelfJsonPayload, ui as resolveProfileWorkspaceRuntime, un as runAuthStatus, uo as readAgentActivityIntegrationStatus, ur as createProfileActionGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as writeVersionState, vi as describeProfileWorkspacePathValidationFailure, vn as resolveDeviceAuthClientId, vo as formatProfileAwareOpenMeldCliCommands, vr as createSpaceMenuGuideError, vt as runDaemonInterrupt, w as buildFormalDispatchResultReadPayload, wa as renderHumanErrorCard, wi as listBuiltinAgentsRegistryEntries, wn as promptTextEntry, wo as readAgentActivityContextForPath, wr as createSpaceUpdatesGuideError, wt as runDaemonTeardownStrict, x as loadSpaceIdentityDirectoryOrNull, xa as resolveCurrentDaemonExpectedVersion, xi as resolveAgentProfilePrimaryAgentControllerReport, xn as createProfileByKind, xo as syncLocalAgentActivity, xr as createSpaceResultGuideError, xt as runDaemonSnapshot, y as emitHumanReadSignalsTextProjection, ya as resolveDaemonRuntimeContractCompatibility, yi as syncDeviceRuntimeStateProjection, yn as resolveDeviceTokenExpiresAt, yo as resolveSetupFollowUpCliEntryCommand, yr as createSpacePublicationSetGuideError, yt as runDaemonReinstall, z as buildReplyReadinessGuidance, za as resolveOpenMeldProfile, zi as buildDaemonRouteObservationPresentation$1, zn as assertNoRemovedCcSpaceAddressingSyntax, zo as runIfAgentActivityBindingGenerationIsCurrent, zr as formatDualViewGuideForDisplay, zt as readGatewayTextResponse } from "./command-BGqFPMwd.js";
|
|
5
|
-
import {
|
|
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-
|
|
3
|
+
import { $ as resolveOpenMeldOrphanedLockIssue, $t as systemDir, A as toSpaceContractUrl, Bt as organizationSkillReleaseDir, Ct as accountProfileViewPath, D as normalizeBaseUrl, E as updateConfiguredStartV1OnboardingState, F as toSpaceDispatchTraceUrl, Ft as openMeldManagedBinaryPath, G as acquireLock, Gt as resolveOpenMeldCliEntryNameFromArgv, Ht as profileViewPath, It as openMeldManagedVersionBinaryPath, J as isOpenMeldOrphanedLockError, Jt as resolveOpenMeldRootDir, K as buildOpenMeldOrphanedLockAction, Kt as resolveOpenMeldEnvPreset, Nt as openMeldBackupsDir, P as toSpaceDispatchLookupUrl, Q as repairOrphanedLegacyLocks, Qt as spacesDir, Rt as openMeldRootDir, S as setConfiguredSkillsConfig, St as accountProfileSpaceCacheDir, Tt as accountsDir, V as toSpaceResultUrl, Vt as profileDir, Z as releaseLockSync, Zt as skillsDir, _t as toRecognizedLocalMachineFailureError, a as resolveBaseUrl, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, dt as LocalMachineFailureError, en as formatLocalMachineIssueMessage, et as runWithHeldLock, g as getConfiguredSkillsConfig, gt as isLocalMachineFailureError, ht as createOrphanedSetupConcurrencyIssue, jt as normalizeAccountKey, k as toSpaceBoardUrl, lt as formatLaneScopeSentence, m as getConfiguredOnboardingDisclaimerAcceptedAt, nt as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, o as resolveBaseUrlOrNull, ot as resolveCliContext, pt as createActiveSetupConcurrencyIssue, q as isOpenMeldLockError, rt as OPENMELD_CLI_CONTEXT_ENV_KEY, sn as agentControllerConversationRefSchema, u as alignRuntimeConfigStorage, ut as resolveOpenMeldLaneDescriptor, w as updateConfiguredOnboardingConfig } from "./base-url-CY_j4bLH.js";
|
|
4
|
+
import { $ as runAgentsManage, $a as setProfileDefaultView, $i as isCurrentCommandCheckScopeActive, $n as assessCliUpdate, $o as cliBinaryDeltaPatchSchema, $r as formatDaemonFailureContextText, $t as runSkillsUpdate, A as parseEnvelope, Aa as resolveRuntimeContext, Ai as getAgentControllerPermissionModeDisplayMetadata, An as computeRetryDelayMs, Ao as readCodexSessionTitles, Ar as getCommandHintsFromContract, At as emitDaemonAgentOverview, B as resolveHumanControllerDisplayName, Ba as resolveOpenMeldProfile, Bi as buildDaemonRouteObservationPresentation$1, Bn as assertNoRemovedCcSpaceAddressingSyntax, Bo as runIfAgentActivityBindingGenerationIsCurrent, Br as formatDualViewGuideForDisplay, Bt as readGatewayTextResponse, C as toSpaceMetaUpsertInput, Ca as OPENMELD_VERSION, Ci as listAgentTargetStates, Cn as resolveCreateProfileKind, Co as readDaemonServiceContract, Cr as createSpaceSubcommandTargetGuideError, Ct as runDaemonStatusFlow, D as formatHumanReadTargetList, Da as createPresenter, Di as resolveLocalRegistryAgentIdFromAgentControllerRef, Dn as formatServiceParticipationReadinessLabel, Do as buildAgentActivityEvent, Dr as createStartAuthenticationGuideError, Dt as buildProfileWorkspacePresentation, E as buildHumanReplyContextSummary, Ea as renderHumanTextErrorCard, Ei as notifyDaemonRouteCatalogChanged, En as ensureAgentProfileRuntimeBinding, Eo as removeAgentActivityContextCache, Er as createStartAgentIdentityGuideError, Et as runDaemonUninstall, F as resolveOpenMeldProfileForSpaceCommand, Fa as createOpenMeldAgentProfile, Fi as resolveAgentExecutionStatus, Fn as resolveLocalAgentControllerBlockerReasonCodes, Fo as bindProject, Fr as registerDaemonControlTargetOptions, Ft as fetchSpaceUpdates, G as runAgentsCustomAdd, Ga as setSelectedOpenMeldProfileId, Gi as classifyDaemonServiceRunStartability, Gn as buildSpaceRoundReadProjection, Go as readControllerTaskLifecycleOutboxHealth, Gr as areAllowedActionsEquivalent, Gt as resolveDaemonServiceParticipationStatus, H as resolveAgentProfileSetup, Ha as alignSelectedOpenMeldProfileStorage, Hi as getSetupFlowCopy, Hn as buildDispatchResultReplyWorkflowProjection, Ho as unbindProject, Hr as formatAgentOverviewPayload, Ht as parseJsonResponse, I as emitSpaceAgentOverview, Ia as createOpenMeldHumanProfile, Ii as resolveAgentProfileEditCapabilities, In as resolveLocalAgentControllerLaunchability, Io as listProjectBindings, Ir as registerAuthLoginRequestOptions, It as createCliSpaceApi, J as runAgentsCustomUpdate, Ja as createAuthenticationError, Ji as assessServerRequiredVersion, Jn as formatRemovedCcRelationMessage, Jo as sanitizeTerminalDisplayText, Jr as readOpenMeldToolsUpdateContextFromEnv, Jt as collectSkillsReadinessSnapshot, K as runAgentsCustomList, Ka as buildAgentAuthenticationGuide, Ki as classifyDaemonServiceWakeability, Kn as buildUpdatesReplyWorkflowProjection, Ko as renderInfoCard, Kr as buildAgentFacingPublicationModeGuideLines, Kt as runDaemonServiceParticipationGate, L as emitSpaceCliAgentOverview, La as deleteOpenMeldProfile, Li as resolveEvidenceSyncHealth, Ln as resolveLocalAgentControllerReportDecision, Lo as listProjectConnectionsWithStatus, Lr as registerBuiltinAgentSelectionOptions, Lt as fetchSpaceMeta, M as assertFullSignalIdArgument, Ma as isSelectedOpenMeldProfileRequiredError, Mi as listAgentControllerPermissionModeOptions, Mn as submitRuntimeAgentControllerReport, Mo as removeProjectInbox, Mr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Mt as shouldEmitAgentOverview, N as assertValidSpaceIdTarget, Na as requireOpenMeldProfile, Ni as parseAgentControllerRef, Nn as submitRuntimeAgentControllerReports, No as readAgentActivityOutboxHealth, Nr as registerSkillsTargetSelectionOptions, Nt as runDaemonStartupPreflight, O as resolveLinkAccessLabel, Oa as formatMessage, Oi as buildAgentControllerRef, On as resolveServiceParticipationReadiness, Oo as resolveObservedAgentActivityBinding, Or as createUpgradeConfirmationGuideError, Ot as buildProfileWorkspaceRows, P as prepareAuthenticatedSpaceCommandContext, Pa as resolveOpenMeldProfileOrNull, Pi as resolveAgentControllerPermissionModeForController, Pn as collectLocalAgentControllerInventory, Po as removeProjectOutbox, Pr as getCliVersionInfo, Pt as readDaemonStartFailureLogTailLines, Q as runAgentsList, Qa as getProfileDefaultView, Qi as getCurrentCommandCheckState, Qn as runInteractivePrompt, Qo as outLine, Qr as resolveDaemonDeviceId, Qt as runSkillsUninstall, R as prepareLocalAgentReadiness, Ra as listOpenMeldProfiles, Ri as resolveNativeAgentControllerPermissionModeForController, Rn as inspectSpaceCacheFile, Ro as migrateProjectBindingStore, Rr as buildAgentOverviewFromContract, Rt as updateSpaceMeta, S as loadSpaceSignalIndexOrNull, Sa as resolveCurrentDaemonExpectedVersion, Si as resolveAgentProfilePrimaryAgentControllerReport, Sn as createProfileByKind, So as syncLocalAgentActivity, Sr as createSpaceResultGuideError, St as runDaemonSnapshot, T as buildFormalSignalReadPayload, Ta as renderHumanErrorCard, Ti as listBuiltinAgentsRegistryEntries, Tn as promptTextEntry, To as readAgentActivityContextForPath, Tr as createSpaceUpdatesGuideError, Tt as runDaemonTeardownStrict, U as runAgents, Ua as clearSelectedOpenMeldProfileId, Ui as buildDaemonServiceTargetSpec, Un as buildSignalIndex, Uo as canonicalizeLocalProjectPath, Ur as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ut as resolveLocalComponentsStatus, V as persistAgentTransportSelection, Va as updateOpenMeldProfile, Vi as buildOnboardingPlan, Vn as buildDispatchResultMessageReadProjection, Vo as setDefaultProjectConnection, Vr as buildDualViewGuideMessage, Vt as toStructuredGatewayFailure, W as runAgentsConfig, Wa as getSelectedOpenMeldProfileId, Wi as resolveDaemonServiceAlignmentDecision, Wn as buildSignalMessageReadProjection, Wo as enqueueControllerTaskLifecycleEventWhileLocked, Wr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Wt as writeInstalledLocalComponentsSnapshot, X as runAgentsDisable, Xa as resolveAuthenticationGuidanceFromError, Xi as resolveAuthBaseUrl, Xn as promptSearchSelect, Xo as errLine, Xr as scheduleDaemonServiceUpdate, Xt as runSkillsEnsure, Y as runAgentsDetect, Ya as resolveAuthenticationGuidance, Yi as resolveOpenMeldEnvironmentTarget, Yn as promptSearchMultiselect, Yo as emitCliJsonEnvelope, Yr as runPendingDaemonServiceUpdate, Yt as runSkillsCheck$1, Z as runAgentsEnable, Za as resolveAuthenticationGuidanceFromMessage, Zi as finishCurrentCommandCheckScope, Zn as isReturnKeypress, Zo as outJsonLine, Zr as ensureDaemonRuntimePaths, Zt as runSkillsInstall, _ as runSpaceWriteWithPasswordRetry, _a as fetchLatestPackageInfo, _i as setOpenMeldManagedProfileWorkspace, _n as fetchAuthUserSnapshot, _o as formatOpenMeldCliLine, _r as createSpaceContractSetGuideError, _t as runDaemonCancel, a as runSpaceDelete, aa as readCurrentObservedDaemonRuntimeStatus, ai as formatHumanReplyReadinessReason$1, an as buildCommandAuthenticationPromptMessage, ao as registerAgentActivityRoute, ar as formatElapsedTime, as as organizationJoinLinkErrorResponseSchema, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as resolveDaemonRuntimeContractCompatibility, bi as syncDeviceRuntimeStateProjection, bn as resolveDeviceTokenExpiresAt, bo as resolveSetupFollowUpCliEntryCommand, br as createSpacePublicationSetGuideError, bt as runDaemonReinstall, c as runSpaceLeave, ca as readDaemonServiceJobCrashExitCode, ci as resolveOpenClawLocalDiagnosticsValue, cn as runAuthLogin, cr as formatDaemonServiceMissingRecommendation, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as buildInstallSelfJsonPayload, di as resolveProfileWorkspaceRuntime, dn as runAuthStatus, do as readAgentActivityIntegrationStatus, dr as createProfileActionGuideError, dt as resolveSpaceWebGatewayOrigin, ea as resetCurrentCommandCheckState, ei as resolveServiceReadinessFromServiceStatus, en as ensureLocalSkills, eo as LocalProjectConnectionError, er as isCliUpdateCheckApplicable, es as cliJsonOutputEnvelopeSchema, et as runAgentsRepair, f as runSpaceSend, fa as performManagedInstall, fi as ensureOpenMeldManagedProfileWorkspace, fn as exchangeOneTimeTokenAuthSession, fo as resolveAgentActivityDispatcherCommand, fr as createProfileCreateGuideError, ft as resolveSpaceSendText, g as runSpaceReadWithPasswordRetry, ga as fetchLatestCliBinaryRelease, gi as setCustomProfileWorkspace, gn as extractAuthApiErrorMessage, go as formatOpenMeldCliCommands, gr as createSpaceAliasTargetGuideError, gt as runDaemonBackgroundStartForDecision, h as uploadPreparedSpaceFiles, ha as ensureVersionStateReady, hi as resolveConfiguredProfileWorkspacePath, hn as formatActiveOrganizationLabel, ho as formatOpenMeldCliCommand, hr as createSpaceAddMembersGuideError, ht as runDaemonAutostart, i as runSpaceCreate, ia as readCurrentDaemonRuntimeContext, ii as formatDeviceReplyReadinessLabel, in as connectWebSocket, io as isAgentActivityRouteRegistered, ir as writeDispatchSpaceActionRecord, is as getOrganizationJoinLinkResponseSchema, it as colorizeDisplayProfileLabel, j as isSpaceCommandOutputHandledError, ja as resolveViewProfileKey, ji as getAgentControllerPermissionModeFieldLabel, jn as submitProfileRuntimeAgentControllerReport, jo as enqueueAgentActivityHookEvent, jr as registerSpaceMemberSelectionOptions, jt as createDelayedSpinner, k as resolveOrganizationVisibilityLabel, ka as parseCliViewMode, ki as createAgentExecutionStatusDisplayRows, kn as assessActionParticipationCandidate, ko as normalizeSharedSessionTitle, kr as getCommandEntryContract, kt as reconcileCliVersionView, l as runSpaceList, la as resolveDaemonServiceManager, li as syncProfileWorkspaceState, ln as runAuthLogout, lo as defaultManagedIntegrationPaths, lr as canUseInteractivePrompts, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as compareSemver, mi as readProfileWorkspaceConfig, mn as buildAuthStatusSnapshot, mo as formatInlineOpenMeldCliCommands, mr as createResetConfirmationGuideError, mt as runDaemon, n as promptAndConfirmSpacePassword, na as inspectDaemonServiceInventory, ni as resolveCurrentReplyReadinessSnapshot, nn as readRuntimeReportingHealthState, no as LocalDaemonControlPlaneClientError, nr as readDispatchOwnedRuntimeGuard, ns as cliJsonSkillsLoadEnvelopeSchema, nt as formatTransportModeDisplay, o as runSpaceHistory, oa as getDaemonSystemServiceLogPath, oi as mapAgentReplyReadinessToLegacyAutoReply, on as ensureCommandAuthenticationOrCancel, oo as resolveAgentActivityRouteForPath, or as resolveElapsedTimeMs, os as revokeOrganizationJoinLinkResponseSchema, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as buildNextVersionState, pi as normalizeCustomProfileWorkspacePath, pn as buildAuthStatusRows, po as uninstallAgentActivityIntegrations, pr as createProfileMenuGuideError, pt as bestEffortStopCurrentLaneDaemonService, q as runAgentsCustomRemove, qa as buildHumanAuthenticationCard, qi as resolveServiceUpdateUrgency, qn as createSpaceMemberIdentityIndex, qo as renderTextInfoCard, qr as canonicalizeAllowedActions, qt as runDaemonStartDecisionPrompt, r as runSpaceAddMembers, ra as resolveVersionChangeDirection, ri as formatAgentReplyReadinessLabel, rn as readRecentDaemonDispatchJournalEvents, ro as requestLocalAgentActivitySync, rr as readDispatchSpaceActionContextFromEnv, rs as cliJsonSkillsShowEnvelopeSchema, rt as colorizeAgentLabel, s as runSpaceJoin, sa as isDaemonServiceJobNeverSpawned, si as resolveGatewayChainReadiness, sn as evaluateCommandAuthentication, so as unregisterAgentActivityRoute, sr as formatDaemonServiceDowngradeBlockedRecommendation, ss as compareAgentControllerRefsForDisplay, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as startCurrentCommandCheckScope, ti as resolveDaemonServiceFreshnessWarning, tn as readBundledOpenMeldCliSkillDocumentByPath, to as validateLocalProjectConnectionPath, tr as assertDispatchOwnedRuntimePublicWriteAllowed, ts as cliJsonSkillsListEnvelopeSchema, tt as runAgentsShow, u as runSpacePassword, ua as readRecentDaemonLifecycleEvents, ui as createModelCatalogReadSession, un as runAuthMenu, uo as installAgentActivityIntegrations, ur as createDoctorFailedGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as readVersionState, vi as validateCustomProfileWorkspacePath, vn as requestDeviceToken, vo as formatOpenMeldCliTextBlock, vr as createSpaceLeaveGuideError, vt as runDaemonInstall, w as buildFormalDispatchResultReadPayload, wa as buildHumanErrorCopy, wi as reconcileNewRunnableBuiltinAgentsForSetup, wn as resolveCreateProfileName, wo as upsertDaemonServiceContract, wr as createSpaceTargetGuideError, wt as runDaemonStop, x as loadSpaceIdentityDirectoryOrNull, xa as toStartBackgroundHelperExecutionCompatibility, xi as createPrimaryBindingReadSession, xn as revokeAuthAccessToken, xo as resolveUserFacingCliEntryCommand, xr as createSpaceRemoveMembersGuideError, xt as runDaemonRunAfterEntryChecks, y as emitHumanReadSignalsTextProjection, ya as writeVersionState, yi as describeProfileWorkspacePathValidationFailure, yn as resolveDeviceAuthClientId, yo as formatProfileAwareOpenMeldCliCommands, yr as createSpaceMenuGuideError, yt as runDaemonInterrupt, z as buildReplyReadinessGuidance, za as primeOpenMeldProfilesSessionCache, zn as upsertSpaceConfig, zo as removeProjectConnection, zr as DualViewGuideError, zt as readGatewayJsonResponse } from "./command-CU_3raCS.js";
|
|
5
|
+
import { At as submitFeedbackIssueRequestSchema, D as toStructuredApiClientFailure, Et as authProfileManagedRoleSchema, F as OPENMELD_HEADER_PROFILE_ID, G as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Ht as agentActivityProviderSchema, J as spaceDispatchTraceAttemptStatusSchema, K as projectSpaceDispatchTraceFinalVisibleOutcome, Q as projectObservabilityWakeCorrelation, R as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Tt as authProfileKindSchema, Ut as agentActivitySessionStatusSchema, V as sleep, Wt as agentActivitySnapshotQuerySchema, X as spaceDispatchTraceResponseSchema, Y as spaceDispatchTraceDispatchStatusSchema, Z as observabilityWakeTraceSelectorSchema, _ as createOrganizationSkillsApi, _n as startReplyReadinessSummarySchema, b as createProjectsApi, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, en as agentActivityInventorySessionOriginSchema, et as ownerComputerDiagnosticsSchema, f as createFeedbackApi, g as createOrganizationApi, gn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, hn as START_ISO_DATE_TIME_SCHEMA, in as localAgentSessionProviderSchema, it as agentProfileCreationConfigurationSchema, l as createCenterAgentApi, mn as START_BOUNDED_VERSION_SCHEMA, nn as agentActivitySessionInventoryQuerySchema, nt as summarizeComputerFileAccessPolicy, pn as START_BOUNDED_ID_SCHEMA, q as resolveSpaceDispatchTraceRootCause, rt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, s as createAgentActivityApi, tn as agentActivityInventorySessionStatusSchema, tt as projectOwnerComputerLocalRuntimes, u as createComputerFileAccessApi, v as createPrepareReadinessApi, vn as localAgentCatalogSchema, vt as organizationSkillBundleSchema, x as createRoutinesApi, xt as stringifyOrganizationSkillBundleCanonicalJson } from "./dist-NJH-sDDB.js";
|
|
6
|
+
import { Ar as clientMessageIdSchema, Dn as messageEnvelopeSchema, Er as unknown, Ft as spaceStatusSchema, Ht as isSpaceFileTextEditable, It as centerAgentInteractionSourceSchema, Kt as resolveSpaceFileMimeType, Sr as string, Tr as union, Zr as openMeldProfileIdSchema, br as record, di as trimmedStringFromUnknown, dr as enumFactory, fr as int, gr as nullFactory, hn as spaceContractSchema, li as nonEmptyTrimmedStringFromUnknown, ln as dispatchExecutionSchema, lr as discriminatedUnion, mn as spaceContractFieldsSchema, mr as literal, ni as openMeldRuntimeProfileIdSchema, or as array, pr as iso, sr as boolean, un as spaceThreadContextSchema, vr as object, xr as strictObject } from "./runtime-transport-DYzU1lHC.js";
|
|
7
7
|
import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
|
|
8
|
-
import { j as getDaemonStatus } from "./daemon-runtime-lease-
|
|
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-
|
|
10
|
-
import { c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, l as buildRequestAuthHeaders, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout } from "./api-client-foundation-
|
|
8
|
+
import { j as getDaemonStatus } from "./daemon-runtime-lease-6DIprlJy.js";
|
|
9
|
+
import { _ as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, c as getAuthSessionMetadata, d as getInterruptedComputerAuthSessionRecovery, f as markInterruptedComputerAuthSessionRecovery, g as updateAuthSessionActiveOrganization, l as getAuthSessionState, m as recordInterruptedComputerAuthSessionRecoveryFailure, n as AuthSessionRecoveryInProgressError, o as clearAuthSession, p as normalizeStoredActiveOrganization, s as completeInterruptedComputerAuthSessionRecovery, t as AuthSessionChangedBeforeTransitionError, u as getCurrentAuthOwnerUserId, v as isBinaryDistribution, y as resolveOpenMeldDistribution } from "./auth-session-B06nfwnD.js";
|
|
10
|
+
import { c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, l as buildRequestAuthHeaders, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout } from "./api-client-foundation-BPmXnsr9.js";
|
|
11
11
|
import { Command, Option } from "commander";
|
|
12
12
|
import os, { homedir, hostname, release, tmpdir } from "node:os";
|
|
13
13
|
import * as z$1 from "zod/v4";
|
|
@@ -5510,7 +5510,7 @@ const CHOOSE_PROFILE = "__command_entry_choose_profile__";
|
|
|
5510
5510
|
const CREATE_PROFILE = "__command_entry_create_profile__";
|
|
5511
5511
|
const CANCEL_PROFILE = "__command_entry_cancel_profile__";
|
|
5512
5512
|
async function runSelectedProfileCheck(input) {
|
|
5513
|
-
const explicitProfileArg = normalizeOptionalString$
|
|
5513
|
+
const explicitProfileArg = normalizeOptionalString$17(input.context.profileArg);
|
|
5514
5514
|
const hasExplicitProfileArg = explicitProfileArg !== null;
|
|
5515
5515
|
const requiresConfirmation = input.requirement.mode === "confirm" && input.context.runtime.resolvedView === "human" && input.context.allowPrompt && !hasExplicitProfileArg;
|
|
5516
5516
|
const currentState = getCurrentCommandCheckState();
|
|
@@ -5683,7 +5683,7 @@ function ensureCurrentProfileIsVisible(input) {
|
|
|
5683
5683
|
function resolveProfileConfirmationMessage(entryName) {
|
|
5684
5684
|
return entryName === "space.join" ? SPACE_JOIN_PROFILE_SELECTION_MESSAGE : SPACE_COMMAND_PROFILE_SELECTION_MESSAGE;
|
|
5685
5685
|
}
|
|
5686
|
-
function normalizeOptionalString$
|
|
5686
|
+
function normalizeOptionalString$17(value) {
|
|
5687
5687
|
const normalized = String(value ?? "").trim();
|
|
5688
5688
|
return normalized.length > 0 ? normalized : null;
|
|
5689
5689
|
}
|
|
@@ -5941,7 +5941,10 @@ async function runSignInCheck(input) {
|
|
|
5941
5941
|
if (hasValidCurrentSignIn(getCurrentCommandCheckState().signIn, input.context.gatewayUrl)) return { status: "continue" };
|
|
5942
5942
|
const evaluated = await evaluateCommandAuthentication({ ...input.context.gatewayUrl ? { gatewayUrl: input.context.gatewayUrl } : {} });
|
|
5943
5943
|
setCurrentSignInStatus(evaluated.status, input.context.gatewayUrl);
|
|
5944
|
-
if (evaluated.status === "valid")
|
|
5944
|
+
if (evaluated.status === "valid") {
|
|
5945
|
+
if (evaluated.session) primeOpenMeldProfilesSessionCache(evaluated.session);
|
|
5946
|
+
return { status: "continue" };
|
|
5947
|
+
}
|
|
5945
5948
|
const copy = getCommandEntryCopy(input.context.entryName);
|
|
5946
5949
|
const guidance = buildSignInGuidance({
|
|
5947
5950
|
status: evaluated.status,
|
|
@@ -5999,7 +6002,8 @@ async function runRequiredSignInCheck(input) {
|
|
|
5999
6002
|
...input.context.gatewayUrl ? { gatewayUrl: input.context.gatewayUrl } : {},
|
|
6000
6003
|
promptMessage: buildCommandAuthenticationPromptMessage(input.action ?? void 0),
|
|
6001
6004
|
allowPrompt: true,
|
|
6002
|
-
evaluated: input.evaluated
|
|
6005
|
+
evaluated: input.evaluated,
|
|
6006
|
+
onAuthenticatedSession: primeOpenMeldProfilesSessionCache
|
|
6003
6007
|
})) return { status: "cancelled" };
|
|
6004
6008
|
setCurrentSignInStatus("valid", input.context.gatewayUrl);
|
|
6005
6009
|
return { status: "continue" };
|
|
@@ -6073,7 +6077,10 @@ async function runOptionalSignInLogin(input) {
|
|
|
6073
6077
|
});
|
|
6074
6078
|
const afterLogin = await evaluateCommandAuthentication({ ...input.context.gatewayUrl ? { gatewayUrl: input.context.gatewayUrl } : {} });
|
|
6075
6079
|
setCurrentSignInStatus(afterLogin.status, input.context.gatewayUrl);
|
|
6076
|
-
if (afterLogin.status === "valid")
|
|
6080
|
+
if (afterLogin.status === "valid") {
|
|
6081
|
+
if (afterLogin.session) primeOpenMeldProfilesSessionCache(afterLogin.session);
|
|
6082
|
+
return { status: "continue" };
|
|
6083
|
+
}
|
|
6077
6084
|
emitSignInStatus({
|
|
6078
6085
|
context: input.context,
|
|
6079
6086
|
guidance: buildSignInGuidance({
|
|
@@ -6241,6 +6248,12 @@ const PASSIVE_CLI_QUERY_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
6241
6248
|
"service trace",
|
|
6242
6249
|
"whoami"
|
|
6243
6250
|
]);
|
|
6251
|
+
const COMMAND_ROUTE_OPTIONS_WITH_VALUES = /* @__PURE__ */ new Set([
|
|
6252
|
+
"--gateway-url",
|
|
6253
|
+
"--profile",
|
|
6254
|
+
"--service-auto-install",
|
|
6255
|
+
"--view"
|
|
6256
|
+
]);
|
|
6244
6257
|
function isStandaloneViewQueryArgv(argv) {
|
|
6245
6258
|
const args = argv.slice(2);
|
|
6246
6259
|
return args.length === 1 && args[0] === "--view";
|
|
@@ -6294,12 +6307,12 @@ function parseLeadingCommandTokensFromArgv(argv, maxTokens = 2) {
|
|
|
6294
6307
|
const tokens = [];
|
|
6295
6308
|
for (let i = 0; i < args.length; i += 1) {
|
|
6296
6309
|
if (collectTokensAfterTerminator(args, i, tokens, maxTokens)) return tokens;
|
|
6297
|
-
if (
|
|
6310
|
+
if (shouldSkipKnownCommandRouteOption(args, i)) {
|
|
6298
6311
|
i += 1;
|
|
6299
6312
|
continue;
|
|
6300
6313
|
}
|
|
6301
6314
|
const arg = args[i];
|
|
6302
|
-
if (typeof arg !== "string" ||
|
|
6315
|
+
if (typeof arg !== "string" || shouldSkipInlineCommandRouteOption(arg)) continue;
|
|
6303
6316
|
if (pushLeadingCommandToken(arg, tokens, maxTokens)) return tokens;
|
|
6304
6317
|
}
|
|
6305
6318
|
return tokens;
|
|
@@ -6310,7 +6323,7 @@ function isPassiveCliQueryArgv(argv) {
|
|
|
6310
6323
|
const arg = args[i];
|
|
6311
6324
|
if (typeof arg !== "string") continue;
|
|
6312
6325
|
if (arg === "--") return false;
|
|
6313
|
-
if (
|
|
6326
|
+
if (isKnownCommandRouteOptionExpectValue(arg) && isGlobalFlagValueCandidate(args[i + 1])) {
|
|
6314
6327
|
i += 1;
|
|
6315
6328
|
continue;
|
|
6316
6329
|
}
|
|
@@ -6333,8 +6346,8 @@ function shouldUseAgentViewForNonInteractiveStart(argv, interactive) {
|
|
|
6333
6346
|
if (parseViewFromArgv(argv, { allowMissingValue: true }) !== null) return false;
|
|
6334
6347
|
return parseFirstCommandTokenFromArgv(argv) === "start";
|
|
6335
6348
|
}
|
|
6336
|
-
function
|
|
6337
|
-
return value
|
|
6349
|
+
function isKnownCommandRouteOptionExpectValue(value) {
|
|
6350
|
+
return COMMAND_ROUTE_OPTIONS_WITH_VALUES.has(value);
|
|
6338
6351
|
}
|
|
6339
6352
|
function isGlobalFlagValueCandidate(value) {
|
|
6340
6353
|
return typeof value === "string" && value.length > 0 && !value.startsWith("-");
|
|
@@ -6349,11 +6362,11 @@ function collectTokensAfterTerminator(args, index, tokens, maxTokens) {
|
|
|
6349
6362
|
}
|
|
6350
6363
|
return true;
|
|
6351
6364
|
}
|
|
6352
|
-
function
|
|
6353
|
-
return
|
|
6365
|
+
function shouldSkipKnownCommandRouteOption(args, index) {
|
|
6366
|
+
return isKnownCommandRouteOptionExpectValue(args[index] ?? "") && isGlobalFlagValueCandidate(args[index + 1]);
|
|
6354
6367
|
}
|
|
6355
|
-
function
|
|
6356
|
-
return
|
|
6368
|
+
function shouldSkipInlineCommandRouteOption(value) {
|
|
6369
|
+
return [...COMMAND_ROUTE_OPTIONS_WITH_VALUES].some((option) => value.startsWith(`${option}=`));
|
|
6357
6370
|
}
|
|
6358
6371
|
function pushLeadingCommandToken(value, tokens, maxTokens) {
|
|
6359
6372
|
if (value.startsWith("-")) return false;
|
|
@@ -6389,7 +6402,7 @@ async function runCommandWithEntryChecks(input) {
|
|
|
6389
6402
|
allowPrompt: runtime.interactive,
|
|
6390
6403
|
environmentTarget,
|
|
6391
6404
|
gatewayUrl: normalizedGatewayUrl,
|
|
6392
|
-
profileArg: normalizeOptionalString$
|
|
6405
|
+
profileArg: normalizeOptionalString$16(input.profile),
|
|
6393
6406
|
jsonOutput
|
|
6394
6407
|
}),
|
|
6395
6408
|
jsonOutput
|
|
@@ -6398,7 +6411,7 @@ async function runCommandWithEntryChecks(input) {
|
|
|
6398
6411
|
finishCurrentCommandCheckScope();
|
|
6399
6412
|
}
|
|
6400
6413
|
}
|
|
6401
|
-
function normalizeOptionalString$
|
|
6414
|
+
function normalizeOptionalString$16(value) {
|
|
6402
6415
|
const normalized = String(value ?? "").trim();
|
|
6403
6416
|
return normalized.length > 0 ? normalized : null;
|
|
6404
6417
|
}
|
|
@@ -7101,8 +7114,8 @@ function normalizeOrganizationSelectionPayload(payload) {
|
|
|
7101
7114
|
message: "OpenMeld auth returned an invalid Organization selection."
|
|
7102
7115
|
});
|
|
7103
7116
|
return {
|
|
7104
|
-
activeOrganizationId: normalizeOptionalString$
|
|
7105
|
-
lastSelectedOrganizationId: normalizeOptionalString$
|
|
7117
|
+
activeOrganizationId: normalizeOptionalString$15(payload.session.activeOrganizationId),
|
|
7118
|
+
lastSelectedOrganizationId: normalizeOptionalString$15(payload.user.lastSelectedOrganizationId)
|
|
7106
7119
|
};
|
|
7107
7120
|
}
|
|
7108
7121
|
function normalizeOrganizationListPayload(payload) {
|
|
@@ -7134,7 +7147,7 @@ function normalizeOrganizationFromPayload(payload) {
|
|
|
7134
7147
|
if (!isRecord(payload)) return null;
|
|
7135
7148
|
const organization = normalizeStoredActiveOrganization(payload.organization);
|
|
7136
7149
|
if (!organization) return null;
|
|
7137
|
-
const role = normalizeOptionalString$
|
|
7150
|
+
const role = normalizeOptionalString$15(payload.role) ?? (isRecord(payload.member) ? normalizeOptionalString$15(payload.member.role) : null);
|
|
7138
7151
|
return {
|
|
7139
7152
|
...organization,
|
|
7140
7153
|
...role ? { role } : {}
|
|
@@ -7204,13 +7217,13 @@ function parseJsonOrNull(raw) {
|
|
|
7204
7217
|
}
|
|
7205
7218
|
function readRequestId(payload) {
|
|
7206
7219
|
if (!isRecord(payload)) return null;
|
|
7207
|
-
return normalizeOptionalString$
|
|
7220
|
+
return normalizeOptionalString$15(payload.requestId) ?? (isRecord(payload.error) ? normalizeOptionalString$15(payload.error.requestId) : null);
|
|
7208
7221
|
}
|
|
7209
7222
|
function readErrorMessage(payload) {
|
|
7210
7223
|
if (!isRecord(payload)) return null;
|
|
7211
|
-
return normalizeOptionalString$
|
|
7224
|
+
return normalizeOptionalString$15(payload.message) ?? (isRecord(payload.error) ? normalizeOptionalString$15(payload.error.message) : null);
|
|
7212
7225
|
}
|
|
7213
|
-
function normalizeOptionalString$
|
|
7226
|
+
function normalizeOptionalString$15(value) {
|
|
7214
7227
|
const normalized = String(value ?? "").trim();
|
|
7215
7228
|
return normalized.length > 0 ? normalized : null;
|
|
7216
7229
|
}
|
|
@@ -7618,7 +7631,7 @@ async function createCenterAgentApiClient(input) {
|
|
|
7618
7631
|
const CODEX_THREAD_ID_ENV = "CODEX_THREAD_ID";
|
|
7619
7632
|
const CLAUDE_CODE_SESSION_ID_ENV = "CLAUDE_CODE_SESSION_ID";
|
|
7620
7633
|
function detectLocalAgentEnvironment(env) {
|
|
7621
|
-
const claudeSessionId = normalizeOptionalString$
|
|
7634
|
+
const claudeSessionId = normalizeOptionalString$14(env[CLAUDE_CODE_SESSION_ID_ENV]);
|
|
7622
7635
|
if (claudeSessionId) return {
|
|
7623
7636
|
kind: "agent",
|
|
7624
7637
|
agentControllerConversationId: claudeSessionId,
|
|
@@ -7626,7 +7639,7 @@ function detectLocalAgentEnvironment(env) {
|
|
|
7626
7639
|
conversationKind: "session",
|
|
7627
7640
|
label: "Claude Code"
|
|
7628
7641
|
};
|
|
7629
|
-
const codexThreadId = normalizeOptionalString$
|
|
7642
|
+
const codexThreadId = normalizeOptionalString$14(env[CODEX_THREAD_ID_ENV]);
|
|
7630
7643
|
if (codexThreadId) return {
|
|
7631
7644
|
kind: "agent",
|
|
7632
7645
|
agentControllerConversationId: codexThreadId,
|
|
@@ -7638,9 +7651,9 @@ function detectLocalAgentEnvironment(env) {
|
|
|
7638
7651
|
return { kind: "human" };
|
|
7639
7652
|
}
|
|
7640
7653
|
function isCodexLikeEnvironment(env) {
|
|
7641
|
-
return Boolean(normalizeOptionalString$
|
|
7654
|
+
return Boolean(normalizeOptionalString$14(env.CODEX_SHELL) || normalizeOptionalString$14(env.CODEX_CI) || normalizeOptionalString$14(env.CODEX_SESSION_ID) || normalizeOptionalString$14(env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE));
|
|
7642
7655
|
}
|
|
7643
|
-
function normalizeOptionalString$
|
|
7656
|
+
function normalizeOptionalString$14(value) {
|
|
7644
7657
|
if (typeof value !== "string") return null;
|
|
7645
7658
|
const normalized = value.trim();
|
|
7646
7659
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -9044,7 +9057,7 @@ async function exchangeComputerAuthorizationGrant(input) {
|
|
|
9044
9057
|
});
|
|
9045
9058
|
throw new Error(`computer authorization could not verify its OpenMeld account: ${toErrorMessage$8(error)}${formatCleanupFailure(cleanup)}`, { cause: error });
|
|
9046
9059
|
}
|
|
9047
|
-
const userId = normalizeOptionalString$
|
|
9060
|
+
const userId = normalizeOptionalString$13(user?.id);
|
|
9048
9061
|
if (!userId) {
|
|
9049
9062
|
const cleanup = await revokeAuthAccessToken({
|
|
9050
9063
|
accessToken: tokenResult.data.access_token,
|
|
@@ -9054,7 +9067,7 @@ async function exchangeComputerAuthorizationGrant(input) {
|
|
|
9054
9067
|
throw new Error(`computer authorization account response did not include a user id${formatCleanupFailure(cleanup)}`);
|
|
9055
9068
|
}
|
|
9056
9069
|
const expiresAt = resolveDeviceTokenExpiresAt(tokenResult.data.expires_in);
|
|
9057
|
-
const scope = normalizeOptionalString$
|
|
9070
|
+
const scope = normalizeOptionalString$13(tokenResult.data.scope);
|
|
9058
9071
|
return {
|
|
9059
9072
|
accessToken: tokenResult.data.access_token,
|
|
9060
9073
|
tokenType: tokenResult.data.token_type,
|
|
@@ -9080,11 +9093,11 @@ function toErrorMessage$8(error) {
|
|
|
9080
9093
|
return error instanceof Error && error.message.trim() ? error.message.trim() : String(error ?? "unknown error");
|
|
9081
9094
|
}
|
|
9082
9095
|
function normalizeRequiredString(value, message) {
|
|
9083
|
-
const normalized = normalizeOptionalString$
|
|
9096
|
+
const normalized = normalizeOptionalString$13(value);
|
|
9084
9097
|
if (!normalized) throw new Error(message);
|
|
9085
9098
|
return normalized;
|
|
9086
9099
|
}
|
|
9087
|
-
function normalizeOptionalString$
|
|
9100
|
+
function normalizeOptionalString$13(value) {
|
|
9088
9101
|
const normalized = String(value ?? "").trim();
|
|
9089
9102
|
return normalized.length > 0 ? normalized : null;
|
|
9090
9103
|
}
|
|
@@ -9094,7 +9107,7 @@ const UNUSED_SETUP_SESSION_CLEANUP_SUFFIX = " OpenMeld also could not revoke the
|
|
|
9094
9107
|
async function recoverInterruptedComputerAuthHandoff(input) {
|
|
9095
9108
|
const recovery = await getInterruptedComputerAuthSessionRecovery();
|
|
9096
9109
|
if (!recovery) return "none";
|
|
9097
|
-
const previousOwnerUserId = normalizeOptionalString$
|
|
9110
|
+
const previousOwnerUserId = normalizeOptionalString$12(recovery.previousSession?.user?.id);
|
|
9098
9111
|
if (!recovery.serviceReconciled) {
|
|
9099
9112
|
const stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
|
|
9100
9113
|
if (stopped.status === "warning") {
|
|
@@ -9198,7 +9211,7 @@ function formatComputerAuthCleanupFailureSuffix(result) {
|
|
|
9198
9211
|
const status = result.error.status === null ? "network error" : `HTTP ${result.error.status}`;
|
|
9199
9212
|
return `${UNUSED_SETUP_SESSION_CLEANUP_SUFFIX} Cleanup endpoint ${result.error.endpoint} returned ${status}: ${result.error.message}`;
|
|
9200
9213
|
}
|
|
9201
|
-
function normalizeOptionalString$
|
|
9214
|
+
function normalizeOptionalString$12(value) {
|
|
9202
9215
|
if (typeof value !== "string") return null;
|
|
9203
9216
|
const normalized = value.trim();
|
|
9204
9217
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -10363,11 +10376,11 @@ function resolveDaemonRouteSkipMessage(input) {
|
|
|
10363
10376
|
return `Reply route checks were skipped because the OpenMeld profile check failed: ${input.openMeldProfileMessage}`;
|
|
10364
10377
|
}
|
|
10365
10378
|
function resolveFeedbackInboxKey(input) {
|
|
10366
|
-
const fromCli = normalizeOptionalString$
|
|
10379
|
+
const fromCli = normalizeOptionalString$11(input.cliValue);
|
|
10367
10380
|
if (fromCli) return fromCli;
|
|
10368
|
-
return normalizeOptionalString$
|
|
10381
|
+
return normalizeOptionalString$11((input.env ?? process.env).OPENMELD_FEEDBACK_INBOX_KEY) ?? "feedback_key_8oDRg9Aq-Q4crzVGV6hUqhKT2dQpKkBn4bKg9bjXLcE";
|
|
10369
10382
|
}
|
|
10370
|
-
function normalizeOptionalString$
|
|
10383
|
+
function normalizeOptionalString$11(value) {
|
|
10371
10384
|
const normalized = String(value ?? "").trim();
|
|
10372
10385
|
return normalized.length > 0 ? normalized : null;
|
|
10373
10386
|
}
|
|
@@ -10708,7 +10721,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
|
|
|
10708
10721
|
value: input.agentControllerPermissionModeInput
|
|
10709
10722
|
});
|
|
10710
10723
|
if (!agentControllerPermissionMode) return { hasAnyAgentControllerPermissionModeInput: false };
|
|
10711
|
-
const agentControllerRef = normalizeOptionalString$
|
|
10724
|
+
const agentControllerRef = normalizeOptionalString$10(input.agentControllerRef);
|
|
10712
10725
|
assertAgentControllerPermissionModeSupported({
|
|
10713
10726
|
agentControllerPermissionMode,
|
|
10714
10727
|
agentControllerRef,
|
|
@@ -10729,7 +10742,7 @@ async function resolveAgentControllerPermissionModeInput(input) {
|
|
|
10729
10742
|
};
|
|
10730
10743
|
}
|
|
10731
10744
|
function normalizeAgentControllerPermissionModeCliInput(input) {
|
|
10732
|
-
const raw = normalizeOptionalString$
|
|
10745
|
+
const raw = normalizeOptionalString$10(input.value);
|
|
10733
10746
|
if (!raw) return null;
|
|
10734
10747
|
const options = listAgentControllerPermissionModeOptions(input.agentControllerRef ? { agentControllerRef: input.agentControllerRef } : void 0);
|
|
10735
10748
|
for (const option of options) if (raw === option.value) return option.value;
|
|
@@ -10832,7 +10845,7 @@ const AGENT_CONTROLLER_PERMISSION_MODE_BY_CLI_VALUE = {
|
|
|
10832
10845
|
"run-everything": "cursor:force",
|
|
10833
10846
|
runeverything: "cursor:force"
|
|
10834
10847
|
};
|
|
10835
|
-
function normalizeOptionalString$
|
|
10848
|
+
function normalizeOptionalString$10(value) {
|
|
10836
10849
|
const normalized = String(value ?? "").trim();
|
|
10837
10850
|
return normalized.length > 0 ? normalized : null;
|
|
10838
10851
|
}
|
|
@@ -11196,7 +11209,7 @@ async function runProfileShow(input) {
|
|
|
11196
11209
|
}
|
|
11197
11210
|
const presenter = createPresenter(runtime);
|
|
11198
11211
|
const allowPrompt = canUseInteractivePrompts(runtime);
|
|
11199
|
-
const explicitProfileId = normalizeOptionalString$
|
|
11212
|
+
const explicitProfileId = normalizeOptionalString$9(input.profile);
|
|
11200
11213
|
const visibleProfiles = explicitProfileId ? [] : await listVisibleProfilesForListByView(runtime.resolvedView);
|
|
11201
11214
|
const current = explicitProfileId ? null : await resolveCurrentProfileId({
|
|
11202
11215
|
profiles: visibleProfiles,
|
|
@@ -11678,7 +11691,7 @@ async function runProfileUpdate(input) {
|
|
|
11678
11691
|
}
|
|
11679
11692
|
const presenter = createPresenter(runtime);
|
|
11680
11693
|
const allowPrompt = canUseInteractivePrompts(runtime);
|
|
11681
|
-
const explicitProfileId = normalizeOptionalString$
|
|
11694
|
+
const explicitProfileId = normalizeOptionalString$9(input.profile);
|
|
11682
11695
|
const visibleProfiles = explicitProfileId ? [] : await listVisibleProfilesForListByView(runtime.resolvedView);
|
|
11683
11696
|
const current = explicitProfileId ? null : await resolveCurrentProfileId({
|
|
11684
11697
|
profiles: visibleProfiles,
|
|
@@ -11906,7 +11919,7 @@ function emitProfileUpdateCandidatesForHuman(input) {
|
|
|
11906
11919
|
}
|
|
11907
11920
|
}
|
|
11908
11921
|
async function resolveProfileUpdatePayload(input) {
|
|
11909
|
-
const profileName = normalizeOptionalString$
|
|
11922
|
+
const profileName = normalizeOptionalString$9(input.profileName);
|
|
11910
11923
|
const explicitAgentController = await resolveExplicitAgentControllerPatchForProfile({
|
|
11911
11924
|
agentController: input.agentController,
|
|
11912
11925
|
agentControllerConversationId: input.agentControllerConversationId,
|
|
@@ -11951,7 +11964,7 @@ async function resolveProfileUpdatePayload(input) {
|
|
|
11951
11964
|
}
|
|
11952
11965
|
function resolveExplicitWorkspacePatchForProfile(input) {
|
|
11953
11966
|
const normalizedMode = normalizeWorkspaceModeInput(input.workspaceMode);
|
|
11954
|
-
const normalizedWorkspacePath = normalizeOptionalString$
|
|
11967
|
+
const normalizedWorkspacePath = normalizeOptionalString$9(input.workspacePath);
|
|
11955
11968
|
if (!(normalizedMode || normalizedWorkspacePath)) return null;
|
|
11956
11969
|
if (input.profile.profileKind !== "agent") throw new Error("Workspace can only be configured for agent profiles.");
|
|
11957
11970
|
if (!normalizedMode) throw new Error("--workspace-path can only be used with --workspace-mode custom.");
|
|
@@ -11984,7 +11997,7 @@ function resolveExplicitModelSelectionPatchForProfile(input) {
|
|
|
11984
11997
|
};
|
|
11985
11998
|
}
|
|
11986
11999
|
async function resolveExplicitAgentControllerPermissionModePatchForProfile(input) {
|
|
11987
|
-
if (!normalizeOptionalString$
|
|
12000
|
+
if (!normalizeOptionalString$9(input.agentControllerPermissionModeInput)) return null;
|
|
11988
12001
|
if (input.profile.profileKind !== "agent") throw new Error("Agent Controller Permission Mode can only be configured for agent profiles.");
|
|
11989
12002
|
const currentBinding = input.agentControllerRef ? null : await resolveAgentProfilePrimaryAgentControllerReport({ profile: input.profile });
|
|
11990
12003
|
const agentControllerRef = input.agentControllerRef ?? currentBinding?.agentControllerRef ?? null;
|
|
@@ -12003,8 +12016,8 @@ async function resolveExplicitAgentControllerPermissionModePatchForProfile(input
|
|
|
12003
12016
|
};
|
|
12004
12017
|
}
|
|
12005
12018
|
async function resolveExplicitAgentControllerPatchForProfile(input) {
|
|
12006
|
-
const agentController = normalizeOptionalString$
|
|
12007
|
-
const agentControllerConversationId = normalizeOptionalString$
|
|
12019
|
+
const agentController = normalizeOptionalString$9(input.agentController);
|
|
12020
|
+
const agentControllerConversationId = normalizeOptionalString$9(input.agentControllerConversationId);
|
|
12008
12021
|
if (!(agentController || agentControllerConversationId)) return null;
|
|
12009
12022
|
if (input.profile.profileKind !== "agent") throw new Error("Agent controller can only be configured for agent profiles.");
|
|
12010
12023
|
if (!agentController) throw new Error("--agent-controller-conversation-id requires --agent-controller.");
|
|
@@ -12018,7 +12031,7 @@ async function resolveExplicitAgentControllerPatchForProfile(input) {
|
|
|
12018
12031
|
};
|
|
12019
12032
|
}
|
|
12020
12033
|
async function applyAgentProfileControllerBinding(input) {
|
|
12021
|
-
const agentControllerRef = normalizeOptionalString$
|
|
12034
|
+
const agentControllerRef = normalizeOptionalString$9(input.agentControllerRef);
|
|
12022
12035
|
const hasModelSelectionPatch = input.modelId !== void 0;
|
|
12023
12036
|
if (!(agentControllerRef || hasModelSelectionPatch)) return;
|
|
12024
12037
|
if (input.profile.profileKind !== "agent") throw new Error("Agent controller can only be configured for agent profiles.");
|
|
@@ -12156,7 +12169,7 @@ async function promptWorkspacePayload(profile) {
|
|
|
12156
12169
|
});
|
|
12157
12170
|
if (workspacePath.status === "cancelled") return { status: "cancelled" };
|
|
12158
12171
|
if (workspacePath.status === "back") continue;
|
|
12159
|
-
const customWorkspacePath = normalizeOptionalString$
|
|
12172
|
+
const customWorkspacePath = normalizeOptionalString$9(workspacePath.value);
|
|
12160
12173
|
if (!customWorkspacePath) throw new Error("Custom workspace path is required.");
|
|
12161
12174
|
return {
|
|
12162
12175
|
status: "submitted",
|
|
@@ -12261,7 +12274,7 @@ async function promptModelSelectionPayload(profile) {
|
|
|
12261
12274
|
});
|
|
12262
12275
|
if (isCancel(selectedReasoningLevel)) return { status: "cancelled" };
|
|
12263
12276
|
if (selectedReasoningLevel === BACK_UPDATE_FIELD_SELECTION) return { status: "back" };
|
|
12264
|
-
const reasoningLevel = normalizeOptionalString$
|
|
12277
|
+
const reasoningLevel = normalizeOptionalString$9(selectedReasoningLevel);
|
|
12265
12278
|
return {
|
|
12266
12279
|
status: "submitted",
|
|
12267
12280
|
value: {
|
|
@@ -12329,7 +12342,7 @@ async function promptProfileNamePayload(currentProfileName) {
|
|
|
12329
12342
|
});
|
|
12330
12343
|
if (nextName.status === "cancelled") return { status: "cancelled" };
|
|
12331
12344
|
if (nextName.status === "back") return { status: "back" };
|
|
12332
|
-
const profileName = normalizeOptionalString$
|
|
12345
|
+
const profileName = normalizeOptionalString$9(nextName.value);
|
|
12333
12346
|
if (!profileName) throw new Error("profileName is required");
|
|
12334
12347
|
return {
|
|
12335
12348
|
status: "submitted",
|
|
@@ -12585,11 +12598,11 @@ function buildProfileSearchItem(input) {
|
|
|
12585
12598
|
function buildProfileSearchText(profile) {
|
|
12586
12599
|
return [
|
|
12587
12600
|
profile.openMeldProfileId,
|
|
12588
|
-
normalizeOptionalString$
|
|
12601
|
+
normalizeOptionalString$9(profile.profileName),
|
|
12589
12602
|
profile.profileKind,
|
|
12590
|
-
normalizeOptionalString$
|
|
12591
|
-
normalizeOptionalString$
|
|
12592
|
-
normalizeOptionalString$
|
|
12603
|
+
normalizeOptionalString$9(profile.ownerUserId),
|
|
12604
|
+
normalizeOptionalString$9(profile.ownerName),
|
|
12605
|
+
normalizeOptionalString$9(profile.source)
|
|
12593
12606
|
].filter((value) => typeof value === "string").join("\n");
|
|
12594
12607
|
}
|
|
12595
12608
|
function resolveProfileSelectLabel(input) {
|
|
@@ -12640,7 +12653,7 @@ function normalizeProfileDisplayName(profile) {
|
|
|
12640
12653
|
}
|
|
12641
12654
|
function normalizeAgentControllerArgumentInput(input) {
|
|
12642
12655
|
const agentController = String(input.agentController ?? "").trim();
|
|
12643
|
-
const agentControllerConversationId = normalizeOptionalString$
|
|
12656
|
+
const agentControllerConversationId = normalizeOptionalString$9(input.agentControllerConversationId);
|
|
12644
12657
|
const hasControllerEnabled = typeof input.controllerEnabled === "boolean";
|
|
12645
12658
|
const hasAnyAgentControllerInput = Boolean(agentController) || Boolean(agentControllerConversationId) || hasControllerEnabled;
|
|
12646
12659
|
return {
|
|
@@ -12848,7 +12861,7 @@ function resolveProfileUpdateCommandExamples() {
|
|
|
12848
12861
|
function toProfileActionGuideExamples(_input) {
|
|
12849
12862
|
return {};
|
|
12850
12863
|
}
|
|
12851
|
-
function normalizeOptionalString$
|
|
12864
|
+
function normalizeOptionalString$9(value) {
|
|
12852
12865
|
const normalized = String(value ?? "").trim();
|
|
12853
12866
|
return normalized.length > 0 ? normalized : null;
|
|
12854
12867
|
}
|
|
@@ -12859,8 +12872,8 @@ function normalizeWorkspaceModeInput(value) {
|
|
|
12859
12872
|
throw new Error("--workspace-mode must be openmeld-managed|custom");
|
|
12860
12873
|
}
|
|
12861
12874
|
function normalizeModelSelectionInput(input) {
|
|
12862
|
-
const modelId = normalizeOptionalString$
|
|
12863
|
-
const reasoningLevel = normalizeOptionalString$
|
|
12875
|
+
const modelId = normalizeOptionalString$9(input.model);
|
|
12876
|
+
const reasoningLevel = normalizeOptionalString$9(input.reasoningEffort);
|
|
12864
12877
|
if (!(modelId || reasoningLevel)) return { hasAnyModelSelectionInput: false };
|
|
12865
12878
|
if (!modelId) throw new Error("--reasoning-effort requires --model.");
|
|
12866
12879
|
return {
|
|
@@ -12961,7 +12974,7 @@ const PROMPT_GUIDE_CATALOG = {
|
|
|
12961
12974
|
"Use canonical `<space-id>` targets instead of space names.",
|
|
12962
12975
|
"Keep `--profile <profile-id>` explicit in agent or multi-process workflows.",
|
|
12963
12976
|
"If a protected Space blocks access, first confirm the active account/profile. Join once with the Space password only when the account has not joined yet.",
|
|
12964
|
-
"For structured Space replies, leave `activationTargets` and `
|
|
12977
|
+
"For structured Space replies, leave `activationTargets`, `referenceTargets`, and `mentionTargets` empty unless you intentionally address another profile."
|
|
12965
12978
|
],
|
|
12966
12979
|
agentCommands: [
|
|
12967
12980
|
"openmeld space create --profile <profile-id> --name <space-name> --view agent",
|
|
@@ -12976,8 +12989,9 @@ const PROMPT_GUIDE_CATALOG = {
|
|
|
12976
12989
|
notes: [
|
|
12977
12990
|
...buildAgentFacingPublicationModeGuideLines(),
|
|
12978
12991
|
"`activationTargets` is only for waking another Agent Profile in the Space. It is not the sender, reply recipient, or human mention target.",
|
|
12979
|
-
"
|
|
12980
|
-
"
|
|
12992
|
+
"`referenceTargets` is only for Agent Reference context; `mentionTargets` is only for Human Mentions that should notify a person.",
|
|
12993
|
+
"For a normal reply to the current Wake, use `post_message` with empty `activationTargets`, `referenceTargets`, and `mentionTargets`.",
|
|
12994
|
+
"Use `openmeld space send --plain` only when canonical Agent Wake, Agent Reference, or Human Mention syntax should be quoted as literal text instead of resolved as Space addressing.",
|
|
12981
12995
|
"Use `openmeld space contract`, `status`, `updates`, and `result` for formal read-side inspection."
|
|
12982
12996
|
]
|
|
12983
12997
|
}
|
|
@@ -12993,7 +13007,8 @@ const PROMPT_GUIDE_CATALOG = {
|
|
|
12993
13007
|
"Run the one final action named at the top of the current dispatch prompt before reading optional forms.",
|
|
12994
13008
|
"Use `reply` for the normal final answer.",
|
|
12995
13009
|
"Use `wake` or `reply --wake` only when handing off work to another Agent Profile.",
|
|
12996
|
-
"Use `--reference` when another
|
|
13010
|
+
"Use `--reference` when another Agent Profile should be included as context without starting work.",
|
|
13011
|
+
"Use `--mention` when a Human Profile should receive attention without starting Agent work.",
|
|
12997
13012
|
"Keep each reply aligned to the source message it answers. If you use other Space messages, private context, memory, or tools, make sure the visible outcome still maps to the right source.",
|
|
12998
13013
|
"Use `status` only for final-safe status outcomes, not ongoing progress.",
|
|
12999
13014
|
"Answer text never becomes a Space Action. Call the dispatch-scoped CLI command for every controlled visible outcome."
|
|
@@ -13002,6 +13017,7 @@ const PROMPT_GUIDE_CATALOG = {
|
|
|
13002
13017
|
"<DISPATCH_ACTION_CLI> space action reply \"message\"",
|
|
13003
13018
|
"<DISPATCH_ACTION_CLI> space action wake \"@Agent Name\" \"summary and request\"",
|
|
13004
13019
|
"<DISPATCH_ACTION_CLI> space action reply --wake \"@Agent Name\" \"message\"",
|
|
13020
|
+
"<DISPATCH_ACTION_CLI> space action reply --mention \"@Person Name\" \"message\"",
|
|
13005
13021
|
"<DISPATCH_ACTION_CLI> space action status done \"short completion update\"",
|
|
13006
13022
|
"<DISPATCH_ACTION_CLI> space action silent --reason \"No public reply is needed.\"",
|
|
13007
13023
|
"<DISPATCH_ACTION_CLI> space action targets",
|
|
@@ -13013,7 +13029,7 @@ const PROMPT_GUIDE_CATALOG = {
|
|
|
13013
13029
|
"If a Space Action CLI command fails, do not print JSON or prose as a substitute. Let OpenMeld preserve and report the tool failure.",
|
|
13014
13030
|
"Wake targets must be active Agent Profile members in the current Space.",
|
|
13015
13031
|
"If a user asks you to deliver work to another Agent Profile, a plain reply is not enough; use `wake` or `reply --wake` so executable work is created.",
|
|
13016
|
-
"Bare @names in prose are not
|
|
13032
|
+
"Bare @names in prose are not addressing targets in the agent path; use target flags for Agent Wake, Agent Reference, or Human Mention semantics.",
|
|
13017
13033
|
"OpenMeld metadata is infrastructure context, not proof of what a human or agent is doing. Use Space context, private context, memory, and tools when appropriate; avoid exposing secrets, credentials, private files, or high-risk sensitive data unless the owner clearly authorizes it.",
|
|
13018
13034
|
"`working` is not accepted here because status actions are final visible outcomes in the current contract."
|
|
13019
13035
|
]
|
|
@@ -13869,10 +13885,10 @@ function resolveDaemonDispatchJournalEvidence(dispatchId) {
|
|
|
13869
13885
|
};
|
|
13870
13886
|
}
|
|
13871
13887
|
async function resolveDispatchTraceSelection(input) {
|
|
13872
|
-
const dispatchSelector = normalizeOptionalString$
|
|
13873
|
-
const sourceSignalSelector = normalizeOptionalString$
|
|
13874
|
-
const clientMessageSelector = normalizeOptionalString$
|
|
13875
|
-
const targetProfileSelector = normalizeOptionalString$
|
|
13888
|
+
const dispatchSelector = normalizeOptionalString$8(input.dispatchId);
|
|
13889
|
+
const sourceSignalSelector = normalizeOptionalString$8(input.sourceSignalId);
|
|
13890
|
+
const clientMessageSelector = normalizeOptionalString$8(input.clientMessageId);
|
|
13891
|
+
const targetProfileSelector = normalizeOptionalString$8(input.targetProfileId);
|
|
13876
13892
|
if (Number(dispatchSelector !== null) + Number(sourceSignalSelector !== null) + Number(clientMessageSelector !== null) !== 1) throw new Error("exactly one of dispatchId, sourceSignalId, or clientMessageId is required");
|
|
13877
13893
|
if (dispatchSelector) return {
|
|
13878
13894
|
dispatchId: dispatchSelector,
|
|
@@ -14379,7 +14395,7 @@ function parenthesizedDetail(value, label) {
|
|
|
14379
14395
|
return detail.length > 0 ? detail : null;
|
|
14380
14396
|
}
|
|
14381
14397
|
async function resolveServiceTraceActorProfile(input) {
|
|
14382
|
-
if (normalizeOptionalString$
|
|
14398
|
+
if (normalizeOptionalString$8(input.explicitProfileId) || !canUseInteractivePrompts(input.runtime)) return input.actingProfile;
|
|
14383
14399
|
while (true) {
|
|
14384
14400
|
const selectedAction = await select({
|
|
14385
14401
|
message: `Use ${input.actingProfile.profileName} (${input.actingProfile.openMeldProfileId}) to read this dispatch trace?`,
|
|
@@ -15260,7 +15276,7 @@ function truncateText(text, maxLength) {
|
|
|
15260
15276
|
if (text.length <= maxLength) return text;
|
|
15261
15277
|
return `${text.slice(0, maxLength)}...`;
|
|
15262
15278
|
}
|
|
15263
|
-
function normalizeOptionalString$
|
|
15279
|
+
function normalizeOptionalString$8(value) {
|
|
15264
15280
|
const normalized = String(value ?? "").trim();
|
|
15265
15281
|
return normalized.length > 0 ? normalized : null;
|
|
15266
15282
|
}
|
|
@@ -16088,7 +16104,7 @@ async function acquireSetupCommandLockWithTakeover(input) {
|
|
|
16088
16104
|
pid,
|
|
16089
16105
|
startedAtLabel
|
|
16090
16106
|
};
|
|
16091
|
-
if (!(normalizeOptionalString$
|
|
16107
|
+
if (!(normalizeOptionalString$7(input.startSession) !== null && pid !== null && pid !== deps.selfPid && deps.probePid(pid) === "alive")) return {
|
|
16092
16108
|
status: "contended",
|
|
16093
16109
|
...contendedBase,
|
|
16094
16110
|
takeoverAttempted: false
|
|
@@ -16325,7 +16341,7 @@ function getErrorCode(error) {
|
|
|
16325
16341
|
const code = error.code;
|
|
16326
16342
|
return typeof code === "string" ? code : void 0;
|
|
16327
16343
|
}
|
|
16328
|
-
function normalizeOptionalString$
|
|
16344
|
+
function normalizeOptionalString$7(value) {
|
|
16329
16345
|
const normalized = String(value ?? "").trim();
|
|
16330
16346
|
return normalized.length > 0 ? normalized : null;
|
|
16331
16347
|
}
|
|
@@ -16377,6 +16393,86 @@ function shouldForceSetupServiceRefresh() {
|
|
|
16377
16393
|
return process.env.OPENMELD_SETUP_FORCE_SERVICE_REFRESH === "1";
|
|
16378
16394
|
}
|
|
16379
16395
|
//#endregion
|
|
16396
|
+
//#region src/ui/confirm.ts
|
|
16397
|
+
const PROMPT_SYMBOL_ACTIVE = pc.green("◇");
|
|
16398
|
+
const PROMPT_SYMBOL_CANCELLED = pc.red("■");
|
|
16399
|
+
const BAR_SYMBOL = pc.dim("│");
|
|
16400
|
+
const SELECTED_SYMBOL = pc.green("●");
|
|
16401
|
+
const UNSELECTED_SYMBOL = pc.dim("○");
|
|
16402
|
+
function promptConfirm(input, streams) {
|
|
16403
|
+
return runInteractivePrompt({
|
|
16404
|
+
initialState: {
|
|
16405
|
+
activeLabel: input.activeLabel ?? "Yes",
|
|
16406
|
+
inactiveLabel: input.inactiveLabel ?? "No",
|
|
16407
|
+
message: input.message,
|
|
16408
|
+
value: input.initialValue ?? true
|
|
16409
|
+
},
|
|
16410
|
+
fallbackResult: "cancelled",
|
|
16411
|
+
renderLines: renderConfirmPromptLines,
|
|
16412
|
+
handleKeypress: handleConfirmPromptKeypress
|
|
16413
|
+
}, streams);
|
|
16414
|
+
}
|
|
16415
|
+
function renderConfirmPromptLines(state, status) {
|
|
16416
|
+
const lines = [`${status === "cancelled" ? PROMPT_SYMBOL_CANCELLED : PROMPT_SYMBOL_ACTIVE} ${pc.bold(state.message)}`];
|
|
16417
|
+
if (status === "cancelled") {
|
|
16418
|
+
lines.push(`${BAR_SYMBOL} ${pc.strikethrough(pc.dim("Cancelled"))}`);
|
|
16419
|
+
return lines;
|
|
16420
|
+
}
|
|
16421
|
+
if (status === "submitted") {
|
|
16422
|
+
lines.push(`${BAR_SYMBOL} ${pc.dim(state.value ? state.activeLabel : state.inactiveLabel)}`);
|
|
16423
|
+
return lines;
|
|
16424
|
+
}
|
|
16425
|
+
lines.push(`${BAR_SYMBOL} ${renderConfirmOption(state.activeLabel, state.value)} / ${renderConfirmOption(state.inactiveLabel, !state.value)}`, pc.dim("└"));
|
|
16426
|
+
return lines;
|
|
16427
|
+
}
|
|
16428
|
+
function handleConfirmPromptKeypress(input) {
|
|
16429
|
+
if (isReturnKeypress({
|
|
16430
|
+
key: input.key,
|
|
16431
|
+
str: input.str
|
|
16432
|
+
})) return {
|
|
16433
|
+
type: "result",
|
|
16434
|
+
result: input.state.value ? "confirmed" : "declined",
|
|
16435
|
+
status: "submitted",
|
|
16436
|
+
state: input.state
|
|
16437
|
+
};
|
|
16438
|
+
if (input.key.name === "escape" || input.key.ctrl === true && input.key.name === "c") return {
|
|
16439
|
+
type: "result",
|
|
16440
|
+
result: "cancelled",
|
|
16441
|
+
status: "cancelled",
|
|
16442
|
+
state: input.state
|
|
16443
|
+
};
|
|
16444
|
+
if (input.key.name === "up" || input.key.name === "down" || input.key.name === "left" || input.key.name === "right" || input.key.name === "tab" || input.key.name === "space") return {
|
|
16445
|
+
type: "state",
|
|
16446
|
+
state: {
|
|
16447
|
+
...input.state,
|
|
16448
|
+
value: !input.state.value
|
|
16449
|
+
}
|
|
16450
|
+
};
|
|
16451
|
+
const normalized = String(input.str ?? "").trim().toLowerCase();
|
|
16452
|
+
if (normalized === "y") return {
|
|
16453
|
+
type: "result",
|
|
16454
|
+
result: "confirmed",
|
|
16455
|
+
status: "submitted",
|
|
16456
|
+
state: {
|
|
16457
|
+
...input.state,
|
|
16458
|
+
value: true
|
|
16459
|
+
}
|
|
16460
|
+
};
|
|
16461
|
+
if (normalized === "n") return {
|
|
16462
|
+
type: "result",
|
|
16463
|
+
result: "declined",
|
|
16464
|
+
status: "submitted",
|
|
16465
|
+
state: {
|
|
16466
|
+
...input.state,
|
|
16467
|
+
value: false
|
|
16468
|
+
}
|
|
16469
|
+
};
|
|
16470
|
+
return { type: "ignore" };
|
|
16471
|
+
}
|
|
16472
|
+
function renderConfirmOption(label, selected) {
|
|
16473
|
+
return `${selected ? SELECTED_SYMBOL : UNSELECTED_SYMBOL} ${label}`;
|
|
16474
|
+
}
|
|
16475
|
+
//#endregion
|
|
16380
16476
|
//#region src/runtime/cli-output-handled-error.ts
|
|
16381
16477
|
var CliOutputHandledError = class extends Error {
|
|
16382
16478
|
constructor(message) {
|
|
@@ -18084,7 +18180,7 @@ async function resolveCurrentComputerSession(candidate) {
|
|
|
18084
18180
|
}
|
|
18085
18181
|
if (currentState.state === "missing" || currentState.session) return currentState.session;
|
|
18086
18182
|
const revoked = await revokePreparedAuthSession(candidate);
|
|
18087
|
-
const detail = normalizeOptionalString$
|
|
18183
|
+
const detail = normalizeOptionalString$6(currentState.errorMessage) ?? normalizeOptionalString$6(currentState.reasonCode);
|
|
18088
18184
|
throw new Error(`OpenMeld could not inspect the current Computer sign-in. The current Computer connection was not changed.${detail ? ` ${detail}` : ""}${formatComputerAuthCleanupFailureSuffix(revoked)}`);
|
|
18089
18185
|
}
|
|
18090
18186
|
async function beginComputerSessionTransition(input) {
|
|
@@ -18116,24 +18212,25 @@ function attachComputerAuthCleanupFailure(input) {
|
|
|
18116
18212
|
} });
|
|
18117
18213
|
}
|
|
18118
18214
|
async function confirmComputerAccountSwitch(input) {
|
|
18119
|
-
const currentUserId = normalizeOptionalString$
|
|
18215
|
+
const currentUserId = normalizeOptionalString$6(input.currentSession?.user?.id);
|
|
18120
18216
|
if (!input.currentSession) return true;
|
|
18121
18217
|
if (!currentUserId) {
|
|
18122
18218
|
const revoked = await revokePreparedAuthSession(input.candidate);
|
|
18123
18219
|
throw new Error(`OpenMeld could not verify the account currently connected to this Computer. The current Computer connection was not changed.${formatComputerAuthCleanupFailureSuffix(revoked)}`);
|
|
18124
18220
|
}
|
|
18125
18221
|
if (currentUserId === input.candidate.user.id) return true;
|
|
18126
|
-
const currentAccount = normalizeOptionalString$
|
|
18127
|
-
const nextAccount = normalizeOptionalString$
|
|
18222
|
+
const currentAccount = normalizeOptionalString$6(input.currentSession?.user?.email) ?? "the current account";
|
|
18223
|
+
const nextAccount = normalizeOptionalString$6(input.candidate.user.email) ?? "another account";
|
|
18128
18224
|
if (!input.interactive || input.resolvedView !== "human") {
|
|
18129
18225
|
const revoked = await revokePreparedAuthSession(input.candidate);
|
|
18130
18226
|
throw new Error(`This computer is signed in as ${currentAccount}, but the setup command uses ${nextAccount}. Run the setup command in an interactive Terminal to review and confirm the account switch. The current Computer connection was not changed.${formatComputerAuthCleanupFailureSuffix(revoked)}`);
|
|
18131
18227
|
}
|
|
18132
|
-
|
|
18228
|
+
if (await promptConfirm({
|
|
18229
|
+
activeLabel: "Switch account",
|
|
18230
|
+
inactiveLabel: "Keep current account",
|
|
18133
18231
|
initialValue: false,
|
|
18134
18232
|
message: `Switch this computer from ${currentAccount} to ${nextAccount}?`
|
|
18135
|
-
})
|
|
18136
|
-
if (isCancel(confirmed) || !confirmed) {
|
|
18233
|
+
}) !== "confirmed") {
|
|
18137
18234
|
input.presenter.line({
|
|
18138
18235
|
code: "setup.account_switch.cancelled",
|
|
18139
18236
|
text: "Account switch canceled. The current Computer connection was not changed."
|
|
@@ -18153,7 +18250,7 @@ async function restorePreviousComputerAfterFailedHandoff(input) {
|
|
|
18153
18250
|
async function restoreLegacyComputerAuthTransition(input) {
|
|
18154
18251
|
const revoked = await revokePreparedAuthSession(input.candidate);
|
|
18155
18252
|
if (!revoked.ok) emitUnusedSetupSessionCleanupWarning(input.presenter, revoked.error);
|
|
18156
|
-
const previousOwnerUserId = normalizeOptionalString$
|
|
18253
|
+
const previousOwnerUserId = normalizeOptionalString$6(input.transition.previousSession?.user?.id);
|
|
18157
18254
|
if (!previousOwnerUserId) {
|
|
18158
18255
|
const stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
|
|
18159
18256
|
if (stopped.status === "warning") throw new Error(stopped.errorMessage ?? "OpenMeld could not stop the incomplete Computer connection.");
|
|
@@ -18175,7 +18272,7 @@ async function restoreLegacyComputerAuthTransition(input) {
|
|
|
18175
18272
|
});
|
|
18176
18273
|
if (restored.status !== "aligned") throw new Error(restored.errorMessage ?? "OpenMeld could not reconnect the previous Computer account.");
|
|
18177
18274
|
}
|
|
18178
|
-
function normalizeOptionalString$
|
|
18275
|
+
function normalizeOptionalString$6(value) {
|
|
18179
18276
|
if (typeof value !== "string") return null;
|
|
18180
18277
|
const normalized = value.trim();
|
|
18181
18278
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -18201,7 +18298,7 @@ async function runSetupLocalAgentConnection(input) {
|
|
|
18201
18298
|
view: runtime.resolvedView
|
|
18202
18299
|
});
|
|
18203
18300
|
if (input.humanProfile) throw new Error(RETIRED_HUMAN_PROFILE_SETUP_MESSAGE);
|
|
18204
|
-
const deviceCode = normalizeOptionalString$
|
|
18301
|
+
const deviceCode = normalizeOptionalString$5(input.deviceCode);
|
|
18205
18302
|
if (input.startSession && deviceCode) return buildPrepareSessionSetupResult(await runComputerAuthorizationHandoff({
|
|
18206
18303
|
deviceCode,
|
|
18207
18304
|
interactive,
|
|
@@ -18211,7 +18308,7 @@ async function runSetupLocalAgentConnection(input) {
|
|
|
18211
18308
|
startSession: input.startSession,
|
|
18212
18309
|
view: input.view
|
|
18213
18310
|
}));
|
|
18214
|
-
const oneTimeToken = normalizeOptionalString$
|
|
18311
|
+
const oneTimeToken = normalizeOptionalString$5(input.ott);
|
|
18215
18312
|
if (input.startSession && oneTimeToken) return buildPrepareSessionSetupResult(await runOneTimeTokenComputerHandoff({
|
|
18216
18313
|
oneTimeToken,
|
|
18217
18314
|
interactive,
|
|
@@ -18310,7 +18407,7 @@ async function runSetupLocalAgentConnection(input) {
|
|
|
18310
18407
|
};
|
|
18311
18408
|
}
|
|
18312
18409
|
async function resolveExplicitSetupProfile(profileId) {
|
|
18313
|
-
const normalizedProfileId = normalizeOptionalString$
|
|
18410
|
+
const normalizedProfileId = normalizeOptionalString$5(profileId);
|
|
18314
18411
|
if (!normalizedProfileId) return {
|
|
18315
18412
|
profile: null,
|
|
18316
18413
|
resolved: false
|
|
@@ -18364,8 +18461,8 @@ function emitSetupLocalAgentConnectionHeader(input) {
|
|
|
18364
18461
|
}
|
|
18365
18462
|
function assertValidSetupLocalAgentConnectionInput(input) {
|
|
18366
18463
|
const facts = resolveSetupLocalAgentConnectionInputFacts(input);
|
|
18367
|
-
if (normalizeOptionalString$
|
|
18368
|
-
if (normalizeOptionalString$
|
|
18464
|
+
if (normalizeOptionalString$5(input.deviceCode) && !facts.hasStartSession) throw new Error("--device-code requires --start-session.");
|
|
18465
|
+
if (normalizeOptionalString$5(input.deviceCode) && normalizeOptionalString$5(input.ott)) throw new Error("use either --device-code or --ott, not both");
|
|
18369
18466
|
if (facts.hasStartSession && (facts.hasProfile || facts.hasHumanProfile || facts.hasLocalAgentPreparation)) throw new Error("--start-session cannot be combined with --profile, --human-profile, or --agent.");
|
|
18370
18467
|
if (!facts.hasStartSession && facts.hasPrepareSessionLocalAgentMode) throw new Error("--local-agents requires --start-session.");
|
|
18371
18468
|
assertValidLocalAgentSelectionInput({
|
|
@@ -18377,14 +18474,14 @@ function assertValidSetupLocalAgentConnectionInput(input) {
|
|
|
18377
18474
|
if (facts.hasProfile && facts.hasLocalAgentPreparation) throw new Error("use either --profile <id> or --agent <id...>, not both");
|
|
18378
18475
|
}
|
|
18379
18476
|
function resolveStandaloneProfileLocalAgentId(input) {
|
|
18380
|
-
if (!normalizeOptionalString$
|
|
18477
|
+
if (!normalizeOptionalString$5(input.profile)) return null;
|
|
18381
18478
|
return normalizeLocalAgentIds(input.localAgent)[0] ?? null;
|
|
18382
18479
|
}
|
|
18383
18480
|
function normalizeLocalAgentIds(localAgent) {
|
|
18384
|
-
return Array.from(new Set((localAgent ?? []).map((agentId) => normalizeOptionalString$
|
|
18481
|
+
return Array.from(new Set((localAgent ?? []).map((agentId) => normalizeOptionalString$5(agentId)).filter((agentId) => agentId !== null)));
|
|
18385
18482
|
}
|
|
18386
18483
|
function resolvePrepareSessionLocalAgentSelection(input) {
|
|
18387
|
-
const localAgentMode = normalizeOptionalString$
|
|
18484
|
+
const localAgentMode = normalizeOptionalString$5(input.localAgents);
|
|
18388
18485
|
if (localAgentMode === "all" || localAgentMode === "none") return { mode: localAgentMode };
|
|
18389
18486
|
const localAgentIds = normalizeLocalAgentIds(input.localAgent);
|
|
18390
18487
|
if (localAgentIds.length > 0) return {
|
|
@@ -18411,7 +18508,7 @@ async function runSetupLocalAgentConnectionServiceGate(input) {
|
|
|
18411
18508
|
throw new Error("OpenMeld Service is still reconnecting. Run `openmeld setup` again after OpenMeld Service finishes refreshing.");
|
|
18412
18509
|
}
|
|
18413
18510
|
async function maybeLogInWithOneTimeToken$1(input) {
|
|
18414
|
-
const oneTimeToken = normalizeOptionalString$
|
|
18511
|
+
const oneTimeToken = normalizeOptionalString$5(input.ott);
|
|
18415
18512
|
if (!oneTimeToken) return;
|
|
18416
18513
|
if (await runAuthLogin({
|
|
18417
18514
|
ott: oneTimeToken,
|
|
@@ -18420,7 +18517,7 @@ async function maybeLogInWithOneTimeToken$1(input) {
|
|
|
18420
18517
|
}) !== "completed") throw new Error("OpenMeld sign-in was cancelled before local preparation ran.");
|
|
18421
18518
|
}
|
|
18422
18519
|
function resolveSetupLocalAgentConnectionInputFacts(input) {
|
|
18423
|
-
const localAgentMode = normalizeOptionalString$
|
|
18520
|
+
const localAgentMode = normalizeOptionalString$5(input.localAgents);
|
|
18424
18521
|
return {
|
|
18425
18522
|
hasHumanProfile: typeof input.humanProfile === "string" && input.humanProfile.trim().length > 0,
|
|
18426
18523
|
hasLocalAgentIds: Array.isArray(input.localAgent) && input.localAgent.length > 0,
|
|
@@ -18508,7 +18605,7 @@ function collectReadinessReasonCodes(input) {
|
|
|
18508
18605
|
for (const reasonCode of input.agentReplyReadiness?.reasonCodes ?? []) if (!reasonCodes.includes(reasonCode)) reasonCodes.push(reasonCode);
|
|
18509
18606
|
return reasonCodes;
|
|
18510
18607
|
}
|
|
18511
|
-
function normalizeOptionalString$
|
|
18608
|
+
function normalizeOptionalString$5(value) {
|
|
18512
18609
|
const normalized = String(value ?? "").trim();
|
|
18513
18610
|
return normalized.length > 0 ? normalized : null;
|
|
18514
18611
|
}
|
|
@@ -19098,10 +19195,10 @@ async function runSetupStartupLocalStateRepair() {
|
|
|
19098
19195
|
await runLocalStateAlignment({ mode: "repair" });
|
|
19099
19196
|
}
|
|
19100
19197
|
function shouldUseSetupLocalAgentConnection(input) {
|
|
19101
|
-
return Boolean(normalizeOptionalString$
|
|
19198
|
+
return Boolean(normalizeOptionalString$4(input.startSession) ?? normalizeOptionalString$4(input.humanProfile) ?? normalizeOptionalString$4(input.profile) ?? (input.agent && input.agent.length > 0 ? "agent" : null));
|
|
19102
19199
|
}
|
|
19103
19200
|
async function maybeLogInWithOneTimeToken(input) {
|
|
19104
|
-
const oneTimeToken = normalizeOptionalString$
|
|
19201
|
+
const oneTimeToken = normalizeOptionalString$4(input.ott);
|
|
19105
19202
|
if (!oneTimeToken) return;
|
|
19106
19203
|
if (await runAuthLogin({
|
|
19107
19204
|
ott: oneTimeToken,
|
|
@@ -19110,7 +19207,7 @@ async function maybeLogInWithOneTimeToken(input) {
|
|
|
19110
19207
|
}) !== "completed") throw new Error("OpenMeld sign-in was cancelled before setup ran.");
|
|
19111
19208
|
}
|
|
19112
19209
|
function resolveSetupLocalAgentIds(input) {
|
|
19113
|
-
const localAgentMode = normalizeOptionalString$
|
|
19210
|
+
const localAgentMode = normalizeOptionalString$4(input.localAgents);
|
|
19114
19211
|
const localAgentIds = [...new Set((input.localAgent ?? []).map((agentId) => agentId.trim()).filter((agentId) => agentId.length > 0))];
|
|
19115
19212
|
if (localAgentMode && localAgentMode !== "all" && localAgentMode !== "none") throw new Error("--local-agents must be either all or none.");
|
|
19116
19213
|
if (localAgentMode && localAgentIds.length > 0) throw new Error("use either --local-agents <all|none> or --local-agent <id...>, not both");
|
|
@@ -19127,7 +19224,7 @@ function resolveSetupLocalAgentIds(input) {
|
|
|
19127
19224
|
return [...selectableById.keys()].sort((left, right) => left.localeCompare(right));
|
|
19128
19225
|
}
|
|
19129
19226
|
async function confirmZeroLocalAgentSetupIfNeeded(input) {
|
|
19130
|
-
if (input.selectedLocalAgentIds.length > 0 || normalizeOptionalString$
|
|
19227
|
+
if (input.selectedLocalAgentIds.length > 0 || normalizeOptionalString$4(input.localAgentsMode) === "none") return;
|
|
19131
19228
|
if (input.explicitSelection) {
|
|
19132
19229
|
emitSetupNoLocalAgentsWarning(input);
|
|
19133
19230
|
return;
|
|
@@ -19335,7 +19432,7 @@ function resolveRuntimeIdentityFromSetupSession(snapshot) {
|
|
|
19335
19432
|
};
|
|
19336
19433
|
}
|
|
19337
19434
|
function hasExplicitLocalAgentSelection(input) {
|
|
19338
|
-
return Boolean(normalizeOptionalString$
|
|
19435
|
+
return Boolean(normalizeOptionalString$4(input.localAgents) ?? (input.localAgent && input.localAgent.length > 0 ? "local-agent" : null));
|
|
19339
19436
|
}
|
|
19340
19437
|
function emitDefaultLocalAgentsNoticeIfNeeded(input) {
|
|
19341
19438
|
if (input.explicitSelection || input.interactive || input.selectedLocalAgentIds.length === 0) return;
|
|
@@ -19601,7 +19698,7 @@ function toErrorMessage$1(error) {
|
|
|
19601
19698
|
if (typeof error === "string" && error.trim().length > 0) return error.trim();
|
|
19602
19699
|
return "Unknown error.";
|
|
19603
19700
|
}
|
|
19604
|
-
function normalizeOptionalString$
|
|
19701
|
+
function normalizeOptionalString$4(value) {
|
|
19605
19702
|
const normalized = String(value ?? "").trim();
|
|
19606
19703
|
return normalized.length > 0 ? normalized : null;
|
|
19607
19704
|
}
|
|
@@ -21566,7 +21663,7 @@ function buildStartRecapItems() {
|
|
|
21566
21663
|
//#endregion
|
|
21567
21664
|
//#region src/start-shell/notices.ts
|
|
21568
21665
|
function renderStartWelcome(input) {
|
|
21569
|
-
const email = normalizeOptionalString$
|
|
21666
|
+
const email = normalizeOptionalString$3(input.session.user?.email) ?? "(unknown)";
|
|
21570
21667
|
if (input.runtime.resolvedView === "agent") {
|
|
21571
21668
|
input.presenter.data({
|
|
21572
21669
|
code: "start.welcome",
|
|
@@ -21580,10 +21677,10 @@ function renderStartWelcome(input) {
|
|
|
21580
21677
|
note([`Signed In: ${email}`, `Gateway: ${input.gatewayUrl}`].join("\n"), "Welcome");
|
|
21581
21678
|
}
|
|
21582
21679
|
function emitStartCompatibilityNotice(input) {
|
|
21583
|
-
const normalizedSkillsMode = normalizeOptionalString$
|
|
21680
|
+
const normalizedSkillsMode = normalizeOptionalString$3(input.input.skillsMode)?.toLowerCase();
|
|
21584
21681
|
const ignoredFlags = [
|
|
21585
|
-
normalizeOptionalString$
|
|
21586
|
-
normalizeOptionalString$
|
|
21682
|
+
normalizeOptionalString$3(input.input.agentModel) ? "--agent-model" : null,
|
|
21683
|
+
normalizeOptionalString$3(input.input.agentOwner) ? "--agent-owner" : null,
|
|
21587
21684
|
normalizedSkillsMode && normalizedSkillsMode !== "auto" ? "--skills-mode" : null
|
|
21588
21685
|
].filter((value) => value !== null);
|
|
21589
21686
|
if (ignoredFlags.length === 0) return;
|
|
@@ -21634,7 +21731,7 @@ function emitStartSetupHint(input) {
|
|
|
21634
21731
|
text: formatInlineOpenMeldCliCommands("If this computer needs local service or agent setup, run `openmeld setup`.")
|
|
21635
21732
|
});
|
|
21636
21733
|
}
|
|
21637
|
-
function normalizeOptionalString$
|
|
21734
|
+
function normalizeOptionalString$3(value) {
|
|
21638
21735
|
if (typeof value !== "string") return null;
|
|
21639
21736
|
const normalized = value.trim();
|
|
21640
21737
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -22077,7 +22174,7 @@ function ensureStartAgentIdentityPreflight(input) {
|
|
|
22077
22174
|
}
|
|
22078
22175
|
function shouldEnsureDefaultHumanProfile(input) {
|
|
22079
22176
|
if (input.resolvedView !== "human") return false;
|
|
22080
|
-
if (normalizeOptionalString$
|
|
22177
|
+
if (normalizeOptionalString$2(input.profileId) ?? normalizeOptionalString$2(input.profile)) return false;
|
|
22081
22178
|
return resolveCreateProfileInputFromArgs(input) === null;
|
|
22082
22179
|
}
|
|
22083
22180
|
function renderDefaultHumanProfileCard(input) {
|
|
@@ -22175,9 +22272,9 @@ async function resolveStartSelectedProfileFromArguments(input) {
|
|
|
22175
22272
|
return { handled: false };
|
|
22176
22273
|
}
|
|
22177
22274
|
function resolveExplicitStartProfile(input) {
|
|
22178
|
-
const explicitProfileId = normalizeOptionalString$
|
|
22275
|
+
const explicitProfileId = normalizeOptionalString$2(input.profileId);
|
|
22179
22276
|
if (explicitProfileId) return resolveOpenMeldProfile({ openMeldProfileId: explicitProfileId });
|
|
22180
|
-
const explicitProfile = normalizeOptionalString$
|
|
22277
|
+
const explicitProfile = normalizeOptionalString$2(input.profile);
|
|
22181
22278
|
if (!explicitProfile) return Promise.resolve(null);
|
|
22182
22279
|
return resolveOpenMeldProfile({ openMeldProfileId: explicitProfile }).catch(async () => {
|
|
22183
22280
|
const matched = (await listOpenMeldProfiles()).find((profile) => profile.profileName.toLowerCase() === explicitProfile.toLowerCase());
|
|
@@ -22287,7 +22384,7 @@ async function resolveInteractiveStartProfileSearchSelection(input) {
|
|
|
22287
22384
|
}
|
|
22288
22385
|
function resolveCreateProfileInputFromArgs(input) {
|
|
22289
22386
|
const kind = parseStartProfileKind(input.kind);
|
|
22290
|
-
const profileName = normalizeOptionalString$
|
|
22387
|
+
const profileName = normalizeOptionalString$2(input.profileName) ?? (kind === "agent" ? normalizeOptionalString$2(input.agentName) : null);
|
|
22291
22388
|
if (!(kind && profileName)) return null;
|
|
22292
22389
|
return {
|
|
22293
22390
|
kind,
|
|
@@ -22295,11 +22392,11 @@ function resolveCreateProfileInputFromArgs(input) {
|
|
|
22295
22392
|
};
|
|
22296
22393
|
}
|
|
22297
22394
|
function inspectStartAgentIdentityInput(input) {
|
|
22298
|
-
if (normalizeOptionalString$
|
|
22299
|
-
const rawKind = normalizeOptionalString$
|
|
22395
|
+
if (normalizeOptionalString$2(input.profileId) ?? normalizeOptionalString$2(input.profile)) return { status: "valid" };
|
|
22396
|
+
const rawKind = normalizeOptionalString$2(input.kind);
|
|
22300
22397
|
const parsedKind = parseStartProfileKind(input.kind);
|
|
22301
|
-
const rawProfileName = normalizeOptionalString$
|
|
22302
|
-
const rawAgentName = normalizeOptionalString$
|
|
22398
|
+
const rawProfileName = normalizeOptionalString$2(input.profileName);
|
|
22399
|
+
const rawAgentName = normalizeOptionalString$2(input.agentName);
|
|
22303
22400
|
if (parsedKind === "human") return {
|
|
22304
22401
|
status: "error",
|
|
22305
22402
|
summary: "agent view cannot create human profiles. use --kind agent, or switch to human view."
|
|
@@ -22499,7 +22596,7 @@ function throwStartAgentIdentityGuide(input) {
|
|
|
22499
22596
|
function formatStartProfileKindLabel(profileKind) {
|
|
22500
22597
|
return profileKind === "agent" ? "AI agent" : "human";
|
|
22501
22598
|
}
|
|
22502
|
-
function normalizeOptionalString$
|
|
22599
|
+
function normalizeOptionalString$2(value) {
|
|
22503
22600
|
const normalized = String(value ?? "").trim();
|
|
22504
22601
|
return normalized.length > 0 ? normalized : null;
|
|
22505
22602
|
}
|
|
@@ -22973,6 +23070,11 @@ function buildHints(argv, message, error) {
|
|
|
22973
23070
|
if (resolveAuthenticationGuidanceFromError(error) !== null || resolveAuthenticationGuidanceFromMessage(message) !== null) return [];
|
|
22974
23071
|
if (error instanceof DualViewGuideError) return [];
|
|
22975
23072
|
const contractEntryName = resolveCommandEntryNameFromTokens(parseLeadingCommandTokensFromArgv(argv, 3));
|
|
23073
|
+
const invalidSpaceReadTargetHints = resolveInvalidSpaceReadTargetHints({
|
|
23074
|
+
entryName: resolveCommandEntryNameFromTokens(parseLeadingCommandTokensFromArgv(argv, 2)),
|
|
23075
|
+
message
|
|
23076
|
+
});
|
|
23077
|
+
if (invalidSpaceReadTargetHints) return invalidSpaceReadTargetHints;
|
|
22976
23078
|
if (contractEntryName) {
|
|
22977
23079
|
const contractHints = getCommandHintsFromContract({
|
|
22978
23080
|
context: { agentExampleArg: DEFAULT_AGENT_EXAMPLE_PAIR },
|
|
@@ -23003,6 +23105,23 @@ function buildHints(argv, message, error) {
|
|
|
23003
23105
|
];
|
|
23004
23106
|
return [];
|
|
23005
23107
|
}
|
|
23108
|
+
function resolveInvalidSpaceReadTargetHints(input) {
|
|
23109
|
+
if (!isInvalidSpaceTargetMessage(input.message)) return null;
|
|
23110
|
+
const command = resolveSpaceReadCommandName(input.entryName);
|
|
23111
|
+
return command ? [`openmeld space ${command} <space-id-or-url>`] : null;
|
|
23112
|
+
}
|
|
23113
|
+
function resolveSpaceReadCommandName(entryName) {
|
|
23114
|
+
switch (entryName) {
|
|
23115
|
+
case "space.board": return "board";
|
|
23116
|
+
case "space.history": return "history";
|
|
23117
|
+
case "space.members": return "members";
|
|
23118
|
+
case "space.status": return "status";
|
|
23119
|
+
default: return null;
|
|
23120
|
+
}
|
|
23121
|
+
}
|
|
23122
|
+
function isInvalidSpaceTargetMessage(message) {
|
|
23123
|
+
return message.includes("invalid space target") || message.includes("Space target must be a 64-character Space ID") || message.includes("Space URL must include /o/<org-slug>/spaces/<space-id>") || message.includes("Space URL must use a trusted OpenMeld Web origin");
|
|
23124
|
+
}
|
|
23006
23125
|
function isSpaceCommandToken(token) {
|
|
23007
23126
|
return token === "space" || token === "spaces";
|
|
23008
23127
|
}
|
|
@@ -26564,7 +26683,7 @@ const FINAL_SAFE_STATUSES = /* @__PURE__ */ new Set([
|
|
|
26564
26683
|
"needs_input"
|
|
26565
26684
|
]);
|
|
26566
26685
|
const LEADING_AT_PATTERN = /^@/u;
|
|
26567
|
-
const TRAILING_RELATION_PATTERN = /\((wake|reference)\)$/iu;
|
|
26686
|
+
const TRAILING_RELATION_PATTERN = /\((wake|reference|mention)\)$/iu;
|
|
26568
26687
|
const WHITESPACE_PATTERN = /\s+/g;
|
|
26569
26688
|
const DISPATCH_ACTION_CLI_PLACEHOLDER = "<DISPATCH_ACTION_CLI>";
|
|
26570
26689
|
const SPACE_ACTION_REPLY_TIMING_EVENT = "openmeld.space_action.reply_timing";
|
|
@@ -26573,6 +26692,7 @@ function runSpaceActionReply(input) {
|
|
|
26573
26692
|
const result = recordDispatchSpaceReply({
|
|
26574
26693
|
filePaths: input.filePaths,
|
|
26575
26694
|
messagePartCount: input.messageParts.length,
|
|
26695
|
+
mentionTargets: input.mentionTargets,
|
|
26576
26696
|
referenceTargets: input.referenceTargets,
|
|
26577
26697
|
text,
|
|
26578
26698
|
wakeTargets: input.wakeTargets
|
|
@@ -26586,6 +26706,7 @@ function recordDispatchSpaceReply(input) {
|
|
|
26586
26706
|
const timing = createSpaceActionReplyTiming();
|
|
26587
26707
|
timing.emit("command_start", void 0, {
|
|
26588
26708
|
messagePartCount: input.messagePartCount ?? 0,
|
|
26709
|
+
mentionTargetCount: input.mentionTargets?.length ?? 0,
|
|
26589
26710
|
referenceTargetCount: input.referenceTargets?.length ?? 0,
|
|
26590
26711
|
wakeTargetCount: input.wakeTargets?.length ?? 0
|
|
26591
26712
|
});
|
|
@@ -26596,12 +26717,14 @@ function recordDispatchSpaceReply(input) {
|
|
|
26596
26717
|
assertNoRemovedCcSpaceAddressingSyntax(text);
|
|
26597
26718
|
const targetIds = resolveMessageEnvelopeTargetIds({
|
|
26598
26719
|
context,
|
|
26720
|
+
mentionTargets: input.mentionTargets ?? [],
|
|
26599
26721
|
wakeTargets: input.wakeTargets ?? [],
|
|
26600
26722
|
referenceTargets: input.referenceTargets ?? []
|
|
26601
26723
|
});
|
|
26602
26724
|
timing.emit("targets_resolved", context, {
|
|
26603
26725
|
activationTargetCount: targetIds.activationTargets.length,
|
|
26604
26726
|
messageLength: text.length,
|
|
26727
|
+
mentionTargetCount: targetIds.mentionTargets.length,
|
|
26605
26728
|
referenceTargetCount: targetIds.referenceTargets.length
|
|
26606
26729
|
});
|
|
26607
26730
|
const filePaths = input.filePaths ?? [];
|
|
@@ -26644,6 +26767,7 @@ function writeSpaceActionReplyRecord(input) {
|
|
|
26644
26767
|
...input.files.length > 0 ? { files: [...input.files] } : {},
|
|
26645
26768
|
messageEnvelope: {
|
|
26646
26769
|
activationTargets: input.targetIds.activationTargets,
|
|
26770
|
+
mentionTargets: input.targetIds.mentionTargets,
|
|
26647
26771
|
referenceTargets: input.targetIds.referenceTargets,
|
|
26648
26772
|
...input.context.replyToSignalId ? { replyToSignalId: input.context.replyToSignalId } : {},
|
|
26649
26773
|
text: input.text
|
|
@@ -26684,6 +26808,7 @@ function runSpaceActionWake(input) {
|
|
|
26684
26808
|
relation: "wake",
|
|
26685
26809
|
targets: [input.target]
|
|
26686
26810
|
}),
|
|
26811
|
+
mentionTargets: [],
|
|
26687
26812
|
referenceTargets: [],
|
|
26688
26813
|
...context.replyToSignalId ? { replyToSignalId: context.replyToSignalId } : {},
|
|
26689
26814
|
text
|
|
@@ -26731,10 +26856,15 @@ function runSpaceActionTargets() {
|
|
|
26731
26856
|
const targetReference = requireLoadedTargets(readDispatchSpaceActionContextFromEnv().sendTargetReference);
|
|
26732
26857
|
const wakeTargets = targetReference.projection.filter((target) => target.allowedRelations.wake);
|
|
26733
26858
|
const referenceTargets = targetReference.projection.filter((target) => target.allowedRelations.reference);
|
|
26859
|
+
const mentionTargets = targetReference.projection.filter((target) => target.allowedRelations.mention);
|
|
26734
26860
|
outLine("Wake targets:");
|
|
26735
26861
|
if (wakeTargets.length === 0) outLine("- none");
|
|
26736
26862
|
else for (const target of wakeTargets) outLine(`- ${formatTargetLine(target, "wake")}`);
|
|
26737
26863
|
outLine("");
|
|
26864
|
+
outLine("Mention targets:");
|
|
26865
|
+
if (mentionTargets.length === 0) outLine("- none");
|
|
26866
|
+
else for (const target of mentionTargets) outLine(`- ${formatTargetLine(target, "mention")}`);
|
|
26867
|
+
outLine("");
|
|
26738
26868
|
outLine("Reference targets:");
|
|
26739
26869
|
if (referenceTargets.length === 0) outLine("- none");
|
|
26740
26870
|
else for (const target of referenceTargets) outLine(`- ${formatTargetLine(target, "reference")}`);
|
|
@@ -26750,7 +26880,8 @@ function runSpaceActionHelp() {
|
|
|
26750
26880
|
outLine(formatSpaceActionHelpExample("Reply", "reply \"message\"", context));
|
|
26751
26881
|
outLine(formatSpaceActionHelpExample("Handoff and wake another agent", "wake \"@Agent Name\" \"summary and request\"", context));
|
|
26752
26882
|
outLine(formatSpaceActionHelpExample("Reply and also wake another agent", "reply --wake \"@Agent Name\" \"message\"", context));
|
|
26753
|
-
outLine(formatSpaceActionHelpExample("Reply and reference another
|
|
26883
|
+
outLine(formatSpaceActionHelpExample("Reply and reference another agent", "reply --reference \"@Agent Name\" \"message\"", context));
|
|
26884
|
+
outLine(formatSpaceActionHelpExample("Reply and mention a person", "reply --mention \"@Person Name\" \"message\"", context));
|
|
26754
26885
|
outLine(formatSpaceActionHelpExample("Final status", "status done \"short completion update\"", context));
|
|
26755
26886
|
outLine(formatSpaceActionHelpExample("Stay silent", "silent --reason \"No public reply is needed.\"", context));
|
|
26756
26887
|
outLine(formatSpaceActionHelpExample("Current targets", "targets", context));
|
|
@@ -26811,6 +26942,11 @@ function resolveMessageEnvelopeTargetIds(input) {
|
|
|
26811
26942
|
relation: "wake",
|
|
26812
26943
|
targets: input.wakeTargets
|
|
26813
26944
|
}),
|
|
26945
|
+
mentionTargets: resolveTargetProfileIds({
|
|
26946
|
+
context: input.context,
|
|
26947
|
+
relation: "mention",
|
|
26948
|
+
targets: input.mentionTargets
|
|
26949
|
+
}),
|
|
26814
26950
|
referenceTargets: resolveTargetProfileIds({
|
|
26815
26951
|
context: input.context,
|
|
26816
26952
|
relation: "reference",
|
|
@@ -26822,7 +26958,11 @@ function resolveMessageEnvelopeTargetIds(input) {
|
|
|
26822
26958
|
}
|
|
26823
26959
|
function assertDistinctMessageEnvelopeTargets(input) {
|
|
26824
26960
|
const seen = /* @__PURE__ */ new Map();
|
|
26825
|
-
const relationTargets = [
|
|
26961
|
+
const relationTargets = [
|
|
26962
|
+
["wake", input.activationTargets],
|
|
26963
|
+
["reference", input.referenceTargets],
|
|
26964
|
+
["mention", input.mentionTargets]
|
|
26965
|
+
];
|
|
26826
26966
|
for (const [relation, profileIds] of relationTargets) for (const profileId of profileIds) {
|
|
26827
26967
|
const existingRelation = seen.get(profileId);
|
|
26828
26968
|
if (!existingRelation) {
|
|
@@ -26914,9 +27054,10 @@ function createSpaceActionMcpServer() {
|
|
|
26914
27054
|
}, { instructions: "Choose exactly one final OpenMeld Space Action for the current Wake. Use reply for the exact public message, status for a final visible status, or stay_silent when no public message is needed. Private assistant output is not posted to the Space." });
|
|
26915
27055
|
server.registerTool("reply", {
|
|
26916
27056
|
title: "Reply in the current OpenMeld Space",
|
|
26917
|
-
description: "Record the exact final public reply for the active OpenMeld Wake. Use real newline characters for paragraph breaks. Optionally wake or reference
|
|
27057
|
+
description: "Record the exact final public reply for the active OpenMeld Wake. Use real newline characters for paragraph breaks. Optionally wake or reference an Agent, or mention a person, by mention label or profile ID.",
|
|
26918
27058
|
inputSchema: {
|
|
26919
27059
|
message: z.string().min(1),
|
|
27060
|
+
mentionTargets: z.array(z.string().min(1)).optional(),
|
|
26920
27061
|
referenceTargets: z.array(z.string().min(1)).optional(),
|
|
26921
27062
|
wakeTargets: z.array(z.string().min(1)).optional()
|
|
26922
27063
|
},
|
|
@@ -26926,7 +27067,8 @@ function createSpaceActionMcpServer() {
|
|
|
26926
27067
|
openWorldHint: false,
|
|
26927
27068
|
readOnlyHint: false
|
|
26928
27069
|
}
|
|
26929
|
-
}, async ({ message, referenceTargets, wakeTargets }) => executeSpaceAction(() => recordDispatchSpaceReply({
|
|
27070
|
+
}, async ({ mentionTargets, message, referenceTargets, wakeTargets }) => executeSpaceAction(() => recordDispatchSpaceReply({
|
|
27071
|
+
mentionTargets,
|
|
26930
27072
|
referenceTargets,
|
|
26931
27073
|
text: message,
|
|
26932
27074
|
wakeTargets
|
|
@@ -26982,17 +27124,63 @@ async function executeSpaceAction(action) {
|
|
|
26982
27124
|
}
|
|
26983
27125
|
}
|
|
26984
27126
|
//#endregion
|
|
26985
|
-
//#region src/space/
|
|
27127
|
+
//#region src/space/space-target.ts
|
|
26986
27128
|
const SPACE_ID_HEX_REGEX = /^[0-9a-f]{64}$/i;
|
|
27129
|
+
const INVALID_SPACE_TARGET_MESSAGE = "Space target must be a 64-character Space ID or an OpenMeld Space URL.";
|
|
27130
|
+
function parseSpaceTarget(value, options) {
|
|
27131
|
+
const explicitBaseUrl = normalizeOptionalString$1(options?.baseUrl);
|
|
27132
|
+
return {
|
|
27133
|
+
...parseSpaceTargetValue(value, !explicitBaseUrl),
|
|
27134
|
+
...explicitBaseUrl ? { baseUrl: explicitBaseUrl } : {}
|
|
27135
|
+
};
|
|
27136
|
+
}
|
|
27137
|
+
function parseSpaceTargetValue(value, deriveBaseUrl) {
|
|
27138
|
+
const raw = normalizeOptionalString$1(value);
|
|
27139
|
+
if (!raw) throw new Error(INVALID_SPACE_TARGET_MESSAGE);
|
|
27140
|
+
if (SPACE_ID_HEX_REGEX.test(raw)) return { spaceId: raw };
|
|
27141
|
+
const isPathOnly = raw.startsWith("/");
|
|
27142
|
+
let url;
|
|
27143
|
+
let segments;
|
|
27144
|
+
try {
|
|
27145
|
+
url = isPathOnly ? new URL(raw, "https://openmeld.ai") : new URL(raw);
|
|
27146
|
+
segments = url.pathname.split("/").map((segment) => decodeURIComponent(segment.trim())).filter((segment) => segment.length > 0);
|
|
27147
|
+
} catch {
|
|
27148
|
+
throw new Error(INVALID_SPACE_TARGET_MESSAGE);
|
|
27149
|
+
}
|
|
27150
|
+
const spacesIndex = segments.indexOf("spaces");
|
|
27151
|
+
const spaceId = spacesIndex >= 0 ? segments[spacesIndex + 1] : void 0;
|
|
27152
|
+
if (!(spaceId && SPACE_ID_HEX_REGEX.test(spaceId))) throw new Error("Space URL must include /o/<org-slug>/spaces/<space-id> with a full 64-character Space ID. Legacy /spaces/<space-id> and /app/spaces/<space-id> inputs are still accepted.");
|
|
27153
|
+
const profileId = normalizeOptionalString$1(url.searchParams.get("profileId"));
|
|
27154
|
+
return {
|
|
27155
|
+
spaceId,
|
|
27156
|
+
...profileId ? { profileId } : {},
|
|
27157
|
+
...isPathOnly || !deriveBaseUrl ? {} : { baseUrl: resolveSpaceWebGatewayOrigin(url) }
|
|
27158
|
+
};
|
|
27159
|
+
}
|
|
27160
|
+
function resolveSpaceReadCommandTarget(input) {
|
|
27161
|
+
const target = parseSpaceTarget(input.space, { baseUrl: input.baseUrl });
|
|
27162
|
+
const profile = normalizeOptionalString$1(input.profile) ?? target.profileId;
|
|
27163
|
+
return {
|
|
27164
|
+
space: target.spaceId,
|
|
27165
|
+
...target.baseUrl ? { baseUrl: target.baseUrl } : {},
|
|
27166
|
+
...profile ? { profile } : {}
|
|
27167
|
+
};
|
|
27168
|
+
}
|
|
27169
|
+
function normalizeOptionalString$1(value) {
|
|
27170
|
+
if (typeof value !== "string") return null;
|
|
27171
|
+
const normalized = value.trim();
|
|
27172
|
+
return normalized.length > 0 ? normalized : null;
|
|
27173
|
+
}
|
|
27174
|
+
//#endregion
|
|
27175
|
+
//#region src/space/add-me-command.ts
|
|
26987
27176
|
const SHELL_SAFE_ARG_REGEX = /^[A-Za-z0-9_./:=@%+-]+$/u;
|
|
26988
|
-
const TRAILING_SLASH_REGEX = /\/$/u;
|
|
26989
27177
|
async function runSpaceAddMe(input) {
|
|
26990
|
-
const target = parseSpaceAddMeTarget(input.space);
|
|
27178
|
+
const target = parseSpaceAddMeTarget(input.space, { baseUrl: input.baseUrl });
|
|
26991
27179
|
const profile = resolveSpaceAddMeActingProfileId({
|
|
26992
27180
|
cliProfileId: input.profile,
|
|
26993
27181
|
urlProfileId: target.profileId
|
|
26994
27182
|
});
|
|
26995
|
-
const baseUrl =
|
|
27183
|
+
const baseUrl = target.baseUrl;
|
|
26996
27184
|
const hasExplicitBaseUrlInput = normalizeOptionalString(baseUrl) !== null;
|
|
26997
27185
|
const context = await prepareAuthenticatedSpaceCommandContext({
|
|
26998
27186
|
profile,
|
|
@@ -27117,28 +27305,7 @@ async function runSpaceAddMe(input) {
|
|
|
27117
27305
|
});
|
|
27118
27306
|
return "completed";
|
|
27119
27307
|
}
|
|
27120
|
-
|
|
27121
|
-
const raw = normalizeOptionalString(value);
|
|
27122
|
-
if (!raw) throw new Error("Space ID or Space URL is required.");
|
|
27123
|
-
if (SPACE_ID_HEX_REGEX.test(raw)) return { spaceId: raw };
|
|
27124
|
-
const isPathOnly = raw.startsWith("/");
|
|
27125
|
-
let url;
|
|
27126
|
-
try {
|
|
27127
|
-
url = isPathOnly ? new URL(raw, "https://openmeld.ai") : new URL(raw);
|
|
27128
|
-
} catch {
|
|
27129
|
-
throw new Error("Space target must be a 64-character Space ID or an OpenMeld Space URL.");
|
|
27130
|
-
}
|
|
27131
|
-
const segments = url.pathname.split("/").map((segment) => decodeURIComponent(segment.trim())).filter((segment) => segment.length > 0);
|
|
27132
|
-
const spacesIndex = segments.indexOf("spaces");
|
|
27133
|
-
const spaceId = spacesIndex >= 0 ? segments[spacesIndex + 1] : void 0;
|
|
27134
|
-
if (!(spaceId && SPACE_ID_HEX_REGEX.test(spaceId))) throw new Error("Space URL must include /o/<org-slug>/spaces/<space-id> with a full 64-character Space ID. Legacy /spaces/<space-id> and /app/spaces/<space-id> inputs are still accepted.");
|
|
27135
|
-
const profileId = normalizeOptionalString(url.searchParams.get("profileId"));
|
|
27136
|
-
return {
|
|
27137
|
-
spaceId,
|
|
27138
|
-
...profileId ? { profileId } : {},
|
|
27139
|
-
...isPathOnly ? {} : { baseUrl: deriveGatewayUrlFromSpaceUrl(url) }
|
|
27140
|
-
};
|
|
27141
|
-
}
|
|
27308
|
+
const parseSpaceAddMeTarget = parseSpaceTarget;
|
|
27142
27309
|
function resolveSpaceAddMeActingProfileId(input) {
|
|
27143
27310
|
const cliProfileId = normalizeOptionalString(input.cliProfileId);
|
|
27144
27311
|
const urlProfileId = normalizeOptionalString(input.urlProfileId);
|
|
@@ -27393,28 +27560,13 @@ function buildAgentProfileName(input) {
|
|
|
27393
27560
|
const projectName = basename(input.projectFolder) || input.projectFolder;
|
|
27394
27561
|
return `${input.detectedSubject.label} - ${projectName}`;
|
|
27395
27562
|
}
|
|
27396
|
-
function deriveGatewayUrlFromSpaceUrl(url) {
|
|
27397
|
-
const gatewayUrl = new URL(url.toString());
|
|
27398
|
-
gatewayUrl.pathname = "/";
|
|
27399
|
-
gatewayUrl.search = "";
|
|
27400
|
-
gatewayUrl.hash = "";
|
|
27401
|
-
if (gatewayUrl.hostname === "openmeld.ai") {
|
|
27402
|
-
gatewayUrl.hostname = "gateway.openmeld.ai";
|
|
27403
|
-
gatewayUrl.protocol = "https:";
|
|
27404
|
-
gatewayUrl.port = "";
|
|
27405
|
-
} else if (isLoopbackHostname(gatewayUrl.hostname) && gatewayUrl.port === "3000") gatewayUrl.port = "8080";
|
|
27406
|
-
return gatewayUrl.toString().replace(TRAILING_SLASH_REGEX, "");
|
|
27407
|
-
}
|
|
27408
|
-
function isLoopbackHostname(hostname) {
|
|
27409
|
-
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1";
|
|
27410
|
-
}
|
|
27411
27563
|
function normalizeOptionalString(value) {
|
|
27412
27564
|
if (typeof value !== "string") return null;
|
|
27413
27565
|
const normalized = value.trim();
|
|
27414
27566
|
return normalized.length > 0 ? normalized : null;
|
|
27415
27567
|
}
|
|
27416
27568
|
async function runDefaultSpaceAddMeMembership(input) {
|
|
27417
|
-
const { runSpaceAddMeMembership } = await import("./add-me-membership-
|
|
27569
|
+
const { runSpaceAddMeMembership } = await import("./add-me-membership-CZUHkjnP.js");
|
|
27418
27570
|
return await runSpaceAddMeMembership(input);
|
|
27419
27571
|
}
|
|
27420
27572
|
//#endregion
|
|
@@ -28855,7 +29007,11 @@ function emitSpaceMembersAgentOutput(input) {
|
|
|
28855
29007
|
}
|
|
28856
29008
|
function formatMemberAddressing(member) {
|
|
28857
29009
|
const mentionLabel = sanitizeTerminalDisplayText(member.primaryMentionLabel, "single-line");
|
|
28858
|
-
const relations = [
|
|
29010
|
+
const relations = [
|
|
29011
|
+
...member.allowedRelations.wake ? [`@${mentionLabel}(wake)`] : [],
|
|
29012
|
+
...member.allowedRelations.reference ? [`@${mentionLabel}(reference)`] : [],
|
|
29013
|
+
...member.allowedRelations.mention ? [`@${mentionLabel}(mention)`] : []
|
|
29014
|
+
];
|
|
28859
29015
|
return relations.length > 0 ? relations.join(", ") : "no message addressing available";
|
|
28860
29016
|
}
|
|
28861
29017
|
//#endregion
|
|
@@ -29129,9 +29285,9 @@ async function promptSpaceMenuGuide() {
|
|
|
29129
29285
|
value: value.length > 0 ? value : void 0
|
|
29130
29286
|
};
|
|
29131
29287
|
}
|
|
29132
|
-
async function promptSpaceMenuCreatePassword() {
|
|
29288
|
+
async function promptSpaceMenuCreatePassword(visibility) {
|
|
29133
29289
|
for (;;) {
|
|
29134
|
-
const promptConfig = buildCreateSpacePasswordPromptConfig();
|
|
29290
|
+
const promptConfig = buildCreateSpacePasswordPromptConfig(visibility);
|
|
29135
29291
|
const action = await select({
|
|
29136
29292
|
message: promptConfig.message,
|
|
29137
29293
|
options: [
|
|
@@ -29243,7 +29399,7 @@ async function promptSpaceMenuCreateDetails(input) {
|
|
|
29243
29399
|
}
|
|
29244
29400
|
async function promptSpaceMenuCreateOptions(input) {
|
|
29245
29401
|
for (;;) {
|
|
29246
|
-
const password = await promptSpaceMenuCreatePassword();
|
|
29402
|
+
const password = await promptSpaceMenuCreatePassword(input.visibility);
|
|
29247
29403
|
if (password.status === "cancelled") return cancelSpaceMenuFlow();
|
|
29248
29404
|
if (password.status === "back") return { status: "back" };
|
|
29249
29405
|
const join = await promptSpaceMenuJoinAfterCreate();
|
|
@@ -29552,11 +29708,14 @@ async function fetchSpaceDispatchResult(input) {
|
|
|
29552
29708
|
const raw = await readGatewayTextResponse({ response: await fetchSpaceRequestWithTimeout({
|
|
29553
29709
|
url: endpoint.toString(),
|
|
29554
29710
|
operation: "space.result.read",
|
|
29555
|
-
init: { headers:
|
|
29556
|
-
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29711
|
+
init: { headers: {
|
|
29712
|
+
...await buildOpenMeldRequestContextHeadersWithAuth({
|
|
29713
|
+
requestUrl: endpoint.toString(),
|
|
29714
|
+
requestContext: input.requestContext,
|
|
29715
|
+
spacePassword: input.password
|
|
29716
|
+
}),
|
|
29717
|
+
[OPENMELD_HEADER_SPACE_ADDRESSING_VERSION]: "1"
|
|
29718
|
+
} }
|
|
29560
29719
|
}) });
|
|
29561
29720
|
const parsed = getSpaceDispatchResultResponseSchema.safeParse(parseJsonResponse(raw));
|
|
29562
29721
|
if (!parsed.success) throw new Error("invalid space dispatch result response");
|
|
@@ -29726,13 +29885,20 @@ function buildSpaceDispatchResultCardRows(input) {
|
|
|
29726
29885
|
];
|
|
29727
29886
|
}
|
|
29728
29887
|
function buildDispatchResultRelationRows(messageReadProjection) {
|
|
29729
|
-
return [
|
|
29730
|
-
|
|
29731
|
-
|
|
29732
|
-
|
|
29733
|
-
|
|
29734
|
-
|
|
29735
|
-
|
|
29888
|
+
return [
|
|
29889
|
+
...messageReadProjection.wakeTargets.length > 0 ? [{
|
|
29890
|
+
label: pc.dim("Wake"),
|
|
29891
|
+
value: pc.bold(formatHumanReadTargetList(messageReadProjection.wakeTargets))
|
|
29892
|
+
}] : [],
|
|
29893
|
+
...messageReadProjection.referenceTargets.length > 0 ? [{
|
|
29894
|
+
label: pc.dim("Reference"),
|
|
29895
|
+
value: pc.bold(formatHumanReadTargetList(messageReadProjection.referenceTargets))
|
|
29896
|
+
}] : [],
|
|
29897
|
+
...messageReadProjection.mentionTargets.length > 0 ? [{
|
|
29898
|
+
label: pc.dim("Mention"),
|
|
29899
|
+
value: pc.bold(formatHumanReadTargetList(messageReadProjection.mentionTargets))
|
|
29900
|
+
}] : []
|
|
29901
|
+
];
|
|
29736
29902
|
}
|
|
29737
29903
|
function emitSpaceDispatchResultTextBlock(input) {
|
|
29738
29904
|
const normalizedText = sanitizeTerminalDisplayText(input.text, "multi-line");
|
|
@@ -32267,10 +32433,10 @@ serviceCmd.command("trace").description("Read a Space delivery trace for debuggi
|
|
|
32267
32433
|
profile: opts.profile,
|
|
32268
32434
|
gatewayUrl: opts.gatewayUrl,
|
|
32269
32435
|
run: async () => {
|
|
32270
|
-
const dispatchId = normalizeOptionalString$
|
|
32271
|
-
const sourceSignalId = normalizeOptionalString$
|
|
32272
|
-
const clientMessageId = normalizeOptionalString$
|
|
32273
|
-
const targetProfileId = normalizeOptionalString$
|
|
32436
|
+
const dispatchId = normalizeOptionalString$16(opts.dispatch);
|
|
32437
|
+
const sourceSignalId = normalizeOptionalString$16(opts.sourceSignal);
|
|
32438
|
+
const clientMessageId = normalizeOptionalString$16(opts.clientMessage);
|
|
32439
|
+
const targetProfileId = normalizeOptionalString$16(opts.targetProfile);
|
|
32274
32440
|
if (Number(dispatchId !== null) + Number(sourceSignalId !== null) + Number(clientMessageId !== null) !== 1) throw new Error("exactly one of --dispatch, --source-signal, or --client-message is required");
|
|
32275
32441
|
await runServiceTrace({
|
|
32276
32442
|
profile: opts.profile,
|
|
@@ -32428,11 +32594,12 @@ registerSpaceFilesCommands(spaceCmd);
|
|
|
32428
32594
|
const spaceActionCmd = spaceCmd.command("action").description("Record a dispatch-scoped OpenMeld Space Action.").action(async () => {
|
|
32429
32595
|
await runSpaceActionHelp();
|
|
32430
32596
|
});
|
|
32431
|
-
spaceActionCmd.command("reply").description("Record a final Space reply for the current dispatch.").argument("[message...]", "Reply message").option("--message-file <path>", "Read the UTF-8 reply message from a file; use - for stdin").option("--wake <target>", "Wake another Agent Profile with this reply", collectRepeatedOptionValue, []).option("--reference <target>", "Reference a Human
|
|
32597
|
+
spaceActionCmd.command("reply").description("Record a final Space reply for the current dispatch.").argument("[message...]", "Reply message").option("--message-file <path>", "Read the UTF-8 reply message from a file; use - for stdin").option("--wake <target>", "Wake another Agent Profile with this reply", collectRepeatedOptionValue, []).option("--reference <target>", "Reference an Agent Profile", collectRepeatedOptionValue, []).option("--mention <target>", "Mention a Human Profile", collectRepeatedOptionValue, []).option("--file <path>", "Share a local file in this Space reply", collectRepeatedOptionValue, []).action(async (messageParts, opts) => {
|
|
32432
32598
|
await runSpaceActionReply({
|
|
32433
32599
|
filePaths: Array.isArray(opts.file) ? opts.file : [],
|
|
32434
32600
|
messageFilePath: typeof opts.messageFile === "string" ? opts.messageFile : void 0,
|
|
32435
32601
|
messageParts: Array.isArray(messageParts) ? messageParts : [],
|
|
32602
|
+
mentionTargets: Array.isArray(opts.mention) ? opts.mention : [],
|
|
32436
32603
|
wakeTargets: Array.isArray(opts.wake) ? opts.wake : [],
|
|
32437
32604
|
referenceTargets: Array.isArray(opts.reference) ? opts.reference : []
|
|
32438
32605
|
});
|
|
@@ -32461,7 +32628,7 @@ spaceActionCmd.command("help").description("Show OpenMeld Space Action help.").a
|
|
|
32461
32628
|
withSpaceProfileOption(spaceCmd.command("create").description("Create a new space and print its space ID.").option("--name <name>", "Space name (<=80 chars; prompted in human interactive mode)").option("--visibility <public|private>", "Organization visibility for this space").option("--guide <text>", "Optional space guide").option("--password <value>", "Optional space password (minimum 6 characters; numbers/letters/symbols accepted)").option("--join", "Join immediately after create").option("--no-join", "Do not ask to join after create").option("--output <mode>", "Output mode when auto-joining: ndjson|text", "text")).action(async (opts, command) => {
|
|
32462
32629
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
32463
32630
|
const view = getGlobalViewOption();
|
|
32464
|
-
if (view === "agent" && (normalizeOptionalString$
|
|
32631
|
+
if (view === "agent" && (normalizeOptionalString$16(opts.name) === null || normalizeOptionalString$16(opts.visibility) === null)) {
|
|
32465
32632
|
await runSpaceCreate({
|
|
32466
32633
|
profile: cliOptions.profile,
|
|
32467
32634
|
baseUrl: cliOptions.gatewayUrl,
|
|
@@ -32521,7 +32688,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
|
|
|
32521
32688
|
const localEcho = opts.noLocalEcho !== true;
|
|
32522
32689
|
const view = getGlobalViewOption();
|
|
32523
32690
|
if (opts.selfServe === true) {
|
|
32524
|
-
const spaceValue = normalizeOptionalString$
|
|
32691
|
+
const spaceValue = normalizeOptionalString$16(space);
|
|
32525
32692
|
if (!spaceValue) throw Object.assign(/* @__PURE__ */ new Error("space join --self-serve requires an explicit public Organization Space ID"), { code: "space.join.self_serve.space_required" });
|
|
32526
32693
|
await runCommandWithEntryChecks({
|
|
32527
32694
|
routeTokens: [
|
|
@@ -32545,7 +32712,7 @@ withSpaceProfileOption(spaceCmd.command("join").description("Open an existing Sp
|
|
|
32545
32712
|
});
|
|
32546
32713
|
return;
|
|
32547
32714
|
}
|
|
32548
|
-
if (view === "agent" && normalizeOptionalString$
|
|
32715
|
+
if (view === "agent" && normalizeOptionalString$16(space) === null) {
|
|
32549
32716
|
await runSpaceJoin({
|
|
32550
32717
|
profile: cliOptions.profile,
|
|
32551
32718
|
baseUrl: cliOptions.gatewayUrl,
|
|
@@ -32597,8 +32764,8 @@ withSpaceProfileOption(spaceCmd.command("wake-progress").description("Read live
|
|
|
32597
32764
|
profile: cliOptions.profile,
|
|
32598
32765
|
baseUrl: cliOptions.gatewayUrl,
|
|
32599
32766
|
space: String(space),
|
|
32600
|
-
clientMessageId: normalizeOptionalString$
|
|
32601
|
-
targetProfileId: normalizeOptionalString$
|
|
32767
|
+
clientMessageId: normalizeOptionalString$16(opts.clientMessage) ?? void 0,
|
|
32768
|
+
targetProfileId: normalizeOptionalString$16(opts.targetProfile) ?? void 0,
|
|
32602
32769
|
password: cliOptions.password,
|
|
32603
32770
|
view,
|
|
32604
32771
|
entryChecksHandled: true
|
|
@@ -32619,10 +32786,10 @@ withSpaceProfileOption(spaceCmd.command("wake-stop").description("Request Stop f
|
|
|
32619
32786
|
profile: cliOptions.profile,
|
|
32620
32787
|
baseUrl: cliOptions.gatewayUrl,
|
|
32621
32788
|
space: String(space),
|
|
32622
|
-
clientMessageId: normalizeOptionalString$
|
|
32623
|
-
sourceSignalId: normalizeOptionalString$
|
|
32789
|
+
clientMessageId: normalizeOptionalString$16(opts.clientMessage) ?? void 0,
|
|
32790
|
+
sourceSignalId: normalizeOptionalString$16(opts.sourceSignal) ?? void 0,
|
|
32624
32791
|
targetProfileId: String(opts.targetProfile),
|
|
32625
|
-
reason: normalizeOptionalString$
|
|
32792
|
+
reason: normalizeOptionalString$16(opts.reason) ?? void 0,
|
|
32626
32793
|
password: cliOptions.password,
|
|
32627
32794
|
view,
|
|
32628
32795
|
entryChecksHandled: true
|
|
@@ -32840,7 +33007,7 @@ withSpaceProfileOption(spaceCmd.command("watch").description("Watch a space in r
|
|
|
32840
33007
|
}
|
|
32841
33008
|
});
|
|
32842
33009
|
});
|
|
32843
|
-
withSpaceProfileOption(spaceCmd.command("send").description("Send one message to a Space.").argument("[space]", "Space ID (64-character hex)").argument("[text...]", "Text to send").option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(
|
|
33010
|
+
withSpaceProfileOption(spaceCmd.command("send").description("Send one message to a Space.").argument("[space]", "Space ID (64-character hex)").argument("[text...]", "Text to send").option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake), @Name(reference), or @Name(mention) addressing", false).option("--reply-to <signal-id>", "Reply into the thread of a message (creates the thread if it does not exist yet)").option("--password <value>", "Space password for protected access")).action(async (space, textParts, opts, command) => {
|
|
32844
33011
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
32845
33012
|
const spaceValue = String(space ?? "").trim();
|
|
32846
33013
|
const outputView = await resolveEffectiveViewForOutput();
|
|
@@ -32873,7 +33040,7 @@ withSpaceProfileOption(spaceCmd.command("send").description("Send one message to
|
|
|
32873
33040
|
}
|
|
32874
33041
|
});
|
|
32875
33042
|
});
|
|
32876
|
-
withSpaceProfileOption(spaceCmd.command("history").description("Read recent or anchored space history.").argument("[space]", "Space
|
|
33043
|
+
withSpaceProfileOption(spaceCmd.command("history").description("Read recent or anchored space history.").argument("[space]", "Space URL or 64-character Space ID").option("--limit <n>", "Max items (default: 20)").option("--after-signal <signal-id>", "Read history strictly after one signal").option("--around-signal <signal-id>", "Read a local context window around one signal").option("--before <n>", "Context items before --around-signal anchor (requires --around-signal)").option("--after <n>", "Context items after --around-signal anchor (requires --around-signal)").option("--from-profile <profile-id>", "Filter history to one sender profile ID (repeatable)", collectRepeatedOptionValue, []).option("--kind <text|status|system_notice>", "Filter history to one public signal kind (repeatable)", (value, previous = []) => {
|
|
32877
33044
|
return [...previous, parseSpaceHistoryKindOption(value)];
|
|
32878
33045
|
}, []).option("--brief", "Print compact message-only JSON for quick agent checks", false).option("--json", "Print raw JSON envelopes (ndjson)", false).option("--raw-stream", AGENT_RAW_STREAM_OPTION_DESCRIPTION, false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
|
|
32879
33046
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
@@ -32883,6 +33050,11 @@ withSpaceProfileOption(spaceCmd.command("history").description("Read recent or a
|
|
|
32883
33050
|
if (outputView === "agent") throw createSpaceSubcommandTargetGuideError("history");
|
|
32884
33051
|
throw new Error("missing required 'space' argument for openmeld space history");
|
|
32885
33052
|
}
|
|
33053
|
+
const target = resolveSpaceReadCommandTarget({
|
|
33054
|
+
baseUrl: cliOptions.gatewayUrl,
|
|
33055
|
+
profile: cliOptions.profile,
|
|
33056
|
+
space: spaceValue
|
|
33057
|
+
});
|
|
32886
33058
|
const limit = parseNonNegativeIntegerOption(opts.limit, "limit");
|
|
32887
33059
|
const beforeCount = parseNonNegativeIntegerOption(opts.before, "before");
|
|
32888
33060
|
const afterCount = parseNonNegativeIntegerOption(opts.after, "after");
|
|
@@ -32891,13 +33063,13 @@ withSpaceProfileOption(spaceCmd.command("history").description("Read recent or a
|
|
|
32891
33063
|
await runCommandWithEntryChecks({
|
|
32892
33064
|
routeTokens: ["space", "history"],
|
|
32893
33065
|
view,
|
|
32894
|
-
profile:
|
|
32895
|
-
gatewayUrl:
|
|
33066
|
+
profile: target.profile,
|
|
33067
|
+
gatewayUrl: target.baseUrl,
|
|
32896
33068
|
run: async () => {
|
|
32897
33069
|
await runSpaceHistory({
|
|
32898
|
-
profile:
|
|
32899
|
-
baseUrl:
|
|
32900
|
-
space:
|
|
33070
|
+
profile: target.profile,
|
|
33071
|
+
baseUrl: target.baseUrl,
|
|
33072
|
+
space: target.space,
|
|
32901
33073
|
password: cliOptions.password,
|
|
32902
33074
|
limit: limit ?? 20,
|
|
32903
33075
|
brief: Boolean(opts.brief),
|
|
@@ -32965,20 +33137,24 @@ spaceContractCmd.action(async (space, opts, command) => {
|
|
|
32965
33137
|
}
|
|
32966
33138
|
});
|
|
32967
33139
|
});
|
|
32968
|
-
withSpaceProfileOption(spaceCmd.command("board").description("Read the current Space Board.").argument("<space>", "Space
|
|
33140
|
+
withSpaceProfileOption(spaceCmd.command("board").description("Read the current Space Board.").argument("<space>", "Space URL or 64-character Space ID").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
|
|
32969
33141
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
32970
|
-
const
|
|
33142
|
+
const target = resolveSpaceReadCommandTarget({
|
|
33143
|
+
baseUrl: cliOptions.gatewayUrl,
|
|
33144
|
+
profile: cliOptions.profile,
|
|
33145
|
+
space: String(space).trim()
|
|
33146
|
+
});
|
|
32971
33147
|
const view = getGlobalViewOption();
|
|
32972
33148
|
await runCommandWithEntryChecks({
|
|
32973
33149
|
routeTokens: ["space", "board"],
|
|
32974
33150
|
view,
|
|
32975
|
-
profile:
|
|
32976
|
-
gatewayUrl:
|
|
33151
|
+
profile: target.profile,
|
|
33152
|
+
gatewayUrl: target.baseUrl,
|
|
32977
33153
|
run: async () => {
|
|
32978
33154
|
await runSpaceBoard({
|
|
32979
|
-
profile:
|
|
32980
|
-
baseUrl:
|
|
32981
|
-
space:
|
|
33155
|
+
profile: target.profile,
|
|
33156
|
+
baseUrl: target.baseUrl,
|
|
33157
|
+
space: target.space,
|
|
32982
33158
|
password: cliOptions.password,
|
|
32983
33159
|
json: Boolean(opts.json),
|
|
32984
33160
|
view,
|
|
@@ -32987,19 +33163,24 @@ withSpaceProfileOption(spaceCmd.command("board").description("Read the current S
|
|
|
32987
33163
|
}
|
|
32988
33164
|
});
|
|
32989
33165
|
});
|
|
32990
|
-
withSpaceProfileOption(spaceCmd.command("members").description("List the people and agents in a Space.").argument("<space>", "Space
|
|
33166
|
+
withSpaceProfileOption(spaceCmd.command("members").description("List the people and agents in a Space.").argument("<space>", "Space URL or 64-character Space ID").option("--json", "Print the versioned machine-readable envelope", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
|
|
32991
33167
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
33168
|
+
const target = resolveSpaceReadCommandTarget({
|
|
33169
|
+
baseUrl: cliOptions.gatewayUrl,
|
|
33170
|
+
profile: cliOptions.profile,
|
|
33171
|
+
space: String(space).trim()
|
|
33172
|
+
});
|
|
32992
33173
|
const view = getGlobalViewOption();
|
|
32993
33174
|
await runCommandWithEntryChecks({
|
|
32994
33175
|
routeTokens: ["space", "members"],
|
|
32995
33176
|
view,
|
|
32996
|
-
profile:
|
|
32997
|
-
gatewayUrl:
|
|
33177
|
+
profile: target.profile,
|
|
33178
|
+
gatewayUrl: target.baseUrl,
|
|
32998
33179
|
run: async () => {
|
|
32999
33180
|
await runSpaceMembers({
|
|
33000
|
-
profile:
|
|
33001
|
-
baseUrl:
|
|
33002
|
-
space:
|
|
33181
|
+
profile: target.profile,
|
|
33182
|
+
baseUrl: target.baseUrl,
|
|
33183
|
+
space: target.space,
|
|
33003
33184
|
password: cliOptions.password,
|
|
33004
33185
|
json: cliOptions.json === true,
|
|
33005
33186
|
view,
|
|
@@ -33075,22 +33256,27 @@ withSpaceProfileOption(spaceCmd.command("publication").description("Manage how a
|
|
|
33075
33256
|
}
|
|
33076
33257
|
});
|
|
33077
33258
|
});
|
|
33078
|
-
withSpaceProfileOption(spaceCmd.command("status").description("Read Organization visibility, link access, and current Space status.").argument("[space]", "Space
|
|
33259
|
+
withSpaceProfileOption(spaceCmd.command("status").description("Read Organization visibility, link access, and current Space status.").argument("[space]", "Space URL or 64-character Space ID").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
|
|
33079
33260
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
33080
33261
|
const spaceValue = String(space ?? "").trim();
|
|
33081
33262
|
const outputView = await resolveEffectiveViewForOutput();
|
|
33082
33263
|
if (!spaceValue && outputView === "agent") throw createSpaceTargetGuideError("status");
|
|
33264
|
+
const target = resolveSpaceReadCommandTarget({
|
|
33265
|
+
baseUrl: cliOptions.gatewayUrl,
|
|
33266
|
+
profile: cliOptions.profile,
|
|
33267
|
+
space: spaceValue
|
|
33268
|
+
});
|
|
33083
33269
|
const view = getGlobalViewOption();
|
|
33084
33270
|
await runCommandWithEntryChecks({
|
|
33085
33271
|
routeTokens: ["space", "status"],
|
|
33086
33272
|
view,
|
|
33087
|
-
profile:
|
|
33088
|
-
gatewayUrl:
|
|
33273
|
+
profile: target.profile,
|
|
33274
|
+
gatewayUrl: target.baseUrl,
|
|
33089
33275
|
run: async () => {
|
|
33090
33276
|
await runSpaceStatus({
|
|
33091
|
-
profile:
|
|
33092
|
-
baseUrl:
|
|
33093
|
-
space:
|
|
33277
|
+
profile: target.profile,
|
|
33278
|
+
baseUrl: target.baseUrl,
|
|
33279
|
+
space: target.space,
|
|
33094
33280
|
password: cliOptions.password,
|
|
33095
33281
|
json: Boolean(opts.json),
|
|
33096
33282
|
view,
|
|
@@ -33130,8 +33316,8 @@ withSpaceProfileOption(spaceCmd.command("updates").description("Read formal upda
|
|
|
33130
33316
|
withSpaceProfileOption(spaceCmd.command("result").description("Read one formal dispatch result scoped to this space.").argument("[space]", "Space ID (64-character hex)").option("--dispatch <dispatch-id>", "Lookup by dispatch ID").option("--result-ref <result-ref>", "Lookup by dispatch result ref").option("--json", "Print canonical JSON", false).option("--password <value>", "Space password for protected access")).action(async (space, opts, command) => {
|
|
33131
33317
|
const cliOptions = resolveSpaceCommandCliOptions(command, opts);
|
|
33132
33318
|
const spaceValue = String(space ?? "").trim();
|
|
33133
|
-
const dispatchId = normalizeOptionalString$
|
|
33134
|
-
const resultRef = normalizeOptionalString$
|
|
33319
|
+
const dispatchId = normalizeOptionalString$16(opts.dispatch);
|
|
33320
|
+
const resultRef = normalizeOptionalString$16(opts.resultRef);
|
|
33135
33321
|
const selectorCount = Number(dispatchId !== null) + Number(resultRef !== null);
|
|
33136
33322
|
const outputView = await resolveEffectiveViewForOutput();
|
|
33137
33323
|
if ((spaceValue.length === 0 || selectorCount !== 1) && outputView === "agent") throw createSpaceResultGuideError();
|
|
@@ -33227,7 +33413,7 @@ withSpaceProfileOption(spaceCmd.command("password").description("Set, change, or
|
|
|
33227
33413
|
}
|
|
33228
33414
|
});
|
|
33229
33415
|
});
|
|
33230
|
-
program.command("send").description("Alias for `openmeld space send`.").argument("[text...]", "Text to send").option("--profile <id>", "OpenMeld profile ID").option("--base-url <url>", "OpenMeld gateway URL").option("--space <space>", "Space ID (64-character hex)").option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(
|
|
33416
|
+
program.command("send").description("Alias for `openmeld space send`.").argument("[text...]", "Text to send").option("--profile <id>", "OpenMeld profile ID").option("--base-url <url>", "OpenMeld gateway URL").option("--space <space>", "Space ID (64-character hex)").option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake), @Name(reference), or @Name(mention) addressing", false).option("--password <value>", "Space password for protected access").action(async (textParts, opts) => {
|
|
33231
33417
|
const space = String(opts.space ?? "").trim();
|
|
33232
33418
|
if (!space) throw createSpaceAliasTargetGuideError("send");
|
|
33233
33419
|
const view = getGlobalViewOption();
|