openmeld 0.3.159 → 0.3.161
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-jQsB5MBL.js → add-me-membership-zhgufZnd.js} +2 -2
- package/dist/{add-me-membership-jQsB5MBL.js.map → add-me-membership-zhgufZnd.js.map} +1 -1
- package/dist/{api-client-foundation-CoFjLc3o.js → api-client-foundation-C2Ji0552.js} +3 -3
- package/dist/{api-client-foundation-CoFjLc3o.js.map → api-client-foundation-C2Ji0552.js.map} +1 -1
- package/dist/{api-client-foundation-D3vgN2Jh.js → api-client-foundation-DoUewyi_.js} +1 -1
- package/dist/auth-session-DMovqZYd.js +4 -0
- package/dist/{auth-session-Da7OgTZk.js → auth-session-DnS-Axyz.js} +2 -2
- package/dist/{auth-session-Da7OgTZk.js.map → auth-session-DnS-Axyz.js.map} +1 -1
- package/dist/{command-CcqgRB4J.js → command-cgFedSaF.js} +81 -904
- package/dist/command-cgFedSaF.js.map +1 -0
- package/dist/{dist-KezFWl5t.js → dist-BVrzz3du.js} +36 -11
- package/dist/dist-BVrzz3du.js.map +1 -0
- package/dist/{dist-VKaBpS9J.js → dist-CGL0GrR6.js} +1 -1
- package/dist/{elapsed-time-BI7-NmU1.js → elapsed-time-0R9PAYtt.js} +3 -3
- package/dist/{elapsed-time-BI7-NmU1.js.map → elapsed-time-0R9PAYtt.js.map} +1 -1
- package/dist/installer-C3AuWZ_h.js +1100 -0
- package/dist/installer-C3AuWZ_h.js.map +1 -0
- package/dist/{openmeld-DsT7zl0R.js → openmeld-DmYjQa7n.js} +337 -68
- package/dist/openmeld-DmYjQa7n.js.map +1 -0
- package/dist/openmeld-maintenance-worker-Bfj_RQbe.js +78 -0
- package/dist/openmeld-maintenance-worker-Bfj_RQbe.js.map +1 -0
- package/dist/{openmeld-tools-update-coordinator-H16PNoPX.js → openmeld-tools-update-coordinator-CwIVD1Fx.js} +12 -12
- package/dist/{openmeld-tools-update-coordinator-H16PNoPX.js.map → openmeld-tools-update-coordinator-CwIVD1Fx.js.map} +1 -1
- package/dist/openmeld.js +3 -3
- package/dist/{runtime-transport-D6j3RJ5o.js → runtime-transport-BsvsUfwb.js} +7 -1
- package/dist/runtime-transport-BsvsUfwb.js.map +1 -0
- package/dist/upgrade-D-iPQ9qO.js +4 -0
- package/dist/{upgrade-BcmVKRpO.js → upgrade-hBZIXIcH.js} +4 -4
- package/dist/{upgrade-BcmVKRpO.js.map → upgrade-hBZIXIcH.js.map} +1 -1
- package/package.json +2 -2
- package/skills/openmeld-cli/SKILL.md +0 -9
- package/skills/openmeld-cli/playbooks/space-ops.md +8 -0
- package/skills/openmeld-cli/references/commands.md +26 -0
- package/dist/auth-session-DNXann3J.js +0 -4
- package/dist/command-CcqgRB4J.js.map +0 -1
- package/dist/dist-KezFWl5t.js.map +0 -1
- package/dist/openmeld-DsT7zl0R.js.map +0 -1
- package/dist/openmeld-maintenance-worker-Bmc0QSqk.js +0 -49
- package/dist/openmeld-maintenance-worker-Bmc0QSqk.js.map +0 -1
- package/dist/runtime-transport-D6j3RJ5o.js.map +0 -1
- package/dist/upgrade-xohSdsR-.js +0 -4
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
import { c as toSpaceDispatchLookupUrl, h as toSpaceResultUrl, i as toSpaceContractUrl, l as toSpaceDispatchTraceUrl, r as toSpaceBoardUrl, t as normalizeBaseUrl } from "./urls-4D7CaXe3.js";
|
|
4
4
|
import { $ as openMeldManagedVersionBinaryPath, A as formatLocalMachineIssueMessage, C as LocalMachineFailureError, D as createOrphanedSetupConcurrencyIssue, I as accountsDir, J as normalizeAccountKey, N as accountProfileSpaceCacheDir, O as isLocalMachineFailureError, P as accountProfileViewPath, Q as openMeldManagedBinaryPath, T as createActiveSetupConcurrencyIssue, X as openMeldBackupsDir, at as profileViewPath, b as resolveOpenMeldLaneDescriptor, c as repairOrphanedLegacyLocks, ct as resolveOpenMeldCliEntryNameFromArgv, dt as resolveOpenMeldRootDir, f as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, g as resolveCliContext, gt as systemDir, ht as spacesDir, i as isOpenMeldOrphanedLockError, it as profileDir, k as toRecognizedLocalMachineFailureError, l as resolveOpenMeldOrphanedLockIssue, lt as resolveOpenMeldEnvPreset, mt as skillsDir, n as buildOpenMeldOrphanedLockAction, p as OPENMELD_CLI_CONTEXT_ENV_KEY, r as isOpenMeldLockError, rt as organizationSkillReleaseDir, s as releaseLockSync, t as acquireLock, tt as openMeldRootDir, u as runWithHeldLock, y as formatLaneScopeSentence } from "./lock-VfUd0-tH.js";
|
|
5
5
|
import { c as agentControllerConversationRefSchema } from "./controller-contract-CvjP4mYj.js";
|
|
6
|
-
import { $ as resolveCurrentReplyReadinessSnapshot, $a as buildDaemonRouteObservationPresentation$1, $n as resolveLocalRegistryAgentIdFromAgentControllerRef, $r as listAgentControllerPermissionModeOptions, An as canManageRegistryAgentSkillTargets, Ao as createAuthenticationError, Co as clearSelectedOpenMeldProfileId, E as resolveDaemonDeviceId, Eo as buildAgentAuthenticationGuide, F as resolveServiceReadinessFromServiceStatus, Ft as ensureOpenMeldManagedProfileWorkspace, Go as classifyDaemonServiceWakeability, Ht as setOpenMeldManagedProfileWorkspace, It as normalizeCustomProfileWorkspacePath, Ja as upsertDaemonServiceContract, Jo as ensureVersionStateReady, Jr as createAgentExecutionStatusDisplayRows, Ln as notifyDaemonRouteCatalogChanged, Lt as readProfileWorkspaceConfig, Mn as resolveSkillsAgentRegistry, Mo as resolveAuthenticationGuidance, Mt as createModelCatalogReadSession, Nn as listBuiltinAgentsRegistryEntries, No as resolveAuthenticationGuidanceFromError, Oi as inspectDaemonServiceInventory, Po as resolveAuthenticationGuidanceFromMessage, Pt as resolveProfileWorkspaceRuntime, Ri as readCurrentDaemonRuntimeContext, Rn as LocalDaemonControlPlaneClientError, T as ensureDaemonRuntimePaths, To as setSelectedOpenMeldProfileId, Ut as validateCustomProfileWorkspacePath, Vt as setCustomProfileWorkspace, W as resolveDaemonServiceFreshnessWarning, Wo as classifyDaemonServiceRunStartability, Wr as buildAgentControllerRef, Wt as describeProfileWorkspacePathValidationFailure, Xa as OPENMELD_VERSION, Xr as getAgentControllerPermissionModeDisplayMetadata, Xt as listProjectConnectionsWithStatus, Ya as resolveCurrentDaemonExpectedVersion, Yt as listProjectBindings, Zr as getAgentControllerPermissionModeFieldLabel, Zt as migrateProjectBindingStore, _o as resolveOpenMeldProfile, ai as resolveAgentProfileEditCapabilities, an as canonicalizeLocalProjectPath, ao as getProfileDefaultView, as as formatInlineOpenMeldCliCommands, bn as listAgentTargetStates, c as isCliUpdateCheckApplicable, ca as performManagedInstall, co as isSelectedOpenMeldProfileRequiredError, cs as formatOpenMeldCliLine, da as resolveDaemonServiceUpdateOperation, do as createOpenMeldAgentProfile, ds as formatProfileAwareOpenMeldCliCommands, dt as resolveGatewayChainReadiness, ei as parseAgentControllerRef, en as removeProjectConnection, eo as buildOnboardingPlan, et as formatAgentReplyReadinessLabel, fa as resolveDaemonRuntimeContractCompatibility, fo as createOpenMeldHumanProfile, fs as resolveSetupFollowUpCliEntryCommand, go as primeOpenMeldProfilesSessionCache, hn as resolveAgentProfilePrimaryAgentControllerReport, ho as listOpenMeldProfiles, hs as compareAgentControllerRefsForDisplay, ii as resolveAgentExecutionStatus, in as unbindProject, io as resolveViewProfileKey, is as resolveAuthBaseUrl, it as mapAgentReplyReadinessToLegacyAutoReply, jn as detectInstalledSkillsAgents, jt as syncProfileWorkspaceState, ko as buildHumanAuthenticationCard, l as readOpenMeldToolsUpdateContextFromEnv, lo as requireOpenMeldProfile, ls as formatOpenMeldCliTextBlock, mn as createPrimaryBindingReadSession, mt as resolveOpenClawLocalDiagnosticsValue, nn as runIfAgentActivityBindingGenerationIsCurrent, no as parseCliViewMode, nt as formatHumanReplyReadinessReason$1, oi as resolveEvidenceSyncHealth, oo as setProfileDefaultView, os as formatOpenMeldCliCommand, pa as toStartBackgroundHelperExecutionCompatibility, po as deleteOpenMeldProfile, ps as resolveUserFacingCliEntryCommand, qa as readDaemonServiceContract, qo as compareSemver, qt as bindProject, ra as readRecentDaemonLifecycleEvents, ri as resolveAgentControllerPermissionModeForController, rn as setDefaultProjectConnection, ro as resolveRuntimeContext, rs as resolveOpenMeldEnvironmentTarget, s as assessCliUpdate, sa as buildInstallSelfJsonPayload, si as resolveNativeAgentControllerPermissionModeForController, ss as formatOpenMeldCliCommands, to as getSetupFlowCopy, ts as assessServerRequiredVersion, tt as formatDeviceReplyReadinessLabel, u as runPendingDaemonServiceUpdate, un as syncDeviceRuntimeStateProjection, uo as resolveOpenMeldProfileOrNull, vo as updateOpenMeldProfile, wn as reconcileNewRunnableBuiltinAgentsForSetup, wo as getSelectedOpenMeldProfileId, xo as alignSelectedOpenMeldProfileStorage, zi as readCurrentObservedDaemonRuntimeStatus, zn as requestLocalAgentActivitySync, zt as resolveConfiguredProfileWorkspacePath } from "./openmeld-tools-update-coordinator-
|
|
7
|
-
import { $n as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, Br as agentActivitySnapshotQuerySchema, Er as submitFeedbackIssueRequestSchema, Fn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Ft as createAgentProfileBindingApi, Gn as spaceDispatchTraceDispatchStatusSchema, Hn as projectSpaceDispatchTraceFinalVisibleOutcome, Jn as projectObservabilityWakeCorrelation, Jr as resolvedSpaceMemberProfileSchema, Kn as spaceDispatchTraceResponseSchema, Lt as createCenterAgentApi, Mn as OPENMELD_HEADER_PROFILE_ID, Pt as createAgentActivityApi, Qn as summarizeComputerFileAccessPolicy, Qt as createOrganizationSkillsApi, Rr as agentActivityProviderSchema, Sr as authProfileManagedRoleSchema, Un as resolveSpaceDispatchTraceRootCause, Ut as createFeedbackApi, Vn as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Vt as createCurrentDeviceApi, Wn as spaceDispatchTraceAttemptStatusSchema, Xn as ownerComputerDiagnosticsSchema, Xt as createOrganizationApi, Zn as projectOwnerComputerLocalRuntimes, _i as startReplyReadinessSummarySchema, _r as stringifyOrganizationSkillBundleCanonicalJson, ei as agentActivityInventorySessionOriginSchema, en as createPrepareReadinessApi, er as agentProfileCreationConfigurationSchema, gi as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, hi as START_ISO_DATE_TIME_SCHEMA, ii as localAgentSessionProviderSchema, in as createRoutinesApi, mi as START_BOUNDED_VERSION_SCHEMA, mr as organizationSkillBundleSchema, ni as agentActivitySessionInventoryQuerySchema, pi as START_BOUNDED_ID_SCHEMA, qn as observabilityWakeTraceSelectorSchema, rn as createProjectsApi, ti as agentActivityInventorySessionStatusSchema, vi as localAgentCatalogSchema, vn as toStructuredApiClientFailure, xr as authProfileKindSchema, zn as spaceEntryTargetSchema, zr as agentActivitySessionStatusSchema, zt as createComputerFileAccessApi } from "./dist-
|
|
8
|
-
import { $r as openMeldRequestContextSchema, Cr as string, Dr as unknown, Er as union, It as spaceStatusSchema, Lt as centerAgentInteractionSourceSchema, On as messageEnvelopeSchema, Qr as openMeldProfileIdSchema, Sr as strictObject, Ut as isSpaceFileTextEditable, _r as nullFactory, cr as boolean, dn as spaceThreadContextSchema, fi as trimmedStringFromUnknown, fr as enumFactory, gn as spaceContractSchema, hn as spaceContractFieldsSchema, hr as literal, jr as clientMessageIdSchema, mr as iso, pr as int, qt as resolveSpaceFileMimeType, ri as openMeldRuntimeProfileIdSchema, sr as array, ui as nonEmptyTrimmedStringFromUnknown, un as dispatchExecutionSchema, ur as discriminatedUnion, xr as record, yr as object } from "./runtime-transport-
|
|
6
|
+
import { $ as resolveCurrentReplyReadinessSnapshot, $a as buildDaemonRouteObservationPresentation$1, $n as resolveLocalRegistryAgentIdFromAgentControllerRef, $r as listAgentControllerPermissionModeOptions, An as canManageRegistryAgentSkillTargets, Ao as createAuthenticationError, Co as clearSelectedOpenMeldProfileId, E as resolveDaemonDeviceId, Eo as buildAgentAuthenticationGuide, F as resolveServiceReadinessFromServiceStatus, Ft as ensureOpenMeldManagedProfileWorkspace, Go as classifyDaemonServiceWakeability, Ht as setOpenMeldManagedProfileWorkspace, It as normalizeCustomProfileWorkspacePath, Ja as upsertDaemonServiceContract, Jo as ensureVersionStateReady, Jr as createAgentExecutionStatusDisplayRows, Ln as notifyDaemonRouteCatalogChanged, Lt as readProfileWorkspaceConfig, Mn as resolveSkillsAgentRegistry, Mo as resolveAuthenticationGuidance, Mt as createModelCatalogReadSession, Nn as listBuiltinAgentsRegistryEntries, No as resolveAuthenticationGuidanceFromError, Oi as inspectDaemonServiceInventory, Po as resolveAuthenticationGuidanceFromMessage, Pt as resolveProfileWorkspaceRuntime, Ri as readCurrentDaemonRuntimeContext, Rn as LocalDaemonControlPlaneClientError, T as ensureDaemonRuntimePaths, To as setSelectedOpenMeldProfileId, Ut as validateCustomProfileWorkspacePath, Vt as setCustomProfileWorkspace, W as resolveDaemonServiceFreshnessWarning, Wo as classifyDaemonServiceRunStartability, Wr as buildAgentControllerRef, Wt as describeProfileWorkspacePathValidationFailure, Xa as OPENMELD_VERSION, Xr as getAgentControllerPermissionModeDisplayMetadata, Xt as listProjectConnectionsWithStatus, Ya as resolveCurrentDaemonExpectedVersion, Yt as listProjectBindings, Zr as getAgentControllerPermissionModeFieldLabel, Zt as migrateProjectBindingStore, _o as resolveOpenMeldProfile, ai as resolveAgentProfileEditCapabilities, an as canonicalizeLocalProjectPath, ao as getProfileDefaultView, as as formatInlineOpenMeldCliCommands, bn as listAgentTargetStates, c as isCliUpdateCheckApplicable, ca as performManagedInstall, co as isSelectedOpenMeldProfileRequiredError, cs as formatOpenMeldCliLine, da as resolveDaemonServiceUpdateOperation, do as createOpenMeldAgentProfile, ds as formatProfileAwareOpenMeldCliCommands, dt as resolveGatewayChainReadiness, ei as parseAgentControllerRef, en as removeProjectConnection, eo as buildOnboardingPlan, et as formatAgentReplyReadinessLabel, fa as resolveDaemonRuntimeContractCompatibility, fo as createOpenMeldHumanProfile, fs as resolveSetupFollowUpCliEntryCommand, go as primeOpenMeldProfilesSessionCache, hn as resolveAgentProfilePrimaryAgentControllerReport, ho as listOpenMeldProfiles, hs as compareAgentControllerRefsForDisplay, ii as resolveAgentExecutionStatus, in as unbindProject, io as resolveViewProfileKey, is as resolveAuthBaseUrl, it as mapAgentReplyReadinessToLegacyAutoReply, jn as detectInstalledSkillsAgents, jt as syncProfileWorkspaceState, ko as buildHumanAuthenticationCard, l as readOpenMeldToolsUpdateContextFromEnv, lo as requireOpenMeldProfile, ls as formatOpenMeldCliTextBlock, mn as createPrimaryBindingReadSession, mt as resolveOpenClawLocalDiagnosticsValue, nn as runIfAgentActivityBindingGenerationIsCurrent, no as parseCliViewMode, nt as formatHumanReplyReadinessReason$1, oi as resolveEvidenceSyncHealth, oo as setProfileDefaultView, os as formatOpenMeldCliCommand, pa as toStartBackgroundHelperExecutionCompatibility, po as deleteOpenMeldProfile, ps as resolveUserFacingCliEntryCommand, qa as readDaemonServiceContract, qo as compareSemver, qt as bindProject, ra as readRecentDaemonLifecycleEvents, ri as resolveAgentControllerPermissionModeForController, rn as setDefaultProjectConnection, ro as resolveRuntimeContext, rs as resolveOpenMeldEnvironmentTarget, s as assessCliUpdate, sa as buildInstallSelfJsonPayload, si as resolveNativeAgentControllerPermissionModeForController, ss as formatOpenMeldCliCommands, to as getSetupFlowCopy, ts as assessServerRequiredVersion, tt as formatDeviceReplyReadinessLabel, u as runPendingDaemonServiceUpdate, un as syncDeviceRuntimeStateProjection, uo as resolveOpenMeldProfileOrNull, vo as updateOpenMeldProfile, wn as reconcileNewRunnableBuiltinAgentsForSetup, wo as getSelectedOpenMeldProfileId, xo as alignSelectedOpenMeldProfileStorage, zi as readCurrentObservedDaemonRuntimeStatus, zn as requestLocalAgentActivitySync, zt as resolveConfiguredProfileWorkspacePath } from "./openmeld-tools-update-coordinator-CwIVD1Fx.js";
|
|
7
|
+
import { $n as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, Br as agentActivitySnapshotQuerySchema, Er as submitFeedbackIssueRequestSchema, Fn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Ft as createAgentProfileBindingApi, Gn as spaceDispatchTraceDispatchStatusSchema, Hn as projectSpaceDispatchTraceFinalVisibleOutcome, Jn as projectObservabilityWakeCorrelation, Jr as resolvedSpaceMemberProfileSchema, Kn as spaceDispatchTraceResponseSchema, Lt as createCenterAgentApi, Mn as OPENMELD_HEADER_PROFILE_ID, Pt as createAgentActivityApi, Qn as summarizeComputerFileAccessPolicy, Qt as createOrganizationSkillsApi, Rr as agentActivityProviderSchema, Sr as authProfileManagedRoleSchema, Un as resolveSpaceDispatchTraceRootCause, Ut as createFeedbackApi, Vn as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Vt as createCurrentDeviceApi, Wn as spaceDispatchTraceAttemptStatusSchema, Xn as ownerComputerDiagnosticsSchema, Xt as createOrganizationApi, Zn as projectOwnerComputerLocalRuntimes, _i as startReplyReadinessSummarySchema, _r as stringifyOrganizationSkillBundleCanonicalJson, ei as agentActivityInventorySessionOriginSchema, en as createPrepareReadinessApi, er as agentProfileCreationConfigurationSchema, gi as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, hi as START_ISO_DATE_TIME_SCHEMA, ii as localAgentSessionProviderSchema, in as createRoutinesApi, mi as START_BOUNDED_VERSION_SCHEMA, mr as organizationSkillBundleSchema, ni as agentActivitySessionInventoryQuerySchema, pi as START_BOUNDED_ID_SCHEMA, qn as observabilityWakeTraceSelectorSchema, rn as createProjectsApi, ti as agentActivityInventorySessionStatusSchema, vi as localAgentCatalogSchema, vn as toStructuredApiClientFailure, xr as authProfileKindSchema, zn as spaceEntryTargetSchema, zr as agentActivitySessionStatusSchema, zt as createComputerFileAccessApi } from "./dist-BVrzz3du.js";
|
|
8
|
+
import { $r as openMeldRequestContextSchema, Cr as string, Dr as unknown, Er as union, It as spaceStatusSchema, Lt as centerAgentInteractionSourceSchema, On as messageEnvelopeSchema, Qr as openMeldProfileIdSchema, Sr as strictObject, Ut as isSpaceFileTextEditable, _r as nullFactory, cr as boolean, dn as spaceThreadContextSchema, fi as trimmedStringFromUnknown, fr as enumFactory, gn as spaceContractSchema, hn as spaceContractFieldsSchema, hr as literal, jr as clientMessageIdSchema, mr as iso, pr as int, qt as resolveSpaceFileMimeType, ri as openMeldRuntimeProfileIdSchema, sr as array, ui as nonEmptyTrimmedStringFromUnknown, un as dispatchExecutionSchema, ur as discriminatedUnion, xr as record, yr as object } from "./runtime-transport-BsvsUfwb.js";
|
|
9
|
+
import { _ as readSelectedSkillDocument, a as filterTargetsWithInstalledOpenMeldSkills, c as resolveTrackedInstallTargets, d as resolveSkillsInstallStates, f as ensureLocalSkills, i as compareInstallRecords, l as summarizeSkillState, m as readOpenMeldSkillMarker, n as buildAgentTargets, o as mergeTargetsByDir, p as isOpenMeldManagedSkillDir, r as collectSkillsReadinessSnapshot, s as persistDetectedInstallStateFromCheck, t as installSkillsToTargets, v as withSkillsInstallLock } from "./installer-C3AuWZ_h.js";
|
|
9
10
|
import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
|
|
10
|
-
import { $ as runAgentsList, $n as
|
|
11
|
-
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-
|
|
12
|
-
import { A as createSpaceAliasTargetGuideError, At as OPENMELD_AGENT_MENTAL_MODEL_LINES, C as createProfileActionGuideError, Ct as registerBuiltinAgentSelectionOptions, D as createSkillsActionGuideError, Dt as formatDualViewGuideForDisplay, E as createResetConfirmationGuideError, Et as DualViewGuideError, F as createSpaceLeaveGuideError, H as createSpaceResultGuideError, I as createSpaceMenuGuideError, J as createSpaceTargetGuideError, Mt as areAllowedActionsEquivalent, Ot as buildDualViewGuideMessage, Pt as buildAgentFacingPublicationModeGuideLines, Q as createStartAuthenticationGuideError, R as createSpacePublicationSetGuideError, Rt as canonicalizeAllowedActions, S as createDoctorFailedGuideError, T as createProfileMenuGuideError, Tt as buildAgentOverviewFromContract, V as createSpaceRemoveMembersGuideError, X as createSpaceUpdatesGuideError, Z as createStartAgentIdentityGuideError, _ as errLine, b as canUseInteractivePrompts, dt as getSkillsTargetSelectionRequiredArguments, et as getCommandEntryContract, ft as registerSkillsTargetSelectionOptions, g as formatMessage, gt as registerDaemonControlTargetOptions, h as sanitizeTerminalDisplayText, ht as getCliVersionInfo, it as registerSpaceMemberSelectionOptions, j as createSpaceContractSetGuideError, jt as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, k as createSpaceAddMembersGuideError, kt as formatAgentOverviewPayload, lt as buildSkillsTargetSelectionExamples, m as createPresenter, n as resolveElapsedTimeMs, pt as validateSkillsTargetSelectionInput, q as createSpaceSubcommandTargetGuideError, st as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, t as formatElapsedTime, tt as getCommandHintsFromContract, ut as getSkillsTargetSelectionOptionalArguments, v as outJsonLine, vt as registerAuthLoginRequestOptions, w as createProfileCreateGuideError, y as outLine } from "./elapsed-time-
|
|
11
|
+
import { $ as runAgentsList, $n as isCurrentCommandCheckScopeActive, $t as ensureCommandAuthenticationOrCancel, A as parseEnvelope, An as resolveLocalAgentControllerReportDecision, Ar as renderInfoCard, At as buildProfileWorkspaceRows, B as resolveHumanControllerDisplayName, Bn as buildUpdatesReplyWorkflowProjection, Br as organizationJoinLinkManagementQuerySchema, Bt as fetchSpaceMeta, C as toSpaceMetaUpsertInput, Cn as computeRetryDelayMs, Cr as readCodexSessionTitles, Ct as runDaemonRunAfterEntryChecks, D as formatHumanReadTargetList, Dn as collectLocalAgentControllerInventory, Dr as removeProjectOutbox, Dt as runDaemonTeardownStrict, E as buildHumanReplyContextSummary, En as submitRuntimeAgentControllerReports, Er as readAgentActivityOutboxHealth, Et as runDaemonStop, F as resolveOpenMeldProfileForSpaceCommand, Fn as buildDispatchResultReplyWorkflowProjection, Fr as cliJsonSkillsLoadEnvelopeSchema, Ft as runDaemonStartDecisionPrompt, G as runAgentsConfig, Gn as isReturnKeypress, Gt as parseJsonResponse, H as resolveAgentProfileSetup, Hn as formatRemovedCcRelationMessage, Ht as readGatewayJsonResponse, I as emitSpaceAgentOverview, In as buildPublicSpaceEntryUrl, Ir as cliJsonSkillsShowEnvelopeSchema, It as runDaemonStartupPreflight, J as runAgentsCustomRemove, Jn as readDispatchOwnedRuntimeGuard, Jt as resolveDaemonServiceParticipationStatus, K as runAgentsCustomAdd, Kn as runInteractivePrompt, Kt as resolveLocalComponentsStatus, L as emitSpaceCliAgentOverview, Ln as buildSignalIndex, Lr as acceptOrganizationJoinLinkBodySchema, Lt as readDaemonStartFailureLogTailLines, M as assertFullSignalIdArgument, Mn as upsertSpaceConfig, Mr as emitCliJsonEnvelope, Mt as emitDaemonAgentOverview, N as assertValidSpaceIdTarget, Nn as assertNoRemovedCcSpaceAddressingSyntax, Nr as cliJsonOutputEnvelopeSchema, Nt as createDelayedSpinner, O as resolveLinkAccessLabel, On as resolveLocalAgentControllerBlockerReasonCodes, Or as enqueueControllerTaskLifecycleEventWhileLocked, Ot as runDaemonUninstall, P as prepareAuthenticatedSpaceCommandContext, Pn as buildDispatchResultMessageReadProjection, Pr as cliJsonSkillsListEnvelopeSchema, Pt as shouldEmitAgentOverview, Q as runAgentsEnable, Qn as getCurrentCommandCheckState, Qt as buildCommandAuthenticationPromptMessage, R as prepareLocalAgentReadiness, Rn as buildSignalMessageReadProjection, Rr as getOrganizationJoinLinkResponseSchema, Rt as fetchSpaceUpdates, S as loadSpaceSignalIndexOrNull, Sn as assessActionParticipationCandidate, Sr as normalizeSharedSessionTitle, St as runDaemonReinstall, T as buildFormalSignalReadPayload, Tn as submitRuntimeAgentControllerReport, Tr as removeProjectInbox, Tt as runDaemonStatusFlow, U as runDaemonServiceParticipationGate, Un as promptSearchMultiselect, Ut as readGatewayTextResponse, V as persistAgentTransportSelection, Vn as createSpaceMemberIdentityIndex, Vr as revokeOrganizationJoinLinkResponseSchema, Vt as updateSpaceMeta, W as runAgents, Wn as promptSearchSelect, Wt as toStructuredGatewayFailure, X as runAgentsDetect, Xn as writeDispatchSpaceActionRecord, Xt as readRecentDaemonDispatchJournalEvents, Y as runAgentsCustomUpdate, Yn as readDispatchSpaceActionContextFromEnv, Yt as readRuntimeReportingHealthState, Z as runAgentsDisable, Zn as finishCurrentCommandCheckScope, Zt as connectWebSocket, _ as runSpaceWriteWithPasswordRetry, _n as resolveCreateProfileName, _r as syncLocalAgentActivity, _t as runDaemonAutostart, a as runSpaceDelete, an as exchangeOneTimeTokenAuthSession, ar as LocalProjectConnectionError, at as colorizeDisplayProfileLabel, b as buildIdentityOnlyMembersSnapshotForReadProjection, bn as formatServiceParticipationReadinessLabel, br as buildAgentActivityEvent, bt as runDaemonInstall, c as runSpaceLeave, cn as formatActiveOrganizationLabel, cr as registerAgentActivityRoute, ct as renderOpenMeldHeader, d as runSpaceRemoveMembers, dn as requestDeviceToken, dt as resolveGatewayWebOrigin, en as evaluateCommandAuthentication, er as resetCurrentCommandCheckState, et as runAgentsManage, f as runSpaceSend, fn as resolveDeviceAuthClientId, fr as defaultManagedIntegrationPaths, ft as resolveSpaceWebGatewayOrigin, g as runSpaceReadWithPasswordRetry, gn as resolveCreateProfileKind, gr as uninstallAgentActivityIntegrations, gt as runDaemon, h as uploadPreparedSpaceFiles, hn as createProfileByKind, hr as resolveAgentActivityDispatcherCommand, ht as isManagedSystemServiceBootstrapRun, i as runSpaceCreate, in as runAuthStatus, ir as renderHumanTextErrorCard, it as colorizeAgentLabel, j as isSpaceCommandOutputHandledError, jn as inspectSpaceCacheFile, jr as renderTextInfoCard, jt as reconcileCliVersionView, k as resolveOrganizationVisibilityLabel, kn as resolveLocalAgentControllerLaunchability, kr as readControllerTaskLifecycleOutboxHealth, kt as buildProfileWorkspacePresentation, l as runSpaceList, ln as extractAuthApiErrorMessage, lr as resolveAgentActivityRouteForPath, lt as renderOpenMeldLogo, m as prepareRequestedSpaceSendFiles, mn as revokeAuthAccessToken, mr as readAgentActivityIntegrationStatus, mt as bestEffortStopCurrentLaneDaemonService, n as promptAndConfirmSpacePassword, nn as runAuthLogout, nr as buildHumanErrorCopy, nt as runAgentsShow, o as runSpaceHistory, on as buildAuthStatusRows, or as validateLocalProjectConnectionPath, ot as printOpenMeldBanner, p as runSpaceWatch, pn as resolveDeviceTokenExpiresAt, pr as installAgentActivityIntegrations, pt as resolveSpaceSendText, q as runAgentsCustomList, qn as assertDispatchOwnedRuntimePublicWriteAllowed, qt as writeInstalledLocalComponentsSnapshot, r as runSpaceAddMembers, rn as runAuthMenu, rr as renderHumanErrorCard, rt as formatTransportModeDisplay, s as runSpaceJoin, sn as buildAuthStatusSnapshot, sr as isAgentActivityRouteRegistered, st as renderOpenMeldBrandBlockLines, t as buildCreateSpacePasswordPromptConfig, tn as runAuthLogin, tr as startCurrentCommandCheckScope, tt as runAgentsRepair, u as runSpacePassword, un as fetchAuthUserSnapshot, ur as unregisterAgentActivityRoute, ut as renderOpenMeldTagline, v as buildHumanReadSignalsTranscriptItems, vn as promptTextEntry, vr as readAgentActivityContextForPath, vt as runDaemonBackgroundStartForDecision, w as buildFormalDispatchResultReadPayload, wn as submitProfileRuntimeAgentControllerReport, wr as enqueueAgentActivityHookEvent, wt as runDaemonSnapshot, x as loadSpaceIdentityDirectoryOrNull, xn as resolveServiceParticipationReadiness, xr as resolveObservedAgentActivityBinding, xt as runDaemonInterrupt, y as emitHumanReadSignalsTextProjection, yn as ensureAgentProfileRuntimeBinding, yr as removeAgentActivityContextCache, yt as runDaemonCancel, z as buildReplyReadinessGuidance, zn as buildSpaceRoundReadProjection, zr as organizationJoinLinkErrorResponseSchema, zt as createCliSpaceApi } from "./command-cgFedSaF.js";
|
|
12
|
+
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-DnS-Axyz.js";
|
|
13
|
+
import { A as createSpaceAliasTargetGuideError, At as OPENMELD_AGENT_MENTAL_MODEL_LINES, C as createProfileActionGuideError, Ct as registerBuiltinAgentSelectionOptions, D as createSkillsActionGuideError, Dt as formatDualViewGuideForDisplay, E as createResetConfirmationGuideError, Et as DualViewGuideError, F as createSpaceLeaveGuideError, H as createSpaceResultGuideError, I as createSpaceMenuGuideError, J as createSpaceTargetGuideError, Mt as areAllowedActionsEquivalent, Ot as buildDualViewGuideMessage, Pt as buildAgentFacingPublicationModeGuideLines, Q as createStartAuthenticationGuideError, R as createSpacePublicationSetGuideError, Rt as canonicalizeAllowedActions, S as createDoctorFailedGuideError, T as createProfileMenuGuideError, Tt as buildAgentOverviewFromContract, V as createSpaceRemoveMembersGuideError, X as createSpaceUpdatesGuideError, Z as createStartAgentIdentityGuideError, _ as errLine, b as canUseInteractivePrompts, dt as getSkillsTargetSelectionRequiredArguments, et as getCommandEntryContract, ft as registerSkillsTargetSelectionOptions, g as formatMessage, gt as registerDaemonControlTargetOptions, h as sanitizeTerminalDisplayText, ht as getCliVersionInfo, it as registerSpaceMemberSelectionOptions, j as createSpaceContractSetGuideError, jt as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, k as createSpaceAddMembersGuideError, kt as formatAgentOverviewPayload, lt as buildSkillsTargetSelectionExamples, m as createPresenter, n as resolveElapsedTimeMs, pt as validateSkillsTargetSelectionInput, q as createSpaceSubcommandTargetGuideError, st as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, t as formatElapsedTime, tt as getCommandHintsFromContract, ut as getSkillsTargetSelectionOptionalArguments, v as outJsonLine, vt as registerAuthLoginRequestOptions, w as createProfileCreateGuideError, y as outLine } from "./elapsed-time-0R9PAYtt.js";
|
|
13
14
|
import { E as updateConfiguredStartV1OnboardingState, S as setConfiguredSkillsConfig, T as updateConfiguredSkillsConfig, a as resolveBaseUrl, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, g as getConfiguredSkillsConfig, m as getConfiguredOnboardingDisclaimerAcceptedAt, o as resolveBaseUrlOrNull, u as alignRuntimeConfigStorage, w as updateConfiguredOnboardingConfig, y as resolveRuntimeSkillsCustomTargetId } from "./base-url-CgF_v0Ue.js";
|
|
14
15
|
import { t as sleep } from "./dist-o3UL1EGQ.js";
|
|
15
|
-
import { c as buildRequestAuthHeaders, f as deriveAuthBaseUrlFromGatewayUrl, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation, u as buildOpenMeldRequestContextFromProfile } from "./api-client-foundation-
|
|
16
|
+
import { c as buildRequestAuthHeaders, f as deriveAuthBaseUrlFromGatewayUrl, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation, u as buildOpenMeldRequestContextFromProfile } from "./api-client-foundation-C2Ji0552.js";
|
|
16
17
|
import { k as getDaemonStatus } from "./daemon-state-C_KmI_0F.js";
|
|
17
18
|
import { b as resolveDaemonServiceManager, c as getDaemonSystemServiceLogPath, f as isDaemonServiceJobNeverSpawned, g as readDaemonServiceJobCrashExitCode } from "./daemon-service-manager-DRzfyljb.js";
|
|
18
|
-
import { a as runUpgrade, c as OPENMELD_UPGRADE_FAILURE_HINTS, d as waitForExternalOpenMeldToolsUpdate, l as OPENMELD_UPGRADE_METADATA_RECOVERY_HINTS, n as isUpgradeOutputHandledError, o as emitTopLevelAgentOverview, s as emitTopLevelCliAgentOverview, t as UPGRADE_INTERNAL_ALIGN_SERVICE_FLAG$1, u as resolveExternalOpenMeldToolsUpdate } from "./upgrade-
|
|
19
|
+
import { a as runUpgrade, c as OPENMELD_UPGRADE_FAILURE_HINTS, d as waitForExternalOpenMeldToolsUpdate, l as OPENMELD_UPGRADE_METADATA_RECOVERY_HINTS, n as isUpgradeOutputHandledError, o as emitTopLevelAgentOverview, s as emitTopLevelCliAgentOverview, t as UPGRADE_INTERNAL_ALIGN_SERVICE_FLAG$1, u as resolveExternalOpenMeldToolsUpdate } from "./upgrade-hBZIXIcH.js";
|
|
19
20
|
import os, { homedir, hostname, release, tmpdir } from "node:os";
|
|
20
21
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
21
22
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -34,6 +35,94 @@ import { ReadStream, WriteStream } from "node:tty";
|
|
|
34
35
|
import { performance } from "node:perf_hooks";
|
|
35
36
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
36
37
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
38
|
+
//#region ../../packages/schemas/dist/organization-join-request.js
|
|
39
|
+
const id$1 = z$1.string().trim().min(1).max(255);
|
|
40
|
+
const organizationJoinRequestSchema = z$1.strictObject({
|
|
41
|
+
id: id$1,
|
|
42
|
+
organizationId: id$1,
|
|
43
|
+
spaceId: id$1.nullable(),
|
|
44
|
+
requestedByUserId: id$1,
|
|
45
|
+
email: z$1.email(),
|
|
46
|
+
status: z$1.enum([
|
|
47
|
+
"pending",
|
|
48
|
+
"approved",
|
|
49
|
+
"rejected",
|
|
50
|
+
"cancelled"
|
|
51
|
+
]),
|
|
52
|
+
reviewedByUserId: id$1.nullable(),
|
|
53
|
+
createdAt: z$1.number().int().nonnegative(),
|
|
54
|
+
reviewedAt: z$1.number().int().nonnegative().nullable(),
|
|
55
|
+
invitationSentAt: z$1.number().int().nonnegative().nullable(),
|
|
56
|
+
canReview: z$1.boolean().optional(),
|
|
57
|
+
organizationName: z$1.string().optional(),
|
|
58
|
+
requestedByName: z$1.string().optional(),
|
|
59
|
+
spaceName: z$1.string().nullable().optional()
|
|
60
|
+
});
|
|
61
|
+
const organizationJoinRequestInputSchema = z$1.discriminatedUnion("action", [
|
|
62
|
+
z$1.strictObject({
|
|
63
|
+
action: z$1.literal("create"),
|
|
64
|
+
organizationId: id$1,
|
|
65
|
+
spaceId: id$1.optional(),
|
|
66
|
+
email: z$1.string().trim().toLowerCase().pipe(z$1.email())
|
|
67
|
+
}),
|
|
68
|
+
z$1.strictObject({
|
|
69
|
+
action: z$1.literal("list"),
|
|
70
|
+
organizationId: id$1
|
|
71
|
+
}),
|
|
72
|
+
z$1.strictObject({
|
|
73
|
+
action: z$1.literal("summary"),
|
|
74
|
+
organizationId: id$1
|
|
75
|
+
}),
|
|
76
|
+
z$1.strictObject({
|
|
77
|
+
action: z$1.literal("get"),
|
|
78
|
+
requestId: id$1
|
|
79
|
+
}),
|
|
80
|
+
z$1.strictObject({
|
|
81
|
+
action: z$1.literal("approve"),
|
|
82
|
+
requestId: id$1
|
|
83
|
+
}),
|
|
84
|
+
z$1.strictObject({
|
|
85
|
+
action: z$1.literal("reject"),
|
|
86
|
+
requestId: id$1
|
|
87
|
+
}),
|
|
88
|
+
z$1.strictObject({
|
|
89
|
+
action: z$1.literal("cancel"),
|
|
90
|
+
requestId: id$1
|
|
91
|
+
})
|
|
92
|
+
]);
|
|
93
|
+
z$1.strictObject({
|
|
94
|
+
userId: id$1,
|
|
95
|
+
email: z$1.email(),
|
|
96
|
+
emailVerified: z$1.boolean(),
|
|
97
|
+
request: z$1.union([
|
|
98
|
+
organizationJoinRequestInputSchema,
|
|
99
|
+
z$1.strictObject({
|
|
100
|
+
action: z$1.literal("delivery_complete"),
|
|
101
|
+
requestId: id$1
|
|
102
|
+
}),
|
|
103
|
+
z$1.strictObject({
|
|
104
|
+
action: z$1.literal("authorize_link"),
|
|
105
|
+
organizationId: id$1,
|
|
106
|
+
spaceId: id$1.optional()
|
|
107
|
+
}),
|
|
108
|
+
z$1.strictObject({
|
|
109
|
+
action: z$1.literal("create_from_link"),
|
|
110
|
+
organizationId: id$1,
|
|
111
|
+
spaceId: id$1.optional(),
|
|
112
|
+
sponsorUserId: id$1
|
|
113
|
+
})
|
|
114
|
+
])
|
|
115
|
+
});
|
|
116
|
+
const organizationJoinRequestResponseSchema = z$1.discriminatedUnion("ok", [z$1.strictObject({
|
|
117
|
+
ok: z$1.literal(true),
|
|
118
|
+
requests: z$1.array(organizationJoinRequestSchema),
|
|
119
|
+
actionRequiredCount: z$1.number().int().nonnegative().optional()
|
|
120
|
+
}), z$1.strictObject({
|
|
121
|
+
ok: z$1.literal(false),
|
|
122
|
+
code: id$1,
|
|
123
|
+
message: z$1.string()
|
|
124
|
+
})]);
|
|
125
|
+
//#endregion
|
|
37
126
|
//#region ../../packages/schemas/dist/schemas/agent-view/center-agent.js
|
|
38
127
|
const centerAgentOrganizationTargetSchema = z$1.strictObject({
|
|
39
128
|
id: z$1.string().trim().min(1),
|
|
@@ -1038,6 +1127,10 @@ z$1.strictObject({
|
|
|
1038
1127
|
emailVerified: z$1.boolean(),
|
|
1039
1128
|
request: z$1.union([
|
|
1040
1129
|
spaceInvitationRequestSchema,
|
|
1130
|
+
z$1.strictObject({
|
|
1131
|
+
action: z$1.literal("create_approved"),
|
|
1132
|
+
requestId: id
|
|
1133
|
+
}),
|
|
1041
1134
|
z$1.strictObject({
|
|
1042
1135
|
action: z$1.literal("bind"),
|
|
1043
1136
|
invitationId: id,
|
|
@@ -8047,7 +8140,7 @@ async function exchangeComputerAuthorizationGrant(input) {
|
|
|
8047
8140
|
clientId,
|
|
8048
8141
|
deviceCode: normalizeRequiredString(input.deviceCode, "computer authorization code is required")
|
|
8049
8142
|
});
|
|
8050
|
-
if (!tokenResult.ok) throw new Error(`computer authorization failed: ${extractAuthApiErrorMessage(tokenResult.error, tokenResult.status)}
|
|
8143
|
+
if (!tokenResult.ok) throw new Error(`computer authorization failed: ${extractAuthApiErrorMessage(tokenResult.error, tokenResult.status)}. Return to OpenMeld Web and get a new setup command to try again.`);
|
|
8051
8144
|
let user;
|
|
8052
8145
|
try {
|
|
8053
8146
|
user = await fetchAuthUserSnapshot({
|
|
@@ -12222,7 +12315,7 @@ async function runPrompt(input) {
|
|
|
12222
12315
|
skillsReadiness: input?.raw ? null : await collectSkillsReadinessSnapshot().catch(() => null)
|
|
12223
12316
|
});
|
|
12224
12317
|
if (input?.raw) {
|
|
12225
|
-
process.stdout.write(await
|
|
12318
|
+
process.stdout.write(await readSelectedSkillDocument(entry.sourcePath));
|
|
12226
12319
|
return;
|
|
12227
12320
|
}
|
|
12228
12321
|
if (input?.json) {
|
|
@@ -18230,10 +18323,14 @@ async function runPrepareSessionExecutor(input) {
|
|
|
18230
18323
|
});
|
|
18231
18324
|
if (alreadyCompleted) return alreadyCompleted;
|
|
18232
18325
|
let reconnectAttempts = 0;
|
|
18326
|
+
let connectedStream = input.connectedStream;
|
|
18233
18327
|
let reconnectDeadlineMs = null;
|
|
18234
18328
|
while (true) try {
|
|
18235
18329
|
return await runPrepareSessionExecutorOnce({
|
|
18236
|
-
input
|
|
18330
|
+
input: {
|
|
18331
|
+
...input,
|
|
18332
|
+
connectedStream
|
|
18333
|
+
},
|
|
18237
18334
|
initial,
|
|
18238
18335
|
onTerminalConnected: () => {
|
|
18239
18336
|
reconnectAttempts = 0;
|
|
@@ -18241,6 +18338,7 @@ async function runPrepareSessionExecutor(input) {
|
|
|
18241
18338
|
}
|
|
18242
18339
|
});
|
|
18243
18340
|
} catch (error) {
|
|
18341
|
+
connectedStream = void 0;
|
|
18244
18342
|
if (error instanceof PrepareSessionCancelledError) return {
|
|
18245
18343
|
reason: "user_cancelled",
|
|
18246
18344
|
status: "not_completed"
|
|
@@ -18325,7 +18423,7 @@ async function runPrepareSessionExecutorOnce(input) {
|
|
|
18325
18423
|
});
|
|
18326
18424
|
let stream = null;
|
|
18327
18425
|
try {
|
|
18328
|
-
stream = await connectPrepareSessionStream({
|
|
18426
|
+
stream = input.input.connectedStream ?? await connectPrepareSessionStream({
|
|
18329
18427
|
gatewayUrl: input.input.gatewayUrl,
|
|
18330
18428
|
opaqueToken: input.input.startSession,
|
|
18331
18429
|
prepareSessionId: input.initial.prepareSessionId
|
|
@@ -19295,6 +19393,27 @@ async function waitForSnapshotWithProgress(input) {
|
|
|
19295
19393
|
if (progressStartedByWait) progress?.cancel();
|
|
19296
19394
|
}
|
|
19297
19395
|
}
|
|
19396
|
+
async function reportPrepareHandoffStopped(input) {
|
|
19397
|
+
const stream = input.stream;
|
|
19398
|
+
const timeout = setTimeout(() => stream.close(), 5e3);
|
|
19399
|
+
try {
|
|
19400
|
+
const snapshot = await stream.waitForSnapshot((current) => current.terminalConnection.status === "connected");
|
|
19401
|
+
const connectionEpoch = snapshot.terminalConnection.connectionEpoch;
|
|
19402
|
+
if (connectionEpoch === null) throw new Error("Terminal connection was not confirmed.");
|
|
19403
|
+
stream.writeTerminalStep({
|
|
19404
|
+
connectionEpoch,
|
|
19405
|
+
expectedRevision: snapshot.sessionRevision,
|
|
19406
|
+
stepId: "connect_terminal",
|
|
19407
|
+
status: "failed",
|
|
19408
|
+
reasonCode: input.reasonCode,
|
|
19409
|
+
message: input.message
|
|
19410
|
+
});
|
|
19411
|
+
await stream.waitForSnapshot((current) => current.blockers.some((blocker) => blocker.reasonCode === input.reasonCode));
|
|
19412
|
+
} finally {
|
|
19413
|
+
clearTimeout(timeout);
|
|
19414
|
+
stream.close();
|
|
19415
|
+
}
|
|
19416
|
+
}
|
|
19298
19417
|
async function connectPrepareSessionStream(input) {
|
|
19299
19418
|
const ws = await connectWebSocket(buildPrepareSessionStreamUrl(input.gatewayUrl, input.prepareSessionId), { headers: { [PREPARE_TOKEN_HEADER]: input.opaqueToken } });
|
|
19300
19419
|
let latestSnapshot = null;
|
|
@@ -19613,69 +19732,100 @@ async function runPreparedComputerAuthHandoff(input) {
|
|
|
19613
19732
|
gatewayUrl,
|
|
19614
19733
|
opaqueToken: input.startSession
|
|
19615
19734
|
});
|
|
19616
|
-
const
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
});
|
|
19621
|
-
const currentSession = await resolveCurrentComputerSession(candidate);
|
|
19622
|
-
if (!await confirmComputerAccountSwitch({
|
|
19623
|
-
candidate,
|
|
19624
|
-
currentSession,
|
|
19625
|
-
interactive: input.interactive,
|
|
19626
|
-
presenter: input.presenter,
|
|
19627
|
-
resolvedView: input.runtime.resolvedView
|
|
19628
|
-
})) {
|
|
19629
|
-
const revoked = await revokePreparedAuthSession(candidate);
|
|
19630
|
-
if (!revoked.ok) emitUnusedSetupSessionCleanupWarning(input.presenter, revoked.error);
|
|
19631
|
-
return {
|
|
19632
|
-
reason: "user_cancelled",
|
|
19633
|
-
status: "not_completed"
|
|
19634
|
-
};
|
|
19635
|
-
}
|
|
19636
|
-
const transition = await beginComputerSessionTransition({
|
|
19637
|
-
candidate,
|
|
19638
|
-
expectedPreviousSession: currentSession,
|
|
19639
|
-
gatewayUrl
|
|
19735
|
+
const stream = await connectPrepareSessionStream({
|
|
19736
|
+
gatewayUrl,
|
|
19737
|
+
opaqueToken: input.startSession,
|
|
19738
|
+
prepareSessionId: initialSnapshot.prepareSessionId
|
|
19640
19739
|
});
|
|
19641
19740
|
try {
|
|
19642
|
-
const
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19741
|
+
const notifyStopped = async (reasonCode, message) => {
|
|
19742
|
+
try {
|
|
19743
|
+
await reportPrepareHandoffStopped({
|
|
19744
|
+
stream,
|
|
19745
|
+
reasonCode,
|
|
19746
|
+
message
|
|
19747
|
+
});
|
|
19748
|
+
} catch {
|
|
19749
|
+
input.presenter.line({
|
|
19750
|
+
code: "setup.handoff.notification_failed",
|
|
19751
|
+
text: "OpenMeld Web could not be updated. Return to Web and get a new setup command to try again."
|
|
19752
|
+
});
|
|
19753
|
+
}
|
|
19754
|
+
};
|
|
19755
|
+
let candidate;
|
|
19756
|
+
try {
|
|
19757
|
+
candidate = await input.exchangeCandidate();
|
|
19758
|
+
} catch (error) {
|
|
19759
|
+
await notifyStopped("prepare.authorization_failed", "Computer authorization could not finish. Get a new setup command to try again.");
|
|
19760
|
+
throw error;
|
|
19761
|
+
}
|
|
19762
|
+
await assertPrepareSessionOwner({
|
|
19763
|
+
candidate,
|
|
19764
|
+
ownerUserId: initialSnapshot.ownerUserId
|
|
19651
19765
|
});
|
|
19652
|
-
|
|
19653
|
-
|
|
19654
|
-
|
|
19655
|
-
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19766
|
+
const currentSession = await resolveCurrentComputerSession(candidate);
|
|
19767
|
+
if (!await confirmComputerAccountSwitch({
|
|
19768
|
+
candidate,
|
|
19769
|
+
currentSession,
|
|
19770
|
+
interactive: input.interactive,
|
|
19771
|
+
presenter: input.presenter,
|
|
19772
|
+
resolvedView: input.runtime.resolvedView
|
|
19773
|
+
})) {
|
|
19774
|
+
const revoked = await revokePreparedAuthSession(candidate);
|
|
19775
|
+
if (!revoked.ok) emitUnusedSetupSessionCleanupWarning(input.presenter, revoked.error);
|
|
19776
|
+
await notifyStopped("prepare.account_switch_cancelled", "Account switch canceled. The current computer connection was not changed.");
|
|
19777
|
+
return {
|
|
19778
|
+
reason: "user_cancelled",
|
|
19779
|
+
status: "not_completed"
|
|
19780
|
+
};
|
|
19662
19781
|
}
|
|
19663
|
-
await
|
|
19664
|
-
|
|
19665
|
-
|
|
19782
|
+
const transition = await beginComputerSessionTransition({
|
|
19783
|
+
candidate,
|
|
19784
|
+
expectedPreviousSession: currentSession,
|
|
19785
|
+
gatewayUrl
|
|
19786
|
+
});
|
|
19666
19787
|
try {
|
|
19667
|
-
await
|
|
19668
|
-
candidate,
|
|
19788
|
+
const sessionResult = await runPrepareSessionExecutor({
|
|
19669
19789
|
gatewayUrl,
|
|
19670
|
-
|
|
19790
|
+
connectedStream: stream,
|
|
19791
|
+
initialSnapshot,
|
|
19792
|
+
startSession: input.startSession,
|
|
19671
19793
|
runtime: input.runtime,
|
|
19672
|
-
|
|
19794
|
+
presenter: input.presenter,
|
|
19795
|
+
interactive: input.interactive,
|
|
19796
|
+
localAgentSelection: input.localAgentSelection,
|
|
19673
19797
|
view: input.view
|
|
19674
19798
|
});
|
|
19675
|
-
|
|
19676
|
-
|
|
19799
|
+
if (sessionResult.status !== "completed") {
|
|
19800
|
+
await restorePreviousComputerAfterFailedHandoff({
|
|
19801
|
+
candidate,
|
|
19802
|
+
gatewayUrl,
|
|
19803
|
+
presenter: input.presenter,
|
|
19804
|
+
runtime: input.runtime,
|
|
19805
|
+
transition,
|
|
19806
|
+
view: input.view
|
|
19807
|
+
});
|
|
19808
|
+
return sessionResult;
|
|
19809
|
+
}
|
|
19810
|
+
await transition.commit();
|
|
19811
|
+
return sessionResult;
|
|
19812
|
+
} catch (error) {
|
|
19813
|
+
try {
|
|
19814
|
+
await restorePreviousComputerAfterFailedHandoff({
|
|
19815
|
+
candidate,
|
|
19816
|
+
gatewayUrl,
|
|
19817
|
+
presenter: input.presenter,
|
|
19818
|
+
runtime: input.runtime,
|
|
19819
|
+
transition,
|
|
19820
|
+
view: input.view
|
|
19821
|
+
});
|
|
19822
|
+
} catch (recoveryError) {
|
|
19823
|
+
throw new Error(`Computer setup failed, and OpenMeld could not restore the previous local account: ${toErrorMessage$2(recoveryError)}`, { cause: error });
|
|
19824
|
+
}
|
|
19825
|
+
throw error;
|
|
19677
19826
|
}
|
|
19678
|
-
|
|
19827
|
+
} finally {
|
|
19828
|
+
stream.close();
|
|
19679
19829
|
}
|
|
19680
19830
|
}
|
|
19681
19831
|
async function assertPrepareSessionOwner(input) {
|
|
@@ -19746,7 +19896,7 @@ async function confirmComputerAccountSwitch(input) {
|
|
|
19746
19896
|
}) !== "confirmed") {
|
|
19747
19897
|
input.presenter.line({
|
|
19748
19898
|
code: "setup.account_switch.cancelled",
|
|
19749
|
-
text: "Account switch canceled. The current Computer connection was not changed."
|
|
19899
|
+
text: "Account switch canceled. The current Computer connection was not changed. To try again, return to OpenMeld Web and get a new setup command."
|
|
19750
19900
|
});
|
|
19751
19901
|
return false;
|
|
19752
19902
|
}
|
|
@@ -25254,6 +25404,120 @@ function normalizeOrganizationSlug(value) {
|
|
|
25254
25404
|
return normalized.length > 0 ? normalized : null;
|
|
25255
25405
|
}
|
|
25256
25406
|
//#endregion
|
|
25407
|
+
//#region src/org/invitation-requests-command.ts
|
|
25408
|
+
const TRAILING_SLASHES$1 = /\/+$/u;
|
|
25409
|
+
function parseRequest(input, organizationId) {
|
|
25410
|
+
const scope = {
|
|
25411
|
+
organizationId,
|
|
25412
|
+
...input.space ? { spaceId: input.space } : {}
|
|
25413
|
+
};
|
|
25414
|
+
if (input.action === "link") return organizationJoinLinkManagementQuerySchema.safeParse(scope);
|
|
25415
|
+
if (input.action === "request") return acceptOrganizationJoinLinkBodySchema.safeParse({ token: input.token });
|
|
25416
|
+
if (input.action === "create") return organizationJoinRequestInputSchema.safeParse({
|
|
25417
|
+
action: "create",
|
|
25418
|
+
...scope,
|
|
25419
|
+
email: input.email
|
|
25420
|
+
});
|
|
25421
|
+
if (input.action === "list") return organizationJoinRequestInputSchema.safeParse({
|
|
25422
|
+
action: "list",
|
|
25423
|
+
organizationId
|
|
25424
|
+
});
|
|
25425
|
+
return organizationJoinRequestInputSchema.safeParse({
|
|
25426
|
+
action: input.action,
|
|
25427
|
+
requestId: input.request
|
|
25428
|
+
});
|
|
25429
|
+
}
|
|
25430
|
+
const ENDPOINTS = {
|
|
25431
|
+
link: "join-link/ensure",
|
|
25432
|
+
request: "join-link/request"
|
|
25433
|
+
};
|
|
25434
|
+
const NEXT_ACTIONS = {
|
|
25435
|
+
link: "Share this link. Each recipient must sign in and request approval.",
|
|
25436
|
+
approve: "The recipient must accept the emailed invitation before joining."
|
|
25437
|
+
};
|
|
25438
|
+
async function runOrganizationInvitationRequests(input) {
|
|
25439
|
+
const presenter = createPresenter(await resolveRuntimeContext({ view: input.view }));
|
|
25440
|
+
const fail = (code, message) => {
|
|
25441
|
+
process.exitCode = 1;
|
|
25442
|
+
if (presenter.view === "agent") presenter.data({
|
|
25443
|
+
code,
|
|
25444
|
+
payload: {
|
|
25445
|
+
status: "error",
|
|
25446
|
+
message
|
|
25447
|
+
}
|
|
25448
|
+
});
|
|
25449
|
+
else presenter.line({
|
|
25450
|
+
code,
|
|
25451
|
+
text: message
|
|
25452
|
+
});
|
|
25453
|
+
};
|
|
25454
|
+
const auth = await getAuthSessionState({ validateRemote: true });
|
|
25455
|
+
if (auth.state !== "valid" || !auth.session) {
|
|
25456
|
+
fail("organization.join_request.authentication_required", "Run openmeld login, then retry this command.");
|
|
25457
|
+
return;
|
|
25458
|
+
}
|
|
25459
|
+
const session = auth.session;
|
|
25460
|
+
if ([
|
|
25461
|
+
"create",
|
|
25462
|
+
"list",
|
|
25463
|
+
"link"
|
|
25464
|
+
].includes(input.action) && !session.activeOrganization?.id) {
|
|
25465
|
+
fail("organization.join_request.organization_required", "Run openmeld org list, then openmeld org switch <slug> to choose the organization. Retry this command afterward.");
|
|
25466
|
+
return;
|
|
25467
|
+
}
|
|
25468
|
+
const body = parseRequest(input, session.activeOrganization?.id);
|
|
25469
|
+
if (!body.success) {
|
|
25470
|
+
fail("organization.join_request.invalid_input", "Use org invitation-requests --help. Create needs --email; review needs --request; request needs --token. Create, list, and link use the active organization.");
|
|
25471
|
+
return;
|
|
25472
|
+
}
|
|
25473
|
+
try {
|
|
25474
|
+
const url = new URL(session.authBaseUrl);
|
|
25475
|
+
const endpoint = ENDPOINTS[input.action] ?? "join-requests";
|
|
25476
|
+
url.pathname = `${url.pathname.replace(TRAILING_SLASHES$1, "")}/api/auth/organization/${endpoint}`;
|
|
25477
|
+
url.search = "";
|
|
25478
|
+
url.hash = "";
|
|
25479
|
+
const data = await (await fetch(url, {
|
|
25480
|
+
method: "POST",
|
|
25481
|
+
headers: {
|
|
25482
|
+
"content-type": "application/json",
|
|
25483
|
+
Authorization: `${session.tokenType} ${session.accessToken}`
|
|
25484
|
+
},
|
|
25485
|
+
body: JSON.stringify(body.data)
|
|
25486
|
+
})).json();
|
|
25487
|
+
const error = organizationJoinRequestResponseSchema.safeParse(data);
|
|
25488
|
+
if (error.success && !error.data.ok) {
|
|
25489
|
+
fail(error.data.code, error.data.message);
|
|
25490
|
+
return;
|
|
25491
|
+
}
|
|
25492
|
+
const result = input.action === "link" ? getOrganizationJoinLinkResponseSchema.parse(data) : organizationJoinRequestResponseSchema.parse(data);
|
|
25493
|
+
if (!result.ok) {
|
|
25494
|
+
fail(result.code, result.message);
|
|
25495
|
+
return;
|
|
25496
|
+
}
|
|
25497
|
+
const nextAction = NEXT_ACTIONS[input.action] ?? "Use get --request <id> to check status. Owners and admins can approve or reject pending requests.";
|
|
25498
|
+
if (presenter.view === "agent") {
|
|
25499
|
+
presenter.data({
|
|
25500
|
+
code: "organization.join_request.result",
|
|
25501
|
+
payload: {
|
|
25502
|
+
...result,
|
|
25503
|
+
nextAction
|
|
25504
|
+
}
|
|
25505
|
+
});
|
|
25506
|
+
return;
|
|
25507
|
+
}
|
|
25508
|
+
presenter.line({
|
|
25509
|
+
code: "organization.join_request.result",
|
|
25510
|
+
text: "joinLink" in result ? result.joinLink?.url ?? "No active link." : result.requests.map((request) => `${request.email} — ${request.status}\nRequest: ${request.id}`).join("\n") || "No invitation requests."
|
|
25511
|
+
});
|
|
25512
|
+
presenter.line({
|
|
25513
|
+
code: "organization.join_request.next_action",
|
|
25514
|
+
text: nextAction
|
|
25515
|
+
});
|
|
25516
|
+
} catch (error) {
|
|
25517
|
+
fail("organization.join_request.request_failed", error instanceof Error ? error.message : "Could not complete the request. Try again.");
|
|
25518
|
+
}
|
|
25519
|
+
}
|
|
25520
|
+
//#endregion
|
|
25257
25521
|
//#region src/organization-skills/cache.ts
|
|
25258
25522
|
const CACHE_MARKER_FILENAME = ".openmeld-organization-skill.json";
|
|
25259
25523
|
const DIRECTORY_READ_ONLY_MODE = 365;
|
|
@@ -29439,7 +29703,7 @@ function normalizeOptionalString(value) {
|
|
|
29439
29703
|
return normalized.length > 0 ? normalized : null;
|
|
29440
29704
|
}
|
|
29441
29705
|
async function runDefaultSpaceAddMeMembership(input) {
|
|
29442
|
-
const { runSpaceAddMeMembership } = await import("./add-me-membership-
|
|
29706
|
+
const { runSpaceAddMeMembership } = await import("./add-me-membership-zhgufZnd.js");
|
|
29443
29707
|
return await runSpaceAddMeMembership(input);
|
|
29444
29708
|
}
|
|
29445
29709
|
//#endregion
|
|
@@ -33543,6 +33807,11 @@ authCmd.command("logout").description("Sign out on this device.").action(async (
|
|
|
33543
33807
|
});
|
|
33544
33808
|
});
|
|
33545
33809
|
const orgCmd = program.command("org").description("Manage OpenMeld organizations.");
|
|
33810
|
+
orgCmd.command("invitation-requests").description("Request invitations, share approval-required links, and review requests.").argument("<action>", "create | list | get | approve | reject | cancel | link | request").option("--email <email>", "Recipient email for create").option("--space <id>", "Optional target Space for create or link").option("--request <id>", "Request ID for get, approve, reject, or cancel").option("--token <token>", "Shared link token for request").action(async (action, opts) => runOrganizationInvitationRequests({
|
|
33811
|
+
action,
|
|
33812
|
+
...opts,
|
|
33813
|
+
view: getGlobalViewOption()
|
|
33814
|
+
}));
|
|
33546
33815
|
orgCmd.command("list").description("List your OpenMeld organizations.").action(async () => {
|
|
33547
33816
|
const view = getGlobalViewOption();
|
|
33548
33817
|
await runCommandWithEntryChecks({
|
|
@@ -36311,4 +36580,4 @@ main().catch((error) => {
|
|
|
36311
36580
|
//#endregion
|
|
36312
36581
|
export {};
|
|
36313
36582
|
|
|
36314
|
-
//# sourceMappingURL=openmeld-
|
|
36583
|
+
//# sourceMappingURL=openmeld-DmYjQa7n.js.map
|