openmeld 0.3.120 → 0.3.122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openmeld.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { $ as runWithHeldLock, A as toSpaceContractUrl, At as openMeldBackupsDir, D as normalizeBaseUrl, E as updateConfiguredStartV1OnboardingState, F as toSpaceDispatchTraceUrl, Ft as openMeldRootDir, G as buildOpenMeldOrphanedLockAction, Gt as resolveOpenMeldRootDir, Ht as resolveOpenMeldCliEntryNameFromArgv, Jt as skillsDir, K as isOpenMeldLockError, Lt as organizationSkillReleaseDir, Mt as openMeldManagedBinaryPath, Nt as openMeldManagedVersionBinaryPath, Ot as normalizeAccountKey, P as toSpaceDispatchLookupUrl, Q as resolveOpenMeldOrphanedLockIssue, Rt as profileDir, S as setConfiguredSkillsConfig, St as accountsDir, Ut as resolveOpenMeldEnvPreset, V as toSpaceResultUrl, W as acquireLock, X as releaseLockSync, Xt as systemDir, Yt as spacesDir, Z as repairOrphanedLegacyLocks, Zt as formatLocalMachineIssueMessage, a as resolveBaseUrl, at as resolveCliContext, b as setConfiguredBaseUrl, bt as accountProfileViewPath, c as resolveExplicitGatewayUrlOrThrow, ct as formatLaneScopeSentence, ft as createActiveSetupConcurrencyIssue, g as getConfiguredSkillsConfig, gt as toRecognizedLocalMachineFailureError, ht as isLocalMachineFailureError, in as agentControllerConversationRefSchema, k as toSpaceBoardUrl, lt as resolveOpenMeldLaneDescriptor, m as getConfiguredOnboardingDisclaimerAcceptedAt, mt as createOrphanedSetupConcurrencyIssue, nt as OPENMELD_CLI_CONTEXT_ENV_KEY, o as resolveBaseUrlOrNull, q as isOpenMeldOrphanedLockError, tt as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, u as alignRuntimeConfigStorage, ut as LocalMachineFailureError, w as updateConfiguredOnboardingConfig, yt as accountProfileSpaceCacheDir, zt as profileViewPath } from "./base-url-PkgATS5u.js";
4
- import { $ as runAgentsRepair, $a as installAgentActivityIntegrations, $i as readDaemonServiceJobCrashExitCode, $n as formatDaemonServiceMissingRecommendation, $r as resolveOpenClawLocalDiagnosticsValue, $t as readBundledOpenMeldCliSkillDocumentByPath, A as assertFullSignalIdArgument, Aa as updateOpenMeldProfile, Ai as resolveNativeAgentControllerPermissionModeForController, An as upsertSpaceConfig, Ao as setDefaultProjectConnection, Ar as DualViewGuideError, At as shouldEmitAgentOverview, B as persistAgentTransportSelection, Ba as resolveAuthenticationGuidanceFromMessage, Bi as assessServerRequiredVersion, Bn as promptSearchMultiselect, Bo as outJsonLine, Br as runPendingDaemonServiceUpdate, Bt as parseJsonResponse, C as toSpaceMetaUpsertInput, Ca as resolveOpenMeldProfileOrNull, Ci as getAgentControllerPermissionModeFieldLabel, Cn as submitRuntimeAgentControllerReport, Co as removeProjectOutbox, Cr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Ct as runDaemonTeardownStrict, D as formatHumanReadTargetList, Da as listOpenMeldProfiles, Di as resolveAgentExecutionStatus, Dn as resolveLocalAgentControllerLaunchability, Do as migrateProjectBindingStore, Dr as registerAuthLoginRequestOptions, Dt as reconcileCliVersionView, E as buildHumanReplyContextSummary, Ea as deleteOpenMeldProfile, Ei as resolveAgentControllerPermissionModeForController, En as resolveLocalAgentControllerBlockerReasonCodes, Eo as listProjectConnectionsWithStatus, Er as registerDaemonControlTargetOptions, Et as buildProfileWorkspaceRows, F as emitSpaceAgentOverview, Fa as buildAgentAuthenticationGuide, Fi as buildDaemonServiceTargetSpec, Fn as buildSignalMessageReadProjection, Fo as renderInfoCard, Fr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Ft as fetchSpaceMeta, G as runAgentsCustomList, Ga as LocalDaemonControlPlaneClientError, Gi as resetCurrentCommandCheckState, Gn as isCliUpdateCheckApplicable, Go as cliJsonSkillsLoadEnvelopeSchema, Gr as resolveServiceReadinessFromServiceStatus, Gt as runDaemonStartDecisionPrompt, H as runAgents, Ha as setProfileDefaultView, Hi as finishCurrentCommandCheckScope, Hn as isReturnKeypress, Ho as cliBinaryDeltaPatchSchema, Hr as ensureDaemonRuntimePaths, Ht as writeInstalledLocalComponentsSnapshot, I as emitSpaceCliAgentOverview, Ia as buildHumanAuthenticationCard, Ii as resolveDaemonServiceAlignmentDecision, In as buildSpaceRoundReadProjection, Io as renderTextInfoCard, Ir as areAllowedActionsEquivalent, It as updateSpaceMeta, J as runAgentsDetect, Ja as registerAgentActivityRoute, Ji as resolveVersionChangeDirection, Jn as readDispatchSpaceActionContextFromEnv, Jo as organizationJoinLinkErrorResponseSchema, Jr as formatAgentReplyReadinessLabel, Jt as runSkillsEnsure, K as runAgentsCustomRemove, Ka as requestLocalAgentActivitySync, Ki as startCurrentCommandCheckScope, Kn as assertDispatchOwnedRuntimePublicWriteAllowed, Ko as cliJsonSkillsShowEnvelopeSchema, Kr as resolveDaemonServiceFreshnessWarning, Kt as collectSkillsReadinessSnapshot, L as prepareLocalAgentReadiness, La as createAuthenticationError, Li as classifyDaemonServiceRunStartability, Ln as buildUpdatesReplyWorkflowProjection, Lo as sanitizeTerminalDisplayText, Lr as buildAgentFacingPublicationModeGuideLines, Lt as readGatewayJsonResponse, M as prepareAuthenticatedSpaceCommandContext, Ma as clearSelectedOpenMeldProfileId, Mi as buildDaemonRouteObservationPresentation$1, Mn as buildDispatchResultMessageReadProjection, Mo as canonicalizeLocalProjectPath, Mr as buildDualViewGuideMessage, Mt as readDaemonStartFailureLogTailLines, N as resolveOpenMeldProfileForSpaceCommand, Na as getSelectedOpenMeldProfileId, Ni as buildOnboardingPlan, Nn as buildDispatchResultReplyWorkflowProjection, No as enqueueControllerTaskLifecycleEventWhileLocked, Nr as formatAgentOverviewPayload, Nt as fetchSpaceUpdates, O as parseEnvelope, Oa as primeOpenMeldProfilesSessionCache, Oi as resolveAgentProfileEditCapabilities, On as resolveLocalAgentControllerReportDecision, Oo as removeProjectConnection, Or as registerBuiltinAgentSelectionOptions, Ot as emitDaemonAgentOverview, P as resolveSpaceAccessLabel, Pa as setSelectedOpenMeldProfileId, Pi as getSetupFlowCopy, Pn as buildSignalIndex, Po as readControllerTaskLifecycleOutboxHealth, Pr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Pt as createCliSpaceApi, Q as runAgentsManage, Qa as defaultManagedIntegrationPaths, Qi as isDaemonServiceJobNeverSpawned, Qn as formatDaemonServiceDowngradeBlockedRecommendation, Qr as resolveGatewayChainReadiness, Qt as ensureLocalSkills, R as buildReplyReadinessGuidance, Ra as resolveAuthenticationGuidance, Ri as classifyDaemonServiceWakeability, Rn as createSpaceMemberIdentityIndex, Ro as emitCliJsonEnvelope, Rr as canonicalizeAllowedActions, Rt as readGatewayTextResponse, S as loadSpaceSignalIndexOrNull, Sa as requireOpenMeldProfile, Si as getAgentControllerPermissionModeDisplayMetadata, Sn as submitProfileRuntimeAgentControllerReport, So as readAgentActivityOutboxHealth, Sr as registerSpaceMemberSelectionOptions, St as runDaemonStop, T as buildFormalSignalReadPayload, Ta as createOpenMeldHumanProfile, Ti as parseAgentControllerRef, Tn as collectLocalAgentControllerInventory, To as listProjectBindings, Tr as getCliVersionInfo, Tt as buildProfileWorkspacePresentation, U as runAgentsConfig, Ua as LocalProjectConnectionError, Ui as getCurrentCommandCheckState, Un as runInteractivePrompt, Uo as cliJsonOutputEnvelopeSchema, Ur as resolveDaemonDeviceId, Ut as resolveDaemonServiceParticipationStatus, V as resolveAgentProfileSetup, Va as getProfileDefaultView, Vi as resolveOpenMeldEnvironmentTarget, Vn as promptSearchSelect, Vo as outLine, Vr as scheduleDaemonServiceUpdate, Vt as resolveLocalComponentsStatus, W as runAgentsCustomAdd, Wa as validateLocalProjectConnectionPath, Wi as isCurrentCommandCheckScopeActive, Wn as assessCliUpdate, Wo as cliJsonSkillsListEnvelopeSchema, Wr as formatDaemonFailureContextText, Wt as runDaemonServiceParticipationGate, X as runAgentsEnable, Xa as unregisterAgentActivityRoute, Xi as readCurrentObservedDaemonRuntimeStatus, Xn as formatElapsedTime, Xo as compareAgentControllerRefsForDisplay, Xr as formatHumanReplyReadinessReason$1, Xt as runSkillsUninstall, Y as runAgentsDisable, Ya as resolveAgentActivityRouteForPath, Yi as readCurrentDaemonRuntimeContext, Yn as writeDispatchSpaceActionRecord, Yo as revokeOrganizationJoinLinkResponseSchema, Yr as formatDeviceReplyReadinessLabel, Yt as runSkillsInstall, Z as runAgentsList, Zi as getDaemonSystemServiceLogPath, Zn as resolveElapsedTimeMs, Zo as package_default, Zr as mapAgentReplyReadinessToLegacyAutoReply, Zt as runSkillsUpdate, _ as runSpaceWriteWithPasswordRetry, _a as formatMessage, _i as listBuiltinAgentsRegistryEntries, _n as ensureAgentProfileRuntimeBinding, _o as resolveObservedAgentActivityBinding, _r as createStartAgentIdentityGuideError, _t as runDaemonInterrupt, a as runSpaceDelete, aa as ensureVersionStateReady, ai as normalizeCustomProfileWorkspacePath, an as evaluateCommandAuthentication, ao as formatOpenMeldCliCommands, ar as createResetConfirmationGuideError, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as resolveViewProfileKey, bi as buildAgentControllerRef, bn as assessActionParticipationCandidate, bo as enqueueAgentActivityHookEvent, br as getCommandEntryContract, bt as runDaemonSnapshot, c as runSpaceLeave, ca as readVersionState, ci as setCustomProfileWorkspace, cn as runAuthMenu, co as formatProfileAwareOpenMeldCliCommands, cr as createSpaceContractSetGuideError, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as toStartBackgroundHelperExecutionCompatibility, di as describeProfileWorkspacePathValidationFailure, dn as buildAuthStatusSnapshot, do as syncLocalAgentActivity, dr as createSpacePublicationSetGuideError, dt as resolveSpaceSendText, ea as resolveDaemonServiceManager, ei as readRecentDaemonLifecycleEvents, en as readRuntimeReportingHealthState, eo as readAgentActivityIntegrationStatus, er as canUseInteractivePrompts, et as runAgentsShow, f as runSpaceSend, fa as resolveCurrentDaemonExpectedVersion, fi as syncDeviceRuntimeStateProjection, fn as formatActiveOrganizationLabel, fo as readDaemonServiceContract, fr as createSpaceRemoveMembersGuideError, ft as runDaemon, g as runSpaceReadWithPasswordRetry, ga as createPresenter, gi as reconcileNewRunnableBuiltinAgentsForSetup, gn as promptTextEntry, go as buildAgentActivityEvent, gr as createSpaceUpdatesGuideError, gt as runDaemonInstall, h as uploadPreparedSpaceFiles, ha as renderHumanTextErrorCard, hi as listAgentTargetStates, hn as resolveCreateProfileName, ho as removeAgentActivityContextCache, hr as createSpaceTargetGuideError, ht as runDaemonCancel, i as runSpaceCreate, ia as compareSemver, ii as ensureOpenMeldManagedProfileWorkspace, in as ensureCommandAuthenticationOrCancel, io as formatOpenMeldCliCommand, ir as createProfileMenuGuideError, it as colorizeDisplayProfileLabel, j as assertValidSpaceIdTarget, ja as alignSelectedOpenMeldProfileStorage, jn as assertNoRemovedCcSpaceAddressingSyntax, jo as unbindProject, jr as formatDualViewGuideForDisplay, jt as runDaemonStartupPreflight, k as isSpaceCommandOutputHandledError, ka as resolveOpenMeldProfile, ki as resolveEvidenceSyncHealth, kn as inspectSpaceCacheFile, ko as runIfAgentActivityBindingGenerationIsCurrent, kr as buildAgentOverviewFromContract, kt as createDelayedSpinner, l as runSpaceList, la as writeVersionState, li as setOpenMeldManagedProfileWorkspace, ln as runAuthStatus, lo as resolveSetupFollowUpCliEntryCommand, lr as createSpaceLeaveGuideError, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as renderHumanErrorCard, mi as resolveAgentProfilePrimaryAgentControllerReport, mn as resolveCreateProfileKind, mo as readAgentActivityContextForPath, mr as createSpaceSubcommandTargetGuideError, mt as runDaemonBackgroundStartForDecision, n as promptAndConfirmSpacePassword, na as performManagedInstall, ni as createModelCatalogReadSession, nn as connectWebSocket, no as uninstallAgentActivityIntegrations, nr as createProfileActionGuideError, nt as postLocalParticipationMutationReconcile, o as runSpaceHistory, oa as fetchLatestCliBinaryRelease, oi as readProfileWorkspaceConfig, on as runAuthLogin, oo as formatOpenMeldCliLine, or as createSpaceAddMembersGuideError, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as buildHumanErrorCopy, pi as createPrimaryBindingReadSession, pn as createProfileByKind, po as upsertDaemonServiceContract, pr as createSpaceResultGuideError, pt as runDaemonAutostart, q as runAgentsCustomUpdate, qa as isAgentActivityRouteRegistered, qi as inspectDaemonServiceInventory, qn as readDispatchOwnedRuntimeGuard, qo as getOrganizationJoinLinkResponseSchema, qr as resolveCurrentReplyReadinessSnapshot, qt as runSkillsCheck$1, r as runSpaceAddMembers, ra as buildNextVersionState, ri as resolveProfileWorkspaceRuntime, rn as buildCommandAuthenticationPromptMessage, ro as formatInlineOpenMeldCliCommands, rr as createProfileCreateGuideError, rt as colorizeAgentLabel, s as runSpaceJoin, sa as fetchLatestPackageInfo, si as resolveConfiguredProfileWorkspacePath, sn as runAuthLogout, so as formatOpenMeldCliTextBlock, sr as createSpaceAliasTargetGuideError, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as buildInstallSelfJsonPayload, ti as syncProfileWorkspaceState, tn as readRecentDaemonDispatchJournalEvents, to as resolveAgentActivityDispatcherCommand, tr as createDoctorFailedGuideError, tt as formatTransportModeDisplay, u as runSpacePassword, ua as resolveDaemonRuntimeContractCompatibility, ui as validateCustomProfileWorkspacePath, un as buildAuthStatusRows, uo as resolveUserFacingCliEntryCommand, ur as createSpaceMenuGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as parseCliViewMode, vi as notifyDaemonRouteCatalogChanged, vn as formatServiceParticipationReadinessLabel, vo as normalizeSharedSessionTitle, vr as createStartAuthenticationGuideError, vt as runDaemonReinstall, w as buildFormalDispatchResultReadPayload, wa as createOpenMeldAgentProfile, wi as listAgentControllerPermissionModeOptions, wn as submitRuntimeAgentControllerReports, wo as bindProject, wr as registerSkillsTargetSelectionOptions, wt as runDaemonUninstall, x as loadSpaceIdentityDirectoryOrNull, xa as isSelectedOpenMeldProfileRequiredError, xi as createAgentExecutionStatusDisplayRows, xn as computeRetryDelayMs, xo as removeProjectInbox, xr as getCommandHintsFromContract, xt as runDaemonStatusFlow, y as emitHumanReadSignalsTextProjection, ya as resolveRuntimeContext, yi as resolveLocalRegistryAgentIdFromAgentControllerRef, yn as resolveServiceParticipationReadiness, yo as readCodexSessionTitles, yr as createUpgradeConfirmationGuideError, yt as runDaemonRunAfterEntryChecks, z as resolveHumanControllerDisplayName, za as resolveAuthenticationGuidanceFromError, zi as resolveServiceUpdateUrgency, zn as formatRemovedCcRelationMessage, zo as errLine, zr as readOpenMeldToolsUpdateContextFromEnv, zt as toStructuredGatewayFailure } from "./command-JlIqpPyF.js";
5
- import { $ as ownerComputerDiagnosticsSchema, $t as agentActivityInventorySessionStatusSchema, B as sleep, Bt as agentActivityProviderSchema, Ct as authProfileKindSchema, D as toStructuredApiClientFailure, F as OPENMELD_HEADER_PROFILE_ID, G as projectSpaceDispatchTraceFinalVisibleOutcome, Ht as agentActivitySnapshotQuerySchema, J as spaceDispatchTraceDispatchStatusSchema, K as resolveSpaceDispatchTraceRootCause, Ot as submitFeedbackIssueRequestSchema, Qt as agentActivityInventorySessionOriginSchema, Vt as agentActivitySessionStatusSchema, W as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, X as observabilityWakeTraceSelectorSchema, Y as spaceDispatchTraceResponseSchema, Z as projectObservabilityWakeCorrelation, _ as createOrganizationSkillsApi, b as createProjectsApi, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, dn as START_BOUNDED_ID_SCHEMA, en as agentActivitySessionInventoryQuerySchema, et as projectOwnerComputerLocalRuntimes, f as createFeedbackApi, fn as START_BOUNDED_VERSION_SCHEMA, g as createOrganizationApi, gn as localAgentCatalogSchema, gt as organizationSkillBundleSchema, hn as startReplyReadinessSummarySchema, l as createCenterAgentApi, mn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, nn as localAgentSessionProviderSchema, nt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, pn as START_ISO_DATE_TIME_SCHEMA, q as spaceDispatchTraceAttemptStatusSchema, rt as agentProfileCreationConfigurationSchema, s as createAgentActivityApi, tt as summarizeComputerFileAccessPolicy, u as createComputerFileAccessApi, v as createPrepareReadinessApi, wt as authProfileManagedRoleSchema, x as createRoutinesApi, yt as stringifyOrganizationSkillBundleCanonicalJson } from "./dist-BAzyHNIX.js";
6
- import { Bt as resolveSpaceFileMimeType, Er as openMeldRuntimeProfileIdSchema, Fr as trimmedStringFromUnknown, Lt as isSpaceFileTextEditable, Mt as centerAgentInteractionSourceSchema, Nr as nonEmptyTrimmedStringFromUnknown, bn as messageEnvelopeSchema, cn as spaceContractSchema, er as clientMessageIdSchema, jt as spaceStatusSchema, nn as dispatchExecutionSchema, rn as spaceThreadContextSchema, sn as spaceContractFieldsSchema, xr as openMeldProfileIdSchema } from "./runtime-transport-BVqEGkly.js";
4
+ import { $ as runAgentsRepair, $a as defaultManagedIntegrationPaths, $i as readDaemonServiceJobCrashExitCode, $n as formatDaemonServiceMissingRecommendation, $r as resolveOpenClawLocalDiagnosticsValue, $t as readBundledOpenMeldCliSkillDocumentByPath, A as assertFullSignalIdArgument, Aa as resolveOpenMeldProfile, Ai as resolveNativeAgentControllerPermissionModeForController, An as upsertSpaceConfig, Ao as runIfAgentActivityBindingGenerationIsCurrent, Ar as DualViewGuideError, At as shouldEmitAgentOverview, B as persistAgentTransportSelection, Ba as resolveAuthenticationGuidanceFromError, Bi as assessServerRequiredVersion, Bn as promptSearchMultiselect, Bo as errLine, Br as runPendingDaemonServiceUpdate, Bt as parseJsonResponse, C as toSpaceMetaUpsertInput, Ca as requireOpenMeldProfile, Ci as getAgentControllerPermissionModeFieldLabel, Cn as submitRuntimeAgentControllerReport, Co as readAgentActivityOutboxHealth, Cr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, Ct as runDaemonTeardownStrict, D as formatHumanReadTargetList, Da as deleteOpenMeldProfile, Di as resolveAgentExecutionStatus, Dn as resolveLocalAgentControllerLaunchability, Do as listProjectConnectionsWithStatus, Dr as registerAuthLoginRequestOptions, Dt as reconcileCliVersionView, E as buildHumanReplyContextSummary, Ea as createOpenMeldHumanProfile, Ei as resolveAgentControllerPermissionModeForController, En as resolveLocalAgentControllerBlockerReasonCodes, Eo as listProjectBindings, Er as registerDaemonControlTargetOptions, Et as buildProfileWorkspaceRows, F as emitSpaceAgentOverview, Fa as setSelectedOpenMeldProfileId, Fi as buildDaemonServiceTargetSpec, Fn as buildSignalMessageReadProjection, Fo as readControllerTaskLifecycleOutboxHealth, Fr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Ft as fetchSpaceMeta, G as runAgentsCustomList, Ga as validateLocalProjectConnectionPath, Gi as resetCurrentCommandCheckState, Gn as isCliUpdateCheckApplicable, Go as cliJsonSkillsListEnvelopeSchema, Gr as resolveServiceReadinessFromServiceStatus, Gt as runDaemonStartDecisionPrompt, H as runAgents, Ha as getProfileDefaultView, Hi as finishCurrentCommandCheckScope, Hn as isReturnKeypress, Ho as outLine, Hr as ensureDaemonRuntimePaths, Ht as writeInstalledLocalComponentsSnapshot, I as emitSpaceCliAgentOverview, Ia as buildAgentAuthenticationGuide, Ii as resolveDaemonServiceAlignmentDecision, In as buildSpaceRoundReadProjection, Io as renderInfoCard, Ir as areAllowedActionsEquivalent, It as updateSpaceMeta, J as runAgentsDetect, Ja as isAgentActivityRouteRegistered, Ji as resolveVersionChangeDirection, Jn as readDispatchSpaceActionContextFromEnv, Jo as getOrganizationJoinLinkResponseSchema, Jr as formatAgentReplyReadinessLabel, Jt as runSkillsEnsure, K as runAgentsCustomRemove, Ka as LocalDaemonControlPlaneClientError, Ki as startCurrentCommandCheckScope, Kn as assertDispatchOwnedRuntimePublicWriteAllowed, Ko as cliJsonSkillsLoadEnvelopeSchema, Kr as resolveDaemonServiceFreshnessWarning, Kt as collectSkillsReadinessSnapshot, L as prepareLocalAgentReadiness, La as buildHumanAuthenticationCard, Li as classifyDaemonServiceRunStartability, Ln as buildUpdatesReplyWorkflowProjection, Lo as renderTextInfoCard, Lr as buildAgentFacingPublicationModeGuideLines, Lt as readGatewayJsonResponse, M as prepareAuthenticatedSpaceCommandContext, Ma as alignSelectedOpenMeldProfileStorage, Mi as buildDaemonRouteObservationPresentation$1, Mn as buildDispatchResultMessageReadProjection, Mo as unbindProject, Mr as buildDualViewGuideMessage, Mt as readDaemonStartFailureLogTailLines, N as resolveOpenMeldProfileForSpaceCommand, Na as clearSelectedOpenMeldProfileId, Ni as buildOnboardingPlan, Nn as buildDispatchResultReplyWorkflowProjection, No as canonicalizeLocalProjectPath, Nr as formatAgentOverviewPayload, Nt as fetchSpaceUpdates, O as parseEnvelope, Oa as listOpenMeldProfiles, Oi as resolveAgentProfileEditCapabilities, On as resolveLocalAgentControllerReportDecision, Oo as migrateProjectBindingStore, Or as registerBuiltinAgentSelectionOptions, Ot as emitDaemonAgentOverview, P as resolveSpaceAccessLabel, Pa as getSelectedOpenMeldProfileId, Pi as getSetupFlowCopy, Pn as buildSignalIndex, Po as enqueueControllerTaskLifecycleEventWhileLocked, Pr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Pt as createCliSpaceApi, Q as runAgentsManage, Qi as isDaemonServiceJobNeverSpawned, Qn as formatDaemonServiceDowngradeBlockedRecommendation, Qr as resolveGatewayChainReadiness, Qt as ensureLocalSkills, R as buildReplyReadinessGuidance, Ra as createAuthenticationError, Ri as classifyDaemonServiceWakeability, Rn as createSpaceMemberIdentityIndex, Ro as sanitizeTerminalDisplayText, Rr as canonicalizeAllowedActions, Rt as readGatewayTextResponse, S as loadSpaceSignalIndexOrNull, Sa as isSelectedOpenMeldProfileRequiredError, Si as getAgentControllerPermissionModeDisplayMetadata, Sn as submitProfileRuntimeAgentControllerReport, So as removeProjectInbox, Sr as registerSpaceMemberSelectionOptions, St as runDaemonStop, T as buildFormalSignalReadPayload, Ta as createOpenMeldAgentProfile, Ti as parseAgentControllerRef, Tn as collectLocalAgentControllerInventory, To as bindProject, Tr as getCliVersionInfo, Tt as buildProfileWorkspacePresentation, U as runAgentsConfig, Ua as setProfileDefaultView, Ui as getCurrentCommandCheckState, Un as runInteractivePrompt, Uo as cliBinaryDeltaPatchSchema, Ur as resolveDaemonDeviceId, Ut as resolveDaemonServiceParticipationStatus, V as resolveAgentProfileSetup, Va as resolveAuthenticationGuidanceFromMessage, Vi as resolveOpenMeldEnvironmentTarget, Vn as promptSearchSelect, Vo as outJsonLine, Vr as scheduleDaemonServiceUpdate, Vt as resolveLocalComponentsStatus, W as runAgentsCustomAdd, Wa as LocalProjectConnectionError, Wi as isCurrentCommandCheckScopeActive, Wn as assessCliUpdate, Wo as cliJsonOutputEnvelopeSchema, Wr as formatDaemonFailureContextText, Wt as runDaemonServiceParticipationGate, X as runAgentsEnable, Xa as resolveAgentActivityRouteForPath, Xi as readCurrentObservedDaemonRuntimeStatus, Xn as formatElapsedTime, Xo as revokeOrganizationJoinLinkResponseSchema, Xr as formatHumanReplyReadinessReason$1, Xt as runSkillsUninstall, Y as runAgentsDisable, Ya as registerAgentActivityRoute, Yi as readCurrentDaemonRuntimeContext, Yn as writeDispatchSpaceActionRecord, Yo as organizationJoinLinkErrorResponseSchema, Yr as formatDeviceReplyReadinessLabel, Yt as runSkillsInstall, Z as runAgentsList, Za as unregisterAgentActivityRoute, Zi as getDaemonSystemServiceLogPath, Zn as resolveElapsedTimeMs, Zo as compareAgentControllerRefsForDisplay, Zr as mapAgentReplyReadinessToLegacyAutoReply, Zt as runSkillsUpdate, _ as runSpaceWriteWithPasswordRetry, _a as createPresenter, _i as listBuiltinAgentsRegistryEntries, _n as ensureAgentProfileRuntimeBinding, _o as buildAgentActivityEvent, _r as createStartAgentIdentityGuideError, _t as runDaemonInterrupt, a as runSpaceDelete, aa as ensureVersionStateReady, ai as normalizeCustomProfileWorkspacePath, an as evaluateCommandAuthentication, ao as formatOpenMeldCliCommand, ar as createResetConfirmationGuideError, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as resolveRuntimeContext, bi as buildAgentControllerRef, bn as assessActionParticipationCandidate, bo as readCodexSessionTitles, br as getCommandEntryContract, bt as runDaemonSnapshot, c as runSpaceLeave, ca as readVersionState, ci as setCustomProfileWorkspace, cn as runAuthMenu, co as formatOpenMeldCliTextBlock, cr as createSpaceContractSetGuideError, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as toStartBackgroundHelperExecutionCompatibility, di as describeProfileWorkspacePathValidationFailure, dn as buildAuthStatusSnapshot, do as resolveUserFacingCliEntryCommand, dr as createSpacePublicationSetGuideError, dt as resolveSpaceSendText, ea as resolveDaemonServiceManager, ei as readRecentDaemonLifecycleEvents, en as readRuntimeReportingHealthState, eo as installAgentActivityIntegrations, er as canUseInteractivePrompts, et as runAgentsShow, f as runSpaceSend, fa as resolveCurrentDaemonExpectedVersion, fi as syncDeviceRuntimeStateProjection, fn as formatActiveOrganizationLabel, fo as syncLocalAgentActivity, fr as createSpaceRemoveMembersGuideError, ft as runDaemon, g as runSpaceReadWithPasswordRetry, ga as renderHumanTextErrorCard, gi as reconcileNewRunnableBuiltinAgentsForSetup, gn as promptTextEntry, go as removeAgentActivityContextCache, gr as createSpaceUpdatesGuideError, gt as runDaemonInstall, h as uploadPreparedSpaceFiles, ha as renderHumanErrorCard, hi as listAgentTargetStates, hn as resolveCreateProfileName, ho as readAgentActivityContextForPath, hr as createSpaceTargetGuideError, ht as runDaemonCancel, i as runSpaceCreate, ia as compareSemver, ii as ensureOpenMeldManagedProfileWorkspace, in as ensureCommandAuthenticationOrCancel, io as formatInlineOpenMeldCliCommands, ir as createProfileMenuGuideError, it as colorizeDisplayProfileLabel, j as assertValidSpaceIdTarget, ja as updateOpenMeldProfile, jn as assertNoRemovedCcSpaceAddressingSyntax, jo as setDefaultProjectConnection, jr as formatDualViewGuideForDisplay, jt as runDaemonStartupPreflight, k as isSpaceCommandOutputHandledError, ka as primeOpenMeldProfilesSessionCache, ki as resolveEvidenceSyncHealth, kn as inspectSpaceCacheFile, ko as removeProjectConnection, kr as buildAgentOverviewFromContract, kt as createDelayedSpinner, l as runSpaceList, la as writeVersionState, li as setOpenMeldManagedProfileWorkspace, ln as runAuthStatus, lo as formatProfileAwareOpenMeldCliCommands, lr as createSpaceLeaveGuideError, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as buildHumanErrorCopy, mi as resolveAgentProfilePrimaryAgentControllerReport, mn as resolveCreateProfileKind, mo as upsertDaemonServiceContract, mr as createSpaceSubcommandTargetGuideError, mt as runDaemonBackgroundStartForDecision, n as promptAndConfirmSpacePassword, na as performManagedInstall, ni as createModelCatalogReadSession, nn as connectWebSocket, no as resolveAgentActivityDispatcherCommand, nr as createProfileActionGuideError, nt as postLocalParticipationMutationReconcile, o as runSpaceHistory, oa as fetchLatestCliBinaryRelease, oi as readProfileWorkspaceConfig, on as runAuthLogin, oo as formatOpenMeldCliCommands, or as createSpaceAddMembersGuideError, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as OPENMELD_VERSION, pi as createPrimaryBindingReadSession, pn as createProfileByKind, po as readDaemonServiceContract, pr as createSpaceResultGuideError, pt as runDaemonAutostart, q as runAgentsCustomUpdate, qa as requestLocalAgentActivitySync, qi as inspectDaemonServiceInventory, qn as readDispatchOwnedRuntimeGuard, qo as cliJsonSkillsShowEnvelopeSchema, qr as resolveCurrentReplyReadinessSnapshot, qt as runSkillsCheck$1, r as runSpaceAddMembers, ra as buildNextVersionState, ri as resolveProfileWorkspaceRuntime, rn as buildCommandAuthenticationPromptMessage, ro as uninstallAgentActivityIntegrations, rr as createProfileCreateGuideError, rt as colorizeAgentLabel, s as runSpaceJoin, sa as fetchLatestPackageInfo, si as resolveConfiguredProfileWorkspacePath, sn as runAuthLogout, so as formatOpenMeldCliLine, sr as createSpaceAliasTargetGuideError, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as buildInstallSelfJsonPayload, ti as syncProfileWorkspaceState, tn as readRecentDaemonDispatchJournalEvents, to as readAgentActivityIntegrationStatus, tr as createDoctorFailedGuideError, tt as formatTransportModeDisplay, u as runSpacePassword, ua as resolveDaemonRuntimeContractCompatibility, ui as validateCustomProfileWorkspacePath, un as buildAuthStatusRows, uo as resolveSetupFollowUpCliEntryCommand, ur as createSpaceMenuGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as formatMessage, vi as notifyDaemonRouteCatalogChanged, vn as formatServiceParticipationReadinessLabel, vo as resolveObservedAgentActivityBinding, vr as createStartAuthenticationGuideError, vt as runDaemonReinstall, w as buildFormalDispatchResultReadPayload, wa as resolveOpenMeldProfileOrNull, wi as listAgentControllerPermissionModeOptions, wn as submitRuntimeAgentControllerReports, wo as removeProjectOutbox, wr as registerSkillsTargetSelectionOptions, wt as runDaemonUninstall, x as loadSpaceIdentityDirectoryOrNull, xa as resolveViewProfileKey, xi as createAgentExecutionStatusDisplayRows, xn as computeRetryDelayMs, xo as enqueueAgentActivityHookEvent, xr as getCommandHintsFromContract, xt as runDaemonStatusFlow, y as emitHumanReadSignalsTextProjection, ya as parseCliViewMode, yi as resolveLocalRegistryAgentIdFromAgentControllerRef, yn as resolveServiceParticipationReadiness, yo as normalizeSharedSessionTitle, yr as createUpgradeConfirmationGuideError, yt as runDaemonRunAfterEntryChecks, z as resolveHumanControllerDisplayName, za as resolveAuthenticationGuidance, zi as resolveServiceUpdateUrgency, zn as formatRemovedCcRelationMessage, zo as emitCliJsonEnvelope, zr as readOpenMeldToolsUpdateContextFromEnv, zt as toStructuredGatewayFailure } from "./command-D_BRRxBQ.js";
5
+ import { $ as ownerComputerDiagnosticsSchema, $t as agentActivityInventorySessionStatusSchema, B as sleep, Bt as agentActivityProviderSchema, Ct as authProfileKindSchema, D as toStructuredApiClientFailure, F as OPENMELD_HEADER_PROFILE_ID, G as projectSpaceDispatchTraceFinalVisibleOutcome, Ht as agentActivitySnapshotQuerySchema, J as spaceDispatchTraceDispatchStatusSchema, K as resolveSpaceDispatchTraceRootCause, Ot as submitFeedbackIssueRequestSchema, Qt as agentActivityInventorySessionOriginSchema, Vt as agentActivitySessionStatusSchema, W as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, X as observabilityWakeTraceSelectorSchema, Y as spaceDispatchTraceResponseSchema, Z as projectObservabilityWakeCorrelation, _ as createOrganizationSkillsApi, b as createProjectsApi, c as createAgentProfileBindingApi, d as createCurrentDeviceApi, dn as START_BOUNDED_ID_SCHEMA, en as agentActivitySessionInventoryQuerySchema, et as projectOwnerComputerLocalRuntimes, f as createFeedbackApi, fn as START_BOUNDED_VERSION_SCHEMA, g as createOrganizationApi, gn as localAgentCatalogSchema, gt as organizationSkillBundleSchema, hn as startReplyReadinessSummarySchema, l as createCenterAgentApi, mn as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, nn as localAgentSessionProviderSchema, nt as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, pn as START_ISO_DATE_TIME_SCHEMA, q as spaceDispatchTraceAttemptStatusSchema, rt as agentProfileCreationConfigurationSchema, s as createAgentActivityApi, tt as summarizeComputerFileAccessPolicy, u as createComputerFileAccessApi, v as createPrepareReadinessApi, wt as authProfileManagedRoleSchema, x as createRoutinesApi, yt as stringifyOrganizationSkillBundleCanonicalJson } from "./dist-DYE9Q3T4.js";
6
+ import { $n as array, Bt as resolveSpaceFileMimeType, Cr as clientMessageIdSchema, Lt as isSpaceFileTextEditable, Mt as centerAgentInteractionSourceSchema, Wr as openMeldProfileIdSchema, Yr as openMeldRuntimeProfileIdSchema, ar as int, bn as messageEnvelopeSchema, cn as spaceContractSchema, dr as object, er as boolean, hr as string, ii as trimmedStringFromUnknown, ir as enumFactory, jt as spaceStatusSchema, lr as nullFactory, mr as strictObject, ni as nonEmptyTrimmedStringFromUnknown, nn as dispatchExecutionSchema, nr as discriminatedUnion, or as iso, pr as record, rn as spaceThreadContextSchema, sn as spaceContractFieldsSchema, sr as literal, vr as union, yr as unknown } from "./runtime-transport-CWWB2Ily.js";
7
7
  import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
8
8
  import { O as getDaemonStatus } from "./daemon-runtime-lease-Cath1v3w.js";
9
- import { a as getCurrentAuthOwnerUserId, c as updateAuthSessionActiveOrganization, d as resolveOpenMeldDistribution, i as getAuthSessionState, l as runMacOsNativeKeychainHelperIfRequested, n as clearAuthSession, o as normalizeStoredActiveOrganization, r as getAuthSessionMetadata, u as isBinaryDistribution } from "./auth-session-6twfCXM2.js";
10
- import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth } from "./api-client-foundation-CwfGZiC-.js";
9
+ import { a as getCurrentAuthOwnerUserId, c as updateAuthSessionActiveOrganization, d as resolveOpenMeldDistribution, i as getAuthSessionState, l as runMacOsNativeKeychainHelperIfRequested, n as clearAuthSession, o as normalizeStoredActiveOrganization, r as getAuthSessionMetadata, u as isBinaryDistribution } from "./auth-session-qk94UQqs.js";
10
+ import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as createCliApiClientFoundation, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth } from "./api-client-foundation-w4Oa06t4.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";
@@ -441,15 +441,15 @@ z$1.strictObject({
441
441
  const getSpaceDispatchResultResponseSchema = dispatchResultSchema;
442
442
  //#endregion
443
443
  //#region ../../packages/schemas/dist/schemas/prepare/session.js
444
- const PREPARE_BOUNDED_ID_SCHEMA = z$1.string().trim().min(1).max(256);
445
- const PREPARE_REASON_CODE_SCHEMA = z$1.string().trim().min(1).max(256);
446
- const PREPARE_USER_MESSAGE_SCHEMA = z$1.string().trim().min(1).max(512);
447
- const PREPARE_LONG_TEXT_SCHEMA = z$1.string().trim().min(1).max(4096);
444
+ const PREPARE_BOUNDED_ID_SCHEMA = string().trim().min(1).max(256);
445
+ const PREPARE_REASON_CODE_SCHEMA = string().trim().min(1).max(256);
446
+ const PREPARE_USER_MESSAGE_SCHEMA = string().trim().min(1).max(512);
447
+ const PREPARE_LONG_TEXT_SCHEMA = string().trim().min(1).max(4096);
448
448
  const PREPARE_STEP_DIAGNOSTICS_MAX_CHARS = 16384;
449
- const PREPARE_STEP_DIAGNOSTICS_SCHEMA = z$1.string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_MAX_CHARS);
450
- const PREPARE_ISO_DATE_TIME_SCHEMA = z$1.iso.datetime({ offset: true }).max(64);
451
- const PREPARE_NULLABLE_DATE_TIME_SCHEMA = z$1.union([PREPARE_ISO_DATE_TIME_SCHEMA, z$1.null()]);
452
- const PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA = z$1.string().trim().min(1).max(256);
449
+ const PREPARE_STEP_DIAGNOSTICS_SCHEMA = string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_MAX_CHARS);
450
+ const PREPARE_ISO_DATE_TIME_SCHEMA = iso.datetime({ offset: true }).max(64);
451
+ const PREPARE_NULLABLE_DATE_TIME_SCHEMA = union([PREPARE_ISO_DATE_TIME_SCHEMA, nullFactory()]);
452
+ const PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA = string().trim().min(1).max(256);
453
453
  const PREPARE_STEP_DIAGNOSTICS_LOG_LINE_MAX_CHARS = 321;
454
454
  const PREPARE_STEP_DIAGNOSTICS_LIFECYCLE_ENTRY_MAX_CHARS = 700;
455
455
  const PREPARE_STEP_DIAGNOSTICS_COLLECTION_ERROR_MAX_CHARS = 64;
@@ -457,23 +457,23 @@ const PREPARE_STEP_DIAGNOSTICS_CLI_VERSION_MAX_CHARS = 64;
457
457
  const PREPARE_STEP_DIAGNOSTICS_OS_PLATFORM_MAX_CHARS = 64;
458
458
  const PREPARE_STEP_DIAGNOSTICS_OS_RELEASE_MAX_CHARS = 128;
459
459
  const PREPARE_STEP_DIAGNOSTICS_SERVICE_JOB_TEXT_MAX_CHARS = 128;
460
- const prepareStepDiagnosticsServiceJobSchema = z$1.object({
461
- controller: z$1.enum([
460
+ const prepareStepDiagnosticsServiceJobSchema = object({
461
+ controller: enumFactory([
462
462
  "launchd",
463
463
  "systemd",
464
464
  "windows-service",
465
465
  "legacy-detached",
466
466
  "unknown"
467
467
  ]),
468
- loaded: z$1.boolean(),
469
- runs: z$1.union([z$1.int().nonnegative(), z$1.null()]),
470
- state: z$1.union([z$1.string().trim().max(PREPARE_STEP_DIAGNOSTICS_SERVICE_JOB_TEXT_MAX_CHARS), z$1.null()]),
471
- lastExitCodeText: z$1.union([z$1.string().trim().max(PREPARE_STEP_DIAGNOSTICS_SERVICE_JOB_TEXT_MAX_CHARS), z$1.null()]),
472
- lastExitCode: z$1.union([z$1.int(), z$1.null()]),
473
- pendedNondemandSpawn: z$1.union([z$1.string().trim().max(PREPARE_STEP_DIAGNOSTICS_SERVICE_JOB_TEXT_MAX_CHARS), z$1.null()]),
474
- keepaliveRunAtLoad: z$1.boolean()
468
+ loaded: boolean(),
469
+ runs: union([int().nonnegative(), nullFactory()]),
470
+ state: union([string().trim().max(PREPARE_STEP_DIAGNOSTICS_SERVICE_JOB_TEXT_MAX_CHARS), nullFactory()]),
471
+ lastExitCodeText: union([string().trim().max(PREPARE_STEP_DIAGNOSTICS_SERVICE_JOB_TEXT_MAX_CHARS), nullFactory()]),
472
+ lastExitCode: union([int(), nullFactory()]),
473
+ pendedNondemandSpawn: union([string().trim().max(PREPARE_STEP_DIAGNOSTICS_SERVICE_JOB_TEXT_MAX_CHARS), nullFactory()]),
474
+ keepaliveRunAtLoad: boolean()
475
475
  });
476
- const prepareStepDiagnosticsLifecycleEventTypeSchema = z$1.enum([
476
+ const prepareStepDiagnosticsLifecycleEventTypeSchema = enumFactory([
477
477
  "connection.state",
478
478
  "daemon.crash",
479
479
  "lifecycle.command.begin",
@@ -489,42 +489,42 @@ const prepareStepDiagnosticsLifecycleEventTypeSchema = z$1.enum([
489
489
  "process_stop.action",
490
490
  "service_contract.write"
491
491
  ]);
492
- const prepareStepDiagnosticsLifecycleJournalEntrySchema = z$1.object({
493
- schema: z$1.literal("openmeld-daemon-lifecycle-event-v1"),
494
- v: z$1.literal(1),
492
+ const prepareStepDiagnosticsLifecycleJournalEntrySchema = object({
493
+ schema: literal("openmeld-daemon-lifecycle-event-v1"),
494
+ v: literal(1),
495
495
  type: prepareStepDiagnosticsLifecycleEventTypeSchema,
496
496
  timestamp: PREPARE_ISO_DATE_TIME_SCHEMA,
497
- lane: z$1.string().trim().min(1).max(64),
498
- intent: z$1.string().trim().min(1).max(64),
499
- command: z$1.string().trim().min(1).max(256),
500
- pid: z$1.int().nonnegative(),
501
- sessionId: z$1.union([PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA, z$1.null()]),
502
- result: z$1.string().trim().min(1).max(64),
503
- metadata: z$1.record(z$1.string().trim().min(1).max(64), z$1.unknown()).optional()
497
+ lane: string().trim().min(1).max(64),
498
+ intent: string().trim().min(1).max(64),
499
+ command: string().trim().min(1).max(256),
500
+ pid: int().nonnegative(),
501
+ sessionId: union([PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA, nullFactory()]),
502
+ result: string().trim().min(1).max(64),
503
+ metadata: record(string().trim().min(1).max(64), unknown()).optional()
504
504
  }).superRefine((value, ctx) => {
505
505
  if (JSON.stringify(value).length > PREPARE_STEP_DIAGNOSTICS_LIFECYCLE_ENTRY_MAX_CHARS) ctx.addIssue({
506
506
  code: "custom",
507
507
  message: "lifecycle journal entry exceeds diagnostics size budget"
508
508
  });
509
509
  });
510
- const prepareStepDiagnosticsBundleSchema = z$1.object({
511
- bundleVersion: z$1.int().positive(),
510
+ const prepareStepDiagnosticsBundleSchema = object({
511
+ bundleVersion: int().positive(),
512
512
  collectedAt: PREPARE_ISO_DATE_TIME_SCHEMA,
513
513
  supportCode: PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA,
514
514
  stepId: PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA,
515
515
  deviceId: PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA.optional(),
516
- cliVersion: z$1.string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_CLI_VERSION_MAX_CHARS),
517
- os: z$1.object({
518
- platform: z$1.string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_OS_PLATFORM_MAX_CHARS),
519
- release: z$1.string().trim().max(PREPARE_STEP_DIAGNOSTICS_OS_RELEASE_MAX_CHARS)
516
+ cliVersion: string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_CLI_VERSION_MAX_CHARS),
517
+ os: object({
518
+ platform: string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_OS_PLATFORM_MAX_CHARS),
519
+ release: string().trim().max(PREPARE_STEP_DIAGNOSTICS_OS_RELEASE_MAX_CHARS)
520
520
  }),
521
- inventoryAnomalies: z$1.union([z$1.array(PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA).max(32), z$1.null()]),
522
- serviceJob: z$1.union([prepareStepDiagnosticsServiceJobSchema, z$1.null()]),
523
- lifecycleJournalTail: z$1.union([z$1.array(prepareStepDiagnosticsLifecycleJournalEntrySchema).max(10), z$1.null()]),
524
- serviceLogTail: z$1.union([z$1.array(z$1.string().trim().max(PREPARE_STEP_DIAGNOSTICS_LOG_LINE_MAX_CHARS)).max(30), z$1.null()]),
525
- serviceLogNote: z$1.enum(["file_missing", "file_empty"]).optional(),
526
- collectionErrors: z$1.array(z$1.string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_COLLECTION_ERROR_MAX_CHARS)).max(8),
527
- truncated: z$1.boolean()
521
+ inventoryAnomalies: union([array(PREPARE_STEP_DIAGNOSTICS_SHORT_TEXT_SCHEMA).max(32), nullFactory()]),
522
+ serviceJob: union([prepareStepDiagnosticsServiceJobSchema, nullFactory()]),
523
+ lifecycleJournalTail: union([array(prepareStepDiagnosticsLifecycleJournalEntrySchema).max(10), nullFactory()]),
524
+ serviceLogTail: union([array(string().trim().max(PREPARE_STEP_DIAGNOSTICS_LOG_LINE_MAX_CHARS)).max(30), nullFactory()]),
525
+ serviceLogNote: enumFactory(["file_missing", "file_empty"]).optional(),
526
+ collectionErrors: array(string().trim().min(1).max(PREPARE_STEP_DIAGNOSTICS_COLLECTION_ERROR_MAX_CHARS)).max(8),
527
+ truncated: boolean()
528
528
  });
529
529
  const PREPARE_STEP_DIAGNOSTICS_REDACTION_REPLACEMENTS = [
530
530
  [/\b(authorization\s*:\s*(?:bearer|basic)\s+)[^\s,;]+/gi, "$1[redacted]"],
@@ -548,7 +548,7 @@ function redactPrepareStepDiagnosticsValue(value) {
548
548
  function redactPrepareStepDiagnosticsBundle(bundle) {
549
549
  return redactPrepareStepDiagnosticsValue(bundle);
550
550
  }
551
- const PREPARE_URL_SCHEMA = z$1.string().trim().min(1).max(2048).refine((value) => {
551
+ const PREPARE_URL_SCHEMA = string().trim().min(1).max(2048).refine((value) => {
552
552
  try {
553
553
  new URL(value);
554
554
  return true;
@@ -556,15 +556,15 @@ const PREPARE_URL_SCHEMA = z$1.string().trim().min(1).max(2048).refine((value) =
556
556
  return false;
557
557
  }
558
558
  }, { message: "expected a valid URL" });
559
- const prepareOpaqueTokenSchema = z$1.string().trim().min(1).max(2048);
560
- const prepareSessionLifecycleStatusSchema = z$1.enum([
559
+ const prepareOpaqueTokenSchema = string().trim().min(1).max(2048);
560
+ const prepareSessionLifecycleStatusSchema = enumFactory([
561
561
  "active",
562
562
  "completed",
563
563
  "failed",
564
564
  "cancelled",
565
565
  "expired"
566
566
  ]);
567
- const prepareSessionPhaseSchema = z$1.enum([
567
+ const prepareSessionPhaseSchema = enumFactory([
568
568
  "waiting_for_terminal",
569
569
  "terminal_connected",
570
570
  "checking_computer",
@@ -579,7 +579,7 @@ const prepareSessionPhaseSchema = z$1.enum([
579
579
  "failed",
580
580
  "expired"
581
581
  ]);
582
- const prepareStepIdSchema = z$1.enum([
582
+ const prepareStepIdSchema = enumFactory([
583
583
  "computer",
584
584
  "connect_terminal",
585
585
  "choose_local_agents",
@@ -589,20 +589,19 @@ const prepareStepIdSchema = z$1.enum([
589
589
  "verify_setup",
590
590
  "ready"
591
591
  ]);
592
- const prepareStepStateSchema = z$1.enum([
593
- "pending",
594
- "active",
595
- "waiting_for_user",
596
- "complete",
597
- "blocked",
598
- "terminal_disconnected"
599
- ]);
600
- const prepareStepSchema = z$1.strictObject({
592
+ const prepareStepSchema = strictObject({
601
593
  id: prepareStepIdSchema,
602
- state: prepareStepStateSchema,
594
+ state: enumFactory([
595
+ "pending",
596
+ "active",
597
+ "waiting_for_user",
598
+ "complete",
599
+ "blocked",
600
+ "terminal_disconnected"
601
+ ]),
603
602
  title: PREPARE_USER_MESSAGE_SCHEMA,
604
- summary: z$1.union([PREPARE_USER_MESSAGE_SCHEMA, z$1.null()]),
605
- blockerReasonCode: z$1.union([PREPARE_REASON_CODE_SCHEMA, z$1.null()]),
603
+ summary: union([PREPARE_USER_MESSAGE_SCHEMA, nullFactory()]),
604
+ blockerReasonCode: union([PREPARE_REASON_CODE_SCHEMA, nullFactory()]),
606
605
  startedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,
607
606
  completedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,
608
607
  updatedAt: PREPARE_ISO_DATE_TIME_SCHEMA
@@ -623,20 +622,19 @@ const prepareStepSchema = z$1.strictObject({
623
622
  path: ["completedAt"]
624
623
  });
625
624
  });
626
- const prepareTerminalConnectionStatusSchema = z$1.enum([
627
- "never_connected",
628
- "connected",
629
- "disconnected",
630
- "replaced"
631
- ]);
632
- const prepareTerminalConnectionSchema = z$1.strictObject({
633
- status: prepareTerminalConnectionStatusSchema,
634
- connectionId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]),
635
- connectionEpoch: z$1.union([z$1.int().positive(), z$1.null()]),
625
+ const prepareTerminalConnectionSchema = strictObject({
626
+ status: enumFactory([
627
+ "never_connected",
628
+ "connected",
629
+ "disconnected",
630
+ "replaced"
631
+ ]),
632
+ connectionId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]),
633
+ connectionEpoch: union([int().positive(), nullFactory()]),
636
634
  connectedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,
637
635
  lastSeenAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,
638
636
  disconnectedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,
639
- disconnectReason: z$1.union([PREPARE_REASON_CODE_SCHEMA, z$1.null()])
637
+ disconnectReason: union([PREPARE_REASON_CODE_SCHEMA, nullFactory()])
640
638
  }).superRefine((value, ctx) => {
641
639
  if (value.status === "connected") {
642
640
  if (value.connectionId === null) ctx.addIssue({
@@ -656,36 +654,34 @@ const prepareTerminalConnectionSchema = z$1.strictObject({
656
654
  });
657
655
  }
658
656
  });
659
- const prepareBlockerSeveritySchema = z$1.enum(["user_action_required", "system_blocked"]);
660
- const prepareBlockerRetryActionSchema = z$1.enum([
661
- "run_prepare_command",
662
- "copy_fresh_command",
663
- "choose_agents",
664
- "refresh",
665
- "contact_support"
666
- ]);
667
- const prepareBlockerSchema = z$1.strictObject({
657
+ const prepareBlockerSchema = strictObject({
668
658
  blockerId: PREPARE_BOUNDED_ID_SCHEMA,
669
659
  stepId: prepareStepIdSchema,
670
660
  reasonCode: PREPARE_REASON_CODE_SCHEMA,
671
661
  message: PREPARE_USER_MESSAGE_SCHEMA,
672
- severity: prepareBlockerSeveritySchema,
673
- retryAction: prepareBlockerRetryActionSchema,
662
+ severity: enumFactory(["user_action_required", "system_blocked"]),
663
+ retryAction: enumFactory([
664
+ "run_prepare_command",
665
+ "copy_fresh_command",
666
+ "choose_agents",
667
+ "refresh",
668
+ "contact_support"
669
+ ]),
674
670
  createdAt: PREPARE_ISO_DATE_TIME_SCHEMA
675
671
  });
676
- const prepareLocalAgentIdsSchema = z$1.array(PREPARE_BOUNDED_ID_SCHEMA).superRefine((value, ctx) => {
672
+ const prepareLocalAgentIdsSchema = array(PREPARE_BOUNDED_ID_SCHEMA).superRefine((value, ctx) => {
677
673
  if (new Set(value).size !== value.length) ctx.addIssue({
678
674
  code: "custom",
679
675
  message: "localAgentIds must not contain duplicates"
680
676
  });
681
677
  });
682
678
  const prepareLocalAgentCatalogSchema = localAgentCatalogSchema;
683
- const prepareLocalReadinessSnapshotSchema = z$1.strictObject({
679
+ const prepareLocalReadinessSnapshotSchema = strictObject({
684
680
  observedAt: PREPARE_ISO_DATE_TIME_SCHEMA,
685
681
  service: startBackgroundHelperProjectionSchema,
686
682
  skills: startSkillsReadinessProjectionSchema
687
683
  });
688
- const prepareSetupBootstrapStepSchema = z$1.enum([
684
+ const prepareSetupBootstrapStepSchema = enumFactory([
689
685
  "human_profile",
690
686
  "assistant_profile",
691
687
  "account_space_index",
@@ -695,12 +691,12 @@ const prepareSetupBootstrapStepSchema = z$1.enum([
695
691
  "welcome_message",
696
692
  "unknown"
697
693
  ]);
698
- const prepareSetupBootstrapProfileSummarySchema = z$1.strictObject({
694
+ const prepareSetupBootstrapProfileSummarySchema = strictObject({
699
695
  openMeldProfileId: PREPARE_BOUNDED_ID_SCHEMA,
700
696
  profileKind: authProfileKindSchema,
701
697
  profileName: PREPARE_USER_MESSAGE_SCHEMA
702
698
  });
703
- const prepareSetupBootstrapFactsSchema = z$1.strictObject({
699
+ const prepareSetupBootstrapFactsSchema = strictObject({
704
700
  ownerUserId: PREPARE_BOUNDED_ID_SCHEMA,
705
701
  assistantProfileId: PREPARE_BOUNDED_ID_SCHEMA,
706
702
  spaceId: PREPARE_BOUNDED_ID_SCHEMA,
@@ -709,90 +705,90 @@ const prepareSetupBootstrapFactsSchema = z$1.strictObject({
709
705
  });
710
706
  const legacyPrepareSetupBootstrapAssistantProfileSchema = prepareSetupBootstrapProfileSummarySchema.extend({
711
707
  managedRole: authProfileManagedRoleSchema.extract(["openmeld_assistant"]),
712
- profileKind: z$1.literal("agent")
708
+ profileKind: literal("agent")
713
709
  });
714
- const legacyPrepareSetupBootstrapMembershipSchema = z$1.strictObject({
715
- addedMemberIds: z$1.array(PREPARE_BOUNDED_ID_SCHEMA),
716
- alreadyMemberIds: z$1.array(PREPARE_BOUNDED_ID_SCHEMA),
710
+ const legacyPrepareSetupBootstrapMembershipSchema = strictObject({
711
+ addedMemberIds: array(PREPARE_BOUNDED_ID_SCHEMA),
712
+ alreadyMemberIds: array(PREPARE_BOUNDED_ID_SCHEMA),
717
713
  assistantProfileId: PREPARE_BOUNDED_ID_SCHEMA,
718
714
  humanProfileId: PREPARE_BOUNDED_ID_SCHEMA
719
715
  });
720
- const legacyPrepareSetupBootstrapWelcomingSpaceSchema = z$1.strictObject({
716
+ const legacyPrepareSetupBootstrapWelcomingSpaceSchema = strictObject({
721
717
  createdAt: PREPARE_ISO_DATE_TIME_SCHEMA,
722
718
  name: PREPARE_USER_MESSAGE_SCHEMA,
723
- outcome: z$1.enum(["created", "reused"]).optional(),
719
+ outcome: enumFactory(["created", "reused"]).optional(),
724
720
  spaceId: PREPARE_BOUNDED_ID_SCHEMA,
725
721
  url: PREPARE_URL_SCHEMA
726
722
  });
727
- const prepareSetupBootstrapResultSchema = z$1.discriminatedUnion("status", [z$1.strictObject({
728
- status: z$1.literal("completed"),
729
- assistantProfile: z$1.union([legacyPrepareSetupBootstrapAssistantProfileSchema, z$1.null()]),
730
- binding: z$1.union([z$1.strictObject({
723
+ const prepareSetupBootstrapResultSchema = discriminatedUnion("status", [strictObject({
724
+ status: literal("completed"),
725
+ assistantProfile: union([legacyPrepareSetupBootstrapAssistantProfileSchema, nullFactory()]),
726
+ binding: union([strictObject({
731
727
  agentControllerRef: PREPARE_BOUNDED_ID_SCHEMA,
732
728
  openMeldServiceRuntimeId: PREPARE_BOUNDED_ID_SCHEMA,
733
- outcome: z$1.enum([
729
+ outcome: enumFactory([
734
730
  "created",
735
731
  "reused",
736
732
  "reconnected"
737
733
  ]),
738
- reason: z$1.union([PREPARE_REASON_CODE_SCHEMA, z$1.null()]).optional(),
739
- reasonCodes: z$1.array(PREPARE_REASON_CODE_SCHEMA),
740
- routable: z$1.literal(true),
741
- source: z$1.literal("agent_profile_binding_api"),
742
- status: z$1.literal("accepted")
743
- }), z$1.null()]),
744
- bindingWarning: z$1.union([z$1.strictObject({
734
+ reason: union([PREPARE_REASON_CODE_SCHEMA, nullFactory()]).optional(),
735
+ reasonCodes: array(PREPARE_REASON_CODE_SCHEMA),
736
+ routable: literal(true),
737
+ source: literal("agent_profile_binding_api"),
738
+ status: literal("accepted")
739
+ }), nullFactory()]),
740
+ bindingWarning: union([strictObject({
745
741
  code: PREPARE_REASON_CODE_SCHEMA,
746
742
  message: PREPARE_USER_MESSAGE_SCHEMA,
747
743
  retryCommand: PREPARE_LONG_TEXT_SCHEMA
748
- }), z$1.null()]).optional(),
749
- humanProfile: prepareSetupBootstrapProfileSummarySchema.extend({ profileKind: z$1.literal("human") }),
750
- facts: z$1.union([prepareSetupBootstrapFactsSchema, z$1.null()]),
751
- membership: z$1.union([legacyPrepareSetupBootstrapMembershipSchema, z$1.null()]),
752
- retryCommand: z$1.null(),
753
- warnings: z$1.array(z$1.strictObject({
744
+ }), nullFactory()]).optional(),
745
+ humanProfile: prepareSetupBootstrapProfileSummarySchema.extend({ profileKind: literal("human") }),
746
+ facts: union([prepareSetupBootstrapFactsSchema, nullFactory()]),
747
+ membership: union([legacyPrepareSetupBootstrapMembershipSchema, nullFactory()]),
748
+ retryCommand: nullFactory(),
749
+ warnings: array(strictObject({
754
750
  code: PREPARE_REASON_CODE_SCHEMA,
755
751
  message: PREPARE_USER_MESSAGE_SCHEMA,
756
752
  profileId: PREPARE_BOUNDED_ID_SCHEMA
757
753
  })),
758
- welcomeMessage: z$1.union([z$1.strictObject({
754
+ welcomeMessage: union([strictObject({
759
755
  signalId: PREPARE_BOUNDED_ID_SCHEMA,
760
756
  text: PREPARE_LONG_TEXT_SCHEMA
761
- }), z$1.null()]),
762
- welcomingSpace: z$1.union([legacyPrepareSetupBootstrapWelcomingSpaceSchema, z$1.null()])
763
- }), z$1.strictObject({
764
- status: z$1.literal("failed"),
765
- diagnostics: z$1.strictObject({
766
- errorName: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]),
757
+ }), nullFactory()]),
758
+ welcomingSpace: union([legacyPrepareSetupBootstrapWelcomingSpaceSchema, nullFactory()])
759
+ }), strictObject({
760
+ status: literal("failed"),
761
+ diagnostics: strictObject({
762
+ errorName: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]),
767
763
  selectedAgentIds: prepareLocalAgentIdsSchema
768
764
  }),
769
765
  failedStep: prepareSetupBootstrapStepSchema,
770
766
  message: PREPARE_LONG_TEXT_SCHEMA,
771
- reason: z$1.literal("bootstrap_failed"),
767
+ reason: literal("bootstrap_failed"),
772
768
  retryCommand: PREPARE_LONG_TEXT_SCHEMA
773
769
  })]);
774
- const prepareSetupBootstrapWriteSchema = z$1.strictObject({
770
+ const prepareSetupBootstrapWriteSchema = strictObject({
775
771
  prepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,
776
772
  setupBootstrap: prepareSetupBootstrapResultSchema
777
773
  });
778
- const prepareSessionSnapshotSchema = z$1.strictObject({
774
+ const prepareSessionSnapshotSchema = strictObject({
779
775
  prepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,
780
776
  ownerUserId: PREPARE_BOUNDED_ID_SCHEMA,
781
- connectedComputerId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]).optional(),
782
- humanProfileId: z$1.union([openMeldProfileIdSchema, z$1.null()]),
783
- deviceId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]),
784
- runtimeLane: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]),
785
- targetSpaceId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]),
786
- sessionRevision: z$1.int().nonnegative(),
777
+ connectedComputerId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]).optional(),
778
+ humanProfileId: union([openMeldProfileIdSchema, nullFactory()]),
779
+ deviceId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]),
780
+ runtimeLane: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]),
781
+ targetSpaceId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]),
782
+ sessionRevision: int().nonnegative(),
787
783
  lifecycleStatus: prepareSessionLifecycleStatusSchema,
788
784
  phase: prepareSessionPhaseSchema,
789
- steps: z$1.array(prepareStepSchema),
790
- localAgentCatalog: z$1.union([prepareLocalAgentCatalogSchema, z$1.null()]).default(null),
791
- localReadinessSnapshot: z$1.union([prepareLocalReadinessSnapshotSchema, z$1.null()]).default(null),
785
+ steps: array(prepareStepSchema),
786
+ localAgentCatalog: union([prepareLocalAgentCatalogSchema, nullFactory()]).default(null),
787
+ localReadinessSnapshot: union([prepareLocalReadinessSnapshotSchema, nullFactory()]).default(null),
792
788
  setupBootstrap: prepareSetupBootstrapResultSchema.optional(),
793
789
  selectedLocalAgentIds: prepareLocalAgentIdsSchema,
794
790
  terminalConnection: prepareTerminalConnectionSchema,
795
- blockers: z$1.array(prepareBlockerSchema),
791
+ blockers: array(prepareBlockerSchema),
796
792
  diagnosticCorrelationId: PREPARE_BOUNDED_ID_SCHEMA,
797
793
  createdAt: PREPARE_ISO_DATE_TIME_SCHEMA,
798
794
  updatedAt: PREPARE_ISO_DATE_TIME_SCHEMA,
@@ -816,7 +812,7 @@ const prepareSessionSnapshotSchema = z$1.strictObject({
816
812
  path: ["blockers"]
817
813
  });
818
814
  });
819
- const prepareSessionEventTypeSchema = z$1.enum([
815
+ const prepareSessionEventTypeSchema = enumFactory([
820
816
  "session.created",
821
817
  "session.snapshot_updated",
822
818
  "session.completed",
@@ -838,134 +834,134 @@ const prepareSessionEventTypeSchema = z$1.enum([
838
834
  "blocker.added",
839
835
  "blocker.cleared"
840
836
  ]);
841
- const prepareSessionEventActorSchema = z$1.enum([
837
+ const prepareSessionEventActorSchema = enumFactory([
842
838
  "web",
843
839
  "terminal",
844
840
  "system"
845
841
  ]);
846
- const prepareSessionEventSchema = z$1.strictObject({
842
+ const prepareSessionEventSchema = strictObject({
847
843
  eventId: PREPARE_BOUNDED_ID_SCHEMA,
848
844
  prepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,
849
- sessionRevision: z$1.int().nonnegative(),
845
+ sessionRevision: int().nonnegative(),
850
846
  eventType: prepareSessionEventTypeSchema,
851
847
  actor: prepareSessionEventActorSchema,
852
- stepId: z$1.union([prepareStepIdSchema, z$1.null()]),
853
- connectionEpoch: z$1.union([z$1.int().positive(), z$1.null()]),
854
- reasonCode: z$1.union([PREPARE_REASON_CODE_SCHEMA, z$1.null()]),
855
- message: z$1.union([PREPARE_USER_MESSAGE_SCHEMA, z$1.null()]),
848
+ stepId: union([prepareStepIdSchema, nullFactory()]),
849
+ connectionEpoch: union([int().positive(), nullFactory()]),
850
+ reasonCode: union([PREPARE_REASON_CODE_SCHEMA, nullFactory()]),
851
+ message: union([PREPARE_USER_MESSAGE_SCHEMA, nullFactory()]),
856
852
  localAgentIds: prepareLocalAgentIdsSchema,
857
853
  createdAt: PREPARE_ISO_DATE_TIME_SCHEMA
858
854
  });
859
- z$1.strictObject({
860
- connectedComputerId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]).optional(),
861
- humanProfileId: z$1.union([openMeldProfileIdSchema, z$1.null()]).optional(),
862
- deviceId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]).optional(),
863
- runtimeLane: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]).optional(),
864
- targetSpaceId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]).optional(),
855
+ strictObject({
856
+ connectedComputerId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]).optional(),
857
+ humanProfileId: union([openMeldProfileIdSchema, nullFactory()]).optional(),
858
+ deviceId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]).optional(),
859
+ runtimeLane: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]).optional(),
860
+ targetSpaceId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]).optional(),
865
861
  selectedLocalAgentIds: prepareLocalAgentIdsSchema.optional(),
866
- sourceNavigationAction: z$1.strictObject({
862
+ sourceNavigationAction: strictObject({
867
863
  signalId: PREPARE_BOUNDED_ID_SCHEMA,
868
864
  spaceId: PREPARE_BOUNDED_ID_SCHEMA
869
865
  }).optional()
870
866
  });
871
- z$1.strictObject({
867
+ strictObject({
872
868
  snapshot: prepareSessionSnapshotSchema,
873
869
  opaqueToken: prepareOpaqueTokenSchema,
874
870
  opaqueTokenExpiresAt: PREPARE_ISO_DATE_TIME_SCHEMA
875
871
  });
876
- const prepareSessionResponseSchema = z$1.strictObject({ snapshot: prepareSessionSnapshotSchema });
877
- const terminalStepWriteStatusSchema = z$1.enum([
872
+ const prepareSessionResponseSchema = strictObject({ snapshot: prepareSessionSnapshotSchema });
873
+ const terminalStepWriteStatusSchema = enumFactory([
878
874
  "started",
879
875
  "completed",
880
876
  "failed"
881
877
  ]);
882
- const terminalStepWriteSchema = z$1.strictObject({
878
+ const terminalStepWriteSchema = strictObject({
883
879
  prepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,
884
- connectionEpoch: z$1.int().positive(),
885
- expectedRevision: z$1.int().nonnegative(),
886
- deviceId: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]).optional(),
887
- runtimeLane: z$1.union([PREPARE_BOUNDED_ID_SCHEMA, z$1.null()]).optional(),
880
+ connectionEpoch: int().positive(),
881
+ expectedRevision: int().nonnegative(),
882
+ deviceId: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]).optional(),
883
+ runtimeLane: union([PREPARE_BOUNDED_ID_SCHEMA, nullFactory()]).optional(),
888
884
  stepAttemptId: PREPARE_BOUNDED_ID_SCHEMA,
889
885
  stepId: prepareStepIdSchema,
890
886
  status: terminalStepWriteStatusSchema,
891
- localReadinessSnapshot: z$1.union([prepareLocalReadinessSnapshotSchema, z$1.null()]).optional(),
892
- reasonCode: z$1.union([PREPARE_REASON_CODE_SCHEMA, z$1.null()]).optional(),
893
- message: z$1.union([PREPARE_USER_MESSAGE_SCHEMA, z$1.null()]).optional(),
887
+ localReadinessSnapshot: union([prepareLocalReadinessSnapshotSchema, nullFactory()]).optional(),
888
+ reasonCode: union([PREPARE_REASON_CODE_SCHEMA, nullFactory()]).optional(),
889
+ message: union([PREPARE_USER_MESSAGE_SCHEMA, nullFactory()]).optional(),
894
890
  diagnostics: PREPARE_STEP_DIAGNOSTICS_SCHEMA.optional()
895
891
  });
896
- const terminalLocalAgentCatalogWriteSchema = z$1.strictObject({
892
+ const terminalLocalAgentCatalogWriteSchema = strictObject({
897
893
  prepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,
898
- connectionEpoch: z$1.int().positive(),
894
+ connectionEpoch: int().positive(),
899
895
  localAgentCatalog: prepareLocalAgentCatalogSchema
900
896
  });
901
- const terminalAgentSelectionWriteSchema = z$1.strictObject({
897
+ const terminalAgentSelectionWriteSchema = strictObject({
902
898
  prepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,
903
- connectionEpoch: z$1.int().positive(),
904
- expectedRevision: z$1.int().nonnegative(),
899
+ connectionEpoch: int().positive(),
900
+ expectedRevision: int().nonnegative(),
905
901
  localAgentIds: prepareLocalAgentIdsSchema
906
902
  });
907
- const webAgentSelectionWriteSchema = z$1.strictObject({
903
+ const webAgentSelectionWriteSchema = strictObject({
908
904
  prepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,
909
- expectedRevision: z$1.int().nonnegative(),
905
+ expectedRevision: int().nonnegative(),
910
906
  localAgentIds: prepareLocalAgentIdsSchema
911
907
  });
912
- z$1.strictObject({
908
+ strictObject({
913
909
  snapshot: prepareSessionSnapshotSchema,
914
- events: z$1.array(prepareSessionEventSchema)
910
+ events: array(prepareSessionEventSchema)
915
911
  });
916
- z$1.enum(["web", "terminal"]);
917
- z$1.discriminatedUnion("type", [
918
- z$1.strictObject({
919
- type: z$1.literal("client.ping"),
920
- payload: z$1.strictObject({ sentAt: PREPARE_ISO_DATE_TIME_SCHEMA })
912
+ enumFactory(["web", "terminal"]);
913
+ discriminatedUnion("type", [
914
+ strictObject({
915
+ type: literal("client.ping"),
916
+ payload: strictObject({ sentAt: PREPARE_ISO_DATE_TIME_SCHEMA })
921
917
  }),
922
- z$1.strictObject({
923
- type: z$1.literal("client.hello"),
924
- payload: z$1.strictObject({
918
+ strictObject({
919
+ type: literal("client.hello"),
920
+ payload: strictObject({
925
921
  cliVersion: PREPARE_BOUNDED_ID_SCHEMA,
926
- protocolVersion: z$1.int().positive()
922
+ protocolVersion: int().positive()
927
923
  })
928
924
  }),
929
- z$1.strictObject({
930
- type: z$1.literal("terminal.step.write"),
925
+ strictObject({
926
+ type: literal("terminal.step.write"),
931
927
  payload: terminalStepWriteSchema
932
928
  }),
933
- z$1.strictObject({
934
- type: z$1.literal("terminal.local_agent_catalog.write"),
929
+ strictObject({
930
+ type: literal("terminal.local_agent_catalog.write"),
935
931
  payload: terminalLocalAgentCatalogWriteSchema
936
932
  }),
937
- z$1.strictObject({
938
- type: z$1.literal("terminal.agent_selection.write"),
933
+ strictObject({
934
+ type: literal("terminal.agent_selection.write"),
939
935
  payload: terminalAgentSelectionWriteSchema
940
936
  }),
941
- z$1.strictObject({
942
- type: z$1.literal("web.agent_selection.write"),
937
+ strictObject({
938
+ type: literal("web.agent_selection.write"),
943
939
  payload: webAgentSelectionWriteSchema
944
940
  })
945
941
  ]);
946
- const prepareSessionStreamServerFrameSchema = z$1.discriminatedUnion("type", [
947
- z$1.strictObject({
948
- type: z$1.literal("server.pong"),
949
- payload: z$1.strictObject({ sentAt: PREPARE_ISO_DATE_TIME_SCHEMA })
942
+ const prepareSessionStreamServerFrameSchema = discriminatedUnion("type", [
943
+ strictObject({
944
+ type: literal("server.pong"),
945
+ payload: strictObject({ sentAt: PREPARE_ISO_DATE_TIME_SCHEMA })
950
946
  }),
951
- z$1.strictObject({
952
- type: z$1.literal("snapshot"),
953
- payload: z$1.strictObject({ snapshot: prepareSessionSnapshotSchema })
947
+ strictObject({
948
+ type: literal("snapshot"),
949
+ payload: strictObject({ snapshot: prepareSessionSnapshotSchema })
954
950
  }),
955
- z$1.strictObject({
956
- type: z$1.literal("snapshot_changed"),
957
- payload: z$1.strictObject({ snapshot: prepareSessionSnapshotSchema })
951
+ strictObject({
952
+ type: literal("snapshot_changed"),
953
+ payload: strictObject({ snapshot: prepareSessionSnapshotSchema })
958
954
  }),
959
- z$1.strictObject({
960
- type: z$1.literal("terminal.replaced"),
961
- payload: z$1.strictObject({
955
+ strictObject({
956
+ type: literal("terminal.replaced"),
957
+ payload: strictObject({
962
958
  reasonCode: PREPARE_REASON_CODE_SCHEMA,
963
959
  message: PREPARE_USER_MESSAGE_SCHEMA
964
960
  })
965
961
  }),
966
- z$1.strictObject({
967
- type: z$1.literal("server.error"),
968
- payload: z$1.strictObject({
962
+ strictObject({
963
+ type: literal("server.error"),
964
+ payload: strictObject({
969
965
  code: PREPARE_REASON_CODE_SCHEMA,
970
966
  message: PREPARE_USER_MESSAGE_SCHEMA
971
967
  })
@@ -3034,6 +3030,8 @@ function resolveTopLevelEntryName(command) {
3034
3030
  const OPENMELD_PACKAGE_NAME = "openmeld";
3035
3031
  const CLI_BINARY_DOWNLOAD_TIMEOUT_MS = 6e4;
3036
3032
  const BINARY_MANUAL_OPENMELD_UPGRADE_COMMAND = "curl -fsSL 'https://openmeld.ai/setup?dist=binary' | sh";
3033
+ const STAGING_BINARY_MANIFEST_URL = "https://staging.openmeld.ai/cli/manifest.json";
3034
+ const STAGING_BINARY_SETUP_COMMAND = "curl -fsSL 'https://staging.openmeld.ai/setup?lane=canary&dist=binary' | sh";
3037
3035
  const INSTALL_SELF_JSON_LINE_SPLIT_RE = /\r?\n/u;
3038
3036
  const SERVICE_CHECK_STARTED_TEXT = "Checking OpenMeld Service";
3039
3037
  const SERVICE_CHECK_COMPLETED_TEXT = "OpenMeld Service check finished.";
@@ -3059,13 +3057,13 @@ async function runUpgrade(input) {
3059
3057
  await runInternalUpgradeServiceAlignment({
3060
3058
  presenter,
3061
3059
  resolvedView: runtime.resolvedView,
3062
- daemonVersion: package_default.version,
3060
+ daemonVersion: OPENMELD_VERSION,
3063
3061
  ...process.argv[1] && !isBinaryDistribution() ? { cliScriptPath: process.argv[1] } : {}
3064
3062
  });
3065
3063
  return;
3066
3064
  }
3067
3065
  const allowPrompt = canUseInteractivePrompts(runtime);
3068
- const currentVersion = package_default.version;
3066
+ const currentVersion = OPENMELD_VERSION;
3069
3067
  const { currentGlobalInstall, manualUpgradeCommand } = await resolveUpgradeInstallContext();
3070
3068
  const previousVersionState = await readVersionState();
3071
3069
  if (!previousVersionState) handleMissingVersionMetadata({
@@ -3313,7 +3311,7 @@ async function installAndReconcileNpmUpgrade(input) {
3313
3311
  async function resolveUpgradeInstallContext() {
3314
3312
  if (isBinaryDistribution()) return {
3315
3313
  currentGlobalInstall: null,
3316
- manualUpgradeCommand: BINARY_MANUAL_OPENMELD_UPGRADE_COMMAND
3314
+ manualUpgradeCommand: resolveBinaryManualOpenMeldUpgradeCommand()
3317
3315
  };
3318
3316
  const currentGlobalInstall = await resolveCurrentNpmGlobalPackageInstall({ packageName: OPENMELD_PACKAGE_NAME });
3319
3317
  return {
@@ -3321,6 +3319,9 @@ async function resolveUpgradeInstallContext() {
3321
3319
  manualUpgradeCommand: buildManualOpenMeldUpgradeCommand({ globalPrefixPath: currentGlobalInstall?.globalPrefixPath ?? null })
3322
3320
  };
3323
3321
  }
3322
+ function resolveBinaryManualOpenMeldUpgradeCommand(env = process.env) {
3323
+ return env.OPENMELD_ENV_PRESET === "canary" && env.OPENMELD_CLI_BINARY_MANIFEST_URL === STAGING_BINARY_MANIFEST_URL ? STAGING_BINARY_SETUP_COMMAND : BINARY_MANUAL_OPENMELD_UPGRADE_COMMAND;
3324
+ }
3324
3325
  function handleMissingVersionMetadata(input) {
3325
3326
  const errorMessage = formatOpenMeldCliTextBlock(`OpenMeld version metadata is missing, so automatic upgrade cannot continue.\nManual fallback: \`${input.manualUpgradeCommand}\`\nIf you want to repair local OpenMeld state first, run \`openmeld reset --yes\` before \`openmeld upgrade\`.`);
3326
3327
  if (input.resolvedView === "agent") {
@@ -3681,7 +3682,7 @@ function formatUpgradeReconcileFailureMessage(input) {
3681
3682
  return formatInlineOpenMeldCliCommands(`Service reconcile failed: ${input.errorMessage}. Please run \`openmeld service repair\` manually.${failureContext.length > 0 ? ` ${failureContext}` : ""}`);
3682
3683
  }
3683
3684
  function buildUpgradeAlignmentBlockedMessage(reasonCodes) {
3684
- if (reasonCodes.includes("downgrade_blocked")) return formatDaemonServiceDowngradeBlockedRecommendation({ expectedVersion: package_default.version });
3685
+ if (reasonCodes.includes("downgrade_blocked")) return formatDaemonServiceDowngradeBlockedRecommendation({ expectedVersion: OPENMELD_VERSION });
3685
3686
  return formatInlineOpenMeldCliCommands(`Service alignment is blocked (${reasonCodes.length > 0 ? reasonCodes.join(", ") : "unknown"}). Please run \`openmeld service status\` or \`openmeld service repair\` manually.`);
3686
3687
  }
3687
3688
  function emitUpgradeReconcileAlreadyCurrent(input) {
@@ -3727,7 +3728,7 @@ function resolveUpgradeReconcileSkipMessage(reason) {
3727
3728
  command: "openmeld service install"
3728
3729
  };
3729
3730
  if (reason === "downgrade_blocked") return {
3730
- text: formatDaemonServiceDowngradeBlockedRecommendation({ expectedVersion: package_default.version }),
3731
+ text: formatDaemonServiceDowngradeBlockedRecommendation({ expectedVersion: OPENMELD_VERSION }),
3731
3732
  command: "openmeld upgrade"
3732
3733
  };
3733
3734
  return {
@@ -13519,7 +13520,7 @@ async function runReset(input) {
13519
13520
  recursive: true,
13520
13521
  force: true
13521
13522
  });
13522
- const bootstrap = await bootstrapOpenMeldHome({ currentVersion: package_default.version });
13523
+ const bootstrap = await bootstrapOpenMeldHome({ currentVersion: OPENMELD_VERSION });
13523
13524
  await runSkillsCheck$1({
13524
13525
  view: runtime.resolvedView,
13525
13526
  quiet: true,
@@ -13528,7 +13529,7 @@ async function runReset(input) {
13528
13529
  const payload = {
13529
13530
  lane,
13530
13531
  rootDir,
13531
- version: bootstrap.versionState.last_version ?? package_default.version,
13532
+ version: bootstrap.versionState.last_version ?? OPENMELD_VERSION,
13532
13533
  skills: bootstrap.skills.map((skill) => ({
13533
13534
  id: skill.id,
13534
13535
  path: skill.relativePath
@@ -27425,7 +27426,7 @@ function normalizeOptionalString(value) {
27425
27426
  return normalized.length > 0 ? normalized : null;
27426
27427
  }
27427
27428
  async function runDefaultSpaceAddMeMembership(input) {
27428
- const { runSpaceAddMeMembership } = await import("./add-me-membership-DKUlyR1n.js");
27429
+ const { runSpaceAddMeMembership } = await import("./add-me-membership-BhI3ntPB.js");
27429
27430
  return await runSpaceAddMeMembership(input);
27430
27431
  }
27431
27432
  //#endregion
@@ -31038,7 +31039,7 @@ function parseSpaceHistoryKindOption(value) {
31038
31039
  throw new Error("kind must be one of: text, status, system_notice");
31039
31040
  }
31040
31041
  applyProductionReleaseDefaultsToProcessEnv();
31041
- program.name(resolveUserFacingCliEntryCommand()).version(package_default.version);
31042
+ program.name(resolveUserFacingCliEntryCommand()).version(OPENMELD_VERSION);
31042
31043
  program.option("--view <mode>", "View mode: auto|human|agent", "auto");
31043
31044
  program.option("--service-auto-install <mode>", "Service auto-install policy on startup: ask|always|never", "ask");
31044
31045
  program.configureHelp({ showGlobalOptions: true });
@@ -33891,7 +33892,7 @@ async function runRootCommand() {
33891
33892
  async function delegateToManagedCliIfAuthoritative(argv) {
33892
33893
  const delegation = await resolveManagedCliDelegation({
33893
33894
  argv,
33894
- currentVersion: package_default.version,
33895
+ currentVersion: OPENMELD_VERSION,
33895
33896
  distribution: resolveOpenMeldDistribution()
33896
33897
  });
33897
33898
  if (delegation.status !== "delegate") return false;