openmeld 0.3.83 → 0.3.85

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 LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, At as openMeldManagedBinaryPath, Bt as resolveOpenMeldCliEntryNameFromArgv, D as toSpaceBoardUrl, Et as normalizeAccountKey, Ft as organizationSkillReleaseDir, G as isOpenMeldOrphanedLockError, H as acquireLock, It as profileDir, J as releaseLockSync, Jt as systemDir, Kt as skillsDir, Lt as profileViewPath, M as toSpaceDispatchLookupUrl, N as toSpaceDispatchTraceUrl, Nt as openMeldRootDir, O as toSpaceContractUrl, Ot as openMeldBackupsDir, S as updateConfiguredOnboardingConfig, T as normalizeBaseUrl, U as buildOpenMeldOrphanedLockAction, Ut as resolveOpenMeldRootDir, Vt as resolveOpenMeldEnvPreset, W as isOpenMeldLockError, X as resolveOpenMeldOrphanedLockIssue, Y as repairOrphanedLegacyLocks, Yt as formatLocalMachineIssueMessage, Z as runWithHeldLock, _t as accountProfileSpaceCacheDir, a as resolveBaseUrl, b as setConfiguredSkillsConfig, bt as accountsDir, c as resolveExplicitGatewayUrlOrThrow, ct as LocalMachineFailureError, et as OPENMELD_CLI_CONTEXT_ENV_KEY, ft as createOrphanedSetupConcurrencyIssue, h as getConfiguredSkillsConfig, jt as openMeldManagedVersionBinaryPath, m as getConfiguredOnboardingDisclaimerAcceptedAt, mt as toRecognizedLocalMachineFailureError, nn as agentControllerConversationRefSchema, o as resolveBaseUrlOrNull, ot as formatLaneScopeSentence, pt as isLocalMachineFailureError, qt as spacesDir, rt as resolveCliContext, st as resolveOpenMeldLaneDescriptor, u as alignRuntimeConfigStorage, ut as createActiveSetupConcurrencyIssue, vt as accountProfileViewPath, w as updateConfiguredStartV1OnboardingState, y as setConfiguredBaseUrl, z as toSpaceResultUrl } from "./base-url-Cv9x5Es9.js";
4
- import { $ as formatTransportModeDisplay, $a as uninstallAgentActivityIntegrations, $i as compareSemver, $n as canUseInteractivePrompts, $r as normalizeCustomProfileWorkspacePath, $t as readRecentDaemonDispatchJournalEvents, A as prepareAuthenticatedSpaceCommandContext, Aa as getSelectedOpenMeldProfileId, Ai as listAgentControllerPermissionModeOptions, An as assertNoRemovedCcSpaceAddressingSyntax, Ao as enqueueControllerTaskLifecycleEventWhileLocked, Ar as formatDualViewGuideForDisplay, At as readDaemonStartFailureLogTailLines, B as runAgents, Ba as LocalProjectConnectionError, Bi as resetCurrentCommandCheckState, Bn as promptSearchSelect, Bo as cliJsonOutputEnvelopeSchema, Br as resolveServiceReadinessFromServiceStatus, Bt as writeInstalledLocalComponentsSnapshot, C as buildFormalSignalReadPayload, Ca as deleteOpenMeldProfile, Ci as ensureDaemonRuntimePaths, Cn as submitRuntimeAgentControllerReports, Co as listProjectConnectionsWithStatus, Cr as registerSkillsTargetSelectionOptions, Ct as buildProfileWorkspacePresentation, D as isSpaceCommandOutputHandledError, Da as updateOpenMeldProfile, Di as createAgentExecutionStatusDisplayRows, Dn as resolveLocalAgentControllerReportDecision, Do as setDefaultProjectConnection, Dr as registerBuiltinAgentSelectionOptions, Dt as createDelayedSpinner, E as parseEnvelope, Ea as resolveOpenMeldProfile, Ei as buildAgentControllerRef, En as resolveLocalAgentControllerLaunchability, Eo as runIfAgentActivityBindingGenerationIsCurrent, Er as registerAuthLoginRequestOptions, Et as emitDaemonAgentOverview, F as prepareLocalAgentReadiness, Fa as resolveAuthenticationGuidance, Fi as resolveEvidenceSyncHealth, Fn as buildSpaceRoundReadProjection, Fo as emitCliJsonEnvelope, Fr as areAllowedActionsEquivalent, Ft as readGatewayJsonResponse, G as runAgentsCustomUpdate, Ga as registerAgentActivityRoute, Gi as readCurrentObservedDaemonRuntimeStatus, Gn as assertDispatchOwnedRuntimePublicWriteAllowed, Go as organizationJoinLinkErrorResponseSchema, Gr as formatHumanReplyReadinessReason$1, Gt as runSkillsCheck$1, H as runAgentsCustomAdd, Ha as LocalDaemonControlPlaneClientError, Hi as inspectDaemonServiceInventory, Hn as runInteractivePrompt, Ho as cliJsonSkillsLoadEnvelopeSchema, Hr as resolveCurrentReplyReadinessSnapshot, Ht as runDaemonServiceParticipationGate, I as buildReplyReadinessGuidance, Ia as resolveAuthenticationGuidanceFromError, Ii as resolveNativeAgentControllerPermissionModeForController, In as buildUpdatesReplyWorkflowProjection, Io as errLine, Ir as buildAgentFacingPublicationModeGuideLines, It as readGatewayTextResponse, J as runAgentsEnable, Ji as readDaemonServiceJobCrashExitCode, Jn as writeDispatchSpaceActionRecord, Jo as package_default, Jr as resolveOpenClawLocalDiagnosticsValue, Jt as runSkillsUninstall, K as runAgentsDetect, Ka as resolveAgentActivityRouteForPath, Ki as getDaemonSystemServiceLogPath, Kn as readDispatchOwnedRuntimeGuard, Ko as revokeOrganizationJoinLinkResponseSchema, Kr as mapAgentReplyReadinessToLegacyAutoReply, Kt as runSkillsEnsure, L as resolveHumanControllerDisplayName, La as resolveAuthenticationGuidanceFromMessage, Li as finishCurrentCommandCheckScope, Ln as createSpaceMemberIdentityIndex, Lo as outJsonLine, Lr as canonicalizeAllowedActions, Lt as toStructuredGatewayFailure, M as resolveSpaceAccessLabel, Ma as buildAgentAuthenticationGuide, Mi as resolveAgentControllerPermissionModeForController, Mn as buildDispatchResultReplyWorkflowProjection, Mo as renderInfoCard, Mr as formatAgentOverviewPayload, Mt as createCliSpaceApi, N as emitSpaceAgentOverview, Na as buildHumanAuthenticationCard, Ni as resolveAgentExecutionStatus, Nn as buildSignalIndex, No as renderTextInfoCard, Nr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Nt as fetchSpaceMeta, O as assertFullSignalIdArgument, Oa as alignSelectedOpenMeldProfileStorage, Oi as getAgentControllerPermissionModeDisplayMetadata, On as inspectSpaceCacheFile, Oo as unbindProject, Or as buildAgentOverviewFromContract, Ot as shouldEmitAgentOverview, P as emitSpaceCliAgentOverview, Pa as createAuthenticationError, Pi as resolveAgentProfileEditCapabilities, Pn as buildSignalMessageReadProjection, Po as sanitizeTerminalDisplayText, Pr as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, Pt as updateSpaceMeta, Q as runAgentsShow, Qa as resolveAgentActivityDispatcherCommand, Qi as buildNextVersionState, Qn as formatDaemonServiceMissingRecommendation, Qr as ensureOpenMeldManagedProfileWorkspace, Qt as readRuntimeReportingHealthState, R as persistAgentTransportSelection, Ra as getProfileDefaultView, Ri as getCurrentCommandCheckState, Rn as formatRemovedCcRelationMessage, Ro as outLine, Rr as runDaemonServiceFullAlignment, Rt as parseJsonResponse, S as buildFormalDispatchResultReadPayload, Sa as createOpenMeldHumanProfile, Si as readRecentDaemonLifecycleEvents, Sn as submitRuntimeAgentControllerReport, So as listProjectBindings, Sr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, St as runDaemonUninstall, T as formatHumanReadTargetList, Ta as primeOpenMeldProfilesSessionCache, Ti as resolveOpenMeldEnvironmentTarget, Tn as resolveLocalAgentControllerBlockerReasonCodes, To as removeProjectConnection, Tr as registerDaemonControlTargetOptions, Tt as reconcileCliVersionView, U as runAgentsCustomList, Ua as requestLocalAgentActivitySync, Ui as resolveVersionChangeDirection, Un as assessCliUpdate, Uo as cliJsonSkillsShowEnvelopeSchema, Ur as formatAgentReplyReadinessLabel, Ut as runDaemonStartDecisionPrompt, V as runAgentsConfig, Va as validateLocalProjectConnectionPath, Vi as startCurrentCommandCheckScope, Vn as isReturnKeypress, Vo as cliJsonSkillsListEnvelopeSchema, Vr as resolveDaemonServiceFreshnessWarning, Vt as resolveDaemonServiceParticipationStatus, W as runAgentsCustomRemove, Wa as isAgentActivityRouteRegistered, Wi as readCurrentDaemonRuntimeContext, Wn as isCliUpdateCheckApplicable, Wo as getOrganizationJoinLinkResponseSchema, Wr as formatDeviceReplyReadinessLabel, Wt as collectSkillsReadinessSnapshot, X as runAgentsManage, Xa as installAgentActivityIntegrations, Xi as buildInstallSelfJsonPayload, Xn as resolveElapsedTimeMs, Xr as createModelCatalogReadSession, Xt as ensureLocalSkills, Y as runAgentsList, Ya as defaultManagedIntegrationPaths, Yi as resolveDaemonServiceManager, Yn as formatElapsedTime, Yr as syncProfileWorkspaceState, Yt as runSkillsUpdate, Z as runAgentsRepair, Za as readAgentActivityIntegrationStatus, Zi as performManagedInstall, Zn as formatDaemonServiceDowngradeBlockedRecommendation, Zr as resolveProfileWorkspaceRuntime, Zt as readBundledOpenMeldCliSkillDocumentByPath, _ as emitHumanReadSignalsTextProjection, _a as resolveViewProfileKey, _i as getSetupFlowCopy, _n as formatServiceParticipationReadinessLabel, _o as enqueueAgentActivityHookEvent, _r as createStartAuthenticationGuideError, _t as runDaemonRunAfterEntryChecks, a as runSpaceDelete, aa as isBinaryDistribution, ai as describeProfileWorkspacePathValidationFailure, an as runAuthLogin, ao as formatProfileAwareOpenMeldCliCommands, ar as createSpaceAddMembersGuideError, at as renderOpenMeldHeader, b as loadSpaceSignalIndexOrNull, ba as resolveOpenMeldProfileOrNull, bi as classifyDaemonServiceRunStartability, bn as computeRetryDelayMs, bo as removeProjectOutbox, br as getCommandHintsFromContract, bt as runDaemonStop, c as runSpaceLeave, ca as toStartBackgroundHelperExecutionCompatibility, ci as resolveAgentProfilePrimaryAgentControllerReport, cn as runAuthStatus, co as syncLocalAgentActivity, cr as createSpaceLeaveGuideError, ct as resolveGatewayWebOrigin, d as runSpaceRemoveMembers, da as renderHumanErrorCard, di as listBuiltinAgentsRegistryEntries, dn as formatActiveOrganizationLabel, do as readAgentActivityContextForPath, dr as createSpaceRemoveMembersGuideError, dt as runDaemonAutostart, ea as ensureVersionStateReady, ei as readProfileWorkspaceConfig, en as connectWebSocket, eo as formatInlineOpenMeldCliCommands, er as createDoctorFailedGuideError, et as postLocalParticipationMutationReconcile, f as runSpaceSend, fa as renderHumanTextErrorCard, fi as notifyDaemonRouteCatalogChanged, fn as createProfileByKind, fo as removeAgentActivityContextCache, fr as createSpaceResultGuideError, ft as runDaemonBackgroundStartForDecision, g as buildHumanReadSignalsTranscriptItems, ga as resolveRuntimeContext, gi as buildOnboardingPlan, gn as ensureAgentProfileRuntimeBinding, go as readCodexSessionTitles, gr as createStartAgentIdentityGuideError, gt as runDaemonReinstall, h as runSpaceWriteWithPasswordRetry, ha as parseCliViewMode, hi as buildDaemonRouteObservationPresentation$1, hn as promptTextEntry, ho as normalizeSharedSessionTitle, hr as createSpaceUpdatesGuideError, ht as runDaemonInterrupt, i as runSpaceCreate, ia as writeVersionState, ii as validateCustomProfileWorkspacePath, in as evaluateCommandAuthentication, io as formatOpenMeldCliTextBlock, ir as createResetConfirmationGuideError, it as renderOpenMeldBrandBlockLines, j as resolveOpenMeldProfileForSpaceCommand, ja as setSelectedOpenMeldProfileId, ji as parseAgentControllerRef, jn as buildDispatchResultMessageReadProjection, jo as readControllerTaskLifecycleOutboxHealth, jr as buildDualViewGuideMessage, jt as fetchSpaceUpdates, k as assertValidSpaceIdTarget, ka as clearSelectedOpenMeldProfileId, ki as getAgentControllerPermissionModeFieldLabel, kn as upsertSpaceConfig, ko as canonicalizeLocalProjectPath, kr as DualViewGuideError, kt as runDaemonStartupPreflight, l as runSpaceList, la as resolveCurrentDaemonExpectedVersion, li as listAgentTargetStates, ln as buildAuthStatusRows, lo as readDaemonServiceContract, lr as createSpaceMenuGuideError, lt as resolveSpaceSendText, m as runSpaceReadWithPasswordRetry, ma as formatMessage, mn as resolveCreateProfileName, mo as resolveObservedAgentActivityBinding, mr as createSpaceTargetGuideError, mt as runDaemonInstall, n as promptAndConfirmSpacePassword, na as fetchLatestPackageInfo, ni as setCustomProfileWorkspace, nn as buildCommandAuthenticationPromptMessage, no as formatOpenMeldCliCommands, nr as createProfileCreateGuideError, nt as colorizeDisplayProfileLabel, o as runSpaceHistory, oa as resolveOpenMeldDistribution, oi as syncDeviceRuntimeStateProjection, on as runAuthLogout, oo as resolveSetupFollowUpCliEntryCommand, or as createSpaceAliasTargetGuideError, ot as renderOpenMeldLogo, p as runSpaceWatch, pa as createPresenter, pi as resolveLocalRegistryAgentIdFromAgentControllerRef, pn as resolveCreateProfileKind, po as buildAgentActivityEvent, pr as createSpaceSubcommandTargetGuideError, pt as runDaemonCancel, q as runAgentsDisable, qa as unregisterAgentActivityRoute, qi as isDaemonServiceJobNeverSpawned, qn as readDispatchSpaceActionContextFromEnv, qo as compareAgentControllerRefsForDisplay, qr as resolveGatewayChainReadiness, qt as runSkillsInstall, r as runSpaceAddMembers, ra as readVersionState, ri as setOpenMeldManagedProfileWorkspace, rn as ensureCommandAuthenticationOrCancel, ro as formatOpenMeldCliLine, rr as createProfileMenuGuideError, rt as printOpenMeldBanner, s as runSpaceJoin, sa as resolveDaemonRuntimeContractCompatibility, si as createPrimaryBindingReadSession, sn as runAuthMenu, so as resolveUserFacingCliEntryCommand, sr as createSpaceContractSetGuideError, st as renderOpenMeldTagline, t as buildCreateSpacePasswordPromptConfig, ta as fetchLatestCliBinaryRelease, ti as resolveConfiguredProfileWorkspacePath, tn as assessServerRequiredVersion, to as formatOpenMeldCliCommand, tr as createProfileActionGuideError, tt as colorizeAgentLabel, u as runSpacePassword, ua as buildHumanErrorCopy, ui as reconcileNewRunnableBuiltinAgentsForSetup, un as buildAuthStatusSnapshot, uo as upsertDaemonServiceContract, ur as createSpacePublicationSetGuideError, ut as runDaemon, v as buildIdentityOnlyMembersSnapshotForReadProjection, va as isSelectedOpenMeldProfileRequiredError, vi as buildDaemonServiceTargetSpec, vn as resolveServiceParticipationReadiness, vo as removeProjectInbox, vr as createUpgradeConfirmationGuideError, vt as runDaemonSnapshot, w as buildHumanReplyContextSummary, wa as listOpenMeldProfiles, wi as resolveDaemonDeviceId, wn as collectLocalAgentControllerInventory, wo as migrateProjectBindingStore, wr as getCliVersionInfo, wt as buildProfileWorkspaceRows, x as toSpaceMetaUpsertInput, xa as createOpenMeldAgentProfile, xi as classifyDaemonServiceWakeability, xn as submitProfileRuntimeAgentControllerReport, xo as bindProject, xr as registerSpaceMemberSelectionOptions, xt as runDaemonTeardownStrict, y as loadSpaceIdentityDirectoryOrNull, ya as requireOpenMeldProfile, yi as resolveDaemonServiceAlignmentDecision, yn as assessActionParticipationCandidate, yo as readAgentActivityOutboxHealth, yr as getCommandEntryContract, yt as runDaemonStatusFlow, z as resolveAgentProfileSetup, za as setProfileDefaultView, zi as isCurrentCommandCheckScopeActive, zn as promptSearchMultiselect, zo as cliBinaryDeltaPatchSchema, zr as formatDaemonFailureContextText, zt as resolveLocalComponentsStatus } from "./command-22-KBBsD.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-Cm4BbP8Y.js";
6
- import { $n as openMeldProfileIdSchema, Ht as spaceThreadContextSchema, Kt as spaceContractFieldsSchema, Mn as clientMessageIdSchema, Mt as spaceStatusSchema, Nt as centerAgentInteractionSourceSchema, Vt as dispatchExecutionSchema, an as messageEnvelopeSchema, dr as nonEmptyTrimmedStringFromUnknown, ir as openMeldRuntimeProfileIdSchema, pr as trimmedStringFromUnknown, qt as spaceContractSchema } from "./runtime-transport-DI97Fndy.js";
4
+ import { $ as runAgentsRepair, $a as readAgentActivityIntegrationStatus, $i as performManagedInstall, $n as formatDaemonServiceDowngradeBlockedRecommendation, $r as resolveProfileWorkspaceRuntime, $t as readBundledOpenMeldCliSkillDocumentByPath, A as assertFullSignalIdArgument, Aa as alignSelectedOpenMeldProfileStorage, Ai as getAgentControllerPermissionModeDisplayMetadata, An as inspectSpaceCacheFile, Ao as unbindProject, Ar as buildAgentOverviewFromContract, At as shouldEmitAgentOverview, B as persistAgentTransportSelection, Ba as getProfileDefaultView, Bi as getCurrentCommandCheckState, Bn as formatRemovedCcRelationMessage, Bo as outLine, Br as runDaemonServiceFullAlignment, Bt as parseJsonResponse, C as toSpaceMetaUpsertInput, Ca as createOpenMeldAgentProfile, Ci as classifyDaemonServiceWakeability, Cn as submitProfileRuntimeAgentControllerReport, Co as bindProject, Cr as registerSpaceMemberSelectionOptions, Ct as runDaemonTeardownStrict, D as formatHumanReadTargetList, Da as primeOpenMeldProfilesSessionCache, Di as resolveOpenMeldEnvironmentTarget, Dn as resolveLocalAgentControllerBlockerReasonCodes, Do as removeProjectConnection, Dr as registerDaemonControlTargetOptions, Dt as reconcileCliVersionView, E as buildHumanReplyContextSummary, Ea as listOpenMeldProfiles, Ei as resolveDaemonDeviceId, En as collectLocalAgentControllerInventory, Eo as migrateProjectBindingStore, Er as getCliVersionInfo, Et as buildProfileWorkspaceRows, F as emitSpaceAgentOverview, Fa as buildHumanAuthenticationCard, Fi as resolveAgentExecutionStatus, Fn as buildSignalIndex, Fo as renderTextInfoCard, Fr as OPENMELD_AGENT_MENTAL_MODEL_LINES, Ft as fetchSpaceMeta, G as runAgentsCustomList, Ga as requestLocalAgentActivitySync, Gi as resolveVersionChangeDirection, Gn as assessCliUpdate, Go as cliJsonSkillsShowEnvelopeSchema, Gr as formatAgentReplyReadinessLabel, Gt as runDaemonStartDecisionPrompt, H as runAgents, Ha as LocalProjectConnectionError, Hi as resetCurrentCommandCheckState, Hn as promptSearchSelect, Ho as cliJsonOutputEnvelopeSchema, Hr as resolveServiceReadinessFromServiceStatus, Ht as writeInstalledLocalComponentsSnapshot, I as emitSpaceCliAgentOverview, Ia as createAuthenticationError, Ii as resolveAgentProfileEditCapabilities, In as buildSignalMessageReadProjection, Io as sanitizeTerminalDisplayText, Ir as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, It as updateSpaceMeta, J as runAgentsDetect, Ja as resolveAgentActivityRouteForPath, Ji as getDaemonSystemServiceLogPath, Jn as readDispatchOwnedRuntimeGuard, Jo as revokeOrganizationJoinLinkResponseSchema, Jr as mapAgentReplyReadinessToLegacyAutoReply, Jt as runSkillsEnsure, K as runAgentsCustomRemove, Ka as isAgentActivityRouteRegistered, Ki as readCurrentDaemonRuntimeContext, Kn as isCliUpdateCheckApplicable, Ko as getOrganizationJoinLinkResponseSchema, Kr as formatDeviceReplyReadinessLabel, Kt as collectSkillsReadinessSnapshot, L as prepareLocalAgentReadiness, La as resolveAuthenticationGuidance, Li as resolveEvidenceSyncHealth, Ln as buildSpaceRoundReadProjection, Lo as emitCliJsonEnvelope, Lr as areAllowedActionsEquivalent, Lt as readGatewayJsonResponse, M as prepareAuthenticatedSpaceCommandContext, Ma as getSelectedOpenMeldProfileId, Mi as listAgentControllerPermissionModeOptions, Mn as assertNoRemovedCcSpaceAddressingSyntax, Mo as enqueueControllerTaskLifecycleEventWhileLocked, Mr as formatDualViewGuideForDisplay, Mt as readDaemonStartFailureLogTailLines, N as resolveOpenMeldProfileForSpaceCommand, Na as setSelectedOpenMeldProfileId, Ni as parseAgentControllerRef, Nn as buildDispatchResultMessageReadProjection, No as readControllerTaskLifecycleOutboxHealth, Nr as buildDualViewGuideMessage, Nt as fetchSpaceUpdates, O as parseEnvelope, Oa as resolveOpenMeldProfile, Oi as buildAgentControllerRef, On as resolveLocalAgentControllerLaunchability, Oo as runIfAgentActivityBindingGenerationIsCurrent, Or as registerAuthLoginRequestOptions, Ot as emitDaemonAgentOverview, P as resolveSpaceAccessLabel, Pa as buildAgentAuthenticationGuide, Pi as resolveAgentControllerPermissionModeForController, Pn as buildDispatchResultReplyWorkflowProjection, Po as renderInfoCard, Pr as formatAgentOverviewPayload, Pt as createCliSpaceApi, Q as runAgentsManage, Qa as installAgentActivityIntegrations, Qi as buildInstallSelfJsonPayload, Qn as resolveElapsedTimeMs, Qr as createModelCatalogReadSession, Qt as ensureLocalSkills, R as buildReplyReadinessGuidance, Ra as resolveAuthenticationGuidanceFromError, Ri as resolveNativeAgentControllerPermissionModeForController, Rn as buildUpdatesReplyWorkflowProjection, Ro as errLine, Rr as buildAgentFacingPublicationModeGuideLines, Rt as readGatewayTextResponse, S as loadSpaceSignalIndexOrNull, Sa as resolveOpenMeldProfileOrNull, Si as classifyDaemonServiceRunStartability, Sn as computeRetryDelayMs, So as removeProjectOutbox, Sr as getCommandHintsFromContract, St as runDaemonStop, T as buildFormalSignalReadPayload, Ta as deleteOpenMeldProfile, Ti as ensureDaemonRuntimePaths, Tn as submitRuntimeAgentControllerReports, To as listProjectConnectionsWithStatus, Tr as registerSkillsTargetSelectionOptions, Tt as buildProfileWorkspacePresentation, U as runAgentsConfig, Ua as validateLocalProjectConnectionPath, Ui as startCurrentCommandCheckScope, Un as isReturnKeypress, Uo as cliJsonSkillsListEnvelopeSchema, Ur as resolveDaemonServiceFreshnessWarning, Ut as resolveDaemonServiceParticipationStatus, V as resolveAgentProfileSetup, Va as setProfileDefaultView, Vi as isCurrentCommandCheckScopeActive, Vn as promptSearchMultiselect, Vo as cliBinaryDeltaPatchSchema, Vr as formatDaemonFailureContextText, Vt as resolveLocalComponentsStatus, W as runAgentsCustomAdd, Wa as LocalDaemonControlPlaneClientError, Wi as inspectDaemonServiceInventory, Wn as runInteractivePrompt, Wo as cliJsonSkillsLoadEnvelopeSchema, Wr as resolveCurrentReplyReadinessSnapshot, Wt as runDaemonServiceParticipationGate, X as runAgentsEnable, Xi as readDaemonServiceJobCrashExitCode, Xn as writeDispatchSpaceActionRecord, Xo as package_default, Xr as resolveOpenClawLocalDiagnosticsValue, Xt as runSkillsUninstall, Y as runAgentsDisable, Ya as unregisterAgentActivityRoute, Yi as isDaemonServiceJobNeverSpawned, Yn as readDispatchSpaceActionContextFromEnv, Yo as compareAgentControllerRefsForDisplay, Yr as resolveGatewayChainReadiness, Yt as runSkillsInstall, Z as runAgentsList, Za as defaultManagedIntegrationPaths, Zi as resolveDaemonServiceManager, Zn as formatElapsedTime, Zr as syncProfileWorkspaceState, Zt as runSkillsUpdate, _ as runSpaceWriteWithPasswordRetry, _a as parseCliViewMode, _i as buildDaemonRouteObservationPresentation$1, _n as promptTextEntry, _o as normalizeSharedSessionTitle, _r as createSpaceUpdatesGuideError, _t as runDaemonInterrupt, a as runSpaceDelete, aa as readVersionState, ai as setOpenMeldManagedProfileWorkspace, an as ensureCommandAuthenticationOrCancel, ao as formatOpenMeldCliLine, ar as createProfileMenuGuideError, at as printOpenMeldBanner, b as buildIdentityOnlyMembersSnapshotForReadProjection, ba as isSelectedOpenMeldProfileRequiredError, bi as buildDaemonServiceTargetSpec, bn as resolveServiceParticipationReadiness, bo as removeProjectInbox, br as createUpgradeConfirmationGuideError, bt as runDaemonSnapshot, c as runSpaceLeave, ca as resolveOpenMeldDistribution, ci as syncDeviceRuntimeStateProjection, cn as runAuthLogout, co as resolveSetupFollowUpCliEntryCommand, cr as createSpaceAliasTargetGuideError, ct as renderOpenMeldLogo, d as runSpaceRemoveMembers, da as resolveCurrentDaemonExpectedVersion, di as listAgentTargetStates, dn as buildAuthStatusRows, do as readDaemonServiceContract, dr as createSpaceMenuGuideError, dt as resolveSpaceSendText, ea as buildNextVersionState, ei as ensureOpenMeldManagedProfileWorkspace, en as readRuntimeReportingHealthState, eo as resolveAgentActivityDispatcherCommand, er as formatDaemonServiceMissingRecommendation, et as runAgentsShow, f as runSpaceSend, fa as buildHumanErrorCopy, fi as reconcileNewRunnableBuiltinAgentsForSetup, fn as buildAuthStatusSnapshot, fo as upsertDaemonServiceContract, fr as createSpacePublicationSetGuideError, ft as runDaemon, g as runSpaceReadWithPasswordRetry, ga as formatMessage, gn as resolveCreateProfileName, go as resolveObservedAgentActivityBinding, gr as createSpaceTargetGuideError, gt as runDaemonInstall, h as uploadPreparedSpaceFiles, ha as createPresenter, hi as resolveLocalRegistryAgentIdFromAgentControllerRef, hn as resolveCreateProfileKind, ho as buildAgentActivityEvent, hr as createSpaceSubcommandTargetGuideError, ht as runDaemonCancel, i as runSpaceCreate, ia as fetchLatestPackageInfo, ii as setCustomProfileWorkspace, in as buildCommandAuthenticationPromptMessage, io as formatOpenMeldCliCommands, ir as createProfileCreateGuideError, it as colorizeDisplayProfileLabel, j as assertValidSpaceIdTarget, ja as clearSelectedOpenMeldProfileId, ji as getAgentControllerPermissionModeFieldLabel, jn as upsertSpaceConfig, jo as canonicalizeLocalProjectPath, jr as DualViewGuideError, jt as runDaemonStartupPreflight, k as isSpaceCommandOutputHandledError, ka as updateOpenMeldProfile, ki as createAgentExecutionStatusDisplayRows, kn as resolveLocalAgentControllerReportDecision, ko as setDefaultProjectConnection, kr as registerBuiltinAgentSelectionOptions, kt as createDelayedSpinner, l as runSpaceList, la as resolveDaemonRuntimeContractCompatibility, li as createPrimaryBindingReadSession, ln as runAuthMenu, lo as resolveUserFacingCliEntryCommand, lr as createSpaceContractSetGuideError, lt as renderOpenMeldTagline, m as prepareRequestedSpaceSendFiles, ma as renderHumanTextErrorCard, mi as notifyDaemonRouteCatalogChanged, mn as createProfileByKind, mo as removeAgentActivityContextCache, mr as createSpaceResultGuideError, mt as runDaemonBackgroundStartForDecision, n as promptAndConfirmSpacePassword, na as ensureVersionStateReady, ni as readProfileWorkspaceConfig, nn as connectWebSocket, no as formatInlineOpenMeldCliCommands, nr as createDoctorFailedGuideError, nt as postLocalParticipationMutationReconcile, o as runSpaceHistory, oa as writeVersionState, oi as validateCustomProfileWorkspacePath, on as evaluateCommandAuthentication, oo as formatOpenMeldCliTextBlock, or as createResetConfirmationGuideError, ot as renderOpenMeldBrandBlockLines, p as runSpaceWatch, pa as renderHumanErrorCard, pi as listBuiltinAgentsRegistryEntries, pn as formatActiveOrganizationLabel, po as readAgentActivityContextForPath, pr as createSpaceRemoveMembersGuideError, pt as runDaemonAutostart, q as runAgentsCustomUpdate, qa as registerAgentActivityRoute, qi as readCurrentObservedDaemonRuntimeStatus, qn as assertDispatchOwnedRuntimePublicWriteAllowed, qo as organizationJoinLinkErrorResponseSchema, qr as formatHumanReplyReadinessReason$1, qt as runSkillsCheck$1, r as runSpaceAddMembers, ra as fetchLatestCliBinaryRelease, ri as resolveConfiguredProfileWorkspacePath, rn as assessServerRequiredVersion, ro as formatOpenMeldCliCommand, rr as createProfileActionGuideError, rt as colorizeAgentLabel, s as runSpaceJoin, sa as isBinaryDistribution, si as describeProfileWorkspacePathValidationFailure, sn as runAuthLogin, so as formatProfileAwareOpenMeldCliCommands, sr as createSpaceAddMembersGuideError, st as renderOpenMeldHeader, t as buildCreateSpacePasswordPromptConfig, ta as compareSemver, ti as normalizeCustomProfileWorkspacePath, tn as readRecentDaemonDispatchJournalEvents, to as uninstallAgentActivityIntegrations, tr as canUseInteractivePrompts, tt as formatTransportModeDisplay, u as runSpacePassword, ua as toStartBackgroundHelperExecutionCompatibility, ui as resolveAgentProfilePrimaryAgentControllerReport, un as runAuthStatus, uo as syncLocalAgentActivity, ur as createSpaceLeaveGuideError, ut as resolveGatewayWebOrigin, v as buildHumanReadSignalsTranscriptItems, va as resolveRuntimeContext, vi as buildOnboardingPlan, vn as ensureAgentProfileRuntimeBinding, vo as readCodexSessionTitles, vr as createStartAgentIdentityGuideError, vt as runDaemonReinstall, w as buildFormalDispatchResultReadPayload, wa as createOpenMeldHumanProfile, wi as readRecentDaemonLifecycleEvents, wn as submitRuntimeAgentControllerReport, wo as listProjectBindings, wr as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, wt as runDaemonUninstall, x as loadSpaceIdentityDirectoryOrNull, xa as requireOpenMeldProfile, xi as resolveDaemonServiceAlignmentDecision, xn as assessActionParticipationCandidate, xo as readAgentActivityOutboxHealth, xr as getCommandEntryContract, xt as runDaemonStatusFlow, y as emitHumanReadSignalsTextProjection, ya as resolveViewProfileKey, yi as getSetupFlowCopy, yn as formatServiceParticipationReadinessLabel, yo as enqueueAgentActivityHookEvent, yr as createStartAuthenticationGuideError, yt as runDaemonRunAfterEntryChecks, z as resolveHumanControllerDisplayName, za as resolveAuthenticationGuidanceFromMessage, zi as finishCurrentCommandCheckScope, zn as createSpaceMemberIdentityIndex, zo as outJsonLine, zr as canonicalizeAllowedActions, zt as toStructuredGatewayFailure } from "./command-BjGlkb0g.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-CJnq8AgJ.js";
6
+ import { At as centerAgentInteractionSourceSchema, Er as trimmedStringFromUnknown, Ft as isSpaceFileTextEditable, Gn as clientMessageIdSchema, Rt as resolveSpaceFileMimeType, _r as openMeldRuntimeProfileIdSchema, an as spaceContractFieldsSchema, en as dispatchExecutionSchema, fr as openMeldProfileIdSchema, kt as spaceStatusSchema, on as spaceContractSchema, tn as spaceThreadContextSchema, vn as messageEnvelopeSchema, wr as nonEmptyTrimmedStringFromUnknown } from "./runtime-transport-DEj52An9.js";
7
7
  import { r as daemonServiceLaneSchema } from "./service-contract-DZWQdPz5.js";
8
8
  import { O as getDaemonStatus } from "./daemon-runtime-lease-DiRoGxhm.js";
9
- import { a as getAuthSessionState, i as getAuthSessionMetadata, l as updateAuthSessionActiveOrganization, n as clearAuthSession, o as getCurrentAuthOwnerUserId, s as normalizeStoredActiveOrganization } from "./auth-session-BJZuJ2bM.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-Chryr5BZ.js";
9
+ import { a as getAuthSessionState, i as getAuthSessionMetadata, l as updateAuthSessionActiveOrganization, n as clearAuthSession, o as getCurrentAuthOwnerUserId, s as normalizeStoredActiveOrganization } from "./auth-session-vFtLpWjB.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-9MJAKRpy.js";
11
11
  import { Command, Option } from "commander";
12
12
  import os, { homedir, hostname, release, tmpdir } from "node:os";
13
13
  import { z } from "zod/v4";
@@ -2285,6 +2285,18 @@ const COMMAND_CHECK_REQUIREMENTS = Object.freeze({
2285
2285
  "space.add-members": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2286
2286
  "space.remove-members": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2287
2287
  "space.leave": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2288
+ "space.files.list": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2289
+ "space.files.read": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2290
+ "space.files.upload": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2291
+ "space.files.write": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2292
+ "space.files.download": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2293
+ "space.files.mkdir": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2294
+ "space.files.rename": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2295
+ "space.files.move": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2296
+ "space.files.trash": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2297
+ "space.files.history": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2298
+ "space.files.restore": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2299
+ "space.files.restore-version": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2288
2300
  "space.watch": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2289
2301
  "space.send": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
2290
2302
  "space.history": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, AUTO_FIX_LOCAL_RUNTIME, REQUIRED_SIGN_IN, CONFIRM_SELECTED_PROFILE),
@@ -2473,6 +2485,30 @@ const COMMAND_ENTRY_NAME_BY_ROUTE = {
2473
2485
  "spaces remove-members": "space.remove-members",
2474
2486
  "space leave": "space.leave",
2475
2487
  "spaces leave": "space.leave",
2488
+ "space files list": "space.files.list",
2489
+ "spaces files list": "space.files.list",
2490
+ "space files read": "space.files.read",
2491
+ "spaces files read": "space.files.read",
2492
+ "space files upload": "space.files.upload",
2493
+ "spaces files upload": "space.files.upload",
2494
+ "space files write": "space.files.write",
2495
+ "spaces files write": "space.files.write",
2496
+ "space files download": "space.files.download",
2497
+ "spaces files download": "space.files.download",
2498
+ "space files mkdir": "space.files.mkdir",
2499
+ "spaces files mkdir": "space.files.mkdir",
2500
+ "space files rename": "space.files.rename",
2501
+ "spaces files rename": "space.files.rename",
2502
+ "space files move": "space.files.move",
2503
+ "spaces files move": "space.files.move",
2504
+ "space files trash": "space.files.trash",
2505
+ "spaces files trash": "space.files.trash",
2506
+ "space files history": "space.files.history",
2507
+ "spaces files history": "space.files.history",
2508
+ "space files restore": "space.files.restore",
2509
+ "spaces files restore": "space.files.restore",
2510
+ "space files restore-version": "space.files.restore-version",
2511
+ "spaces files restore-version": "space.files.restore-version",
2476
2512
  "space watch": "space.watch",
2477
2513
  "spaces watch": "space.watch",
2478
2514
  "space send": "space.send",
@@ -4502,6 +4538,78 @@ const COMMAND_ENTRY_COPY_BY_NAME = Object.freeze({
4502
4538
  cliUpdateAction: "leaving a space",
4503
4539
  serviceAction: null
4504
4540
  },
4541
+ "space.files.list": {
4542
+ signInAction: "listing Space files",
4543
+ profileAction: "listing Space files",
4544
+ cliUpdateAction: "listing Space files",
4545
+ serviceAction: null
4546
+ },
4547
+ "space.files.read": {
4548
+ signInAction: "reading a Space file",
4549
+ profileAction: "reading a Space file",
4550
+ cliUpdateAction: "reading a Space file",
4551
+ serviceAction: null
4552
+ },
4553
+ "space.files.upload": {
4554
+ signInAction: "uploading a Space file",
4555
+ profileAction: "uploading a Space file",
4556
+ cliUpdateAction: "uploading a Space file",
4557
+ serviceAction: null
4558
+ },
4559
+ "space.files.write": {
4560
+ signInAction: "updating a Space file",
4561
+ profileAction: "updating a Space file",
4562
+ cliUpdateAction: "updating a Space file",
4563
+ serviceAction: null
4564
+ },
4565
+ "space.files.download": {
4566
+ signInAction: "downloading a Space file",
4567
+ profileAction: "downloading a Space file",
4568
+ cliUpdateAction: "downloading a Space file",
4569
+ serviceAction: null
4570
+ },
4571
+ "space.files.mkdir": {
4572
+ signInAction: "creating a Space folder",
4573
+ profileAction: "creating a Space folder",
4574
+ cliUpdateAction: "creating a Space folder",
4575
+ serviceAction: null
4576
+ },
4577
+ "space.files.rename": {
4578
+ signInAction: "renaming a Space file or folder",
4579
+ profileAction: "renaming a Space file or folder",
4580
+ cliUpdateAction: "renaming a Space file or folder",
4581
+ serviceAction: null
4582
+ },
4583
+ "space.files.move": {
4584
+ signInAction: "moving a Space file or folder",
4585
+ profileAction: "moving a Space file or folder",
4586
+ cliUpdateAction: "moving a Space file or folder",
4587
+ serviceAction: null
4588
+ },
4589
+ "space.files.trash": {
4590
+ signInAction: "moving a Space file or folder to trash",
4591
+ profileAction: "moving a Space file or folder to trash",
4592
+ cliUpdateAction: "moving a Space file or folder to trash",
4593
+ serviceAction: null
4594
+ },
4595
+ "space.files.history": {
4596
+ signInAction: "viewing a Space file's history",
4597
+ profileAction: "viewing a Space file's history",
4598
+ cliUpdateAction: "viewing a Space file's history",
4599
+ serviceAction: null
4600
+ },
4601
+ "space.files.restore": {
4602
+ signInAction: "restoring a Space file or folder",
4603
+ profileAction: "restoring a Space file or folder",
4604
+ cliUpdateAction: "restoring a Space file or folder",
4605
+ serviceAction: null
4606
+ },
4607
+ "space.files.restore-version": {
4608
+ signInAction: "restoring a Space file version",
4609
+ profileAction: "restoring a Space file version",
4610
+ cliUpdateAction: "restoring a Space file version",
4611
+ serviceAction: null
4612
+ },
4505
4613
  "space.watch": {
4506
4614
  signInAction: "watching a space",
4507
4615
  profileAction: "watching a space",
@@ -22797,7 +22905,8 @@ const TOP_LEVEL_HELP_EXAMPLES = [
22797
22905
  "openmeld space password <space-id> --password <new-password>",
22798
22906
  "openmeld space send <space-id> \"hello from Mars deck\"",
22799
22907
  "echo \"hello from file-safe input\" | openmeld space send <space-id> --stdin",
22800
- "openmeld space send <space-id> --file /tmp/message.txt",
22908
+ "openmeld space send <space-id> --text-file /tmp/message.txt",
22909
+ "openmeld space send <space-id> --file /tmp/launch-brief.pdf",
22801
22910
  "openmeld view",
22802
22911
  "openmeld view agent"
22803
22912
  ];
@@ -26577,21 +26686,66 @@ function runSpaceActionReply(input) {
26577
26686
  messageLength: text.length,
26578
26687
  referenceTargetCount: targetIds.referenceTargets.length
26579
26688
  });
26689
+ const filePaths = input.filePaths ?? [];
26690
+ if (filePaths.length === 0) {
26691
+ recordSpaceActionReply({
26692
+ context,
26693
+ files: [],
26694
+ targetIds,
26695
+ text,
26696
+ timing
26697
+ });
26698
+ return;
26699
+ }
26700
+ return uploadAndRecordSpaceActionReply({
26701
+ context,
26702
+ filePaths,
26703
+ targetIds,
26704
+ text,
26705
+ timing
26706
+ });
26707
+ }
26708
+ async function uploadAndRecordSpaceActionReply(input) {
26709
+ const files = await uploadSpaceActionReplyFiles({
26710
+ context: input.context,
26711
+ filePaths: input.filePaths
26712
+ });
26713
+ recordSpaceActionReply({
26714
+ ...input,
26715
+ files
26716
+ });
26717
+ }
26718
+ function recordSpaceActionReply(input) {
26580
26719
  const record = recordAction({
26581
26720
  action: {
26582
26721
  type: "post_message",
26722
+ ...input.files.length > 0 ? { files: [...input.files] } : {},
26583
26723
  messageEnvelope: {
26584
- activationTargets: targetIds.activationTargets,
26585
- referenceTargets: targetIds.referenceTargets,
26586
- ...context.replyToSignalId ? { replyToSignalId: context.replyToSignalId } : {},
26587
- text
26724
+ activationTargets: input.targetIds.activationTargets,
26725
+ referenceTargets: input.targetIds.referenceTargets,
26726
+ ...input.context.replyToSignalId ? { replyToSignalId: input.context.replyToSignalId } : {},
26727
+ text: input.text
26588
26728
  }
26589
26729
  },
26590
26730
  command: "reply",
26591
- context
26731
+ context: input.context
26732
+ });
26733
+ input.timing.emit("record_written", input.context, { actionType: record.action.type });
26734
+ input.timing.emit("done", input.context, { actionType: record.action.type });
26735
+ }
26736
+ async function uploadSpaceActionReplyFiles(input) {
26737
+ const prepared = await prepareRequestedSpaceSendFiles({ filePaths: input.filePaths });
26738
+ if (prepared.length === 0) return [];
26739
+ return await uploadPreparedSpaceFiles({
26740
+ files: prepared,
26741
+ requestContext: buildOpenMeldRequestContextFromProfile({ openMeldProfile: await requireOpenMeldProfile({
26742
+ openMeldProfileId: input.context.targetProfileId,
26743
+ persistSelection: false,
26744
+ authAction: "sharing files in a Space reply"
26745
+ }) }),
26746
+ spaceApi: createCliSpaceApi(await resolveBaseUrl()),
26747
+ spaceId: input.context.spaceId
26592
26748
  });
26593
- timing.emit("record_written", context, { actionType: record.action.type });
26594
- timing.emit("done", context, { actionType: record.action.type });
26595
26749
  }
26596
26750
  function runSpaceActionWake(input) {
26597
26751
  const context = readDispatchSpaceActionContextFromEnv();
@@ -27245,7 +27399,7 @@ function normalizeOptionalString(value) {
27245
27399
  return normalized.length > 0 ? normalized : null;
27246
27400
  }
27247
27401
  async function runDefaultSpaceAddMeMembership(input) {
27248
- const { runSpaceAddMeMembership } = await import("./add-me-membership-B9LeL4Ud.js");
27402
+ const { runSpaceAddMeMembership } = await import("./add-me-membership-CsoQDzyh.js");
27249
27403
  return await runSpaceAddMeMembership(input);
27250
27404
  }
27251
27405
  //#endregion
@@ -27812,6 +27966,623 @@ function pruneUnchangedSpaceContractPatch(input) {
27812
27966
  return Object.keys(nextPatch).length > 0 ? nextPatch : null;
27813
27967
  }
27814
27968
  //#endregion
27969
+ //#region src/space/files-command.ts
27970
+ async function runSpaceFilesList(input) {
27971
+ const context = await prepareSpaceFilesContext(input, "listing Space files");
27972
+ if (!context) return;
27973
+ const read = await runSpaceReadWithPasswordRetry({
27974
+ initialPassword: input.password,
27975
+ interactive: isInteractiveHumanOutput(context, input.json),
27976
+ presenter: context.presenter,
27977
+ execute: async (spacePassword) => await context.spaceApi.listFiles({
27978
+ spaceId: input.space,
27979
+ requestContext: context.requestContext,
27980
+ query: {
27981
+ ...input.trash ? {} : { parentId: normalizeFolderId(input.folder) },
27982
+ view: input.trash ? "trash" : "active"
27983
+ },
27984
+ ...spacePassword === void 0 ? {} : { spacePassword }
27985
+ })
27986
+ });
27987
+ if (read.status === "cancelled") return;
27988
+ emitListOutput({
27989
+ presenter: context.presenter,
27990
+ result: read.result,
27991
+ json: input.json
27992
+ });
27993
+ }
27994
+ async function runSpaceFilesRead(input) {
27995
+ const context = await prepareSpaceFilesContext(input, "reading a Space file");
27996
+ if (!context) return;
27997
+ const read = await runSpaceReadWithPasswordRetry({
27998
+ initialPassword: input.password,
27999
+ interactive: isInteractiveHumanOutput(context, input.json),
28000
+ presenter: context.presenter,
28001
+ execute: async (spacePassword) => {
28002
+ const [metadata, content] = await Promise.all([context.spaceApi.getFile({
28003
+ spaceId: input.space,
28004
+ requestContext: context.requestContext,
28005
+ fileId: input.fileId,
28006
+ ...spacePassword === void 0 ? {} : { spacePassword }
28007
+ }), context.spaceApi.downloadFileContent({
28008
+ spaceId: input.space,
28009
+ requestContext: context.requestContext,
28010
+ fileId: input.fileId,
28011
+ ...input.revision === void 0 ? {} : { revision: input.revision },
28012
+ ...spacePassword === void 0 ? {} : { spacePassword }
28013
+ })]);
28014
+ if (!isSpaceFileTextEditable({
28015
+ mimeType: content.mimeType,
28016
+ sizeBytes: content.bytes.byteLength
28017
+ })) throw new Error("This file is binary or too large to print. Use `openmeld space files download` instead.");
28018
+ return {
28019
+ file: metadata.file,
28020
+ revision: content.revision,
28021
+ content: new TextDecoder("utf-8", { fatal: true }).decode(content.bytes)
28022
+ };
28023
+ }
28024
+ });
28025
+ if (read.status === "cancelled") return;
28026
+ if (input.json) {
28027
+ outJsonLine(read.result);
28028
+ return;
28029
+ }
28030
+ if (context.runtime.resolvedView === "agent") {
28031
+ context.presenter.data({
28032
+ code: "space.files.read",
28033
+ payload: read.result
28034
+ });
28035
+ return;
28036
+ }
28037
+ context.presenter.line({
28038
+ code: "space.files.read",
28039
+ text: read.result.content
28040
+ });
28041
+ }
28042
+ async function runSpaceFilesHistory(input) {
28043
+ const context = await prepareSpaceFilesContext(input, "reading Space file history");
28044
+ if (!context) return;
28045
+ const read = await runSpaceReadWithPasswordRetry({
28046
+ initialPassword: input.password,
28047
+ interactive: isInteractiveHumanOutput(context, input.json),
28048
+ presenter: context.presenter,
28049
+ execute: async (spacePassword) => await context.spaceApi.listFileRevisions({
28050
+ spaceId: input.space,
28051
+ requestContext: context.requestContext,
28052
+ fileId: input.fileId,
28053
+ ...spacePassword === void 0 ? {} : { spacePassword }
28054
+ })
28055
+ });
28056
+ if (read.status === "cancelled") return;
28057
+ if (input.json) {
28058
+ outJsonLine(read.result);
28059
+ return;
28060
+ }
28061
+ if (context.presenter.view === "agent") {
28062
+ context.presenter.data({
28063
+ code: "space.files.history",
28064
+ payload: read.result
28065
+ });
28066
+ return;
28067
+ }
28068
+ context.presenter.line({
28069
+ code: "space.files.history",
28070
+ text: `Version history for ${read.result.file.path}:`
28071
+ });
28072
+ for (const revision of read.result.revisions) context.presenter.line({
28073
+ code: "space.files.history.version",
28074
+ text: `Version ${revision.revision} ${revision.createdAt} ${revision.createdBy.displayName} ${revision.sizeBytes} bytes`,
28075
+ data: { revision }
28076
+ });
28077
+ }
28078
+ async function runSpaceFilesUpload(input) {
28079
+ const context = await prepareSpaceFilesContext(input, "uploading a Space file");
28080
+ if (!context) return;
28081
+ const bytes = await readLocalFile(input.file);
28082
+ const write = await runSpaceWriteWithPasswordRetry({
28083
+ initialPassword: input.password,
28084
+ interactive: isInteractiveHumanOutput(context, input.json),
28085
+ presenter: context.presenter,
28086
+ execute: async (spacePassword) => await context.spaceApi.uploadFile({
28087
+ spaceId: input.space,
28088
+ requestContext: context.requestContext,
28089
+ name: input.name?.trim() || basename(input.file),
28090
+ parentId: normalizeFolderId(input.folder),
28091
+ mimeType: resolveMimeType(input.mimeType, input.file),
28092
+ bytes,
28093
+ clientMutationId: randomUUID(),
28094
+ ...spacePassword === void 0 ? {} : { spacePassword }
28095
+ })
28096
+ });
28097
+ if (write.status === "cancelled") return;
28098
+ emitMutationOutput({
28099
+ presenter: context.presenter,
28100
+ code: "space.files.uploaded",
28101
+ text: `Uploaded ${write.result.path} (revision ${write.result.latestRevision.revision}).`,
28102
+ payload: { file: write.result },
28103
+ json: input.json
28104
+ });
28105
+ }
28106
+ async function runSpaceFilesWrite(input) {
28107
+ const context = await prepareSpaceFilesContext(input, "updating a Space file");
28108
+ if (!context) return;
28109
+ const bytes = await resolveContentBytes({
28110
+ file: input.file,
28111
+ stdin: input.stdin
28112
+ });
28113
+ const write = await runSpaceWriteWithPasswordRetry({
28114
+ initialPassword: input.password,
28115
+ interactive: isInteractiveHumanOutput(context, input.json),
28116
+ presenter: context.presenter,
28117
+ execute: async (spacePassword) => await context.spaceApi.updateFileContent({
28118
+ spaceId: input.space,
28119
+ requestContext: context.requestContext,
28120
+ fileId: input.fileId,
28121
+ baseRevision: input.baseRevision,
28122
+ mimeType: resolveMimeType(input.mimeType, input.file),
28123
+ bytes,
28124
+ clientMutationId: randomUUID(),
28125
+ ...spacePassword === void 0 ? {} : { spacePassword }
28126
+ })
28127
+ });
28128
+ if (write.status === "cancelled") return;
28129
+ emitMutationOutput({
28130
+ presenter: context.presenter,
28131
+ code: "space.files.updated",
28132
+ text: `Saved ${write.result.path} as revision ${write.result.latestRevision.revision}.`,
28133
+ payload: { file: write.result },
28134
+ json: input.json
28135
+ });
28136
+ }
28137
+ async function runSpaceFilesDownload(input) {
28138
+ const context = await prepareSpaceFilesContext(input, "downloading a Space file");
28139
+ if (!context) return;
28140
+ const read = await runSpaceReadWithPasswordRetry({
28141
+ initialPassword: input.password,
28142
+ interactive: isInteractiveHumanOutput(context, input.json),
28143
+ presenter: context.presenter,
28144
+ execute: async (spacePassword) => await context.spaceApi.downloadFileContent({
28145
+ spaceId: input.space,
28146
+ requestContext: context.requestContext,
28147
+ fileId: input.fileId,
28148
+ ...input.revision === void 0 ? {} : { revision: input.revision },
28149
+ ...spacePassword === void 0 ? {} : { spacePassword }
28150
+ })
28151
+ });
28152
+ if (read.status === "cancelled") return;
28153
+ await writeFile(input.output, new Uint8Array(read.result.bytes), { flag: input.force ? "w" : "wx" });
28154
+ emitMutationOutput({
28155
+ presenter: context.presenter,
28156
+ code: "space.files.downloaded",
28157
+ text: `Downloaded revision ${read.result.revision} to ${input.output}.`,
28158
+ payload: {
28159
+ output: input.output,
28160
+ revision: read.result.revision,
28161
+ mimeType: read.result.mimeType,
28162
+ sizeBytes: read.result.bytes.byteLength
28163
+ },
28164
+ json: input.json
28165
+ });
28166
+ }
28167
+ async function runSpaceFilesMkdir(input) {
28168
+ const context = await prepareSpaceFilesContext(input, "creating a Space folder");
28169
+ if (!context) return;
28170
+ const write = await runSpaceWriteWithPasswordRetry({
28171
+ initialPassword: input.password,
28172
+ interactive: isInteractiveHumanOutput(context, input.json),
28173
+ presenter: context.presenter,
28174
+ execute: async (spacePassword) => await context.spaceApi.createFolder({
28175
+ spaceId: input.space,
28176
+ requestContext: context.requestContext,
28177
+ body: {
28178
+ name: input.name,
28179
+ parentId: normalizeFolderId(input.folder),
28180
+ clientMutationId: randomUUID()
28181
+ },
28182
+ ...spacePassword === void 0 ? {} : { spacePassword }
28183
+ })
28184
+ });
28185
+ if (write.status === "cancelled") return;
28186
+ emitMutationOutput({
28187
+ presenter: context.presenter,
28188
+ code: "space.files.folder_created",
28189
+ text: `Created folder ${write.result.folder.path}.`,
28190
+ payload: write.result,
28191
+ json: input.json
28192
+ });
28193
+ }
28194
+ async function runSpaceFilesRename(input) {
28195
+ await runSpaceFilesEntryUpdate({
28196
+ ...input,
28197
+ name: input.name
28198
+ });
28199
+ }
28200
+ async function runSpaceFilesMove(input) {
28201
+ await runSpaceFilesEntryUpdate({
28202
+ ...input,
28203
+ parentId: normalizeFolderId(input.folder)
28204
+ });
28205
+ }
28206
+ async function runSpaceFilesTrash(input) {
28207
+ const context = await prepareSpaceFilesContext(input, "moving a Space file to trash");
28208
+ if (!context) return;
28209
+ const write = await runSpaceWriteWithPasswordRetry({
28210
+ initialPassword: input.password,
28211
+ interactive: isInteractiveHumanOutput(context, input.json),
28212
+ presenter: context.presenter,
28213
+ execute: async (spacePassword) => await context.spaceApi.trashFileEntry({
28214
+ spaceId: input.space,
28215
+ requestContext: context.requestContext,
28216
+ entryId: input.entryId,
28217
+ clientMutationId: randomUUID(),
28218
+ ...spacePassword === void 0 ? {} : { spacePassword }
28219
+ })
28220
+ });
28221
+ if (write.status === "cancelled") return;
28222
+ emitMutationOutput({
28223
+ presenter: context.presenter,
28224
+ code: "space.files.trashed",
28225
+ text: "Moved the item to trash.",
28226
+ payload: write.result,
28227
+ json: input.json
28228
+ });
28229
+ }
28230
+ async function runSpaceFilesRestore(input) {
28231
+ const context = await prepareSpaceFilesContext(input, "restoring a Space file from Trash");
28232
+ if (!context) return;
28233
+ const write = await runSpaceWriteWithPasswordRetry({
28234
+ initialPassword: input.password,
28235
+ interactive: isInteractiveHumanOutput(context, input.json),
28236
+ presenter: context.presenter,
28237
+ execute: async (spacePassword) => await context.spaceApi.restoreFileEntry({
28238
+ spaceId: input.space,
28239
+ requestContext: context.requestContext,
28240
+ entryId: input.entryId,
28241
+ clientMutationId: randomUUID(),
28242
+ ...spacePassword === void 0 ? {} : { spacePassword }
28243
+ })
28244
+ });
28245
+ if (write.status === "cancelled") return;
28246
+ emitMutationOutput({
28247
+ presenter: context.presenter,
28248
+ code: "space.files.restored",
28249
+ text: `Restored ${write.result.path}.`,
28250
+ payload: { entry: write.result },
28251
+ json: input.json
28252
+ });
28253
+ }
28254
+ async function runSpaceFilesRestoreVersion(input) {
28255
+ const context = await prepareSpaceFilesContext(input, "restoring a Space file version");
28256
+ if (!context) return;
28257
+ const write = await runSpaceWriteWithPasswordRetry({
28258
+ initialPassword: input.password,
28259
+ interactive: isInteractiveHumanOutput(context, input.json),
28260
+ presenter: context.presenter,
28261
+ execute: async (spacePassword) => await context.spaceApi.restoreFileRevision({
28262
+ spaceId: input.space,
28263
+ requestContext: context.requestContext,
28264
+ fileId: input.fileId,
28265
+ revision: input.revision,
28266
+ baseRevision: input.baseRevision,
28267
+ clientMutationId: randomUUID(),
28268
+ ...spacePassword === void 0 ? {} : { spacePassword }
28269
+ })
28270
+ });
28271
+ if (write.status === "cancelled") return;
28272
+ emitMutationOutput({
28273
+ presenter: context.presenter,
28274
+ code: "space.files.version_restored",
28275
+ text: `Restored version ${input.revision} as version ${write.result.latestRevision.revision}.`,
28276
+ payload: {
28277
+ file: write.result,
28278
+ restoredRevision: input.revision
28279
+ },
28280
+ json: input.json
28281
+ });
28282
+ }
28283
+ async function runSpaceFilesEntryUpdate(input) {
28284
+ const context = await prepareSpaceFilesContext(input, "organizing Space files");
28285
+ if (!context) return;
28286
+ const write = await runSpaceWriteWithPasswordRetry({
28287
+ initialPassword: input.password,
28288
+ interactive: isInteractiveHumanOutput(context, input.json),
28289
+ presenter: context.presenter,
28290
+ execute: async (spacePassword) => await context.spaceApi.updateFileEntry({
28291
+ spaceId: input.space,
28292
+ requestContext: context.requestContext,
28293
+ entryId: input.entryId,
28294
+ body: {
28295
+ ...input.name === void 0 ? {} : { name: input.name },
28296
+ ...input.parentId === void 0 ? {} : { parentId: input.parentId },
28297
+ clientMutationId: randomUUID()
28298
+ },
28299
+ ...spacePassword === void 0 ? {} : { spacePassword }
28300
+ })
28301
+ });
28302
+ if (write.status === "cancelled") return;
28303
+ emitMutationOutput({
28304
+ presenter: context.presenter,
28305
+ code: "space.files.organized",
28306
+ text: `Updated ${write.result.path}.`,
28307
+ payload: { entry: write.result },
28308
+ json: input.json
28309
+ });
28310
+ }
28311
+ async function prepareSpaceFilesContext(input, action) {
28312
+ const context = await prepareAuthenticatedSpaceCommandContext({
28313
+ profile: input.profile,
28314
+ baseUrl: input.baseUrl,
28315
+ view: input.view,
28316
+ promptMessage: buildCommandAuthenticationPromptMessage(action),
28317
+ entryChecksHandled: input.entryChecksHandled
28318
+ });
28319
+ if (context.status === "cancelled") return null;
28320
+ assertValidSpaceIdTarget({
28321
+ space: input.space,
28322
+ resolvedView: context.runtime.resolvedView
28323
+ });
28324
+ const openMeldProfile = await resolveOpenMeldProfileForSpaceCommand({
28325
+ openMeldProfileId: input.profile,
28326
+ resolvedView: context.runtime.resolvedView,
28327
+ interactive: context.interactive
28328
+ });
28329
+ return {
28330
+ ...context,
28331
+ requestContext: buildOpenMeldRequestContextFromProfile({ openMeldProfile }),
28332
+ spaceApi: createCliSpaceApi(context.baseUrl)
28333
+ };
28334
+ }
28335
+ function emitListOutput(input) {
28336
+ if (input.json) {
28337
+ outJsonLine(input.result);
28338
+ return;
28339
+ }
28340
+ if (input.presenter.view === "agent") {
28341
+ input.presenter.data({
28342
+ code: "space.files.list",
28343
+ payload: input.result
28344
+ });
28345
+ return;
28346
+ }
28347
+ const location = input.result.breadcrumbs.map((item) => item.name).join(" / ");
28348
+ input.presenter.line({
28349
+ code: "space.files.location",
28350
+ text: `Files in ${location} (${input.result.capabilities.canWrite ? "can edit" : "view only"}):`
28351
+ });
28352
+ if (input.result.entries.length === 0) {
28353
+ input.presenter.line({
28354
+ code: "space.files.empty",
28355
+ text: input.result.view === "trash" ? "Trash is empty." : "This folder is empty."
28356
+ });
28357
+ return;
28358
+ }
28359
+ for (const entry of input.result.entries) input.presenter.line({
28360
+ code: "space.files.entry",
28361
+ text: formatEntry(entry),
28362
+ data: { entry }
28363
+ });
28364
+ }
28365
+ function emitMutationOutput(input) {
28366
+ if (input.json) {
28367
+ outJsonLine(input.payload);
28368
+ return;
28369
+ }
28370
+ if (input.presenter.view === "agent") {
28371
+ input.presenter.data({
28372
+ code: input.code,
28373
+ payload: input.payload
28374
+ });
28375
+ return;
28376
+ }
28377
+ input.presenter.line({
28378
+ code: input.code,
28379
+ text: input.text
28380
+ });
28381
+ }
28382
+ function formatEntry(entry) {
28383
+ if (entry.kind === "folder") return `[folder] ${entry.name} id=${entry.id}`;
28384
+ return `[file] ${entry.name} revision=${entry.latestRevision.revision} size=${entry.latestRevision.sizeBytes} id=${entry.id}`;
28385
+ }
28386
+ function normalizeFolderId(value) {
28387
+ const normalized = value?.trim();
28388
+ return !normalized || normalized === "root" ? null : normalized;
28389
+ }
28390
+ async function readLocalFile(path) {
28391
+ const bytes = await readFile(path);
28392
+ if (bytes.byteLength > 10485760) throw new Error("Space files must be 10 MiB or smaller.");
28393
+ return bytes;
28394
+ }
28395
+ async function resolveContentBytes(input) {
28396
+ const file = input.file?.trim();
28397
+ if (Boolean(file) === input.stdin) throw new Error("Choose exactly one content source: --file <path> or --stdin.");
28398
+ if (file) return await readLocalFile(file);
28399
+ const chunks = [];
28400
+ let total = 0;
28401
+ for await (const chunk of process.stdin) {
28402
+ const bytes = typeof chunk === "string" ? Buffer.from(chunk) : chunk;
28403
+ total += bytes.byteLength;
28404
+ if (total > 10485760) throw new Error("Space files must be 10 MiB or smaller.");
28405
+ chunks.push(bytes);
28406
+ }
28407
+ return Buffer.concat(chunks, total);
28408
+ }
28409
+ function resolveMimeType(explicitMimeType, path) {
28410
+ return resolveSpaceFileMimeType({
28411
+ declaredMimeType: explicitMimeType,
28412
+ fileName: path ?? ""
28413
+ });
28414
+ }
28415
+ function isInteractiveHumanOutput(context, json) {
28416
+ return context.interactive && context.runtime.resolvedView === "human" && !json;
28417
+ }
28418
+ //#endregion
28419
+ //#region src/space/files-registration.ts
28420
+ function registerSpaceFilesCommands(spaceCommand) {
28421
+ const filesCommand = spaceCommand.command("files").description("Share and collaborate on files in a Space.");
28422
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("list").description("List files and folders in a Space.").argument("<space>", "Space ID (64-character hex)").option("--folder <folder-id>", "Folder ID, or root", "root").option("--trash", "List items in Trash", false))).action(async (space, opts, command) => {
28423
+ await runFilesCommand(command, opts, "list", async (common) => {
28424
+ await runSpaceFilesList({
28425
+ ...common,
28426
+ space: String(space).trim(),
28427
+ folder: opts.folder,
28428
+ trash: opts.trash === true
28429
+ });
28430
+ });
28431
+ });
28432
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("read").description("Print a text Space file.").argument("<space>", "Space ID (64-character hex)").argument("<file-id>", "File ID").option("--revision <number>", "Read a specific revision"))).action(async (space, fileId, opts, command) => {
28433
+ await runFilesCommand(command, opts, "read", async (common) => {
28434
+ await runSpaceFilesRead({
28435
+ ...common,
28436
+ space: String(space).trim(),
28437
+ fileId: String(fileId).trim(),
28438
+ revision: parseRevision(opts.revision, "--revision")
28439
+ });
28440
+ });
28441
+ });
28442
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("history").description("List the saved versions of a Space file.").argument("<space>", "Space ID (64-character hex)").argument("<file-id>", "File ID"))).action(async (space, fileId, opts, command) => {
28443
+ await runFilesCommand(command, opts, "history", async (common) => {
28444
+ await runSpaceFilesHistory({
28445
+ ...common,
28446
+ space: String(space).trim(),
28447
+ fileId: String(fileId).trim()
28448
+ });
28449
+ });
28450
+ });
28451
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("upload").description("Upload a local file into a Space.").argument("<space>", "Space ID (64-character hex)").argument("<file>", "Local file path").option("--name <name>", "File name shown in the Space").option("--folder <folder-id>", "Destination folder ID, or root", "root").option("--type <mime-type>", "File media type"))).action(async (space, file, opts, command) => {
28452
+ await runFilesCommand(command, opts, "upload", async (common) => {
28453
+ await runSpaceFilesUpload({
28454
+ ...common,
28455
+ space: String(space).trim(),
28456
+ file: String(file),
28457
+ name: opts.name,
28458
+ folder: opts.folder,
28459
+ mimeType: opts.type
28460
+ });
28461
+ });
28462
+ });
28463
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("write").description("Save a new revision of an existing Space file.").argument("<space>", "Space ID (64-character hex)").argument("<file-id>", "File ID").requiredOption("--base-revision <number>", "Revision you read before making this change").option("--file <path>", "Read replacement content from a local file").option("--stdin", "Read replacement content from stdin (EOF to finish)", false).option("--type <mime-type>", "File media type"))).action(async (space, fileId, opts, command) => {
28464
+ await runFilesCommand(command, opts, "write", async (common) => {
28465
+ await runSpaceFilesWrite({
28466
+ ...common,
28467
+ space: String(space).trim(),
28468
+ fileId: String(fileId).trim(),
28469
+ baseRevision: parseRequiredRevision(opts.baseRevision, "--base-revision"),
28470
+ file: opts.file,
28471
+ stdin: opts.stdin === true,
28472
+ mimeType: opts.type ?? (opts.stdin === true ? "text/plain" : void 0)
28473
+ });
28474
+ });
28475
+ });
28476
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("download").description("Download a Space file to this computer.").argument("<space>", "Space ID (64-character hex)").argument("<file-id>", "File ID").requiredOption("--output <path>", "Destination path").option("--revision <number>", "Download a specific revision").option("--force", "Replace an existing destination file", false))).action(async (space, fileId, opts, command) => {
28477
+ await runFilesCommand(command, opts, "download", async (common) => {
28478
+ await runSpaceFilesDownload({
28479
+ ...common,
28480
+ space: String(space).trim(),
28481
+ fileId: String(fileId).trim(),
28482
+ output: String(opts.output),
28483
+ revision: parseRevision(opts.revision, "--revision"),
28484
+ force: opts.force === true
28485
+ });
28486
+ });
28487
+ });
28488
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("mkdir").description("Create a folder in a Space.").argument("<space>", "Space ID (64-character hex)").argument("<name>", "Folder name").option("--folder <folder-id>", "Parent folder ID, or root", "root"))).action(async (space, name, opts, command) => {
28489
+ await runFilesCommand(command, opts, "mkdir", async (common) => {
28490
+ await runSpaceFilesMkdir({
28491
+ ...common,
28492
+ space: String(space).trim(),
28493
+ name: String(name),
28494
+ folder: opts.folder
28495
+ });
28496
+ });
28497
+ });
28498
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("rename").description("Rename a Space file or folder.").argument("<space>", "Space ID (64-character hex)").argument("<entry-id>", "File or folder ID").argument("<name>", "New name"))).action(async (space, entryId, name, opts, command) => {
28499
+ await runFilesCommand(command, opts, "rename", async (common) => {
28500
+ await runSpaceFilesRename({
28501
+ ...common,
28502
+ space: String(space).trim(),
28503
+ entryId: String(entryId).trim(),
28504
+ name: String(name)
28505
+ });
28506
+ });
28507
+ });
28508
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("move").description("Move a Space file or folder.").argument("<space>", "Space ID (64-character hex)").argument("<entry-id>", "File or folder ID").option("--folder <folder-id>", "Destination folder ID, or root", "root"))).action(async (space, entryId, opts, command) => {
28509
+ await runFilesCommand(command, opts, "move", async (common) => {
28510
+ await runSpaceFilesMove({
28511
+ ...common,
28512
+ space: String(space).trim(),
28513
+ entryId: String(entryId).trim(),
28514
+ folder: opts.folder
28515
+ });
28516
+ });
28517
+ });
28518
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("trash").description("Move a Space file or folder to trash.").argument("<space>", "Space ID (64-character hex)").argument("<entry-id>", "File or folder ID"))).action(async (space, entryId, opts, command) => {
28519
+ await runFilesCommand(command, opts, "trash", async (common) => {
28520
+ await runSpaceFilesTrash({
28521
+ ...common,
28522
+ space: String(space).trim(),
28523
+ entryId: String(entryId).trim()
28524
+ });
28525
+ });
28526
+ });
28527
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("restore").description("Restore a Space file or folder from Trash.").argument("<space>", "Space ID (64-character hex)").argument("<entry-id>", "File or folder ID"))).action(async (space, entryId, opts, command) => {
28528
+ await runFilesCommand(command, opts, "restore", async (common) => {
28529
+ await runSpaceFilesRestore({
28530
+ ...common,
28531
+ space: String(space).trim(),
28532
+ entryId: String(entryId).trim()
28533
+ });
28534
+ });
28535
+ });
28536
+ withSpaceProfileOption(withCommonOptions(filesCommand.command("restore-version").description("Restore an older version as the newest version.").argument("<space>", "Space ID (64-character hex)").argument("<file-id>", "File ID").argument("<revision>", "Version to restore").requiredOption("--base-revision <number>", "Current revision before restoring"))).action(async (space, fileId, revision, opts, command) => {
28537
+ await runFilesCommand(command, opts, "restore-version", async (common) => {
28538
+ await runSpaceFilesRestoreVersion({
28539
+ ...common,
28540
+ space: String(space).trim(),
28541
+ fileId: String(fileId).trim(),
28542
+ revision: parseRequiredRevision(String(revision), "<revision>"),
28543
+ baseRevision: parseRequiredRevision(opts.baseRevision, "--base-revision")
28544
+ });
28545
+ });
28546
+ });
28547
+ }
28548
+ function withCommonOptions(command) {
28549
+ return command.option("--password <value>", "Space password for protected access").option("--json", "Print canonical JSON", false);
28550
+ }
28551
+ async function runFilesCommand(command, opts, action, run) {
28552
+ const cliOptions = resolveSpaceCommandCliOptions(command, opts);
28553
+ const view = getGlobalViewOption();
28554
+ await runCommandWithEntryChecks({
28555
+ routeTokens: [
28556
+ "space",
28557
+ "files",
28558
+ action
28559
+ ],
28560
+ view,
28561
+ profile: cliOptions.profile,
28562
+ gatewayUrl: cliOptions.gatewayUrl,
28563
+ run: async () => {
28564
+ await run({
28565
+ profile: cliOptions.profile,
28566
+ baseUrl: cliOptions.gatewayUrl,
28567
+ password: cliOptions.password,
28568
+ json: cliOptions.json === true,
28569
+ view,
28570
+ entryChecksHandled: true
28571
+ });
28572
+ }
28573
+ });
28574
+ }
28575
+ function parseRevision(raw, optionName) {
28576
+ const revision = parseNonNegativeIntegerOption(raw, optionName);
28577
+ if (revision === 0) throw new Error(`${optionName} must be at least 1`);
28578
+ return revision;
28579
+ }
28580
+ function parseRequiredRevision(raw, optionName) {
28581
+ const revision = parseRevision(raw, optionName);
28582
+ if (revision === void 0) throw new Error(`${optionName} is required`);
28583
+ return revision;
28584
+ }
28585
+ //#endregion
27815
28586
  //#region src/space/guide-output.ts
27816
28587
  function emitSpaceGuideHumanOutput(input) {
27817
28588
  const guideText = normalizeGuideText(input.meta.guide);
@@ -31659,11 +32430,13 @@ spaceCmd.option("--gateway-url <url>", "OpenMeld gateway URL (command line, OPEN
31659
32430
  }
31660
32431
  });
31661
32432
  });
32433
+ registerSpaceFilesCommands(spaceCmd);
31662
32434
  const spaceActionCmd = spaceCmd.command("action").description("Record a dispatch-scoped OpenMeld Space Action.").action(async () => {
31663
32435
  await runSpaceActionHelp();
31664
32436
  });
31665
- spaceActionCmd.command("reply").description("Record a final Space reply for the current dispatch.").argument("<message...>", "Reply message").option("--wake <target>", "Wake another Agent Profile with this reply", collectRepeatedOptionValue, []).option("--reference <target>", "Reference a Human or Agent Profile", collectRepeatedOptionValue, []).action(async (messageParts, opts) => {
32437
+ spaceActionCmd.command("reply").description("Record a final Space reply for the current dispatch.").argument("<message...>", "Reply message").option("--wake <target>", "Wake another Agent Profile with this reply", collectRepeatedOptionValue, []).option("--reference <target>", "Reference a Human or Agent Profile", collectRepeatedOptionValue, []).option("--file <path>", "Share a local file in this Space reply", collectRepeatedOptionValue, []).action(async (messageParts, opts) => {
31666
32438
  await runSpaceActionReply({
32439
+ filePaths: Array.isArray(opts.file) ? opts.file : [],
31667
32440
  messageParts: Array.isArray(messageParts) ? messageParts : [],
31668
32441
  wakeTargets: Array.isArray(opts.wake) ? opts.wake : [],
31669
32442
  referenceTargets: Array.isArray(opts.reference) ? opts.reference : []
@@ -32072,7 +32845,7 @@ withSpaceProfileOption(spaceCmd.command("watch").description("Watch a space in r
32072
32845
  }
32073
32846
  });
32074
32847
  });
32075
- withSpaceProfileOption(spaceCmd.command("send").description("Send one message to a Space.").argument("[space]", "Space ID (64-character hex)").argument("[text...]", "Text to send").option("--attach <path>", "Upload a JPEG or PNG attachment before sending (repeatable, max 4)", collectRepeatedOptionValue, []).option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(reference) mentions", false).option("--reply-to <signal-id>", "Reply into the thread of a message (creates the thread if it does not exist yet)").option("--password <value>", "Space password for protected access")).action(async (space, textParts, opts, command) => {
32848
+ withSpaceProfileOption(spaceCmd.command("send").description("Send one message to a Space.").argument("[space]", "Space ID (64-character hex)").argument("[text...]", "Text to send").option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(reference) mentions", false).option("--reply-to <signal-id>", "Reply into the thread of a message (creates the thread if it does not exist yet)").option("--password <value>", "Space password for protected access")).action(async (space, textParts, opts, command) => {
32076
32849
  const cliOptions = resolveSpaceCommandCliOptions(command, opts);
32077
32850
  const spaceValue = String(space ?? "").trim();
32078
32851
  const outputView = await resolveEffectiveViewForOutput();
@@ -32092,11 +32865,11 @@ withSpaceProfileOption(spaceCmd.command("send").description("Send one message to
32092
32865
  profile: cliOptions.profile,
32093
32866
  baseUrl: cliOptions.gatewayUrl,
32094
32867
  space: spaceValue,
32095
- attachmentPaths: Array.isArray(opts.attach) ? opts.attach.map(String) : [],
32868
+ filePaths: Array.isArray(opts.file) ? opts.file.map(String) : [],
32096
32869
  password: cliOptions.password,
32097
32870
  text: textValue,
32098
32871
  stdin: Boolean(opts.stdin),
32099
- file: typeof opts.file === "string" ? opts.file : void 0,
32872
+ textFile: typeof opts.textFile === "string" ? opts.textFile : void 0,
32100
32873
  plainText: opts.plain === true,
32101
32874
  replyToSignalId: typeof opts.replyTo === "string" ? opts.replyTo : void 0,
32102
32875
  view,
@@ -32459,7 +33232,7 @@ withSpaceProfileOption(spaceCmd.command("password").description("Set, change, or
32459
33232
  }
32460
33233
  });
32461
33234
  });
32462
- program.command("send").description("Alias for `openmeld space send`.").argument("[text...]", "Text to send").option("--profile <id>", "OpenMeld profile ID").option("--base-url <url>", "OpenMeld gateway URL").option("--space <space>", "Space ID (64-character hex)").option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(reference) mentions", false).option("--password <value>", "Space password for protected access").action(async (textParts, opts) => {
33235
+ program.command("send").description("Alias for `openmeld space send`.").argument("[text...]", "Text to send").option("--profile <id>", "OpenMeld profile ID").option("--base-url <url>", "OpenMeld gateway URL").option("--space <space>", "Space ID (64-character hex)").option("--stdin", "Read message text from stdin (EOF to finish)", false).option("--file <path>", "Share a local file in this Space message (repeatable, max 10)", collectRepeatedOptionValue, []).option("--text-file <path>", "Read message text from a UTF-8 file").option("--plain", "Send text literally without resolving @Name(wake) or @Name(reference) mentions", false).option("--password <value>", "Space password for protected access").action(async (textParts, opts) => {
32463
33236
  const space = String(opts.space ?? "").trim();
32464
33237
  if (!space) throw createSpaceAliasTargetGuideError("send");
32465
33238
  const view = getGlobalViewOption();
@@ -32476,7 +33249,8 @@ program.command("send").description("Alias for `openmeld space send`.").argument
32476
33249
  password: opts.password,
32477
33250
  text: Array.isArray(textParts) ? textParts.join(" ") : "",
32478
33251
  stdin: Boolean(opts.stdin),
32479
- file: typeof opts.file === "string" ? opts.file : void 0,
33252
+ filePaths: Array.isArray(opts.file) ? opts.file.map(String) : [],
33253
+ textFile: typeof opts.textFile === "string" ? opts.textFile : void 0,
32480
33254
  plainText: opts.plain === true,
32481
33255
  view,
32482
33256
  entryChecksHandled: true