openmeld 0.3.104 → 0.3.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-me-membership-Casn6zb0.js → add-me-membership-BlbFG60g.js} +2 -2
- package/dist/{add-me-membership-Casn6zb0.js.map → add-me-membership-BlbFG60g.js.map} +1 -1
- package/dist/{api-client-foundation-57KKhzub.js → api-client-foundation-yID8IaIs.js} +4 -4
- package/dist/{api-client-foundation-57KKhzub.js.map → api-client-foundation-yID8IaIs.js.map} +1 -1
- package/dist/{auth-session-DEVzh7Bz.js → auth-session-p_bMqNdz.js} +3 -3
- package/dist/{auth-session-DEVzh7Bz.js.map → auth-session-p_bMqNdz.js.map} +1 -1
- package/dist/{base-url-Cv9x5Es9.js → base-url-Dq4Lk2FB.js} +25 -4
- package/dist/base-url-Dq4Lk2FB.js.map +1 -0
- package/dist/{command-B1rCpH8H.js → command-CLUw_Vhz.js} +572 -94
- package/dist/{command-B1rCpH8H.js.map → command-CLUw_Vhz.js.map} +1 -1
- package/dist/{daemon-runtime-lease-DiRoGxhm.js → daemon-runtime-lease-Dn9Xfky4.js} +2 -2
- package/dist/{daemon-runtime-lease-DiRoGxhm.js.map → daemon-runtime-lease-Dn9Xfky4.js.map} +1 -1
- package/dist/{dist-kEVPxDxn.js → dist-CPAHV-4Q.js} +69 -4
- package/dist/dist-CPAHV-4Q.js.map +1 -0
- package/dist/openmeld-dev.js +1 -1
- package/dist/openmeld.js +11 -9
- package/dist/openmeld.js.map +1 -1
- package/dist/{runtime-transport-BzWHDehI.js → runtime-transport-BU3w8VEy.js} +39 -3
- package/dist/runtime-transport-BU3w8VEy.js.map +1 -0
- package/package.json +1 -1
- package/dist/base-url-Cv9x5Es9.js.map +0 -1
- package/dist/dist-kEVPxDxn.js.map +0 -1
- package/dist/runtime-transport-BzWHDehI.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { A as
|
|
4
|
-
import { A as MAX_TEXT_LENGTH, At as createCenterAgentRoutineResponseSchema, B as sleep, C as createSpaceApi, D as toStructuredApiClientFailure, Dt as organizationComputersResponseSchema, E as resolveProfileSpaceHistoryGatewayHost, Et as profileErrorResponseSchema, F as OPENMELD_HEADER_PROFILE_ID, Ft as resumeCenterAgentRoutineResponseSchema, Gt as localProjectControlDaemonFrameSchema, H as getSpaceUpdatesResponseSchema, It as updateCenterAgentRoutineResponseSchema, Jt as postSpaceMembersResponseSchema, Kt as localProjectControlDiscoverProjectsResponseSchema, L as OPENMELD_HEADER_REQUEST_ID, M as parseIncoming$1, Mt as listCenterAgentRoutineRunsResponseSchema, N as parseServerErrorFrame$1, Nt as listCenterAgentRoutinesResponseSchema, O as DAEMON_STREAM_KEEPALIVE_PING, Ot as submitFeedbackIssueRequestSchema, P as resolveCustomMentionAliasOverride, Pt as pauseCenterAgentRoutineResponseSchema, Q as submitAgentControllerTaskLifecycleEventItemSchema, Rt as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, S as createRuntimeReportingApi, St as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, T as resolveAccountSpaceIndexGatewayHost, Tt as profileCapabilitiesResponseSchema, U as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Ut as agentActivitySnapshotResponseSchema, V as toErrorMessage$42, Wt as localProjectControlConnectionSchema, Xt as spaceMemberDirectoryEntrySchema, Yt as removeSpaceMembersResponseSchema, Zt as spaceMemberDirectorySchema, _n as agentControllerPermissionModeSchema, _t as organizationSkillReleaseSummarySchema, a as buildSpaceAttachmentDownloadPath, an as createProjectResponseSchema, at as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, bt as organizationDirectoryResponseSchema, c as createAgentProfileBindingApi, cn as updateProjectResponseSchema, ct as computerFileAccessPolicyInputSchema, d as createCurrentDeviceApi, dt as organizationSpaceDirectoryWithMemberCountsResponseSchema, ft as spaceCreatorSchema, g as createOrganizationApi, h as createOpenMeldApiClient, ht as listOrganizationSkillsResponseSchema, i as buildProfileSpaceHistoryUpsertPath, in as archiveProjectResponseSchema, it as gatewayErrorEnvelopeSchema, j as parseEnvelope$1, jt as deleteCenterAgentRoutineResponseSchema, kt as submitFeedbackIssueResponseSchema, ln as centerAgentToolSpeakerSchema, lt as computerFileAccessPolicySchema, m as createLocalRuntimeExpectedRoutesApi, mt as getOrganizationSkillResponseSchema, n as OpenMeldApiClientInvalidResponseError, o as createAccountSpaceIndexApi, on as listProjectsResponseSchema, ot as OPENMELD_RUNTIME_CAPABILITIES_HEADER, p as createFetchTransport, pt as spaceMetaSchema, qt as leaveSpaceResponseSchema, r as buildProfileSpaceHistoryStatusPath, rn as observedLocalAgentSessionSchema, s as createAgentActivityApi, sn as projectSchema, st as computerFileAccessDaemonFrameSchema, t as OpenMeldApiClientHttpError, tn as agentActivitySessionInventoryResponseSchema, un as openCodePermissionConfigSchema, ut as modelCatalogSchema, vn as agentControllerCollaborationModeSchema, vt as organizationSkillSummarySchema, wt as authProfileManagedRoleSchema, xt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, y as createProfileSpaceHistoryApi, yn as toLegacySpaceAddressingWireValue, z as toErrorMessage$43, zt as agentActivityEventSchema } from "./dist-
|
|
5
|
-
import { $t as conversationExecutionStateSchema, A as runtimeTransportResumeControllerConversationFramePayloadSchema, An as agentInteractionRequestSchema,
|
|
3
|
+
import { $t as runtimeAgentControllerLaunchContractSchema, A as toSpaceCreateUrl, At as openMeldBinDir, Bt as resolveExplicitOpenMeldEnvPreset, Ct as deviceOpenClawProfileDir, D as toDaemonRouteObservationUrl, Dt as normalizeAccountKey, E as normalizeBaseUrl, Et as legacyAccountProfileSpacesDir, F as toSpaceLeaveUrl, Ft as openMeldVersionsDir, G as isOpenMeldLockError, Gt as runtimeDir, H as toSpaceWsUrl, Ht as resolveOpenMeldEnvPreset, I as toSpaceMembersUrl, K as isOpenMeldOrphanedLockError, Kt as runtimeLogsDir, L as toSpaceMetaUrl, M as toSpaceDeleteUrl, Mt as openMeldManagedVersionBinaryPath, Nt as openMeldManagedVersionDir, Ot as normalizeOpenMeldProfileId, Pt as openMeldRootDir, Q as runWithHeldLock, Qt as runtimeAgentControllerConversationIdMappingSpecSchema, R as toSpacePasswordUrl, S as updateConfiguredDeviceRuntimeState, St as deviceOpenClawProfileBootstrapPath, Tt as isPublishedOpenMeldHome, U as acquireLock, Ut as resolveOpenMeldPresetOwnedPathInput, V as toSpaceUpdatesUrl, Wt as resolveOpenMeldRootDir, Xt as formatLocalMachineIssueMessage, Yt as systemDir, Z as resolveOpenMeldOrphanedLockIssue, _ as getConfiguredViewCustomization, _t as accountProfileLocalMetaPath, a as resolveBaseUrl, an as conversationPolicySchema, at as resolveCliContextId, bt as accountProfileWorkspacePath, c as resolveExplicitGatewayUrlOrThrow, cn as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, ct as resolveOpenMeldLaneDescriptor, d as createDefaultRuntimeAgentControllerSettings, dn as canonicalizeAgentControllerRef, f as getConfiguredDaemonDispatchLimits, fn as canonicalizeBuiltinAgentControllerRef, ft as createBackgroundExecutionBlockedIssue, g as getConfiguredSkillsConfig, gt as OPENMELD_HOME_ENV_KEY, h as getConfiguredOpenMeldToolsMaintenance, hn as parseAgentControllerRef$1, i as normalizeGatewayBaseUrlOrNull, in as buildAgentControllerConversationRef, it as resolveCliContext, j as toSpaceCursorUrl, jt as openMeldManagedBinaryPath, kt as openMeldBackupsDir, l as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, mn as normalizeKnownBuiltinAgentControllerId, nn as runtimeTransportModeSchema, nt as listCliContextStates, o as resolveBaseUrlOrNull, on as resolveBuiltinAgentControllerConversationKind, ot as writeCliContextState, p as getConfiguredDeviceRuntimeState, pn as normalizeBuiltinAgentControllerId, qt as skillsDir, r as normalizeGatewayBaseUrl, rt as readCliContextState, s as resolveDefaultGatewayBaseUrl, sn as HOSTED_CENTER_AGENT_CONTROLLER_REF, tn as runtimeStreamingModeSchema, un as buildAgentControllerRoutingKey, ut as assessLocalMachineFailure, v as getRuntimeConfigReadHealth, vt as accountProfileSpaceCacheDir, w as updateConfiguredSkillsConfig, wt as deviceOpenClawProfileWorkspaceDir, x as setConfiguredSkillsConfig, xt as accountsDir, y as resolveRuntimeSkillsCustomTargetId, yt as accountProfileViewPath, z as toSpaceRemoveMembersUrl, zt as resolveDefaultOpenMeldHomeDirname } from "./base-url-Dq4Lk2FB.js";
|
|
4
|
+
import { A as MAX_TEXT_LENGTH, At as createCenterAgentRoutineResponseSchema, B as sleep, C as createSpaceApi, D as toStructuredApiClientFailure, Dt as organizationComputersResponseSchema, E as resolveProfileSpaceHistoryGatewayHost, Et as profileErrorResponseSchema, F as OPENMELD_HEADER_PROFILE_ID, Ft as resumeCenterAgentRoutineResponseSchema, Gt as localProjectControlDaemonFrameSchema, H as getSpaceUpdatesResponseSchema, It as updateCenterAgentRoutineResponseSchema, Jt as postSpaceMembersResponseSchema, Kt as localProjectControlDiscoverProjectsResponseSchema, L as OPENMELD_HEADER_REQUEST_ID, M as parseIncoming$1, Mt as listCenterAgentRoutineRunsResponseSchema, N as parseServerErrorFrame$1, Nt as listCenterAgentRoutinesResponseSchema, O as DAEMON_STREAM_KEEPALIVE_PING, Ot as submitFeedbackIssueRequestSchema, P as resolveCustomMentionAliasOverride, Pt as pauseCenterAgentRoutineResponseSchema, Q as submitAgentControllerTaskLifecycleEventItemSchema, Rt as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, S as createRuntimeReportingApi, St as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, T as resolveAccountSpaceIndexGatewayHost, Tt as profileCapabilitiesResponseSchema, U as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Ut as agentActivitySnapshotResponseSchema, V as toErrorMessage$42, Wt as localProjectControlConnectionSchema, Xt as spaceMemberDirectoryEntrySchema, Yt as removeSpaceMembersResponseSchema, Zt as spaceMemberDirectorySchema, _n as agentControllerPermissionModeSchema, _t as organizationSkillReleaseSummarySchema, a as buildSpaceAttachmentDownloadPath, an as createProjectResponseSchema, at as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, bt as organizationDirectoryResponseSchema, c as createAgentProfileBindingApi, cn as updateProjectResponseSchema, ct as computerFileAccessPolicyInputSchema, d as createCurrentDeviceApi, dt as organizationSpaceDirectoryWithMemberCountsResponseSchema, ft as spaceCreatorSchema, g as createOrganizationApi, h as createOpenMeldApiClient, ht as listOrganizationSkillsResponseSchema, i as buildProfileSpaceHistoryUpsertPath, in as archiveProjectResponseSchema, it as gatewayErrorEnvelopeSchema, j as parseEnvelope$1, jt as deleteCenterAgentRoutineResponseSchema, kt as submitFeedbackIssueResponseSchema, ln as centerAgentToolSpeakerSchema, lt as computerFileAccessPolicySchema, m as createLocalRuntimeExpectedRoutesApi, mt as getOrganizationSkillResponseSchema, n as OpenMeldApiClientInvalidResponseError, o as createAccountSpaceIndexApi, on as listProjectsResponseSchema, ot as OPENMELD_RUNTIME_CAPABILITIES_HEADER, p as createFetchTransport, pt as spaceMetaSchema, qt as leaveSpaceResponseSchema, r as buildProfileSpaceHistoryStatusPath, rn as observedLocalAgentSessionSchema, s as createAgentActivityApi, sn as projectSchema, st as computerFileAccessDaemonFrameSchema, t as OpenMeldApiClientHttpError, tn as agentActivitySessionInventoryResponseSchema, un as openCodePermissionConfigSchema, ut as modelCatalogSchema, vn as agentControllerCollaborationModeSchema, vt as organizationSkillSummarySchema, wt as authProfileManagedRoleSchema, xt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, y as createProfileSpaceHistoryApi, yn as toLegacySpaceAddressingWireValue, z as toErrorMessage$43, zt as agentActivityEventSchema } from "./dist-CPAHV-4Q.js";
|
|
5
|
+
import { $t as conversationExecutionStateSchema, A as runtimeTransportResumeControllerConversationFramePayloadSchema, An as agentInteractionRequestSchema, B as openMeldSpaceEgressActionSchema, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, D as runtimeTransportRegisterSessionRequestSchema, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, Er as profileWorkspaceModeSchema, Fn as formatLocalSetupActionDescription, Fr as resolvePublicAgentAvailabilityCopy, G as localFolderPickerHelperResultSchema, Gn as openMeldToolsUpdateOperationPhaseSchema, H as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, Hn as localServiceComponentUpdateProjectionSchema, Hr as resolveCommandAgentWorkActivity, Ht as spaceFileNameSchema, I as openMeldDaemonTaskResultEnvelopeWriteSchema, In as formatLocalSetupActionLabel, Ir as resolvePublicAgentFailureRecovery, Jt as openMeldDaemonControlPlaneRequestSchema, L as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Ln as installedLocalComponentsSnapshotSchema, Lr as sanitizeDispatchErrorSummary, M as runtimeTransportRouteCatalogChangedFramePayloadSchema, Mr as MAX_TEXT_LENGTH$1, Mt as SPACE_FILE_MAX_SIZE_BYTES, Nn as formatLocalComponentsSummaryDescription, Nr as resolveDetailedPublicAgentFailureReason$1, O as runtimeTransportRegisterSessionResponseSchema, On as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, P as runtimeTransportSubmitTaskResultRequestSchema, Pn as formatLocalComponentsSummaryLabel, Pr as resolveMappedPublicAgentFailureReason, Qt as providerDispatchRuntimeContextSchema, R as openMeldDaemonTaskResultPayloadSchema, Rn as localCliComponentUpdateProjectionSchema, Rr as shouldPreferMappedPublicAgentFailureReason, Rt as resolveSpaceFileMimeType, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Sr as openMeldRuntimeProfileIdSchema, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, U as localFolderPickerDaemonFrameSchema, V as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, W as localFolderPickerHelperProtocolResultSchema, Wn as openMeldToolsUpdateAttemptSchema, Yt as openMeldDaemonControlPlaneResponseSchema, Zn as parseOptionalClientMessageId, Zt as skippedDaemonProfileSchema, _ as runtimeTransportHeartbeatRequestSchema, _n as getSpaceMessageAddressingRelationSupportForTargetKind, a as runtimeTransportCapabilitiesSchema, ar as normalizeSpacePasswordText, b as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, bn as resolveMessageEnvelopeTargetField, br as agentProfileIdSchema, c as runtimeTransportDispatchInteractionRequestSchema, cr as resolveSpaceMentionLabels, ct as CONVERSATION_CONTINUITY_WARNING_PURPOSE, d as runtimeTransportDispatchPreviewEndRequestSchema, f as runtimeTransportDispatchPreviewRequestSchema, ft as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, g as runtimeTransportForkAgentSessionResultSchema, gn as formatCanonicalMentionLiteral, gt as sanitizeSignalTextPreview, h as runtimeTransportErrorCodeSchema, hn as collectCanonicalMentionTextFragments, i as localWakeRouteReportSchema, j as runtimeTransportResumeControllerConversationResultFramePayloadSchema, jn as agentInteractionResolutionSchema, jr as trimmedStringFromUnknown, k as runtimeTransportRejectedProfileRegistrationSchema, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, m as runtimeTransportDispatchToolActivityRequestSchema, mn as MESSAGE_MENTION_TYPE_VALUES, mt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, n as daemonExecutionCompatibilitySchema, nr as runtimeTransportDeliveryExecutionIdentitySchema, o as runtimeTransportDeliverDispatchRequestSchema, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, qn as openMeldToolsUpdateRequestSourceSchema, r as daemonStreamFrameSchema, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, sr as resolveSingleSpaceMentionLabels, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, tr as runtimeCoordinatorExecutionTokenEnvelopeSchema, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportHeartbeatResponseSchema, vr as openMeldRequestContextSchema, w as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, x as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, xr as normalizeOptionalWorkingDirectory, y as runtimeTransportLocalAgentControlCancelFramePayloadSchema, yn as normalizeMessageEnvelope, yr as MAX_PROFILE_WORKING_DIRECTORY_LENGTH } from "./runtime-transport-BU3w8VEy.js";
|
|
6
6
|
import { r as daemonServiceLaneSchema, t as daemonServiceContractSchema } from "./service-contract-DZWQdPz5.js";
|
|
7
|
-
import { A as isDaemonServiceRuntimeHeartbeatStale, B as setDaemonServiceRuntimeState, C as daemonServiceStableExecutableWrapperPath, D as getDaemonRuntimeStatus, E as ensureDaemonControlPlaneToken, F as releaseDaemonServiceLifecycleLock, G as withDaemonServiceStopLock, H as withDaemonServiceReconcileLock, I as resolveDaemonControlPlaneEndpoint, K as readDaemonLocalStateFile, L as resolveDaemonServiceRuntimeMetadata, M as readDaemonServiceLifecycleLockMeta, N as readDaemonServiceLifecycleLockMetaWithCleanup, O as getDaemonStatus, P as readDaemonServiceRuntimeSnapshot, R as restoreDaemonInstallStateSnapshot, S as daemonServiceRepairJournalPath, T as daemonStatePath, U as withDaemonServiceRegistrationMutationLock, V as uninstallDaemon, W as withDaemonServiceRunLock, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceLegacyExecutableWrapperPath, c as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, d as clearDaemonServiceRuntimeState, f as daemonDispatchJournalPath, g as daemonRuntimeRootPath, h as daemonRuntimeDataPath, i as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, j as readDaemonControlPlaneToken, k as installDaemon, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, q as writeDaemonLocalStateFile, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableLauncherPath, x as daemonServiceRecognizedExecutableWrapperPaths, y as daemonServiceActiveBundleStatePath, z as rotateDaemonControlPlaneTokenIfExpired } from "./daemon-runtime-lease-
|
|
8
|
-
import { D as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, E as OPENCLAW_CLI_TIMEOUT_MS$1, M as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, N as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, O as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, S as MAX_HEARTBEAT_INTERVAL_MS$2, _ as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, d as resolveOpenMeldDistribution, f as CATALOG_SYNC_RETRY_INTERVAL_MS$1, g as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, h as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, i as getAuthSessionState, j as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, k as REGISTER_RESPONSE_TIMEOUT_MS$1, m as DAEMON_RUNTIME_CONTRACT_EPOCH$1, n as clearAuthSession, p as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, s as setAuthSession, u as isBinaryDistribution, v as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, w as MIN_HEARTBEAT_INTERVAL_MS$2, x as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, y as DEFAULT_HEARTBEAT_INTERVAL_MS$1 } from "./auth-session-
|
|
9
|
-
import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as canAttachAuthTokenToRequest, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, u as resolveAuthTokenAttachment } from "./api-client-foundation-
|
|
7
|
+
import { A as isDaemonServiceRuntimeHeartbeatStale, B as setDaemonServiceRuntimeState, C as daemonServiceStableExecutableWrapperPath, D as getDaemonRuntimeStatus, E as ensureDaemonControlPlaneToken, F as releaseDaemonServiceLifecycleLock, G as withDaemonServiceStopLock, H as withDaemonServiceReconcileLock, I as resolveDaemonControlPlaneEndpoint, K as readDaemonLocalStateFile, L as resolveDaemonServiceRuntimeMetadata, M as readDaemonServiceLifecycleLockMeta, N as readDaemonServiceLifecycleLockMetaWithCleanup, O as getDaemonStatus, P as readDaemonServiceRuntimeSnapshot, R as restoreDaemonInstallStateSnapshot, S as daemonServiceRepairJournalPath, T as daemonStatePath, U as withDaemonServiceRegistrationMutationLock, V as uninstallDaemon, W as withDaemonServiceRunLock, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceLegacyExecutableWrapperPath, c as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, d as clearDaemonServiceRuntimeState, f as daemonDispatchJournalPath, g as daemonRuntimeRootPath, h as daemonRuntimeDataPath, i as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, j as readDaemonControlPlaneToken, k as installDaemon, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, q as writeDaemonLocalStateFile, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableLauncherPath, x as daemonServiceRecognizedExecutableWrapperPaths, y as daemonServiceActiveBundleStatePath, z as rotateDaemonControlPlaneTokenIfExpired } from "./daemon-runtime-lease-Dn9Xfky4.js";
|
|
8
|
+
import { D as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, E as OPENCLAW_CLI_TIMEOUT_MS$1, M as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, N as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, O as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, S as MAX_HEARTBEAT_INTERVAL_MS$2, _ as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, d as resolveOpenMeldDistribution, f as CATALOG_SYNC_RETRY_INTERVAL_MS$1, g as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, h as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, i as getAuthSessionState, j as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, k as REGISTER_RESPONSE_TIMEOUT_MS$1, m as DAEMON_RUNTIME_CONTRACT_EPOCH$1, n as clearAuthSession, p as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, s as setAuthSession, u as isBinaryDistribution, v as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, w as MIN_HEARTBEAT_INTERVAL_MS$2, x as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, y as DEFAULT_HEARTBEAT_INTERVAL_MS$1 } from "./auth-session-p_bMqNdz.js";
|
|
9
|
+
import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as canAttachAuthTokenToRequest, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, u as resolveAuthTokenAttachment } from "./api-client-foundation-yID8IaIs.js";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { homedir, tmpdir, userInfo } from "node:os";
|
|
12
12
|
import { z } from "zod/v4";
|
|
@@ -34,7 +34,7 @@ import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybi
|
|
|
34
34
|
var package_default = {
|
|
35
35
|
$schema: "https://www.schemastore.org/package.json",
|
|
36
36
|
name: "openmeld",
|
|
37
|
-
version: "0.3.
|
|
37
|
+
version: "0.3.106",
|
|
38
38
|
openMeldReleaseDate: "2026-08-25",
|
|
39
39
|
description: "OpenMeld CLI - https://openmeld.ai",
|
|
40
40
|
license: "MIT",
|
|
@@ -775,7 +775,7 @@ const runtimeReportingHealthStateSchema = z.strictObject({
|
|
|
775
775
|
});
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region ../../packages/schemas/dist/schemas/daemon/service-update-job.js
|
|
778
|
-
const OPENMELD_DAEMON_SERVICE_UPDATE_JOB_SCHEMA = "openmeld-daemon-service-update-job-
|
|
778
|
+
const OPENMELD_DAEMON_SERVICE_UPDATE_JOB_SCHEMA = "openmeld-daemon-service-update-job-v2";
|
|
779
779
|
const daemonServiceUpdatePreparedBundleSchema = z.strictObject({
|
|
780
780
|
v: z.literal(2),
|
|
781
781
|
schema: z.literal("openmeld-daemon-active-bundle-v2"),
|
|
@@ -800,25 +800,34 @@ const daemonServiceUpdatePreparedBundleSchema = z.strictObject({
|
|
|
800
800
|
createdAt: z.iso.datetime({ offset: true }),
|
|
801
801
|
updatedAt: z.iso.datetime({ offset: true })
|
|
802
802
|
});
|
|
803
|
-
const
|
|
804
|
-
v: z.literal(1),
|
|
805
|
-
schema: z.literal(OPENMELD_DAEMON_SERVICE_UPDATE_JOB_SCHEMA),
|
|
803
|
+
const daemonServiceUpdateJobBodySchema = z.strictObject({
|
|
806
804
|
attempts: z.number().int().nonnegative(),
|
|
807
805
|
desiredState: z.enum(["background", "stopped"]),
|
|
808
806
|
errorMessage: z.string().min(1).nullable(),
|
|
809
807
|
jobId: z.string().min(1),
|
|
810
808
|
preparedBundle: daemonServiceUpdatePreparedBundleSchema,
|
|
811
809
|
requestedAt: z.iso.datetime({ offset: true }),
|
|
810
|
+
targetVersion: z.string().min(1),
|
|
811
|
+
updatedAt: z.iso.datetime({ offset: true }),
|
|
812
|
+
urgency: z.enum(["available", "required"])
|
|
813
|
+
});
|
|
814
|
+
const daemonServiceUpdateJobV1Schema = daemonServiceUpdateJobBodySchema.extend({
|
|
815
|
+
v: z.literal(1),
|
|
816
|
+
schema: z.literal("openmeld-daemon-service-update-job-v1"),
|
|
812
817
|
status: z.enum([
|
|
813
818
|
"scheduled",
|
|
814
819
|
"running",
|
|
815
820
|
"completed",
|
|
816
821
|
"failed"
|
|
817
|
-
])
|
|
818
|
-
targetVersion: z.string().min(1),
|
|
819
|
-
updatedAt: z.iso.datetime({ offset: true }),
|
|
820
|
-
urgency: z.enum(["available", "required"])
|
|
822
|
+
])
|
|
821
823
|
});
|
|
824
|
+
const daemonServiceUpdateJobSchema = daemonServiceUpdateJobBodySchema.extend({
|
|
825
|
+
v: z.literal(2),
|
|
826
|
+
schema: z.literal(OPENMELD_DAEMON_SERVICE_UPDATE_JOB_SCHEMA),
|
|
827
|
+
phase: openMeldToolsUpdateOperationPhaseSchema,
|
|
828
|
+
requestSource: openMeldToolsUpdateRequestSourceSchema
|
|
829
|
+
});
|
|
830
|
+
const storedDaemonServiceUpdateJobSchema = z.discriminatedUnion("v", [daemonServiceUpdateJobV1Schema, daemonServiceUpdateJobSchema]);
|
|
822
831
|
//#endregion
|
|
823
832
|
//#region ../../packages/schemas/dist/schemas/http/cli-binary-manifest.js
|
|
824
833
|
const SHA256_HEX_PATTERN = /^[a-f0-9]{64}$/u;
|
|
@@ -17822,7 +17831,7 @@ function resolveOpenMeldAccountContext(input) {
|
|
|
17822
17831
|
};
|
|
17823
17832
|
}
|
|
17824
17833
|
async function resolveCurrentOpenMeldAccountContext() {
|
|
17825
|
-
const { getAuthSessionMetadata } = await import("./auth-session-
|
|
17834
|
+
const { getAuthSessionMetadata } = await import("./auth-session-p_bMqNdz.js").then((n) => n.t);
|
|
17826
17835
|
return resolveOpenMeldAccountContext({ session: await getAuthSessionMetadata().catch(() => null) });
|
|
17827
17836
|
}
|
|
17828
17837
|
function resolveHostKey(baseUrl) {
|
|
@@ -37166,9 +37175,9 @@ function createModelCatalogReadSession(input) {
|
|
|
37166
37175
|
async function readModelCatalogOnce(baseUrl) {
|
|
37167
37176
|
try {
|
|
37168
37177
|
const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
|
|
37169
|
-
import("./dist-
|
|
37170
|
-
import("./base-url-
|
|
37171
|
-
import("./api-client-foundation-
|
|
37178
|
+
import("./dist-CPAHV-4Q.js").then((n) => n.w),
|
|
37179
|
+
import("./base-url-Dq4Lk2FB.js").then((n) => n.n),
|
|
37180
|
+
import("./api-client-foundation-yID8IaIs.js").then((n) => n.t)
|
|
37172
37181
|
]);
|
|
37173
37182
|
if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
|
|
37174
37183
|
const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
|
|
@@ -44114,6 +44123,70 @@ async function writeLifecycleEvidenceEvent(input) {
|
|
|
44114
44123
|
}, null, 2)}\n`, "utf8").catch(() => void 0);
|
|
44115
44124
|
}
|
|
44116
44125
|
//#endregion
|
|
44126
|
+
//#region src/local-service/lifecycle/daemon-service-update-state.ts
|
|
44127
|
+
const DAEMON_SERVICE_UPDATE_JOB_SCHEMA = OPENMELD_DAEMON_SERVICE_UPDATE_JOB_SCHEMA;
|
|
44128
|
+
function daemonServicePendingUpdatePath(pathInput = {}) {
|
|
44129
|
+
return join(daemonRuntimeStateRootPath(pathInput), "service-update.json");
|
|
44130
|
+
}
|
|
44131
|
+
function daemonServiceLastUpdatePath(pathInput = {}) {
|
|
44132
|
+
return join(daemonRuntimeStateRootPath(pathInput), "service-update-last.json");
|
|
44133
|
+
}
|
|
44134
|
+
async function readPendingDaemonServiceUpdate(pathInput = {}) {
|
|
44135
|
+
return await readDaemonServiceUpdateJob(daemonServicePendingUpdatePath(pathInput));
|
|
44136
|
+
}
|
|
44137
|
+
async function readLastDaemonServiceUpdate(pathInput = {}) {
|
|
44138
|
+
return await readDaemonServiceUpdateJob(daemonServiceLastUpdatePath(pathInput));
|
|
44139
|
+
}
|
|
44140
|
+
async function persistPendingDaemonServiceUpdate(job, pathInput = {}) {
|
|
44141
|
+
await writeUpdateJobAtomically({
|
|
44142
|
+
job,
|
|
44143
|
+
path: daemonServicePendingUpdatePath(pathInput)
|
|
44144
|
+
});
|
|
44145
|
+
}
|
|
44146
|
+
async function completePendingDaemonServiceUpdate(job, pathInput = {}) {
|
|
44147
|
+
await writeUpdateJobAtomically({
|
|
44148
|
+
job,
|
|
44149
|
+
path: daemonServiceLastUpdatePath(pathInput)
|
|
44150
|
+
});
|
|
44151
|
+
await rm(daemonServicePendingUpdatePath(pathInput), { force: true });
|
|
44152
|
+
}
|
|
44153
|
+
async function readDaemonServiceUpdateJob(path) {
|
|
44154
|
+
const raw = await readFile(path, "utf8").catch((error) => {
|
|
44155
|
+
if (error.code === "ENOENT") return null;
|
|
44156
|
+
throw error;
|
|
44157
|
+
});
|
|
44158
|
+
if (raw === null) return null;
|
|
44159
|
+
const parsed = storedDaemonServiceUpdateJobSchema.safeParse(JSON.parse(raw));
|
|
44160
|
+
if (!parsed.success) throw new Error("OpenMeld Service update state is invalid.");
|
|
44161
|
+
if (parsed.data.v === 2) return parsed.data;
|
|
44162
|
+
const { status, ...legacyJob } = parsed.data;
|
|
44163
|
+
return daemonServiceUpdateJobSchema.parse({
|
|
44164
|
+
...legacyJob,
|
|
44165
|
+
v: 2,
|
|
44166
|
+
schema: DAEMON_SERVICE_UPDATE_JOB_SCHEMA,
|
|
44167
|
+
phase: migrateLegacyPhase(status),
|
|
44168
|
+
requestSource: "cli"
|
|
44169
|
+
});
|
|
44170
|
+
}
|
|
44171
|
+
function migrateLegacyPhase(status) {
|
|
44172
|
+
switch (status) {
|
|
44173
|
+
case "scheduled": return "waiting_for_work";
|
|
44174
|
+
case "running": return "updating";
|
|
44175
|
+
case "completed": return "updated";
|
|
44176
|
+
case "failed": return "needs_help";
|
|
44177
|
+
default: return status;
|
|
44178
|
+
}
|
|
44179
|
+
}
|
|
44180
|
+
async function writeUpdateJobAtomically(input) {
|
|
44181
|
+
const temporaryPath = `${input.path}.${String(process.pid)}.tmp`;
|
|
44182
|
+
await mkdir(dirname(input.path), { recursive: true });
|
|
44183
|
+
await writeFile(temporaryPath, `${JSON.stringify(input.job, null, 2)}\n`, {
|
|
44184
|
+
encoding: "utf8",
|
|
44185
|
+
mode: 384
|
|
44186
|
+
});
|
|
44187
|
+
await rename(temporaryPath, input.path);
|
|
44188
|
+
}
|
|
44189
|
+
//#endregion
|
|
44117
44190
|
//#region src/local-service/lifecycle/daemon-service-update-worker-manager.ts
|
|
44118
44191
|
const UPDATE_WORKER_RESTART_BACKOFF_SECONDS = 30;
|
|
44119
44192
|
const WINDOWS_SERVICE_ALREADY_RUNNING_PATTERN = /already running|1056/i;
|
|
@@ -44478,7 +44551,6 @@ async function runCommand$1(input) {
|
|
|
44478
44551
|
//#endregion
|
|
44479
44552
|
//#region src/local-service/lifecycle/daemon-service-update-coordinator.ts
|
|
44480
44553
|
const MAX_BACKGROUND_UPDATE_ATTEMPTS = 5;
|
|
44481
|
-
const DAEMON_SERVICE_UPDATE_JOB_SCHEMA = OPENMELD_DAEMON_SERVICE_UPDATE_JOB_SCHEMA;
|
|
44482
44554
|
async function scheduleDaemonServiceUpdate(input, overrides = {}) {
|
|
44483
44555
|
if (Object.keys(overrides).length === 0) return await withDaemonServiceReconcileLock(async () => await scheduleDaemonServiceUpdate(input, defaultScheduleOverrides()), {
|
|
44484
44556
|
command: "openmeld service update",
|
|
@@ -44486,20 +44558,11 @@ async function scheduleDaemonServiceUpdate(input, overrides = {}) {
|
|
|
44486
44558
|
});
|
|
44487
44559
|
const deps = resolveScheduleDependencies(overrides);
|
|
44488
44560
|
const pending = await deps.readPendingJob();
|
|
44489
|
-
if (pending) {
|
|
44490
|
-
|
|
44491
|
-
|
|
44492
|
-
|
|
44493
|
-
|
|
44494
|
-
} : pending;
|
|
44495
|
-
await deps.installWorker(retained);
|
|
44496
|
-
if (retained !== pending) await deps.persistPendingJob(retained);
|
|
44497
|
-
await deps.startWorker(retained);
|
|
44498
|
-
return {
|
|
44499
|
-
job: retained,
|
|
44500
|
-
status: "already_scheduled"
|
|
44501
|
-
};
|
|
44502
|
-
}
|
|
44561
|
+
if (pending) return await reschedulePendingDaemonServiceUpdate({
|
|
44562
|
+
dependencies: deps,
|
|
44563
|
+
pending,
|
|
44564
|
+
request: input
|
|
44565
|
+
});
|
|
44503
44566
|
const preparedBundle = await deps.prepareBundle({
|
|
44504
44567
|
activate: false,
|
|
44505
44568
|
daemonVersion: input.targetVersion,
|
|
@@ -44507,15 +44570,16 @@ async function scheduleDaemonServiceUpdate(input, overrides = {}) {
|
|
|
44507
44570
|
});
|
|
44508
44571
|
const now = deps.now();
|
|
44509
44572
|
const job = {
|
|
44510
|
-
v:
|
|
44573
|
+
v: 2,
|
|
44511
44574
|
schema: DAEMON_SERVICE_UPDATE_JOB_SCHEMA,
|
|
44512
44575
|
attempts: 0,
|
|
44513
44576
|
desiredState: await deps.resolveDesiredState(),
|
|
44514
44577
|
errorMessage: null,
|
|
44515
|
-
jobId: deps.createJobId(),
|
|
44578
|
+
jobId: input.operationId ?? deps.createJobId(),
|
|
44516
44579
|
preparedBundle,
|
|
44517
|
-
requestedAt: now,
|
|
44518
|
-
|
|
44580
|
+
requestedAt: input.requestedAt ?? now,
|
|
44581
|
+
phase: "waiting_for_work",
|
|
44582
|
+
requestSource: input.requestSource ?? "cli",
|
|
44519
44583
|
targetVersion: input.targetVersion,
|
|
44520
44584
|
updatedAt: now,
|
|
44521
44585
|
urgency: input.urgency
|
|
@@ -44528,24 +44592,97 @@ async function scheduleDaemonServiceUpdate(input, overrides = {}) {
|
|
|
44528
44592
|
status: "scheduled"
|
|
44529
44593
|
};
|
|
44530
44594
|
}
|
|
44531
|
-
async function
|
|
44532
|
-
|
|
44533
|
-
|
|
44534
|
-
|
|
44595
|
+
async function reschedulePendingDaemonServiceUpdate(input) {
|
|
44596
|
+
const replaceTarget = isNewerTargetVersion(input.request.targetVersion, input.pending.targetVersion);
|
|
44597
|
+
const escalateUrgency = input.request.urgency === "required" && input.pending.urgency === "available";
|
|
44598
|
+
const retained = replaceTarget || escalateUrgency ? {
|
|
44599
|
+
...input.pending,
|
|
44600
|
+
...replaceTarget ? {
|
|
44601
|
+
attempts: 0,
|
|
44602
|
+
errorMessage: null,
|
|
44603
|
+
phase: "waiting_for_work",
|
|
44604
|
+
preparedBundle: await input.dependencies.prepareBundle({
|
|
44605
|
+
activate: false,
|
|
44606
|
+
daemonVersion: input.request.targetVersion,
|
|
44607
|
+
...input.request.cliScriptPath ? { cliScriptPath: input.request.cliScriptPath } : {}
|
|
44608
|
+
}),
|
|
44609
|
+
requestSource: input.request.requestSource ?? "cli",
|
|
44610
|
+
targetVersion: input.request.targetVersion
|
|
44611
|
+
} : {},
|
|
44612
|
+
updatedAt: input.dependencies.now(),
|
|
44613
|
+
urgency: escalateUrgency ? "required" : input.pending.urgency
|
|
44614
|
+
} : input.pending;
|
|
44615
|
+
await input.dependencies.installWorker(retained);
|
|
44616
|
+
if (retained !== input.pending) await input.dependencies.persistPendingJob(retained);
|
|
44617
|
+
await input.dependencies.startWorker(retained);
|
|
44618
|
+
if (replaceTarget) await discardReplacedBundleBestEffort({
|
|
44619
|
+
dependencies: input.dependencies,
|
|
44620
|
+
pending: input.pending
|
|
44621
|
+
});
|
|
44622
|
+
return {
|
|
44623
|
+
job: retained,
|
|
44624
|
+
status: "already_scheduled"
|
|
44625
|
+
};
|
|
44626
|
+
}
|
|
44627
|
+
async function discardReplacedBundleBestEffort(input) {
|
|
44628
|
+
await input.dependencies.discardBundle(input.pending.preparedBundle).catch((error) => {
|
|
44629
|
+
console.warn("[openmeld.daemon_service.update_bundle_cleanup_failed]", {
|
|
44630
|
+
bundleId: input.pending.preparedBundle.bundleId,
|
|
44631
|
+
errorMessage: toErrorMessage$42(error),
|
|
44632
|
+
operationId: input.pending.jobId
|
|
44633
|
+
});
|
|
44535
44634
|
});
|
|
44635
|
+
}
|
|
44636
|
+
async function runPendingDaemonServiceUpdate(overrides = {}) {
|
|
44637
|
+
if (Object.keys(overrides).length === 0) {
|
|
44638
|
+
const deps = resolveRunDependencies(defaultRunOverrides());
|
|
44639
|
+
if (!await preparePendingUpdateForSwitch(deps)) return null;
|
|
44640
|
+
return await withDaemonServiceReconcileLock(async () => await runPreparedPendingUpdate(deps), {
|
|
44641
|
+
command: "openmeld service update-worker",
|
|
44642
|
+
intent: "upgrade_reconcile"
|
|
44643
|
+
});
|
|
44644
|
+
}
|
|
44536
44645
|
const deps = resolveRunDependencies(overrides);
|
|
44646
|
+
if (!await preparePendingUpdateForSwitch(deps)) return null;
|
|
44647
|
+
return await runPreparedPendingUpdate(deps);
|
|
44648
|
+
}
|
|
44649
|
+
async function preparePendingUpdateForSwitch(deps) {
|
|
44650
|
+
const pending = await deps.readPendingJob();
|
|
44651
|
+
if (!pending) return null;
|
|
44652
|
+
if (pending.urgency === "available") {
|
|
44653
|
+
const waiting = {
|
|
44654
|
+
...pending,
|
|
44655
|
+
errorMessage: null,
|
|
44656
|
+
phase: "waiting_for_work",
|
|
44657
|
+
updatedAt: deps.now()
|
|
44658
|
+
};
|
|
44659
|
+
await deps.persistPendingJob(waiting);
|
|
44660
|
+
try {
|
|
44661
|
+
await deps.waitUntilSafeToSwitch(waiting);
|
|
44662
|
+
} catch (error) {
|
|
44663
|
+
await deps.persistPendingJob({
|
|
44664
|
+
...waiting,
|
|
44665
|
+
errorMessage: toErrorMessage$42(error),
|
|
44666
|
+
updatedAt: deps.now()
|
|
44667
|
+
});
|
|
44668
|
+
throw error;
|
|
44669
|
+
}
|
|
44670
|
+
return waiting;
|
|
44671
|
+
}
|
|
44672
|
+
return pending;
|
|
44673
|
+
}
|
|
44674
|
+
async function runPreparedPendingUpdate(deps) {
|
|
44537
44675
|
const pending = await deps.readPendingJob();
|
|
44538
44676
|
if (!pending) return null;
|
|
44539
44677
|
const running = {
|
|
44540
44678
|
...pending,
|
|
44541
44679
|
attempts: pending.attempts + 1,
|
|
44542
44680
|
errorMessage: null,
|
|
44543
|
-
|
|
44681
|
+
phase: "updating",
|
|
44544
44682
|
updatedAt: deps.now()
|
|
44545
44683
|
};
|
|
44546
44684
|
await deps.persistPendingJob(running);
|
|
44547
44685
|
try {
|
|
44548
|
-
if (running.urgency === "available") await deps.waitUntilSafeToSwitch(running);
|
|
44549
44686
|
const lifecycle = await deps.runLifecycle({
|
|
44550
44687
|
desiredState: running.desiredState,
|
|
44551
44688
|
expectedVersion: running.targetVersion,
|
|
@@ -44556,11 +44693,11 @@ async function runPendingDaemonServiceUpdate(overrides = {}) {
|
|
|
44556
44693
|
preparedBundle: running.preparedBundle,
|
|
44557
44694
|
shouldStartAfterLifecycle: running.desiredState === "background"
|
|
44558
44695
|
});
|
|
44559
|
-
if (lifecycle.status !== "aligned") {
|
|
44696
|
+
if (lifecycle.status !== "aligned" && lifecycle.status !== "already_aligned") {
|
|
44560
44697
|
const failed = finishJob(running, {
|
|
44561
44698
|
errorMessage: lifecycle.errorMessage || "OpenMeld restored the previous Service after the replacement did not become healthy.",
|
|
44562
44699
|
now: deps.now(),
|
|
44563
|
-
|
|
44700
|
+
phase: lifecycle.recoveryStatus === "restored_verified_previous_state" ? "restored" : "needs_help"
|
|
44564
44701
|
});
|
|
44565
44702
|
await deps.completePendingJob(failed);
|
|
44566
44703
|
return failed;
|
|
@@ -44568,7 +44705,7 @@ async function runPendingDaemonServiceUpdate(overrides = {}) {
|
|
|
44568
44705
|
const completed = finishJob(running, {
|
|
44569
44706
|
errorMessage: null,
|
|
44570
44707
|
now: deps.now(),
|
|
44571
|
-
|
|
44708
|
+
phase: "updated"
|
|
44572
44709
|
});
|
|
44573
44710
|
await deps.completePendingJob(completed);
|
|
44574
44711
|
return completed;
|
|
@@ -44578,7 +44715,7 @@ async function runPendingDaemonServiceUpdate(overrides = {}) {
|
|
|
44578
44715
|
const retry = {
|
|
44579
44716
|
...running,
|
|
44580
44717
|
errorMessage,
|
|
44581
|
-
|
|
44718
|
+
phase: "waiting_for_work",
|
|
44582
44719
|
updatedAt: deps.now()
|
|
44583
44720
|
};
|
|
44584
44721
|
await deps.persistPendingJob(retry);
|
|
@@ -44587,7 +44724,7 @@ async function runPendingDaemonServiceUpdate(overrides = {}) {
|
|
|
44587
44724
|
const failed = finishJob(running, {
|
|
44588
44725
|
errorMessage,
|
|
44589
44726
|
now: deps.now(),
|
|
44590
|
-
|
|
44727
|
+
phase: "needs_help"
|
|
44591
44728
|
});
|
|
44592
44729
|
await deps.completePendingJob(failed);
|
|
44593
44730
|
return failed;
|
|
@@ -44596,6 +44733,7 @@ async function runPendingDaemonServiceUpdate(overrides = {}) {
|
|
|
44596
44733
|
function defaultScheduleOverrides() {
|
|
44597
44734
|
return {
|
|
44598
44735
|
createJobId: randomUUID,
|
|
44736
|
+
discardBundle: discardPreparedDaemonServiceBundle,
|
|
44599
44737
|
installWorker: installDaemonServiceUpdateWorker,
|
|
44600
44738
|
now: () => (/* @__PURE__ */ new Date()).toISOString(),
|
|
44601
44739
|
persistPendingJob: persistPendingDaemonServiceUpdate,
|
|
@@ -44615,36 +44753,10 @@ function defaultRunOverrides() {
|
|
|
44615
44753
|
waitUntilSafeToSwitch: waitUntilDaemonServiceSafeSwitch
|
|
44616
44754
|
};
|
|
44617
44755
|
}
|
|
44618
|
-
function daemonServicePendingUpdatePath(pathInput = {}) {
|
|
44619
|
-
return join(daemonRuntimeStateRootPath(pathInput), "service-update.json");
|
|
44620
|
-
}
|
|
44621
|
-
function daemonServiceLastUpdatePath(pathInput = {}) {
|
|
44622
|
-
return join(daemonRuntimeStateRootPath(pathInput), "service-update-last.json");
|
|
44623
|
-
}
|
|
44624
|
-
async function readPendingDaemonServiceUpdate(pathInput = {}) {
|
|
44625
|
-
const raw = await readFile(daemonServicePendingUpdatePath(pathInput), "utf8").catch((error) => {
|
|
44626
|
-
if (error.code === "ENOENT") return null;
|
|
44627
|
-
throw error;
|
|
44628
|
-
});
|
|
44629
|
-
if (raw === null) return null;
|
|
44630
|
-
return parseDaemonServiceUpdateJob(JSON.parse(raw));
|
|
44631
|
-
}
|
|
44632
|
-
async function persistPendingDaemonServiceUpdate(job, pathInput = {}) {
|
|
44633
|
-
await writeUpdateJobAtomically({
|
|
44634
|
-
job,
|
|
44635
|
-
path: daemonServicePendingUpdatePath(pathInput)
|
|
44636
|
-
});
|
|
44637
|
-
}
|
|
44638
|
-
async function completePendingDaemonServiceUpdate(job, pathInput = {}) {
|
|
44639
|
-
await writeUpdateJobAtomically({
|
|
44640
|
-
job,
|
|
44641
|
-
path: daemonServiceLastUpdatePath(pathInput)
|
|
44642
|
-
});
|
|
44643
|
-
await rm(daemonServicePendingUpdatePath(pathInput), { force: true });
|
|
44644
|
-
}
|
|
44645
44756
|
function resolveScheduleDependencies(overrides) {
|
|
44646
44757
|
return {
|
|
44647
44758
|
createJobId: overrides.createJobId ?? randomUUID,
|
|
44759
|
+
discardBundle: overrides.discardBundle ?? discardPreparedDaemonServiceBundle,
|
|
44648
44760
|
installWorker: overrides.installWorker ?? installDaemonServiceUpdateWorker,
|
|
44649
44761
|
now: overrides.now ?? (() => (/* @__PURE__ */ new Date()).toISOString()),
|
|
44650
44762
|
persistPendingJob: overrides.persistPendingJob ?? persistPendingDaemonServiceUpdate,
|
|
@@ -44664,8 +44776,10 @@ function resolveRunDependencies(overrides) {
|
|
|
44664
44776
|
waitUntilSafeToSwitch: overrides.waitUntilSafeToSwitch ?? waitUntilDaemonServiceSafeSwitch
|
|
44665
44777
|
};
|
|
44666
44778
|
}
|
|
44667
|
-
async function waitUntilDaemonServiceSafeSwitch() {
|
|
44779
|
+
async function waitUntilDaemonServiceSafeSwitch(job) {
|
|
44668
44780
|
while (true) {
|
|
44781
|
+
const pending = await readPendingDaemonServiceUpdate();
|
|
44782
|
+
if (pending === null || pending.jobId !== job.jobId || pending.urgency === "required") return;
|
|
44669
44783
|
try {
|
|
44670
44784
|
if ((await requestLocalDaemonServiceUpdateReadiness()).safeToSwitch) return;
|
|
44671
44785
|
} catch (error) {
|
|
@@ -44686,23 +44800,41 @@ function finishJob(job, input) {
|
|
|
44686
44800
|
return {
|
|
44687
44801
|
...job,
|
|
44688
44802
|
errorMessage: input.errorMessage,
|
|
44689
|
-
|
|
44803
|
+
phase: input.phase,
|
|
44690
44804
|
updatedAt: input.now
|
|
44691
44805
|
};
|
|
44692
44806
|
}
|
|
44693
|
-
|
|
44694
|
-
|
|
44695
|
-
await mkdir(dirname(input.path), { recursive: true });
|
|
44696
|
-
await writeFile(temporaryPath, `${JSON.stringify(input.job, null, 2)}\n`, {
|
|
44697
|
-
encoding: "utf8",
|
|
44698
|
-
mode: 384
|
|
44699
|
-
});
|
|
44700
|
-
await rename(temporaryPath, input.path);
|
|
44807
|
+
function isNewerTargetVersion(candidate, current) {
|
|
44808
|
+
return compareSemver(candidate, current) > 0;
|
|
44701
44809
|
}
|
|
44702
|
-
|
|
44703
|
-
|
|
44704
|
-
|
|
44705
|
-
|
|
44810
|
+
//#endregion
|
|
44811
|
+
//#region src/local-service/maintenance/openmeld-tools-update-context.ts
|
|
44812
|
+
const OPERATION_ID_ENV = "OPENMELD_INTERNAL_TOOLS_UPDATE_OPERATION_ID";
|
|
44813
|
+
const REQUESTED_AT_ENV = "OPENMELD_INTERNAL_TOOLS_UPDATE_REQUESTED_AT";
|
|
44814
|
+
const REQUEST_SOURCE_ENV = "OPENMELD_INTERNAL_TOOLS_UPDATE_REQUEST_SOURCE";
|
|
44815
|
+
function buildOpenMeldToolsUpdateContextEnv(context) {
|
|
44816
|
+
return {
|
|
44817
|
+
[OPERATION_ID_ENV]: context.operationId,
|
|
44818
|
+
[REQUESTED_AT_ENV]: context.requestedAt,
|
|
44819
|
+
[REQUEST_SOURCE_ENV]: context.requestSource
|
|
44820
|
+
};
|
|
44821
|
+
}
|
|
44822
|
+
function readOpenMeldToolsUpdateContextFromEnv(env = process.env) {
|
|
44823
|
+
const operationId = normalize$1(env[OPERATION_ID_ENV]);
|
|
44824
|
+
const requestedAt = normalize$1(env[REQUESTED_AT_ENV]);
|
|
44825
|
+
const requestSource = openMeldToolsUpdateRequestSourceSchema.safeParse(env[REQUEST_SOURCE_ENV]);
|
|
44826
|
+
if (!(operationId && requestedAt && requestSource.success)) return null;
|
|
44827
|
+
const requestedAtMs = Date.parse(requestedAt);
|
|
44828
|
+
if (!Number.isFinite(requestedAtMs)) return null;
|
|
44829
|
+
return {
|
|
44830
|
+
operationId,
|
|
44831
|
+
requestedAt: new Date(requestedAtMs).toISOString(),
|
|
44832
|
+
requestSource: requestSource.data
|
|
44833
|
+
};
|
|
44834
|
+
}
|
|
44835
|
+
function normalize$1(value) {
|
|
44836
|
+
const normalized = String(value ?? "").trim();
|
|
44837
|
+
return normalized.length > 0 ? normalized : null;
|
|
44706
44838
|
}
|
|
44707
44839
|
//#endregion
|
|
44708
44840
|
//#region ../../packages/space-mesh/dist/index.js
|
|
@@ -59162,6 +59294,307 @@ function collectErrorMessages(error) {
|
|
|
59162
59294
|
return [...new Set(messages)];
|
|
59163
59295
|
}
|
|
59164
59296
|
//#endregion
|
|
59297
|
+
//#region src/local-service/maintenance/openmeld-tools-automatic-update-loop.ts
|
|
59298
|
+
const INITIAL_AUTOMATIC_UPDATE_DELAY_MS = 120 * 1e3;
|
|
59299
|
+
const AUTOMATIC_UPDATE_CHECK_INTERVAL_MS = 360 * 60 * 1e3;
|
|
59300
|
+
function startOpenMeldToolsAutomaticUpdateLoop(input) {
|
|
59301
|
+
let stopped = false;
|
|
59302
|
+
let timer = null;
|
|
59303
|
+
const intervalMs = input.intervalMs ?? AUTOMATIC_UPDATE_CHECK_INTERVAL_MS;
|
|
59304
|
+
const schedule = (delayMs) => {
|
|
59305
|
+
if (stopped) return;
|
|
59306
|
+
timer = setTimeout(() => {
|
|
59307
|
+
timer = null;
|
|
59308
|
+
tick().catch((error) => {
|
|
59309
|
+
input.onError?.(error);
|
|
59310
|
+
});
|
|
59311
|
+
}, delayMs);
|
|
59312
|
+
timer.unref?.();
|
|
59313
|
+
};
|
|
59314
|
+
const tick = async () => {
|
|
59315
|
+
if (stopped) return;
|
|
59316
|
+
try {
|
|
59317
|
+
if (!await input.coordinator.resumePendingUpdate()) await input.coordinator.requestUpdate({ requestSource: "automatic" });
|
|
59318
|
+
} catch (error) {
|
|
59319
|
+
input.onError?.(error);
|
|
59320
|
+
} finally {
|
|
59321
|
+
schedule(intervalMs);
|
|
59322
|
+
}
|
|
59323
|
+
};
|
|
59324
|
+
input.coordinator.resumePendingUpdate().catch((error) => {
|
|
59325
|
+
input.onError?.(error);
|
|
59326
|
+
});
|
|
59327
|
+
schedule(input.initialDelayMs ?? INITIAL_AUTOMATIC_UPDATE_DELAY_MS);
|
|
59328
|
+
return () => {
|
|
59329
|
+
stopped = true;
|
|
59330
|
+
if (timer) {
|
|
59331
|
+
clearTimeout(timer);
|
|
59332
|
+
timer = null;
|
|
59333
|
+
}
|
|
59334
|
+
};
|
|
59335
|
+
}
|
|
59336
|
+
//#endregion
|
|
59337
|
+
//#region src/local-service/maintenance/openmeld-tools-maintenance-policy.ts
|
|
59338
|
+
async function readOpenMeldToolsMaintenancePolicy() {
|
|
59339
|
+
return await getConfiguredOpenMeldToolsMaintenance();
|
|
59340
|
+
}
|
|
59341
|
+
async function resolveOpenMeldToolsMaintenanceProjection() {
|
|
59342
|
+
try {
|
|
59343
|
+
return {
|
|
59344
|
+
automaticUpdatesEnabled: (await readOpenMeldToolsMaintenancePolicy()).automaticUpdatesEnabled,
|
|
59345
|
+
status: "ready"
|
|
59346
|
+
};
|
|
59347
|
+
} catch {
|
|
59348
|
+
return {
|
|
59349
|
+
automaticUpdatesEnabled: false,
|
|
59350
|
+
status: "needs_help"
|
|
59351
|
+
};
|
|
59352
|
+
}
|
|
59353
|
+
}
|
|
59354
|
+
//#endregion
|
|
59355
|
+
//#region src/local-service/maintenance/openmeld-tools-update-attempt-state.ts
|
|
59356
|
+
function pendingAttemptPath(pathInput = {}) {
|
|
59357
|
+
return join(daemonRuntimeStateRootPath(pathInput), "tools-update.json");
|
|
59358
|
+
}
|
|
59359
|
+
function lastAttemptPath(pathInput = {}) {
|
|
59360
|
+
return join(daemonRuntimeStateRootPath(pathInput), "tools-update-last.json");
|
|
59361
|
+
}
|
|
59362
|
+
async function readPendingOpenMeldToolsUpdateAttempt(pathInput = {}) {
|
|
59363
|
+
return await readAttempt(pendingAttemptPath(pathInput));
|
|
59364
|
+
}
|
|
59365
|
+
async function readLastOpenMeldToolsUpdateAttempt(pathInput = {}) {
|
|
59366
|
+
return await readAttempt(lastAttemptPath(pathInput));
|
|
59367
|
+
}
|
|
59368
|
+
async function persistOpenMeldToolsUpdateAttempt(attempt, pathInput = {}) {
|
|
59369
|
+
await writeAttempt(pendingAttemptPath(pathInput), attempt);
|
|
59370
|
+
}
|
|
59371
|
+
async function completeOpenMeldToolsUpdateAttempt(attempt, pathInput = {}) {
|
|
59372
|
+
await writeAttempt(lastAttemptPath(pathInput), attempt);
|
|
59373
|
+
await discardPendingOpenMeldToolsUpdateAttempt(pathInput);
|
|
59374
|
+
}
|
|
59375
|
+
async function discardPendingOpenMeldToolsUpdateAttempt(pathInput = {}) {
|
|
59376
|
+
await rm(pendingAttemptPath(pathInput), { force: true });
|
|
59377
|
+
}
|
|
59378
|
+
async function readAttempt(path) {
|
|
59379
|
+
const raw = await readFile(path, "utf8").catch((error) => {
|
|
59380
|
+
if (error.code === "ENOENT") return null;
|
|
59381
|
+
throw error;
|
|
59382
|
+
});
|
|
59383
|
+
if (raw === null) return null;
|
|
59384
|
+
const parsed = openMeldToolsUpdateAttemptSchema.safeParse(JSON.parse(raw));
|
|
59385
|
+
if (!parsed.success) throw new Error("OpenMeld update state is invalid.");
|
|
59386
|
+
return parsed.data;
|
|
59387
|
+
}
|
|
59388
|
+
async function writeAttempt(path, attempt) {
|
|
59389
|
+
const validated = openMeldToolsUpdateAttemptSchema.parse(attempt);
|
|
59390
|
+
const temporaryPath = `${path}.${String(process.pid)}.tmp`;
|
|
59391
|
+
await mkdir(dirname(path), { recursive: true });
|
|
59392
|
+
await writeFile(temporaryPath, `${JSON.stringify(validated, null, 2)}\n`, {
|
|
59393
|
+
encoding: "utf8",
|
|
59394
|
+
mode: 384
|
|
59395
|
+
});
|
|
59396
|
+
await rename(temporaryPath, path);
|
|
59397
|
+
}
|
|
59398
|
+
//#endregion
|
|
59399
|
+
//#region src/local-service/maintenance/openmeld-tools-upgrade-process.ts
|
|
59400
|
+
async function runOpenMeldToolsUpgradeProcess(context) {
|
|
59401
|
+
const { command, argsPrefix } = resolveOpenMeldToolsUpgradeProgram({
|
|
59402
|
+
activeBundle: await readDaemonActiveBundleState().catch(() => null),
|
|
59403
|
+
binaryDistribution: isBinaryDistribution(),
|
|
59404
|
+
processEntryScriptPath: process.argv[1],
|
|
59405
|
+
processExecutablePath: process.execPath
|
|
59406
|
+
});
|
|
59407
|
+
return await new Promise((resolve, reject) => {
|
|
59408
|
+
const child = spawn(command, [
|
|
59409
|
+
...argsPrefix,
|
|
59410
|
+
"--view",
|
|
59411
|
+
"agent",
|
|
59412
|
+
"upgrade",
|
|
59413
|
+
"--yes"
|
|
59414
|
+
], {
|
|
59415
|
+
env: {
|
|
59416
|
+
...process.env,
|
|
59417
|
+
...buildOpenMeldToolsUpdateContextEnv(context),
|
|
59418
|
+
OPENMELD_INTERNAL_SKIP_STARTUP_UPGRADE: "1"
|
|
59419
|
+
},
|
|
59420
|
+
stdio: "ignore"
|
|
59421
|
+
});
|
|
59422
|
+
child.once("error", reject);
|
|
59423
|
+
child.once("close", (code) => {
|
|
59424
|
+
resolve({ exitCode: Number(code ?? 1) });
|
|
59425
|
+
});
|
|
59426
|
+
});
|
|
59427
|
+
}
|
|
59428
|
+
function resolveOpenMeldToolsUpgradeProgram(input) {
|
|
59429
|
+
if (input.binaryDistribution) return {
|
|
59430
|
+
argsPrefix: [],
|
|
59431
|
+
command: input.activeBundle?.bundleFormat === "binary_v1" ? input.activeBundle.sourceEntryScriptPath : input.processExecutablePath
|
|
59432
|
+
};
|
|
59433
|
+
const sourceEntryScriptPath = input.activeBundle?.sourceEntryScriptPath ?? input.processEntryScriptPath;
|
|
59434
|
+
if (!sourceEntryScriptPath) throw new Error("OpenMeld could not find its update program.");
|
|
59435
|
+
return {
|
|
59436
|
+
argsPrefix: [sourceEntryScriptPath],
|
|
59437
|
+
command: input.processExecutablePath
|
|
59438
|
+
};
|
|
59439
|
+
}
|
|
59440
|
+
//#endregion
|
|
59441
|
+
//#region src/local-service/maintenance/openmeld-tools-update-coordinator.ts
|
|
59442
|
+
function createOpenMeldToolsUpdateCoordinator(overrides = {}) {
|
|
59443
|
+
const deps = resolveDependencies(overrides);
|
|
59444
|
+
let inFlight = null;
|
|
59445
|
+
let coordination = Promise.resolve();
|
|
59446
|
+
const runSerialized = (run) => {
|
|
59447
|
+
const result = coordination.then(run, run);
|
|
59448
|
+
coordination = result.then(() => void 0, () => void 0);
|
|
59449
|
+
return result;
|
|
59450
|
+
};
|
|
59451
|
+
const startAttempt = (attempt) => {
|
|
59452
|
+
if (inFlight) return;
|
|
59453
|
+
const tracked = runAttempt(attempt, deps).finally(() => {
|
|
59454
|
+
if (inFlight === tracked) inFlight = null;
|
|
59455
|
+
});
|
|
59456
|
+
inFlight = tracked;
|
|
59457
|
+
inFlight.catch(deps.reportBackgroundError);
|
|
59458
|
+
};
|
|
59459
|
+
const resumePendingUpdate = async () => {
|
|
59460
|
+
const serviceJob = await deps.readPendingServiceJob();
|
|
59461
|
+
const pendingAttempt = await deps.readPendingAttempt();
|
|
59462
|
+
if (serviceJob) {
|
|
59463
|
+
if (pendingAttempt) await deps.discardPendingAttempt();
|
|
59464
|
+
return true;
|
|
59465
|
+
}
|
|
59466
|
+
if (!pendingAttempt) return false;
|
|
59467
|
+
startAttempt(pendingAttempt);
|
|
59468
|
+
return true;
|
|
59469
|
+
};
|
|
59470
|
+
const requestUpdate = async ({ requestSource }) => {
|
|
59471
|
+
if (requestSource === "automatic") {
|
|
59472
|
+
if (!(await deps.readPolicy()).automaticUpdatesEnabled) return { status: "disabled" };
|
|
59473
|
+
}
|
|
59474
|
+
const serviceJob = await deps.readPendingServiceJob();
|
|
59475
|
+
if (serviceJob) return {
|
|
59476
|
+
status: "already_running",
|
|
59477
|
+
operation: projectServiceJob$1(serviceJob)
|
|
59478
|
+
};
|
|
59479
|
+
const existingAttempt = await deps.readPendingAttempt();
|
|
59480
|
+
if (existingAttempt) {
|
|
59481
|
+
startAttempt(existingAttempt);
|
|
59482
|
+
return {
|
|
59483
|
+
status: "already_running",
|
|
59484
|
+
operation: existingAttempt.operation
|
|
59485
|
+
};
|
|
59486
|
+
}
|
|
59487
|
+
const assessment = await deps.assessUpdate();
|
|
59488
|
+
if (!(assessment.checked && assessment.latestVersion)) return { status: "unavailable" };
|
|
59489
|
+
if (!assessment.updateAvailable) return {
|
|
59490
|
+
currentVersion: assessment.currentVersion,
|
|
59491
|
+
status: "current"
|
|
59492
|
+
};
|
|
59493
|
+
const now = deps.now();
|
|
59494
|
+
const attempt = {
|
|
59495
|
+
v: 1,
|
|
59496
|
+
attempts: 0,
|
|
59497
|
+
errorMessage: null,
|
|
59498
|
+
operation: {
|
|
59499
|
+
operationId: deps.createOperationId(),
|
|
59500
|
+
phase: "updating",
|
|
59501
|
+
requestSource,
|
|
59502
|
+
requestedAt: now,
|
|
59503
|
+
targetVersion: assessment.latestVersion,
|
|
59504
|
+
updatedAt: now,
|
|
59505
|
+
urgency: assessment.floorBreached ? "required" : await deps.resolveUrgency()
|
|
59506
|
+
}
|
|
59507
|
+
};
|
|
59508
|
+
await deps.persistAttempt(attempt);
|
|
59509
|
+
startAttempt(attempt);
|
|
59510
|
+
return {
|
|
59511
|
+
status: "started",
|
|
59512
|
+
operation: attempt.operation
|
|
59513
|
+
};
|
|
59514
|
+
};
|
|
59515
|
+
return {
|
|
59516
|
+
requestUpdate: async (input) => await runSerialized(async () => await requestUpdate(input)),
|
|
59517
|
+
resumePendingUpdate: async () => await runSerialized(resumePendingUpdate),
|
|
59518
|
+
waitForIdle: async () => {
|
|
59519
|
+
await coordination;
|
|
59520
|
+
while (inFlight) await inFlight;
|
|
59521
|
+
}
|
|
59522
|
+
};
|
|
59523
|
+
}
|
|
59524
|
+
async function runAttempt(attempt, deps) {
|
|
59525
|
+
const running = {
|
|
59526
|
+
...attempt,
|
|
59527
|
+
attempts: attempt.attempts + 1,
|
|
59528
|
+
errorMessage: null,
|
|
59529
|
+
operation: {
|
|
59530
|
+
...attempt.operation,
|
|
59531
|
+
phase: "updating",
|
|
59532
|
+
updatedAt: deps.now()
|
|
59533
|
+
}
|
|
59534
|
+
};
|
|
59535
|
+
await deps.persistAttempt(running);
|
|
59536
|
+
try {
|
|
59537
|
+
const result = await deps.runUpgrade({
|
|
59538
|
+
operationId: running.operation.operationId,
|
|
59539
|
+
requestedAt: running.operation.requestedAt,
|
|
59540
|
+
requestSource: running.operation.requestSource
|
|
59541
|
+
});
|
|
59542
|
+
if (result.exitCode !== 0) throw new Error(`OpenMeld update process exited with status ${String(result.exitCode)}.`);
|
|
59543
|
+
if (await deps.readPendingServiceJob()) {
|
|
59544
|
+
await deps.discardPendingAttempt();
|
|
59545
|
+
return;
|
|
59546
|
+
}
|
|
59547
|
+
await deps.completeAttempt({
|
|
59548
|
+
...running,
|
|
59549
|
+
errorMessage: null,
|
|
59550
|
+
operation: {
|
|
59551
|
+
...running.operation,
|
|
59552
|
+
phase: "updated",
|
|
59553
|
+
updatedAt: deps.now()
|
|
59554
|
+
}
|
|
59555
|
+
});
|
|
59556
|
+
} catch (error) {
|
|
59557
|
+
await deps.completeAttempt({
|
|
59558
|
+
...running,
|
|
59559
|
+
errorMessage: toErrorMessage$42(error),
|
|
59560
|
+
operation: {
|
|
59561
|
+
...running.operation,
|
|
59562
|
+
phase: "needs_help",
|
|
59563
|
+
updatedAt: deps.now()
|
|
59564
|
+
}
|
|
59565
|
+
});
|
|
59566
|
+
}
|
|
59567
|
+
}
|
|
59568
|
+
function resolveDependencies(overrides) {
|
|
59569
|
+
return {
|
|
59570
|
+
assessUpdate: overrides.assessUpdate ?? (async () => await assessCliUpdate({ environmentTarget: await resolveOpenMeldEnvironmentTarget() })),
|
|
59571
|
+
completeAttempt: overrides.completeAttempt ?? completeOpenMeldToolsUpdateAttempt,
|
|
59572
|
+
createOperationId: overrides.createOperationId ?? randomUUID,
|
|
59573
|
+
discardPendingAttempt: overrides.discardPendingAttempt ?? discardPendingOpenMeldToolsUpdateAttempt,
|
|
59574
|
+
now: overrides.now ?? (() => (/* @__PURE__ */ new Date()).toISOString()),
|
|
59575
|
+
persistAttempt: overrides.persistAttempt ?? persistOpenMeldToolsUpdateAttempt,
|
|
59576
|
+
readPendingAttempt: overrides.readPendingAttempt ?? readPendingOpenMeldToolsUpdateAttempt,
|
|
59577
|
+
readPendingServiceJob: overrides.readPendingServiceJob ?? readPendingDaemonServiceUpdate,
|
|
59578
|
+
readPolicy: overrides.readPolicy ?? readOpenMeldToolsMaintenancePolicy,
|
|
59579
|
+
reportBackgroundError: overrides.reportBackgroundError ?? ((error) => {
|
|
59580
|
+
console.error("[openmeld.tools.update_failed]", error);
|
|
59581
|
+
}),
|
|
59582
|
+
resolveUrgency: overrides.resolveUrgency ?? resolveServiceUpdateUrgency,
|
|
59583
|
+
runUpgrade: overrides.runUpgrade ?? runOpenMeldToolsUpgradeProcess
|
|
59584
|
+
};
|
|
59585
|
+
}
|
|
59586
|
+
function projectServiceJob$1(job) {
|
|
59587
|
+
return {
|
|
59588
|
+
operationId: job.jobId,
|
|
59589
|
+
phase: job.phase,
|
|
59590
|
+
requestSource: job.requestSource,
|
|
59591
|
+
requestedAt: job.requestedAt,
|
|
59592
|
+
targetVersion: job.targetVersion,
|
|
59593
|
+
updatedAt: job.updatedAt,
|
|
59594
|
+
urgency: job.urgency
|
|
59595
|
+
};
|
|
59596
|
+
}
|
|
59597
|
+
//#endregion
|
|
59165
59598
|
//#region src/local-service/reporting/runtime-agent-controller-report-sync.ts
|
|
59166
59599
|
async function syncLocalServiceRuntimeAgentControllerReports(input) {
|
|
59167
59600
|
let inventory;
|
|
@@ -63060,6 +63493,32 @@ function buildNonInstallableAgentSelectionError(input) {
|
|
|
63060
63493
|
].join("\n");
|
|
63061
63494
|
}
|
|
63062
63495
|
//#endregion
|
|
63496
|
+
//#region src/local-service/maintenance/openmeld-tools-update-operation.ts
|
|
63497
|
+
const TERMINAL_VISIBILITY_MS = 1440 * 60 * 1e3;
|
|
63498
|
+
async function resolveOpenMeldToolsUpdateOperation(pathInput = {}, nowMs = Date.now()) {
|
|
63499
|
+
const [servicePending, toolsPending] = await Promise.all([readPendingDaemonServiceUpdate(pathInput), readPendingOpenMeldToolsUpdateAttempt(pathInput)]);
|
|
63500
|
+
if (servicePending) return projectServiceJob(servicePending);
|
|
63501
|
+
if (toolsPending) return toolsPending.operation;
|
|
63502
|
+
const [serviceLast, toolsLast] = await Promise.all([readLastDaemonServiceUpdate(pathInput), readLastOpenMeldToolsUpdateAttempt(pathInput)]);
|
|
63503
|
+
return [...serviceLast ? [projectServiceJob(serviceLast)] : [], ...toolsLast ? [toolsLast.operation] : []].filter((operation) => isRecentTerminal(operation, nowMs)).sort((a, b) => Date.parse(b.updatedAt) - Date.parse(a.updatedAt))[0] ?? null;
|
|
63504
|
+
}
|
|
63505
|
+
function projectServiceJob(job) {
|
|
63506
|
+
return {
|
|
63507
|
+
operationId: job.jobId,
|
|
63508
|
+
phase: job.phase,
|
|
63509
|
+
requestSource: job.requestSource,
|
|
63510
|
+
requestedAt: job.requestedAt,
|
|
63511
|
+
targetVersion: job.targetVersion,
|
|
63512
|
+
updatedAt: job.updatedAt,
|
|
63513
|
+
urgency: job.urgency
|
|
63514
|
+
};
|
|
63515
|
+
}
|
|
63516
|
+
function isRecentTerminal(operation, nowMs) {
|
|
63517
|
+
if (operation.phase !== "updated" && operation.phase !== "restored" && operation.phase !== "needs_help") return false;
|
|
63518
|
+
const updatedAtMs = Date.parse(operation.updatedAt);
|
|
63519
|
+
return Number.isFinite(updatedAtMs) && nowMs >= updatedAtMs && nowMs - updatedAtMs <= TERMINAL_VISIBILITY_MS;
|
|
63520
|
+
}
|
|
63521
|
+
//#endregion
|
|
63063
63522
|
//#region src/skills/content-hash.ts
|
|
63064
63523
|
async function computeDirectoryContentHash(input) {
|
|
63065
63524
|
const ignoredNames = new Set(input.ignoredNames ?? []);
|
|
@@ -64041,10 +64500,12 @@ async function writeInstalledLocalComponentsSnapshot(input) {
|
|
|
64041
64500
|
return snapshot;
|
|
64042
64501
|
}
|
|
64043
64502
|
async function resolveLocalComponentsStatus(input = {}) {
|
|
64044
|
-
const [expectedManifest, service, skills] = await Promise.all([
|
|
64503
|
+
const [expectedManifest, service, skills, maintenance, updateOperation] = await Promise.all([
|
|
64045
64504
|
buildExpectedLocalComponentsManifest(),
|
|
64046
64505
|
resolveServiceComponentState(),
|
|
64047
|
-
resolveSkillsComponentState()
|
|
64506
|
+
resolveSkillsComponentState(),
|
|
64507
|
+
resolveOpenMeldToolsMaintenanceProjection(),
|
|
64508
|
+
resolveOpenMeldToolsUpdateOperation()
|
|
64048
64509
|
]);
|
|
64049
64510
|
const cli = resolveCliComponentStatus(input);
|
|
64050
64511
|
const setupAction = resolveLocalComponentsSetupAction({
|
|
@@ -64068,6 +64529,8 @@ async function resolveLocalComponentsStatus(input = {}) {
|
|
|
64068
64529
|
setupAction,
|
|
64069
64530
|
setupActionLabel: formatLocalSetupActionLabel(setupAction),
|
|
64070
64531
|
setupActionDescription: formatLocalSetupActionDescription(setupAction),
|
|
64532
|
+
maintenance,
|
|
64533
|
+
...updateOperation ? { updateOperation } : {},
|
|
64071
64534
|
cli,
|
|
64072
64535
|
service: {
|
|
64073
64536
|
expectedBundleHash: expectedManifest.service.bundleHash,
|
|
@@ -73613,6 +74076,20 @@ const runDaemonServiceLoop = async (input) => {
|
|
|
73613
74076
|
});
|
|
73614
74077
|
}
|
|
73615
74078
|
});
|
|
74079
|
+
const stopOpenMeldToolsAutomaticUpdates = startOpenMeldToolsAutomaticUpdateLoop({
|
|
74080
|
+
coordinator: createOpenMeldToolsUpdateCoordinator({ reportBackgroundError: (error) => {
|
|
74081
|
+
warnDaemonEvent("[openmeld.tools.update_failed]", {
|
|
74082
|
+
event: "cli.openmeld_tools.update_failed",
|
|
74083
|
+
errorMessage: toErrorMessage$31(error)
|
|
74084
|
+
});
|
|
74085
|
+
} }),
|
|
74086
|
+
onError: (error) => {
|
|
74087
|
+
warnDaemonEvent("[openmeld.tools.automatic_update_failed]", {
|
|
74088
|
+
event: "cli.openmeld_tools.automatic_update_failed",
|
|
74089
|
+
errorMessage: toErrorMessage$31(error)
|
|
74090
|
+
});
|
|
74091
|
+
}
|
|
74092
|
+
});
|
|
73616
74093
|
const agentActivitySync = startLocalAgentActivitySyncLoop({
|
|
73617
74094
|
onError: (error) => {
|
|
73618
74095
|
emitRunLine({
|
|
@@ -73812,6 +74289,7 @@ const runDaemonServiceLoop = async (input) => {
|
|
|
73812
74289
|
localFolderPicker.close(),
|
|
73813
74290
|
agentActivityIntegrationRefresh.stop(),
|
|
73814
74291
|
agentActivitySync.stop(),
|
|
74292
|
+
stopOpenMeldToolsAutomaticUpdates(),
|
|
73815
74293
|
stopRegistrationReconcile()
|
|
73816
74294
|
]);
|
|
73817
74295
|
}
|
|
@@ -107608,6 +108086,6 @@ function isHumanInteractiveSpaceRuntime(runtime) {
|
|
|
107608
108086
|
return runtime.resolvedView === "human" && canUseInteractivePrompts(runtime);
|
|
107609
108087
|
}
|
|
107610
108088
|
//#endregion
|
|
107611
|
-
export { runAgentsRepair as $, readAgentActivityIntegrationStatus as $a, resolveDaemonServiceManager as $i, formatDaemonServiceMissingRecommendation as $n, readRecentDaemonLifecycleEvents as $r, readBundledOpenMeldCliSkillDocumentByPath as $t, assertFullSignalIdArgument as A, alignSelectedOpenMeldProfileStorage as Aa, PREPARE_SESSION_RECONNECT_GRACE_MS as Ai, upsertSpaceConfig as An, unbindProject as Ao, DualViewGuideError as Ar, shouldEmitAgentOverview as At, persistAgentTransportSelection as B, getProfileDefaultView as Ba, resolveOpenMeldEnvironmentTarget as Bi, promptSearchMultiselect as Bn, outLine as Bo, scheduleDaemonServiceUpdate as Br, parseJsonResponse$1 as Bt, toSpaceMetaUpsertInput as C, createOpenMeldAgentProfile as Ca, listAgentControllerPermissionModeOptions as Ci, submitRuntimeAgentControllerReport as Cn, bindProject as Co, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as Cr, runDaemonTeardownStrict as Ct, formatHumanReadTargetList as D, primeOpenMeldProfilesSessionCache as Da, resolveAgentProfileEditCapabilities as Di, resolveLocalAgentControllerLaunchability as Dn, removeProjectConnection as Do, registerAuthLoginRequestOptions as Dr, reconcileCliVersionView as Dt, buildHumanReplyContextSummary as E, listOpenMeldProfiles as Ea, resolveAgentExecutionStatus as Ei, resolveLocalAgentControllerBlockerReasonCodes as En, migrateProjectBindingStore as Eo, registerDaemonControlTargetOptions as Er, buildProfileWorkspaceRows as Et, emitSpaceAgentOverview as F, buildHumanAuthenticationCard as Fa, resolveDaemonServiceAlignmentDecision as Fi, buildSignalMessageReadProjection as Fn, renderTextInfoCard as Fo, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Fr, fetchSpaceMeta as Ft, runAgentsCustomList as G, requestLocalAgentActivitySync as Ga, startCurrentCommandCheckScope as Gi, isCliUpdateCheckApplicable as Gn, cliJsonSkillsShowEnvelopeSchema as Go, resolveDaemonServiceFreshnessWarning as Gr, runDaemonStartDecisionPrompt as Gt, runAgents as H, LocalProjectConnectionError as Ha, getCurrentCommandCheckState as Hi, isReturnKeypress as Hn, cliJsonOutputEnvelopeSchema as Ho, resolveDaemonDeviceId as Hr, writeInstalledLocalComponentsSnapshot as Ht, emitSpaceCliAgentOverview as I, createAuthenticationError as Ia, classifyDaemonServiceRunStartability as Ii, buildSpaceRoundReadProjection as In, sanitizeTerminalDisplayText as Io, areAllowedActionsEquivalent as Ir, updateSpaceMeta as It, runAgentsDetect as J, resolveAgentActivityRouteForPath as Ja, readCurrentDaemonRuntimeContext as Ji, readDispatchSpaceActionContextFromEnv as Jn, revokeOrganizationJoinLinkResponseSchema as Jo, formatDeviceReplyReadinessLabel as Jr, runSkillsEnsure as Jt, runAgentsCustomRemove as K, isAgentActivityRouteRegistered as Ka, inspectDaemonServiceInventory as Ki, assertDispatchOwnedRuntimePublicWriteAllowed as Kn, getOrganizationJoinLinkResponseSchema as Ko, resolveCurrentReplyReadinessSnapshot as Kr, collectSkillsReadinessSnapshot as Kt, prepareLocalAgentReadiness as L, resolveAuthenticationGuidance as La, classifyDaemonServiceWakeability as Li, buildUpdatesReplyWorkflowProjection as Ln, emitCliJsonEnvelope as Lo, buildAgentFacingPublicationModeGuideLines as Lr, readGatewayJsonResponse as Lt, prepareAuthenticatedSpaceCommandContext as M, getSelectedOpenMeldProfileId as Ma, buildOnboardingPlan as Mi, buildDispatchResultMessageReadProjection as Mn, enqueueControllerTaskLifecycleEventWhileLocked as Mo, buildDualViewGuideMessage as Mr, readDaemonStartFailureLogTailLines as Mt, resolveOpenMeldProfileForSpaceCommand as N, setSelectedOpenMeldProfileId as Na, getSetupFlowCopy as Ni, buildDispatchResultReplyWorkflowProjection as Nn, readControllerTaskLifecycleOutboxHealth as No, formatAgentOverviewPayload as Nr, fetchSpaceUpdates as Nt, parseEnvelope as O, resolveOpenMeldProfile as Oa, resolveEvidenceSyncHealth as Oi, resolveLocalAgentControllerReportDecision as On, runIfAgentActivityBindingGenerationIsCurrent as Oo, registerBuiltinAgentSelectionOptions as Or, emitDaemonAgentOverview as Ot, resolveSpaceAccessLabel as P, buildAgentAuthenticationGuide as Pa, buildDaemonServiceTargetSpec as Pi, buildSignalIndex as Pn, renderInfoCard as Po, OPENMELD_AGENT_MENTAL_MODEL_LINES as Pr, createCliSpaceApi as Pt, runAgentsManage as Q, installAgentActivityIntegrations as Qa, readDaemonServiceJobCrashExitCode as Qi, formatDaemonServiceDowngradeBlockedRecommendation as Qn, resolveOpenClawLocalDiagnosticsValue as Qr, ensureLocalSkills as Qt, buildReplyReadinessGuidance as R, resolveAuthenticationGuidanceFromError as Ra, resolveServiceUpdateUrgency as Ri, createSpaceMemberIdentityIndex as Rn, errLine as Ro, canonicalizeAllowedActions as Rr, readGatewayTextResponse as Rt, loadSpaceSignalIndexOrNull as S, resolveOpenMeldProfileOrNull as Sa, getAgentControllerPermissionModeFieldLabel as Si, submitProfileRuntimeAgentControllerReport as Sn, removeProjectOutbox as So, registerSpaceMemberSelectionOptions as Sr, runDaemonStop as St, buildFormalSignalReadPayload as T, deleteOpenMeldProfile as Ta, resolveAgentControllerPermissionModeForController as Ti, collectLocalAgentControllerInventory as Tn, listProjectConnectionsWithStatus as To, getCliVersionInfo as Tr, buildProfileWorkspacePresentation as Tt, runAgentsConfig as U, validateLocalProjectConnectionPath as Ua, isCurrentCommandCheckScopeActive as Ui, runInteractivePrompt as Un, cliJsonSkillsListEnvelopeSchema as Uo, formatDaemonFailureContextText as Ur, resolveDaemonServiceParticipationStatus as Ut, resolveAgentProfileSetup as V, setProfileDefaultView as Va, finishCurrentCommandCheckScope as Vi, promptSearchSelect as Vn, cliBinaryDeltaPatchSchema as Vo, ensureDaemonRuntimePaths as Vr, resolveLocalComponentsStatus as Vt, runAgentsCustomAdd as W, LocalDaemonControlPlaneClientError as Wa, resetCurrentCommandCheckState as Wi, assessCliUpdate as Wn, cliJsonSkillsLoadEnvelopeSchema as Wo, resolveServiceReadinessFromServiceStatus as Wr, runDaemonServiceParticipationGate as Wt, runAgentsEnable as X, AGENT_ACTIVITY_INTEGRATION_OWNER as Xa, getDaemonSystemServiceLogPath as Xi, formatElapsedTime as Xn, package_default as Xo, mapAgentReplyReadinessToLegacyAutoReply as Xr, runSkillsUninstall as Xt, runAgentsDisable as Y, unregisterAgentActivityRoute as Ya, readCurrentObservedDaemonRuntimeStatus as Yi, writeDispatchSpaceActionRecord as Yn, compareAgentControllerRefsForDisplay as Yo, formatHumanReplyReadinessReason as Yr, runSkillsInstall as Yt, runAgentsList as Z, defaultManagedIntegrationPaths as Za, isDaemonServiceJobNeverSpawned as Zi, resolveElapsedTimeMs as Zn, resolveGatewayChainReadiness as Zr, runSkillsUpdate as Zt, runSpaceWriteWithPasswordRetry as _, parseCliViewMode as _a, notifyDaemonRouteCatalogChanged as _i, ensureAgentProfileRuntimeBinding as _n, normalizeSharedSessionTitle as _o, createStartAgentIdentityGuideError as _r, runDaemonInterrupt as _t, runSpaceDelete as a, fetchLatestCliBinaryRelease as aa, readProfileWorkspaceConfig as ai, evaluateCommandAuthentication as an, formatOpenMeldCliLine as ao, createResetConfirmationGuideError as ar, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, isSelectedOpenMeldProfileRequiredError as ba, createAgentExecutionStatusDisplayRows as bi, assessActionParticipationCandidate as bn, removeProjectInbox as bo, getCommandEntryContract as br, runDaemonSnapshot as bt, runSpaceLeave as c, writeVersionState as ca, setOpenMeldManagedProfileWorkspace as ci, runAuthMenu as cn, resolveSetupFollowUpCliEntryCommand as co, createSpaceContractSetGuideError as cr, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, resolveCurrentDaemonExpectedVersion as da, syncDeviceRuntimeStateProjection as di, buildAuthStatusSnapshot as dn, readDaemonServiceContract as do, createSpacePublicationSetGuideError as dr, resolveSpaceSendText as dt, buildInstallSelfJsonPayload as ea, syncProfileWorkspaceState as ei, readRuntimeReportingHealthState as en, resolveAgentActivityDispatcherCommand as eo, canUseInteractivePrompts as er, runAgentsShow as et, runSpaceSend as f, buildHumanErrorCopy as fa, createPrimaryBindingReadSession as fi, formatActiveOrganizationLabel as fn, upsertDaemonServiceContract as fo, createSpaceRemoveMembersGuideError as fr, runDaemon as ft, runSpaceReadWithPasswordRetry as g, formatMessage as ga, listBuiltinAgentsRegistryEntries as gi, promptTextEntry as gn, resolveObservedAgentActivityBinding as go, createSpaceUpdatesGuideError as gr, runDaemonInstall as gt, uploadPreparedSpaceFiles as h, createPresenter as ha, reconcileNewRunnableBuiltinAgentsForSetup as hi, resolveCreateProfileName as hn, buildAgentActivityEvent as ho, createSpaceTargetGuideError as hr, runDaemonCancel as ht, runSpaceCreate as i, ensureVersionStateReady as ia, normalizeCustomProfileWorkspacePath as ii, ensureCommandAuthenticationOrCancel as in, formatOpenMeldCliCommands as io, createProfileMenuGuideError as ir, colorizeDisplayProfileLabel as it, assertValidSpaceIdTarget as j, clearSelectedOpenMeldProfileId as ja, buildDaemonRouteObservationPresentation as ji, assertNoRemovedCcSpaceAddressingSyntax as jn, canonicalizeLocalProjectPath as jo, formatDualViewGuideForDisplay as jr, runDaemonStartupPreflight as jt, isSpaceCommandOutputHandledError as k, updateOpenMeldProfile as ka, resolveNativeAgentControllerPermissionModeForController as ki, inspectSpaceCacheFile as kn, setDefaultProjectConnection as ko, buildAgentOverviewFromContract as kr, createDelayedSpinner as kt, runSpaceList as l, resolveDaemonRuntimeContractCompatibility as la, validateCustomProfileWorkspacePath as li, runAuthStatus as ln, resolveUserFacingCliEntryCommand as lo, createSpaceLeaveGuideError as lr, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, renderHumanTextErrorCard as ma, listAgentTargetStates as mi, resolveCreateProfileKind as mn, removeAgentActivityContextCache as mo, createSpaceSubcommandTargetGuideError as mr, runDaemonBackgroundStartForDecision as mt, promptAndConfirmSpacePassword as n, buildNextVersionState as na, resolveProfileWorkspaceRuntime as ni, connectWebSocket as nn, formatInlineOpenMeldCliCommands as no, createProfileActionGuideError as nr, postLocalParticipationMutationReconcile as nt, runSpaceHistory as o, fetchLatestPackageInfo as oa, resolveConfiguredProfileWorkspacePath as oi, runAuthLogin as on, formatOpenMeldCliTextBlock as oo, createSpaceAddMembersGuideError as or, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, renderHumanErrorCard as pa, resolveAgentProfilePrimaryAgentControllerReport as pi, createProfileByKind as pn, readAgentActivityContextForPath as po, createSpaceResultGuideError as pr, runDaemonAutostart as pt, runAgentsCustomUpdate as q, registerAgentActivityRoute as qa, resolveVersionChangeDirection as qi, readDispatchOwnedRuntimeGuard as qn, organizationJoinLinkErrorResponseSchema as qo, formatAgentReplyReadinessLabel as qr, runSkillsCheck as qt, runSpaceAddMembers as r, compareSemver as ra, ensureOpenMeldManagedProfileWorkspace as ri, buildCommandAuthenticationPromptMessage as rn, formatOpenMeldCliCommand as ro, createProfileCreateGuideError as rr, colorizeAgentLabel as rt, runSpaceJoin as s, readVersionState as sa, setCustomProfileWorkspace as si, runAuthLogout as sn, formatProfileAwareOpenMeldCliCommands as so, createSpaceAliasTargetGuideError as sr, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, performManagedInstall as ta, createModelCatalogReadSession as ti, readRecentDaemonDispatchJournalEvents as tn, uninstallAgentActivityIntegrations as to, createDoctorFailedGuideError as tr, formatTransportModeDisplay as tt, runSpacePassword as u, toStartBackgroundHelperExecutionCompatibility as ua, describeProfileWorkspacePathValidationFailure as ui, buildAuthStatusRows as un, syncLocalAgentActivity as uo, createSpaceMenuGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, resolveRuntimeContext as va, resolveLocalRegistryAgentIdFromAgentControllerRef as vi, formatServiceParticipationReadinessLabel as vn, readCodexSessionTitles as vo, createStartAuthenticationGuideError as vr, runDaemonReinstall as vt, buildFormalDispatchResultReadPayload as w, createOpenMeldHumanProfile as wa, parseAgentControllerRef as wi, submitRuntimeAgentControllerReports as wn, listProjectBindings as wo, registerSkillsTargetSelectionOptions as wr, runDaemonUninstall as wt, loadSpaceIdentityDirectoryOrNull as x, requireOpenMeldProfile as xa, getAgentControllerPermissionModeDisplayMetadata as xi, computeRetryDelayMs as xn, readAgentActivityOutboxHealth as xo, getCommandHintsFromContract as xr, runDaemonStatusFlow as xt, emitHumanReadSignalsTextProjection as y, resolveViewProfileKey as ya, buildAgentControllerRef as yi, resolveServiceParticipationReadiness as yn, enqueueAgentActivityHookEvent as yo, createUpgradeConfirmationGuideError as yr, runDaemonRunAfterEntryChecks as yt, resolveHumanControllerDisplayName as z, resolveAuthenticationGuidanceFromMessage as za, assessServerRequiredVersion as zi, formatRemovedCcRelationMessage as zn, outJsonLine as zo, runPendingDaemonServiceUpdate as zr, toStructuredGatewayFailure as zt };
|
|
108089
|
+
export { runAgentsRepair as $, installAgentActivityIntegrations as $a, readDaemonServiceJobCrashExitCode as $i, formatDaemonServiceMissingRecommendation as $n, resolveOpenClawLocalDiagnosticsValue as $r, readBundledOpenMeldCliSkillDocumentByPath as $t, assertFullSignalIdArgument as A, updateOpenMeldProfile as Aa, resolveNativeAgentControllerPermissionModeForController as Ai, upsertSpaceConfig as An, setDefaultProjectConnection as Ao, DualViewGuideError as Ar, shouldEmitAgentOverview as At, persistAgentTransportSelection as B, resolveAuthenticationGuidanceFromMessage as Ba, assessServerRequiredVersion as Bi, promptSearchMultiselect as Bn, outJsonLine as Bo, runPendingDaemonServiceUpdate as Br, parseJsonResponse$1 as Bt, toSpaceMetaUpsertInput as C, resolveOpenMeldProfileOrNull as Ca, getAgentControllerPermissionModeFieldLabel as Ci, submitRuntimeAgentControllerReport as Cn, removeProjectOutbox as Co, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as Cr, runDaemonTeardownStrict as Ct, formatHumanReadTargetList as D, listOpenMeldProfiles as Da, resolveAgentExecutionStatus as Di, resolveLocalAgentControllerLaunchability as Dn, migrateProjectBindingStore as Do, registerAuthLoginRequestOptions as Dr, reconcileCliVersionView as Dt, buildHumanReplyContextSummary as E, deleteOpenMeldProfile as Ea, resolveAgentControllerPermissionModeForController as Ei, resolveLocalAgentControllerBlockerReasonCodes as En, listProjectConnectionsWithStatus as Eo, registerDaemonControlTargetOptions as Er, buildProfileWorkspaceRows as Et, emitSpaceAgentOverview as F, buildAgentAuthenticationGuide as Fa, buildDaemonServiceTargetSpec as Fi, buildSignalMessageReadProjection as Fn, renderInfoCard as Fo, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Fr, fetchSpaceMeta as Ft, runAgentsCustomList as G, LocalDaemonControlPlaneClientError as Ga, resetCurrentCommandCheckState as Gi, isCliUpdateCheckApplicable as Gn, cliJsonSkillsLoadEnvelopeSchema as Go, resolveServiceReadinessFromServiceStatus as Gr, runDaemonStartDecisionPrompt as Gt, runAgents as H, setProfileDefaultView as Ha, finishCurrentCommandCheckScope as Hi, isReturnKeypress as Hn, cliBinaryDeltaPatchSchema as Ho, ensureDaemonRuntimePaths as Hr, writeInstalledLocalComponentsSnapshot as Ht, emitSpaceCliAgentOverview as I, buildHumanAuthenticationCard as Ia, resolveDaemonServiceAlignmentDecision as Ii, buildSpaceRoundReadProjection as In, renderTextInfoCard as Io, areAllowedActionsEquivalent as Ir, updateSpaceMeta as It, runAgentsDetect as J, registerAgentActivityRoute as Ja, resolveVersionChangeDirection as Ji, readDispatchSpaceActionContextFromEnv as Jn, organizationJoinLinkErrorResponseSchema as Jo, formatAgentReplyReadinessLabel as Jr, runSkillsEnsure as Jt, runAgentsCustomRemove as K, requestLocalAgentActivitySync as Ka, startCurrentCommandCheckScope as Ki, assertDispatchOwnedRuntimePublicWriteAllowed as Kn, cliJsonSkillsShowEnvelopeSchema as Ko, resolveDaemonServiceFreshnessWarning as Kr, collectSkillsReadinessSnapshot as Kt, prepareLocalAgentReadiness as L, createAuthenticationError as La, classifyDaemonServiceRunStartability as Li, buildUpdatesReplyWorkflowProjection as Ln, sanitizeTerminalDisplayText as Lo, buildAgentFacingPublicationModeGuideLines as Lr, readGatewayJsonResponse as Lt, prepareAuthenticatedSpaceCommandContext as M, clearSelectedOpenMeldProfileId as Ma, buildDaemonRouteObservationPresentation as Mi, buildDispatchResultMessageReadProjection as Mn, canonicalizeLocalProjectPath as Mo, buildDualViewGuideMessage as Mr, readDaemonStartFailureLogTailLines as Mt, resolveOpenMeldProfileForSpaceCommand as N, getSelectedOpenMeldProfileId as Na, buildOnboardingPlan as Ni, buildDispatchResultReplyWorkflowProjection as Nn, enqueueControllerTaskLifecycleEventWhileLocked as No, formatAgentOverviewPayload as Nr, fetchSpaceUpdates as Nt, parseEnvelope as O, primeOpenMeldProfilesSessionCache as Oa, resolveAgentProfileEditCapabilities as Oi, resolveLocalAgentControllerReportDecision as On, removeProjectConnection as Oo, registerBuiltinAgentSelectionOptions as Or, emitDaemonAgentOverview as Ot, resolveSpaceAccessLabel as P, setSelectedOpenMeldProfileId as Pa, getSetupFlowCopy as Pi, buildSignalIndex as Pn, readControllerTaskLifecycleOutboxHealth as Po, OPENMELD_AGENT_MENTAL_MODEL_LINES as Pr, createCliSpaceApi as Pt, runAgentsManage as Q, defaultManagedIntegrationPaths as Qa, isDaemonServiceJobNeverSpawned as Qi, formatDaemonServiceDowngradeBlockedRecommendation as Qn, resolveGatewayChainReadiness as Qr, ensureLocalSkills as Qt, buildReplyReadinessGuidance as R, resolveAuthenticationGuidance as Ra, classifyDaemonServiceWakeability as Ri, createSpaceMemberIdentityIndex as Rn, emitCliJsonEnvelope as Ro, canonicalizeAllowedActions as Rr, readGatewayTextResponse as Rt, loadSpaceSignalIndexOrNull as S, requireOpenMeldProfile as Sa, getAgentControllerPermissionModeDisplayMetadata as Si, submitProfileRuntimeAgentControllerReport as Sn, readAgentActivityOutboxHealth as So, registerSpaceMemberSelectionOptions as Sr, runDaemonStop as St, buildFormalSignalReadPayload as T, createOpenMeldHumanProfile as Ta, parseAgentControllerRef as Ti, collectLocalAgentControllerInventory as Tn, listProjectBindings as To, getCliVersionInfo as Tr, buildProfileWorkspacePresentation as Tt, runAgentsConfig as U, LocalProjectConnectionError as Ua, getCurrentCommandCheckState as Ui, runInteractivePrompt as Un, cliJsonOutputEnvelopeSchema as Uo, resolveDaemonDeviceId as Ur, resolveDaemonServiceParticipationStatus as Ut, resolveAgentProfileSetup as V, getProfileDefaultView as Va, resolveOpenMeldEnvironmentTarget as Vi, promptSearchSelect as Vn, outLine as Vo, scheduleDaemonServiceUpdate as Vr, resolveLocalComponentsStatus as Vt, runAgentsCustomAdd as W, validateLocalProjectConnectionPath as Wa, isCurrentCommandCheckScopeActive as Wi, assessCliUpdate as Wn, cliJsonSkillsListEnvelopeSchema as Wo, formatDaemonFailureContextText as Wr, runDaemonServiceParticipationGate as Wt, runAgentsEnable as X, unregisterAgentActivityRoute as Xa, readCurrentObservedDaemonRuntimeStatus as Xi, formatElapsedTime as Xn, compareAgentControllerRefsForDisplay as Xo, formatHumanReplyReadinessReason as Xr, runSkillsUninstall as Xt, runAgentsDisable as Y, resolveAgentActivityRouteForPath as Ya, readCurrentDaemonRuntimeContext as Yi, writeDispatchSpaceActionRecord as Yn, revokeOrganizationJoinLinkResponseSchema as Yo, formatDeviceReplyReadinessLabel as Yr, runSkillsInstall as Yt, runAgentsList as Z, AGENT_ACTIVITY_INTEGRATION_OWNER as Za, getDaemonSystemServiceLogPath as Zi, resolveElapsedTimeMs as Zn, package_default as Zo, mapAgentReplyReadinessToLegacyAutoReply as Zr, runSkillsUpdate as Zt, runSpaceWriteWithPasswordRetry as _, formatMessage as _a, listBuiltinAgentsRegistryEntries as _i, ensureAgentProfileRuntimeBinding as _n, resolveObservedAgentActivityBinding as _o, createStartAgentIdentityGuideError as _r, runDaemonInterrupt as _t, runSpaceDelete as a, ensureVersionStateReady as aa, normalizeCustomProfileWorkspacePath as ai, evaluateCommandAuthentication as an, formatOpenMeldCliCommands as ao, createResetConfirmationGuideError as ar, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, resolveViewProfileKey as ba, buildAgentControllerRef as bi, assessActionParticipationCandidate as bn, enqueueAgentActivityHookEvent as bo, getCommandEntryContract as br, runDaemonSnapshot as bt, runSpaceLeave as c, readVersionState as ca, setCustomProfileWorkspace as ci, runAuthMenu as cn, formatProfileAwareOpenMeldCliCommands as co, createSpaceContractSetGuideError as cr, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, toStartBackgroundHelperExecutionCompatibility as da, describeProfileWorkspacePathValidationFailure as di, buildAuthStatusSnapshot as dn, syncLocalAgentActivity as do, createSpacePublicationSetGuideError as dr, resolveSpaceSendText as dt, resolveDaemonServiceManager as ea, readRecentDaemonLifecycleEvents as ei, readRuntimeReportingHealthState as en, readAgentActivityIntegrationStatus as eo, canUseInteractivePrompts as er, runAgentsShow as et, runSpaceSend as f, resolveCurrentDaemonExpectedVersion as fa, syncDeviceRuntimeStateProjection as fi, formatActiveOrganizationLabel as fn, readDaemonServiceContract as fo, createSpaceRemoveMembersGuideError as fr, runDaemon as ft, runSpaceReadWithPasswordRetry as g, createPresenter as ga, reconcileNewRunnableBuiltinAgentsForSetup as gi, promptTextEntry as gn, buildAgentActivityEvent as go, createSpaceUpdatesGuideError as gr, runDaemonInstall as gt, uploadPreparedSpaceFiles as h, renderHumanTextErrorCard as ha, listAgentTargetStates as hi, resolveCreateProfileName as hn, removeAgentActivityContextCache as ho, createSpaceTargetGuideError as hr, runDaemonCancel as ht, runSpaceCreate as i, compareSemver as ia, ensureOpenMeldManagedProfileWorkspace as ii, ensureCommandAuthenticationOrCancel as in, formatOpenMeldCliCommand as io, createProfileMenuGuideError as ir, colorizeDisplayProfileLabel as it, assertValidSpaceIdTarget as j, alignSelectedOpenMeldProfileStorage as ja, PREPARE_SESSION_RECONNECT_GRACE_MS as ji, assertNoRemovedCcSpaceAddressingSyntax as jn, unbindProject as jo, formatDualViewGuideForDisplay as jr, runDaemonStartupPreflight as jt, isSpaceCommandOutputHandledError as k, resolveOpenMeldProfile as ka, resolveEvidenceSyncHealth as ki, inspectSpaceCacheFile as kn, runIfAgentActivityBindingGenerationIsCurrent as ko, buildAgentOverviewFromContract as kr, createDelayedSpinner as kt, runSpaceList as l, writeVersionState as la, setOpenMeldManagedProfileWorkspace as li, runAuthStatus as ln, resolveSetupFollowUpCliEntryCommand as lo, createSpaceLeaveGuideError as lr, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, renderHumanErrorCard as ma, resolveAgentProfilePrimaryAgentControllerReport as mi, resolveCreateProfileKind as mn, readAgentActivityContextForPath as mo, createSpaceSubcommandTargetGuideError as mr, runDaemonBackgroundStartForDecision as mt, promptAndConfirmSpacePassword as n, performManagedInstall as na, createModelCatalogReadSession as ni, connectWebSocket as nn, uninstallAgentActivityIntegrations as no, createProfileActionGuideError as nr, postLocalParticipationMutationReconcile as nt, runSpaceHistory as o, fetchLatestCliBinaryRelease as oa, readProfileWorkspaceConfig as oi, runAuthLogin as on, formatOpenMeldCliLine as oo, createSpaceAddMembersGuideError as or, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, buildHumanErrorCopy as pa, createPrimaryBindingReadSession as pi, createProfileByKind as pn, upsertDaemonServiceContract as po, createSpaceResultGuideError as pr, runDaemonAutostart as pt, runAgentsCustomUpdate as q, isAgentActivityRouteRegistered as qa, inspectDaemonServiceInventory as qi, readDispatchOwnedRuntimeGuard as qn, getOrganizationJoinLinkResponseSchema as qo, resolveCurrentReplyReadinessSnapshot as qr, runSkillsCheck as qt, runSpaceAddMembers as r, buildNextVersionState as ra, resolveProfileWorkspaceRuntime as ri, buildCommandAuthenticationPromptMessage as rn, formatInlineOpenMeldCliCommands as ro, createProfileCreateGuideError as rr, colorizeAgentLabel as rt, runSpaceJoin as s, fetchLatestPackageInfo as sa, resolveConfiguredProfileWorkspacePath as si, runAuthLogout as sn, formatOpenMeldCliTextBlock as so, createSpaceAliasTargetGuideError as sr, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, buildInstallSelfJsonPayload as ta, syncProfileWorkspaceState as ti, readRecentDaemonDispatchJournalEvents as tn, resolveAgentActivityDispatcherCommand as to, createDoctorFailedGuideError as tr, formatTransportModeDisplay as tt, runSpacePassword as u, resolveDaemonRuntimeContractCompatibility as ua, validateCustomProfileWorkspacePath as ui, buildAuthStatusRows as un, resolveUserFacingCliEntryCommand as uo, createSpaceMenuGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, parseCliViewMode as va, notifyDaemonRouteCatalogChanged as vi, formatServiceParticipationReadinessLabel as vn, normalizeSharedSessionTitle as vo, createStartAuthenticationGuideError as vr, runDaemonReinstall as vt, buildFormalDispatchResultReadPayload as w, createOpenMeldAgentProfile as wa, listAgentControllerPermissionModeOptions as wi, submitRuntimeAgentControllerReports as wn, bindProject as wo, registerSkillsTargetSelectionOptions as wr, runDaemonUninstall as wt, loadSpaceIdentityDirectoryOrNull as x, isSelectedOpenMeldProfileRequiredError as xa, createAgentExecutionStatusDisplayRows as xi, computeRetryDelayMs as xn, removeProjectInbox as xo, getCommandHintsFromContract as xr, runDaemonStatusFlow as xt, emitHumanReadSignalsTextProjection as y, resolveRuntimeContext as ya, resolveLocalRegistryAgentIdFromAgentControllerRef as yi, resolveServiceParticipationReadiness as yn, readCodexSessionTitles as yo, createUpgradeConfirmationGuideError as yr, runDaemonRunAfterEntryChecks as yt, resolveHumanControllerDisplayName as z, resolveAuthenticationGuidanceFromError as za, resolveServiceUpdateUrgency as zi, formatRemovedCcRelationMessage as zn, errLine as zo, readOpenMeldToolsUpdateContextFromEnv as zr, toStructuredGatewayFailure as zt };
|
|
107612
108090
|
|
|
107613
|
-
//# sourceMappingURL=command-
|
|
108091
|
+
//# sourceMappingURL=command-CLUw_Vhz.js.map
|