openmeld 0.3.159 → 0.3.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-me-membership-jQsB5MBL.js → add-me-membership-DIlgLZLR.js} +2 -2
- package/dist/{add-me-membership-jQsB5MBL.js.map → add-me-membership-DIlgLZLR.js.map} +1 -1
- package/dist/{api-client-foundation-D3vgN2Jh.js → api-client-foundation-UKDtNrdW.js} +1 -1
- package/dist/{api-client-foundation-CoFjLc3o.js → api-client-foundation-i0M0ZIrQ.js} +3 -3
- package/dist/{api-client-foundation-CoFjLc3o.js.map → api-client-foundation-i0M0ZIrQ.js.map} +1 -1
- package/dist/auth-session-DMovqZYd.js +4 -0
- package/dist/{auth-session-Da7OgTZk.js → auth-session-DnS-Axyz.js} +2 -2
- package/dist/{auth-session-Da7OgTZk.js.map → auth-session-DnS-Axyz.js.map} +1 -1
- package/dist/{command-CcqgRB4J.js → command-D9xEikCY.js} +81 -904
- package/dist/command-D9xEikCY.js.map +1 -0
- package/dist/{dist-KezFWl5t.js → dist-CqYwEcEG.js} +24 -7
- package/dist/dist-CqYwEcEG.js.map +1 -0
- package/dist/{dist-VKaBpS9J.js → dist-sCZhNX4o.js} +1 -1
- package/dist/{elapsed-time-BI7-NmU1.js → elapsed-time-Dd6Ecbev.js} +3 -3
- package/dist/{elapsed-time-BI7-NmU1.js.map → elapsed-time-Dd6Ecbev.js.map} +1 -1
- package/dist/installer-CLPF4DHx.js +1100 -0
- package/dist/installer-CLPF4DHx.js.map +1 -0
- package/dist/{openmeld-DsT7zl0R.js → openmeld-DR8Bn-1b.js} +337 -68
- package/dist/openmeld-DR8Bn-1b.js.map +1 -0
- package/dist/openmeld-maintenance-worker-Bj1ZAvBN.js +78 -0
- package/dist/openmeld-maintenance-worker-Bj1ZAvBN.js.map +1 -0
- package/dist/{openmeld-tools-update-coordinator-H16PNoPX.js → openmeld-tools-update-coordinator-C7JyBdik.js} +11 -11
- package/dist/{openmeld-tools-update-coordinator-H16PNoPX.js.map → openmeld-tools-update-coordinator-C7JyBdik.js.map} +1 -1
- package/dist/openmeld.js +3 -3
- package/dist/{runtime-transport-D6j3RJ5o.js → runtime-transport-BsvsUfwb.js} +7 -1
- package/dist/runtime-transport-BsvsUfwb.js.map +1 -0
- package/dist/upgrade-CDPK-ayC.js +4 -0
- package/dist/{upgrade-BcmVKRpO.js → upgrade-VYwQsaiC.js} +4 -4
- package/dist/{upgrade-BcmVKRpO.js.map → upgrade-VYwQsaiC.js.map} +1 -1
- package/package.json +1 -1
- package/skills/openmeld-cli/SKILL.md +0 -9
- package/skills/openmeld-cli/playbooks/space-ops.md +8 -0
- package/skills/openmeld-cli/references/commands.md +26 -0
- package/dist/auth-session-DNXann3J.js +0 -4
- package/dist/command-CcqgRB4J.js.map +0 -1
- package/dist/dist-KezFWl5t.js.map +0 -1
- package/dist/openmeld-DsT7zl0R.js.map +0 -1
- package/dist/openmeld-maintenance-worker-Bmc0QSqk.js +0 -49
- package/dist/openmeld-maintenance-worker-Bmc0QSqk.js.map +0 -1
- package/dist/runtime-transport-D6j3RJ5o.js.map +0 -1
- package/dist/upgrade-xohSdsR-.js +0 -4
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
import { _ as toSpaceWsUrl, a as toSpaceCreateUrl, d as toSpaceMembersUrl, f as toSpaceMetaUrl, g as toSpaceUpdatesUrl, m as toSpaceRemoveMembersUrl, o as toSpaceCursorUrl, p as toSpacePasswordUrl, s as toSpaceDeleteUrl, t as normalizeBaseUrl, u as toSpaceLeaveUrl } from "./urls-4D7CaXe3.js";
|
|
4
4
|
import { t as isLoopbackHostname } from "./loopback-hostname-DHQPKq8N.js";
|
|
5
|
-
import { A as formatLocalMachineIssueMessage, E as createBackgroundExecutionBlockedIssue, I as accountsDir, J as normalizeAccountKey, K as legacyAccountProfileSpacesDir, N as accountProfileSpaceCacheDir, Q as openMeldManagedBinaryPath, Y as normalizeOpenMeldProfileId, _ as resolveCliContextId, b as resolveOpenMeldLaneDescriptor, dt as resolveOpenMeldRootDir, j as OPENMELD_HOME_ENV_KEY, l as resolveOpenMeldOrphanedLockIssue, lt as resolveOpenMeldEnvPreset,
|
|
5
|
+
import { A as formatLocalMachineIssueMessage, E as createBackgroundExecutionBlockedIssue, I as accountsDir, J as normalizeAccountKey, K as legacyAccountProfileSpacesDir, N as accountProfileSpaceCacheDir, Q as openMeldManagedBinaryPath, Y as normalizeOpenMeldProfileId, _ as resolveCliContextId, b as resolveOpenMeldLaneDescriptor, dt as resolveOpenMeldRootDir, j as OPENMELD_HOME_ENV_KEY, l as resolveOpenMeldOrphanedLockIssue, lt as resolveOpenMeldEnvPreset, r as isOpenMeldLockError, t as acquireLock, tt as openMeldRootDir, u as runWithHeldLock, ut as resolveOpenMeldPresetOwnedPathInput, w as assessLocalMachineFailure } from "./lock-VfUd0-tH.js";
|
|
6
6
|
import { _ as canonicalizeBuiltinAgentControllerRef, b as parseAgentControllerRef, d as resolveBuiltinAgentControllerConversationKind, l as buildAgentControllerConversationRef, v as normalizeBuiltinAgentControllerId, y as normalizeKnownBuiltinAgentControllerId } from "./controller-contract-CvjP4mYj.js";
|
|
7
|
-
import { $ as resolveCurrentReplyReadinessSnapshot, $i as emitDaemonLifecycleEvent, $n as resolveLocalRegistryAgentIdFromAgentControllerRef, $t as removeMissingProjectConnections, A as formatDaemonFailureContextText, Aa as CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS, Ai as formatDaemonOwnerSummaryLabel, An as canManageRegistryAgentSkillTargets, Ao as createAuthenticationError, Ar as buildTaskResultEnvelope, At as resolveLocalRuntimeControllerSupport, B as buildDaemonServiceUpdateRequiredNextStep, Ba as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS, Bi as resolveDaemonRuntimeState, Bn as requestLocalDaemonShutdown, Bo as DAEMON_SERVICE_AUTO_HEAL_ANOMALIES, Br as buildAuthenticatedControlPlaneResponse, Bt as resolveConfiguredProfileWorkspacePathForAccount, C as ensureDaemonSystemServiceCommandFiles, Ca as normalizeText$2, Ci as resolveInstalledClaudeCodeLaunchCandidates, Cn as reconcileNewRunnableBuiltinAgentRegistrations, Cr as resolveDispatchQueueLogMeta, Ct as createRouteCatalogFromMutableState, D as resolvePreferredDaemonDeviceId, Da as CATALOG_SYNC_RETRY_INTERVAL_MS, Di as materializeCliLaunchCommand, Dn as setAgentRegistrationEnabled, Do as buildAuthenticationStatusLabel, Dr as resolveLatestScopedConversationExecutionState, Dt as buildRuntimeRouteTargets, E as resolveDaemonDeviceId, Ea as warnDaemonEvent, Ei as buildCliLaunchInvocation, En as resolveAgentTargetState, Er as resolveCompatibleConversationExecutionState, Et as syncDaemonRouteCatalogState, Fa as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS, Fi as summarizeDaemonOwnerSnapshot, Fn as resolveRegistryRuntimeAdapterCapabilitySnapshot, Fo as resolveAuthenticationReasonFromState, Fr as resolveConversationExecutionStateByLookupKey, Ft as ensureOpenMeldManagedProfileWorkspace, G as clearDaemonStartFailureState, Ga as clearDaemonServiceContract, Gn as sortAgentRegistrations, Go as classifyDaemonServiceWakeability, Gr as buildInformationProtectionPromptPlan, Gt as ProjectBindingOperationError, H as formatDaemonServiceUpdateRequiredMessage, Ha as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS, Hi as waitForDaemonSystemServiceToStop, Hn as normalizeAgentId, Ho as DAEMON_SERVICE_REPAIR_ANOMALIES, Hr as DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS, I as buildDaemonServiceRefreshNextStep, Ia as DEFAULT_RECONNECT_DELAY_MS, Ii as clearDaemonRuntimeStateIfDefinitelyStopped, In as resolveRegistryRuntimeAdapterContractByAgentControllerRef, Io as buildDaemonServiceTargetSpec, Ir as seedLegacyAgentContext, J as buildDaemonServiceDependencyMeaning, Ja as upsertDaemonServiceContract, Ji as cleanupInactiveDaemonServiceBundles, Jn as resolveBuiltinAgentControllerDefinition, Jt as isProjectBound, K as writeDaemonStartFailureState, Ka as isDaemonServiceContractIdentityReusable, Ki as extractDaemonCommandEntryPath, Kn as repairBuiltinControllerInstall, Kr as buildWorkingLanguagePromptPlan, Kt as ProjectBindingStoreUpdateRequiredError, L as buildDaemonServiceRefreshPromptMessage, La as HEARTBEAT_RESPONSE_TIMEOUT_MS, Li as getEffectiveDaemonRuntimeStatus, Lo as resolveDaemonServiceAlignmentDecision, Lr as settleInflightTask, M as resolveDaemonStatusAttention, Ma as DAEMON_RUNTIME_CONTRACT_EPOCH, Mi as readCurrentDaemonOwnerSnapshot, Mn as resolveSkillsAgentRegistry, Mo as resolveAuthenticationGuidance, Mr as commitResolvedAgentContext, N as resolveDaemonStatusAuthenticationAttention, Na as DAEMON_STREAM_CONNECT_TIMEOUT_MS, Ni as resolveDaemonStopStrategy, Nn as listBuiltinAgentsRegistryEntries, No as resolveAuthenticationGuidanceFromError, Nr as loadLedgerState, Nt as resolveCurrentEffectiveProfileWorkingFolderRuntime, O as captureDaemonServiceEvidence, Oa as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS, Oi as inspectDaemonServiceInventory, On as updateAgentCustomTarget, Oo as buildCommandAuthenticationPromptMessage$1, Or as runRuntimeTask, Ot as readLocalEnabledControllers, P as resolveServiceReadiness, Pa as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS, Pi as resolveStoppedContractWriteBlockedReason, Pn as resolveRegistryOriginLaunchCommand, Pr as removeConversationExecutionState, Pt as resolveProfileWorkspaceRuntime, Q as resolveDaemonServiceDependencyDiagnostics, Qi as resolveDaemonBundleEntryPathFromState, Qn as isPnpmGlobalCommandPath, Qr as isAgentExecutionReadyOrConnecting, Qt as removeAgentActivityBindingsWhileDeliveryLocked, R as buildDaemonServiceRepairGuidance, Ra as MAX_RECONNECT_DELAY_MS, Ri as readCurrentDaemonRuntimeContext, Rn as LocalDaemonControlPlaneClientError, Ro as isVersionDowngrade, Rr as upsertConversationExecutionState, Rt as readProfileWorkspaceConfigForAccount, S as buildDaemonSystemServiceCommandSpec, Sa as normalizeOptionalText$21, Si as verifyCodexAppServerThread, Sn as readAgentRuntimeConfigHealth, So as clearAllSelectedOpenMeldProfileIds, Sr as resolveCatalogSyncIntervalMs, St as createMutableRouteCatalogState, T as ensureDaemonRuntimePaths, Ta as toErrorMessage$19, Ti as createUnsupportedProviderUsageLimits, Tn as removeAgentCustomTarget, Tr as resolveCompatibleAgentContextMatch, Tt as summarizeSkippedDaemonProfiles, U as buildDaemonServiceFreshnessPromptLines, Ua as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS, Ui as cleanupLegacySharedDaemonServiceState, Un as normalizeAgentIds, Uo as DAEMON_SERVICE_WAKEABILITY_ADVISORY_ANOMALIES, Ur as areAgentControllerInterfaceAccountsSame, V as formatDaemonServiceRefreshReliabilityMessage, Va as REGISTER_RESPONSE_TIMEOUT_MS, Vi as resolveDaemonServiceManagerForRuntimeState, Vn as sendLocalDaemonControlPlaneRequest, Vo as DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES, Vr as buildAgentContextLookupKey, Vt as setCustomProfileWorkspace, W as resolveDaemonServiceFreshnessWarning, Wa as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS, Wi as listDaemonOwnedProcesses, Wn as parseAgentEnabledOption, Wo as classifyDaemonServiceRunStartability, Wr as buildAgentControllerRef, X as buildDaemonServiceDependencySummary, Xa as OPENMELD_VERSION, Xi as readDaemonActiveBundleState, Xn as isHomebrewCommandPath, Xt as listProjectConnectionsWithStatus, Y as buildDaemonServiceDependencyNextStep, Ya as resolveCurrentDaemonExpectedVersion, Yi as prepareDaemonServiceBundle, Yn as isBunGlobalCommandPath, Yr as createAuthorityOpenMeldServiceRuntimeId, Yt as listProjectBindings, Z as buildDaemonServiceDependencyTitle, Zi as resolveAlignedDaemonActiveBundleEntryPath, Zn as isNpmGlobalCommandPath, _ as isDaemonInventoryRunningAndStartReady$1, _a as asRecord, _i as resolveInstalledGrokBuildLaunchCandidates, _n as createRegistrationFromCatalogTarget, _r as MIN_HEARTBEAT_INTERVAL_MS, _t as normalizeOpenClawSpaceIdPrefix, a as resolveOpenMeldToolsMaintenanceProjection, aa as runDaemonServiceManagerAction, ar as resolveRouteRegistrationReconcileDecision, as as formatInlineOpenMeldCliCommands, at as REPLY_READINESS_COPY, b as waitForSystemServiceStartup$1, ba as normalizeHeartbeatIntervalMs, bi as resolveInstalledCodexLaunchCandidates, bn as listAgentTargetStates, bo as readDaemonCatalogSyncSignal, br as pruneStaleLeases, bt as writeDaemonRouteCatalogCache, ci as resolveSelectableCandidates, cn as withAgentActivityLocalStateLock, cr as normalizeDispatchPostMessageAction, ct as resolveReplyReadinessGuidanceSummaryCopy, d as scheduleDaemonServiceUpdate, di as createLocalAdapterEntries, dn as emitDriftDetectedEvidence, do as createOpenMeldAgentProfile, dr as createLocalTaskInterruptSender, ea as formatDaemonLifecycleOriginSummary, ei as parseAgentControllerRef$1, en as removeProjectConnection, er as normalizeDispatchThreadAction, es as resolveServiceUpdateUrgency, f as DaemonServiceLifecycleDrainTimeoutError, fi as parseOpenCodeGoUsageResponse, fn as emitReconcileCompletedEvidence, fo as createOpenMeldHumanProfile, fr as buildLocalServiceDiagnosticsPayload, ft as resolveGatewayChainRepairGuidance, g as uninstallDaemonServiceUpdateWorker, ga as DaemonServiceRunError, gi as probeGrokBuildAcpInterface, gn as addAgentCustomTarget, gr as MAX_HEARTBEAT_INTERVAL_MS, gs as resolveBuiltinAgentControllerBrand, gt as buildOpenClawSpaceSessionKey, ha as readDaemonRuntimeContractRepairReport, hi as GrokBuildAcpTransportError, hn as resolveAgentProfilePrimaryAgentControllerReport, ho as listOpenMeldProfiles, hr as ADAPTIVE_HEARTBEAT_JITTER_RATIO, hs as compareAgentControllerRefsForDisplay, ht as prepareProviderRuntime, i as readOpenMeldToolsMaintenancePolicy, ia as resolveRecentDaemonSignalStopCause, ir as isDaemonReconcileInProgressError, is as resolveAuthBaseUrl, j as resolveDaemonStatusSnapshot, ja as CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS, ji as hasActiveDaemonOwners, jn as detectInstalledSkillsAgents, jo as extractAuthenticationPromptAction, jr as appendLedgerHistoryEntry, jt as syncProfileWorkspaceState, k as captureDaemonServiceEvidenceBestEffort, ka as CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS, ki as buildDaemonOwnerSnapshotFromObservedState, kn as updateAgentRegistrations, ko as buildHumanAuthenticationCard, kr as buildRuntimeWorkspaceFingerprint, kt as resolveLocalController, la as readLastDaemonServiceUpdate, li as resolveCatalogSyncSkippedProfilesLogState, lo as requireOpenMeldProfile, lr as createPendingAgentInteractionRegistry, ls as formatOpenMeldCliTextBlock, lt as resolveOpenClawDiagnosticsGuidance, m as ensureDaemonServiceMaintenanceInstalled, ma as ensureDaemonRuntimeContractState, mi as resolveInstalledOpenCodeLaunchCandidates, mo as getOpenMeldProfileCapabilities, mr as createInflightTaskControlRegistry, mt as resolveOpenClawLocalDiagnosticsValue, n as readLastOpenMeldToolsUpdateAttempt, na as readLatestDaemonLifecycleOriginEvent, ni as renderWorkingLanguagePrompt, nr as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, ns as describeServerRequiredVersionUnavailableReason, o as writeOpenMeldToolsMaintenancePolicy, oa as runWithDaemonLifecycleCommandJournal, on as resolveLocalProjectConnectionForPath, or as createSerialAgentInteractionCallback, os as formatOpenMeldCliCommand, ot as formatSpaceMemberCommandRecoveryCopy, p as runDaemonServiceLifecycle, pi as forkOpenCodeServerSession, pn as emitReconcileStartedEvidence, pr as createLocalExecutionSlots, ps as resolveUserFacingCliEntryCommand, pt as resolveGatewayChainRetryGuidance, q as buildDaemonServiceDependencyDetails, qa as readDaemonServiceContract, qi as resolveDaemonBundleIdFromEntryPath, qn as EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES, qo as compareSemver, qr as createAgentControllerInterfaceDisplayRows, qt as bindProject, r as readPendingOpenMeldToolsUpdateAttempt, rn as setDefaultProjectConnection, ro as resolveRuntimeContext, rr as SPACE_ACTION_TARGET_GUIDANCE_LINES, rs as resolveOpenMeldEnvironmentTarget, rt as formatReplyReadinessSummary, s as assessCliUpdate, sn as withAgentActivityDeliveryLock, so as resolveCurrentOpenMeldAccountContext, sr as buildDispatchReplyContextSummary, ss as formatOpenMeldCliCommands, st as resolveReplyReadinessAvailabilityReasonCopy, t as createOpenMeldToolsUpdateCoordinator, ta as readLatestDaemonLifecycleConnectionStateEvent, ti as renderInformationProtectionPrompt, tn as resolveProjectBindingForPath, tr as syncRuntimeEventToInflightTaskControlRegistry, ts as assessServerRequiredVersion, ua as readPendingDaemonServiceUpdate, ui as createLocalAdapterContainer, un as syncDeviceRuntimeStateProjection, uo as resolveOpenMeldProfileOrNull, ur as mergeOpenClawGatewayVisibility, us as formatProfileAwareOpenMeldCliCommand, ut as classifyGatewayChainFailure, v as isSystemServiceStartupTimeoutError, va as dirnamePath, vi as projectCodexUsageLimits, vn as listAgentCustomTargets, vr as applyAcceptedLeases, vt as slugifyOpenClawNamePart, w as buildLedgerPaths, wa as nowIsoString, wi as createUnavailableProviderUsageLimits, wr as resolveDispatchContinuityObservation, wt as loadDaemonRouteCatalog, x as writeDaemonServiceContract, xa as normalizeNonNegativeInteger$1, xi as forkCodexAppServerThread, xn as manageAgentRegistrationInstallation, xr as resolveAdaptiveHeartbeatIntervalMs, xt as resolveLocalServiceDemand, y as resolveSystemServiceStartupWaitMs, ya as emitRunLine, yi as resolveCodexTimeoutMs, yn as listAgentRegistrations, yo as assertAdditionalHumanProfileCreationEnabled, yr as applyIntervalJitterMs, yt as readDaemonRouteCatalogCache, z as buildDaemonServiceStatusReadOnlyDetail, za as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS, zi as readCurrentObservedDaemonRuntimeStatus, zr as withLedgerStateTransaction } from "./openmeld-tools-update-coordinator-H16PNoPX.js";
|
|
8
|
-
import { $r as spaceMemberKindSchema, An as parseServerErrorFrame$1, Ar as listCenterAgentRoutineRunsResponseSchema, Bn as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Dn as MAX_TEXT_LENGTH, Dr as submitFeedbackIssueResponseSchema, Er as submitFeedbackIssueRequestSchema, Fn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Ft as createAgentProfileBindingApi, Gr as leaveSpaceResponseSchema, Hr as localProjectControlConnectionSchema, Ir as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, Kr as postSpaceMembersResponseSchema, Lr as agentActivityEventSchema, Mr as pauseCenterAgentRoutineResponseSchema, Nr as resumeCenterAgentRoutineResponseSchema, Nt as createAccountSpaceIndexApi, On as parseEnvelope$1, Or as createCenterAgentRoutineResponseSchema, Ot as buildSpaceAttachmentDownloadPath, Pn as OPENMELD_HEADER_REQUEST_ID, Pr as updateCenterAgentRoutineResponseSchema, Pt as createAgentActivityApi, Qr as spaceMemberDirectorySchema, Rn as getSpaceUpdatesResponseSchema, Tn as DAEMON_STREAM_KEEPALIVE_PING, Tr as organizationComputersResponseSchema, Ur as localProjectControlDaemonFrameSchema, Vr as agentActivitySnapshotResponseSchema, Wr as localProjectControlDiscoverProjectsResponseSchema, Wt as createFetchTransport, Xr as spaceMemberDirectoryAllowedRelationsSchema, Xt as createOrganizationApi, Yn as submitAgentControllerTaskLifecycleEventItemSchema, Yr as spaceMemberAgentWakeAvailabilitySchema, Yt as createOpenMeldApiClient, Zr as spaceMemberDirectoryEntrySchema, ai as observedLocalAgentSessionSchema, an as createRuntimeReportingApi, ar as computerFileAccessPolicyInputSchema, ci as listProjectsResponseSchema, cr as organizationSpaceDirectoryWithMemberCountsResponseSchema, di as centerAgentToolSpeakerSchema, dr as spaceMetaSchema, fr as getOrganizationSkillResponseSchema, gn as resolveProfileSpaceHistoryGatewayHost, gr as organizationSkillSummarySchema, hn as resolveAccountSpaceIndexGatewayHost, hr as organizationSkillReleaseSummarySchema, ir as computerFileAccessDaemonFrameSchema, jn as resolveCustomMentionAliasOverride, jr as listCenterAgentRoutinesResponseSchema, kn as parseIncoming$1, kr as deleteCenterAgentRoutineResponseSchema, li as projectSchema, lr as resolveInitialSpaceAccessMode, n as OpenMeldApiClientInvalidResponseError, nr as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, oi as archiveProjectResponseSchema, on as createSpaceApi, or as computerFileAccessPolicySchema, pr as listOrganizationSkillsResponseSchema, qr as removeSpaceMembersResponseSchema, ri as agentActivitySessionInventoryResponseSchema, rr as OPENMELD_RUNTIME_CAPABILITIES_HEADER, si as createProjectResponseSchema, t as OpenMeldApiClientHttpError, tn as createProfileSpaceHistoryApi, tr as gatewayErrorEnvelopeSchema, ui as updateProjectResponseSchema, ur as spaceCreatorSchema, vn as toStructuredApiClientFailure, vr as organizationDirectoryResponseSchema, vt as buildProfileSpaceHistoryStatusPath, xi as toCompatibleSpaceAddressingRequestWireValue, yt as buildProfileSpaceHistoryUpsertPath, zn as spaceEntryTargetSchema } from "./dist-
|
|
9
|
-
import { $r as openMeldRequestContextSchema, A as runtimeTransportRegisterSessionRequestSchema, An as resolveMessageEnvelopeTargetField, Bn as agentInteractionRequestSchema, Br as normalizeSpacePasswordText, C as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Cr as string, Ct as sanitizeSignalTextPreview, Dn as getSpaceMessageAddressingRelationSupportForTargetKind, E as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, En as formatCanonicalMentionLiteral, F as runtimeTransportRouteCatalogChangedFramePayloadSchema, G as openMeldDaemonTaskResultPayloadSchema, Gn as formatLocalSetupActionDescription, Hr as resolveSingleSpaceMentionLabels, Ir as runtimeCoordinatorExecutionTokenEnvelopeSchema, J as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, Jn as localCliComponentUpdateProjectionSchema, Kn as formatLocalSetupActionLabel, L as runtimeTransportSubmitTaskResultRequestSchema, Lr as runtimeTransportDeliveryExecutionIdentitySchema, Mr as parseOptionalClientMessageId, N as runtimeTransportResumeControllerConversationFramePayloadSchema, O as runtimeTransportOpenMeldToolsControlFramePayloadSchema, Or as url, P as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Q as localFolderPickerHelperResultSchema, Qn as localServiceComponentUpdateProjectionSchema, Rn as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, S as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, Sr as strictObject, T as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, Tn as collectCanonicalMentionTextFragments, Un as formatLocalComponentsSummaryDescription, Ur as resolveSpaceMentionLabels, Wn as formatLocalComponentsSummaryLabel, X as localFolderPickerDaemonFrameSchema, Y as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, Z as localFolderPickerHelperProtocolResultSchema, Zt as spaceFileNameSchema, _ as runtimeTransportForkAgentSessionResultSchema, a as localWakeRouteWorkingFolderObservationSchema, an as openMeldDaemonControlPlaneResponseSchema, b as runtimeTransportLocalAgentControlCancelFramePayloadSchema, bt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, c as runtimeTransportDispatchInteractionDeliveredRequestSchema, cr as boolean, d as runtimeTransportDispatchLifecycleRequestSchema, f as runtimeTransportDispatchPreviewEndRequestSchema, fr as enumFactory, gi as resolvePublicAgentAvailabilityCopy, h as runtimeTransportDispatchToolActivityRequestSchema, hr as literal, ht as CONVERSATION_CONTINUITY_WARNING_PURPOSE, j as runtimeTransportRegisterSessionResponseSchema, k as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, kn as normalizeMessageEnvelope, l as runtimeTransportDispatchInteractionRequestSchema, m as runtimeTransportDispatchRuntimeEvidenceRequestSchema, mr as iso, ni as normalizeOptionalWorkingDirectory, p as runtimeTransportDispatchPreviewRequestSchema, pi as MAX_TEXT_LENGTH$1, q as openMeldSpaceEgressActionSchema, qn as installedLocalComponentsSnapshotSchema, qt as resolveSpaceFileMimeType, r as daemonStreamFrameSchema, ri as openMeldRuntimeProfileIdSchema, s as runtimeTransportDeliverDispatchRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, u as runtimeTransportDispatchInteractionResponseFramePayloadSchema, ur as discriminatedUnion, v as runtimeTransportHeartbeatRequestSchema, vi as sanitizeDispatchErrorSummary, w as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, wn as MESSAGE_MENTION_TYPE_VALUES, x as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, xt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, y as runtimeTransportHeartbeatResponseSchema, yt as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, zt as SPACE_FILE_MAX_SIZE_BYTES } from "./runtime-transport-
|
|
7
|
+
import { $ as resolveCurrentReplyReadinessSnapshot, $i as emitDaemonLifecycleEvent, $n as resolveLocalRegistryAgentIdFromAgentControllerRef, $t as removeMissingProjectConnections, A as formatDaemonFailureContextText, Aa as CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS, Ai as formatDaemonOwnerSummaryLabel, An as canManageRegistryAgentSkillTargets, Ao as createAuthenticationError, Ar as buildTaskResultEnvelope, At as resolveLocalRuntimeControllerSupport, B as buildDaemonServiceUpdateRequiredNextStep, Ba as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS, Bi as resolveDaemonRuntimeState, Bn as requestLocalDaemonShutdown, Bo as DAEMON_SERVICE_AUTO_HEAL_ANOMALIES, Br as buildAuthenticatedControlPlaneResponse, Bt as resolveConfiguredProfileWorkspacePathForAccount, C as ensureDaemonSystemServiceCommandFiles, Ca as normalizeText$2, Ci as resolveInstalledClaudeCodeLaunchCandidates, Cn as reconcileNewRunnableBuiltinAgentRegistrations, Cr as resolveDispatchQueueLogMeta, Ct as createRouteCatalogFromMutableState, D as resolvePreferredDaemonDeviceId, Da as CATALOG_SYNC_RETRY_INTERVAL_MS, Di as materializeCliLaunchCommand, Dn as setAgentRegistrationEnabled, Do as buildAuthenticationStatusLabel, Dr as resolveLatestScopedConversationExecutionState, Dt as buildRuntimeRouteTargets, E as resolveDaemonDeviceId, Ea as warnDaemonEvent, Ei as buildCliLaunchInvocation, En as resolveAgentTargetState, Er as resolveCompatibleConversationExecutionState, Et as syncDaemonRouteCatalogState, Fa as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS, Fi as summarizeDaemonOwnerSnapshot, Fn as resolveRegistryRuntimeAdapterCapabilitySnapshot, Fo as resolveAuthenticationReasonFromState, Fr as resolveConversationExecutionStateByLookupKey, Ft as ensureOpenMeldManagedProfileWorkspace, G as clearDaemonStartFailureState, Ga as clearDaemonServiceContract, Gn as sortAgentRegistrations, Go as classifyDaemonServiceWakeability, Gr as buildInformationProtectionPromptPlan, Gt as ProjectBindingOperationError, H as formatDaemonServiceUpdateRequiredMessage, Ha as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS, Hi as waitForDaemonSystemServiceToStop, Hn as normalizeAgentId, Ho as DAEMON_SERVICE_REPAIR_ANOMALIES, Hr as DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS, I as buildDaemonServiceRefreshNextStep, Ia as DEFAULT_RECONNECT_DELAY_MS, Ii as clearDaemonRuntimeStateIfDefinitelyStopped, In as resolveRegistryRuntimeAdapterContractByAgentControllerRef, Io as buildDaemonServiceTargetSpec, Ir as seedLegacyAgentContext, J as buildDaemonServiceDependencyMeaning, Ja as upsertDaemonServiceContract, Ji as cleanupInactiveDaemonServiceBundles, Jn as resolveBuiltinAgentControllerDefinition, Jt as isProjectBound, K as writeDaemonStartFailureState, Ka as isDaemonServiceContractIdentityReusable, Ki as extractDaemonCommandEntryPath, Kn as repairBuiltinControllerInstall, Kr as buildWorkingLanguagePromptPlan, Kt as ProjectBindingStoreUpdateRequiredError, L as buildDaemonServiceRefreshPromptMessage, La as HEARTBEAT_RESPONSE_TIMEOUT_MS, Li as getEffectiveDaemonRuntimeStatus, Lo as resolveDaemonServiceAlignmentDecision, Lr as settleInflightTask, M as resolveDaemonStatusAttention, Ma as DAEMON_RUNTIME_CONTRACT_EPOCH, Mi as readCurrentDaemonOwnerSnapshot, Mn as resolveSkillsAgentRegistry, Mo as resolveAuthenticationGuidance, Mr as commitResolvedAgentContext, N as resolveDaemonStatusAuthenticationAttention, Na as DAEMON_STREAM_CONNECT_TIMEOUT_MS, Ni as resolveDaemonStopStrategy, Nn as listBuiltinAgentsRegistryEntries, No as resolveAuthenticationGuidanceFromError, Nr as loadLedgerState, Nt as resolveCurrentEffectiveProfileWorkingFolderRuntime, O as captureDaemonServiceEvidence, Oa as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS, Oi as inspectDaemonServiceInventory, On as updateAgentCustomTarget, Oo as buildCommandAuthenticationPromptMessage$1, Or as runRuntimeTask, Ot as readLocalEnabledControllers, P as resolveServiceReadiness, Pa as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS, Pi as resolveStoppedContractWriteBlockedReason, Pn as resolveRegistryOriginLaunchCommand, Pr as removeConversationExecutionState, Pt as resolveProfileWorkspaceRuntime, Q as resolveDaemonServiceDependencyDiagnostics, Qi as resolveDaemonBundleEntryPathFromState, Qn as isPnpmGlobalCommandPath, Qr as isAgentExecutionReadyOrConnecting, Qt as removeAgentActivityBindingsWhileDeliveryLocked, R as buildDaemonServiceRepairGuidance, Ra as MAX_RECONNECT_DELAY_MS, Ri as readCurrentDaemonRuntimeContext, Rn as LocalDaemonControlPlaneClientError, Ro as isVersionDowngrade, Rr as upsertConversationExecutionState, Rt as readProfileWorkspaceConfigForAccount, S as buildDaemonSystemServiceCommandSpec, Sa as normalizeOptionalText$21, Si as verifyCodexAppServerThread, Sn as readAgentRuntimeConfigHealth, So as clearAllSelectedOpenMeldProfileIds, Sr as resolveCatalogSyncIntervalMs, St as createMutableRouteCatalogState, T as ensureDaemonRuntimePaths, Ta as toErrorMessage$19, Ti as createUnsupportedProviderUsageLimits, Tn as removeAgentCustomTarget, Tr as resolveCompatibleAgentContextMatch, Tt as summarizeSkippedDaemonProfiles, U as buildDaemonServiceFreshnessPromptLines, Ua as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS, Ui as cleanupLegacySharedDaemonServiceState, Un as normalizeAgentIds, Uo as DAEMON_SERVICE_WAKEABILITY_ADVISORY_ANOMALIES, Ur as areAgentControllerInterfaceAccountsSame, V as formatDaemonServiceRefreshReliabilityMessage, Va as REGISTER_RESPONSE_TIMEOUT_MS, Vi as resolveDaemonServiceManagerForRuntimeState, Vn as sendLocalDaemonControlPlaneRequest, Vo as DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES, Vr as buildAgentContextLookupKey, Vt as setCustomProfileWorkspace, W as resolveDaemonServiceFreshnessWarning, Wa as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS, Wi as listDaemonOwnedProcesses, Wn as parseAgentEnabledOption, Wo as classifyDaemonServiceRunStartability, Wr as buildAgentControllerRef, X as buildDaemonServiceDependencySummary, Xa as OPENMELD_VERSION, Xi as readDaemonActiveBundleState, Xn as isHomebrewCommandPath, Xt as listProjectConnectionsWithStatus, Y as buildDaemonServiceDependencyNextStep, Ya as resolveCurrentDaemonExpectedVersion, Yi as prepareDaemonServiceBundle, Yn as isBunGlobalCommandPath, Yr as createAuthorityOpenMeldServiceRuntimeId, Yt as listProjectBindings, Z as buildDaemonServiceDependencyTitle, Zi as resolveAlignedDaemonActiveBundleEntryPath, Zn as isNpmGlobalCommandPath, _ as isDaemonInventoryRunningAndStartReady$1, _a as asRecord, _i as resolveInstalledGrokBuildLaunchCandidates, _n as createRegistrationFromCatalogTarget, _r as MIN_HEARTBEAT_INTERVAL_MS, _t as normalizeOpenClawSpaceIdPrefix, a as resolveOpenMeldToolsMaintenanceProjection, aa as runDaemonServiceManagerAction, ar as resolveRouteRegistrationReconcileDecision, as as formatInlineOpenMeldCliCommands, at as REPLY_READINESS_COPY, b as waitForSystemServiceStartup$1, ba as normalizeHeartbeatIntervalMs, bi as resolveInstalledCodexLaunchCandidates, bn as listAgentTargetStates, bo as readDaemonCatalogSyncSignal, br as pruneStaleLeases, bt as writeDaemonRouteCatalogCache, ci as resolveSelectableCandidates, cn as withAgentActivityLocalStateLock, cr as normalizeDispatchPostMessageAction, ct as resolveReplyReadinessGuidanceSummaryCopy, d as scheduleDaemonServiceUpdate, di as createLocalAdapterEntries, dn as emitDriftDetectedEvidence, do as createOpenMeldAgentProfile, dr as createLocalTaskInterruptSender, ea as formatDaemonLifecycleOriginSummary, ei as parseAgentControllerRef$1, en as removeProjectConnection, er as normalizeDispatchThreadAction, es as resolveServiceUpdateUrgency, f as DaemonServiceLifecycleDrainTimeoutError, fi as parseOpenCodeGoUsageResponse, fn as emitReconcileCompletedEvidence, fo as createOpenMeldHumanProfile, fr as buildLocalServiceDiagnosticsPayload, ft as resolveGatewayChainRepairGuidance, g as uninstallDaemonServiceUpdateWorker, ga as DaemonServiceRunError, gi as probeGrokBuildAcpInterface, gn as addAgentCustomTarget, gr as MAX_HEARTBEAT_INTERVAL_MS, gs as resolveBuiltinAgentControllerBrand, gt as buildOpenClawSpaceSessionKey, ha as readDaemonRuntimeContractRepairReport, hi as GrokBuildAcpTransportError, hn as resolveAgentProfilePrimaryAgentControllerReport, ho as listOpenMeldProfiles, hr as ADAPTIVE_HEARTBEAT_JITTER_RATIO, hs as compareAgentControllerRefsForDisplay, ht as prepareProviderRuntime, i as readOpenMeldToolsMaintenancePolicy, ia as resolveRecentDaemonSignalStopCause, ir as isDaemonReconcileInProgressError, is as resolveAuthBaseUrl, j as resolveDaemonStatusSnapshot, ja as CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS, ji as hasActiveDaemonOwners, jo as extractAuthenticationPromptAction, jr as appendLedgerHistoryEntry, jt as syncProfileWorkspaceState, k as captureDaemonServiceEvidenceBestEffort, ka as CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS, ki as buildDaemonOwnerSnapshotFromObservedState, kn as updateAgentRegistrations, ko as buildHumanAuthenticationCard, kr as buildRuntimeWorkspaceFingerprint, kt as resolveLocalController, la as readLastDaemonServiceUpdate, li as resolveCatalogSyncSkippedProfilesLogState, lo as requireOpenMeldProfile, lr as createPendingAgentInteractionRegistry, ls as formatOpenMeldCliTextBlock, lt as resolveOpenClawDiagnosticsGuidance, m as ensureDaemonServiceMaintenanceInstalled, ma as ensureDaemonRuntimeContractState, mi as resolveInstalledOpenCodeLaunchCandidates, mo as getOpenMeldProfileCapabilities, mr as createInflightTaskControlRegistry, mt as resolveOpenClawLocalDiagnosticsValue, n as readLastOpenMeldToolsUpdateAttempt, na as readLatestDaemonLifecycleOriginEvent, ni as renderWorkingLanguagePrompt, nr as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, ns as describeServerRequiredVersionUnavailableReason, o as writeOpenMeldToolsMaintenancePolicy, oa as runWithDaemonLifecycleCommandJournal, on as resolveLocalProjectConnectionForPath, or as createSerialAgentInteractionCallback, os as formatOpenMeldCliCommand, ot as formatSpaceMemberCommandRecoveryCopy, p as runDaemonServiceLifecycle, pi as forkOpenCodeServerSession, pn as emitReconcileStartedEvidence, pr as createLocalExecutionSlots, ps as resolveUserFacingCliEntryCommand, pt as resolveGatewayChainRetryGuidance, q as buildDaemonServiceDependencyDetails, qa as readDaemonServiceContract, qi as resolveDaemonBundleIdFromEntryPath, qn as EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES, qo as compareSemver, qr as createAgentControllerInterfaceDisplayRows, qt as bindProject, r as readPendingOpenMeldToolsUpdateAttempt, rn as setDefaultProjectConnection, ro as resolveRuntimeContext, rr as SPACE_ACTION_TARGET_GUIDANCE_LINES, rs as resolveOpenMeldEnvironmentTarget, rt as formatReplyReadinessSummary, s as assessCliUpdate, sn as withAgentActivityDeliveryLock, so as resolveCurrentOpenMeldAccountContext, sr as buildDispatchReplyContextSummary, ss as formatOpenMeldCliCommands, st as resolveReplyReadinessAvailabilityReasonCopy, t as createOpenMeldToolsUpdateCoordinator, ta as readLatestDaemonLifecycleConnectionStateEvent, ti as renderInformationProtectionPrompt, tn as resolveProjectBindingForPath, tr as syncRuntimeEventToInflightTaskControlRegistry, ts as assessServerRequiredVersion, ua as readPendingDaemonServiceUpdate, ui as createLocalAdapterContainer, un as syncDeviceRuntimeStateProjection, uo as resolveOpenMeldProfileOrNull, ur as mergeOpenClawGatewayVisibility, us as formatProfileAwareOpenMeldCliCommand, ut as classifyGatewayChainFailure, v as isSystemServiceStartupTimeoutError, va as dirnamePath, vi as projectCodexUsageLimits, vn as listAgentCustomTargets, vr as applyAcceptedLeases, vt as slugifyOpenClawNamePart, w as buildLedgerPaths, wa as nowIsoString, wi as createUnavailableProviderUsageLimits, wr as resolveDispatchContinuityObservation, wt as loadDaemonRouteCatalog, x as writeDaemonServiceContract, xa as normalizeNonNegativeInteger$1, xi as forkCodexAppServerThread, xn as manageAgentRegistrationInstallation, xr as resolveAdaptiveHeartbeatIntervalMs, xt as resolveLocalServiceDemand, y as resolveSystemServiceStartupWaitMs, ya as emitRunLine, yi as resolveCodexTimeoutMs, yn as listAgentRegistrations, yo as assertAdditionalHumanProfileCreationEnabled, yr as applyIntervalJitterMs, yt as readDaemonRouteCatalogCache, z as buildDaemonServiceStatusReadOnlyDetail, za as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS, zi as readCurrentObservedDaemonRuntimeStatus, zr as withLedgerStateTransaction } from "./openmeld-tools-update-coordinator-C7JyBdik.js";
|
|
8
|
+
import { $r as spaceMemberKindSchema, An as parseServerErrorFrame$1, Ar as listCenterAgentRoutineRunsResponseSchema, Bn as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Dn as MAX_TEXT_LENGTH, Dr as submitFeedbackIssueResponseSchema, Er as submitFeedbackIssueRequestSchema, Fn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Ft as createAgentProfileBindingApi, Gr as leaveSpaceResponseSchema, Hr as localProjectControlConnectionSchema, Ir as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, Kr as postSpaceMembersResponseSchema, Lr as agentActivityEventSchema, Mr as pauseCenterAgentRoutineResponseSchema, Nr as resumeCenterAgentRoutineResponseSchema, Nt as createAccountSpaceIndexApi, On as parseEnvelope$1, Or as createCenterAgentRoutineResponseSchema, Ot as buildSpaceAttachmentDownloadPath, Pn as OPENMELD_HEADER_REQUEST_ID, Pr as updateCenterAgentRoutineResponseSchema, Pt as createAgentActivityApi, Qr as spaceMemberDirectorySchema, Rn as getSpaceUpdatesResponseSchema, Tn as DAEMON_STREAM_KEEPALIVE_PING, Tr as organizationComputersResponseSchema, Ur as localProjectControlDaemonFrameSchema, Vr as agentActivitySnapshotResponseSchema, Wr as localProjectControlDiscoverProjectsResponseSchema, Wt as createFetchTransport, Xr as spaceMemberDirectoryAllowedRelationsSchema, Xt as createOrganizationApi, Yn as submitAgentControllerTaskLifecycleEventItemSchema, Yr as spaceMemberAgentWakeAvailabilitySchema, Yt as createOpenMeldApiClient, Zr as spaceMemberDirectoryEntrySchema, ai as observedLocalAgentSessionSchema, an as createRuntimeReportingApi, ar as computerFileAccessPolicyInputSchema, ci as listProjectsResponseSchema, cr as organizationSpaceDirectoryWithMemberCountsResponseSchema, di as centerAgentToolSpeakerSchema, dr as spaceMetaSchema, fr as getOrganizationSkillResponseSchema, gn as resolveProfileSpaceHistoryGatewayHost, gr as organizationSkillSummarySchema, hn as resolveAccountSpaceIndexGatewayHost, hr as organizationSkillReleaseSummarySchema, ir as computerFileAccessDaemonFrameSchema, jn as resolveCustomMentionAliasOverride, jr as listCenterAgentRoutinesResponseSchema, kn as parseIncoming$1, kr as deleteCenterAgentRoutineResponseSchema, li as projectSchema, lr as resolveInitialSpaceAccessMode, n as OpenMeldApiClientInvalidResponseError, nr as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, oi as archiveProjectResponseSchema, on as createSpaceApi, or as computerFileAccessPolicySchema, pr as listOrganizationSkillsResponseSchema, qr as removeSpaceMembersResponseSchema, ri as agentActivitySessionInventoryResponseSchema, rr as OPENMELD_RUNTIME_CAPABILITIES_HEADER, si as createProjectResponseSchema, t as OpenMeldApiClientHttpError, tn as createProfileSpaceHistoryApi, tr as gatewayErrorEnvelopeSchema, ui as updateProjectResponseSchema, ur as spaceCreatorSchema, vn as toStructuredApiClientFailure, vr as organizationDirectoryResponseSchema, vt as buildProfileSpaceHistoryStatusPath, xi as toCompatibleSpaceAddressingRequestWireValue, yt as buildProfileSpaceHistoryUpsertPath, zn as spaceEntryTargetSchema } from "./dist-CqYwEcEG.js";
|
|
9
|
+
import { $r as openMeldRequestContextSchema, A as runtimeTransportRegisterSessionRequestSchema, An as resolveMessageEnvelopeTargetField, Bn as agentInteractionRequestSchema, Br as normalizeSpacePasswordText, C as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Cr as string, Ct as sanitizeSignalTextPreview, Dn as getSpaceMessageAddressingRelationSupportForTargetKind, E as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, En as formatCanonicalMentionLiteral, F as runtimeTransportRouteCatalogChangedFramePayloadSchema, G as openMeldDaemonTaskResultPayloadSchema, Gn as formatLocalSetupActionDescription, Hr as resolveSingleSpaceMentionLabels, Ir as runtimeCoordinatorExecutionTokenEnvelopeSchema, J as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, Jn as localCliComponentUpdateProjectionSchema, Kn as formatLocalSetupActionLabel, L as runtimeTransportSubmitTaskResultRequestSchema, Lr as runtimeTransportDeliveryExecutionIdentitySchema, Mr as parseOptionalClientMessageId, N as runtimeTransportResumeControllerConversationFramePayloadSchema, O as runtimeTransportOpenMeldToolsControlFramePayloadSchema, Or as url, P as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Q as localFolderPickerHelperResultSchema, Qn as localServiceComponentUpdateProjectionSchema, Rn as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, S as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, Sr as strictObject, T as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, Tn as collectCanonicalMentionTextFragments, Un as formatLocalComponentsSummaryDescription, Ur as resolveSpaceMentionLabels, Wn as formatLocalComponentsSummaryLabel, X as localFolderPickerDaemonFrameSchema, Y as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, Z as localFolderPickerHelperProtocolResultSchema, Zt as spaceFileNameSchema, _ as runtimeTransportForkAgentSessionResultSchema, a as localWakeRouteWorkingFolderObservationSchema, an as openMeldDaemonControlPlaneResponseSchema, b as runtimeTransportLocalAgentControlCancelFramePayloadSchema, bt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, c as runtimeTransportDispatchInteractionDeliveredRequestSchema, cr as boolean, d as runtimeTransportDispatchLifecycleRequestSchema, f as runtimeTransportDispatchPreviewEndRequestSchema, fr as enumFactory, gi as resolvePublicAgentAvailabilityCopy, h as runtimeTransportDispatchToolActivityRequestSchema, hr as literal, ht as CONVERSATION_CONTINUITY_WARNING_PURPOSE, j as runtimeTransportRegisterSessionResponseSchema, k as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, kn as normalizeMessageEnvelope, l as runtimeTransportDispatchInteractionRequestSchema, m as runtimeTransportDispatchRuntimeEvidenceRequestSchema, mr as iso, ni as normalizeOptionalWorkingDirectory, p as runtimeTransportDispatchPreviewRequestSchema, pi as MAX_TEXT_LENGTH$1, q as openMeldSpaceEgressActionSchema, qn as installedLocalComponentsSnapshotSchema, qt as resolveSpaceFileMimeType, r as daemonStreamFrameSchema, ri as openMeldRuntimeProfileIdSchema, s as runtimeTransportDeliverDispatchRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, u as runtimeTransportDispatchInteractionResponseFramePayloadSchema, ur as discriminatedUnion, v as runtimeTransportHeartbeatRequestSchema, vi as sanitizeDispatchErrorSummary, w as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, wn as MESSAGE_MENTION_TYPE_VALUES, x as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, xt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, y as runtimeTransportHeartbeatResponseSchema, yt as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, zt as SPACE_FILE_MAX_SIZE_BYTES } from "./runtime-transport-BsvsUfwb.js";
|
|
10
|
+
import { b as computeDirectoryContentHash, f as ensureLocalSkills, g as loadSelectedSkillAssets, r as collectSkillsReadinessSnapshot, t as installSkillsToTargets, u as resolveSkillInstallStateForTarget, v as withSkillsInstallLock, x as OFFICIAL_CLI_SKILL_URL, y as hashBundledSkillAssets } from "./installer-CLPF4DHx.js";
|
|
10
11
|
import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
|
|
11
12
|
import { a as readDaemonLocalStateFile, i as writeDaemonRuntimeLease, o as writeDaemonLocalStateFile } from "./daemon-runtime-lease-D_CULMR8.js";
|
|
12
|
-
import { a as beginAuthSessionTransition, h as setAuthSession, i as assertAuthSessionMutationAvailable, l as getAuthSessionState, o as clearAuthSession, v as isBinaryDistribution, y as resolveOpenMeldDistribution } from "./auth-session-
|
|
13
|
-
import { B as createSpaceRemoveMembersCurrentProfileGuideError, Bt as deriveContinuity, F as createSpaceLeaveGuideError, Ft as buildCenterAgentRoleTemplateText, G as createSpaceSendInputFileReadFailedGuideError, H as createSpaceResultGuideError, Ht as resolvePublicAgentFailureReason, I as createSpaceMenuGuideError, It as buildCompactDispatchActionGuidanceLines, J as createSpaceTargetGuideError, K as createSpaceSendInputRequiredGuideError, L as createSpaceProfileRequiredGuideError, Lt as buildSpaceEntryBriefNeedMoreLine, M as createSpaceCreateGuideError, N as createSpaceDeleteHumanApprovalGuideError, Nt as buildAgentFacingMentalModelLines, O as createSpaceAddMembersCurrentProfileGuideError, P as createSpaceLeaveCreatorGuideError, R as createSpacePublicationSetGuideError, St as getBuiltinAgentSelectionRequiredArguments, Tt as buildAgentOverviewFromContract, U as createSpaceSendInputConflictGuideError, Ut as resolveSpacePublicationRequirement, V as createSpaceRemoveMembersGuideError, Vt as renderSpaceEntryBrief, W as createSpaceSendInputEmptyGuideError, X as createSpaceUpdatesGuideError, Y as createSpaceUnsupportedProfileKindGuideError, _ as errLine, _t as validateDaemonControlTargetInput, a as formatDaemonServiceDowngradeBlockedRecommendation, at as validateSpaceMemberSelectionInput, b as canUseInteractivePrompts, bt as buildBuiltinAgentSelectionExamples, ct as resolveSpaceAddMembersProgressPhase, d as formatDaemonServiceMissingStatus, et as getCommandEntryContract, f as getDaemonDowngradeBlockedTitle, g as formatMessage, h as sanitizeTerminalDisplayText, ht as getCliVersionInfo, i as formatDaemonInstallFailedMessage, j as createSpaceContractSetGuideError, k as createSpaceAddMembersGuideError, kt as formatAgentOverviewPayload, l as formatDaemonServiceMissingRunStepOne, m as createPresenter, mt as formatCliVersionSummary, n as resolveElapsedTimeMs, nt as ROOT_ENTRY_COMMANDS, o as formatDaemonServiceMissingAction, ot as SPACE_ADD_MEMBERS_AGENT_OVERVIEW_STAGES, p as runDaemonInstallDecisionPrompt, q as createSpaceSubcommandTargetGuideError, r as formatDaemonDowngradeBlockedNextStep, rt as ROOT_ENTRY_START_COMMAND, s as formatDaemonServiceMissingMeaning, st as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, t as formatElapsedTime, u as formatDaemonServiceMissingRunStepTwo, v as outJsonLine, w as createProfileCreateGuideError, wt as validateBuiltinAgentSelectionInput, x as createAuthLoginGuideError, xt as getBuiltinAgentSelectionOptionalArguments, y as outLine, yt as buildBuiltinAgentSelectionCommand, z as createSpaceRemoveMembersCreatorGuideError, zt as composeDispatchBrief } from "./elapsed-time-
|
|
14
|
-
import {
|
|
13
|
+
import { a as beginAuthSessionTransition, h as setAuthSession, i as assertAuthSessionMutationAvailable, l as getAuthSessionState, o as clearAuthSession, v as isBinaryDistribution, y as resolveOpenMeldDistribution } from "./auth-session-DnS-Axyz.js";
|
|
14
|
+
import { B as createSpaceRemoveMembersCurrentProfileGuideError, Bt as deriveContinuity, F as createSpaceLeaveGuideError, Ft as buildCenterAgentRoleTemplateText, G as createSpaceSendInputFileReadFailedGuideError, H as createSpaceResultGuideError, Ht as resolvePublicAgentFailureReason, I as createSpaceMenuGuideError, It as buildCompactDispatchActionGuidanceLines, J as createSpaceTargetGuideError, K as createSpaceSendInputRequiredGuideError, L as createSpaceProfileRequiredGuideError, Lt as buildSpaceEntryBriefNeedMoreLine, M as createSpaceCreateGuideError, N as createSpaceDeleteHumanApprovalGuideError, Nt as buildAgentFacingMentalModelLines, O as createSpaceAddMembersCurrentProfileGuideError, P as createSpaceLeaveCreatorGuideError, R as createSpacePublicationSetGuideError, St as getBuiltinAgentSelectionRequiredArguments, Tt as buildAgentOverviewFromContract, U as createSpaceSendInputConflictGuideError, Ut as resolveSpacePublicationRequirement, V as createSpaceRemoveMembersGuideError, Vt as renderSpaceEntryBrief, W as createSpaceSendInputEmptyGuideError, X as createSpaceUpdatesGuideError, Y as createSpaceUnsupportedProfileKindGuideError, _ as errLine, _t as validateDaemonControlTargetInput, a as formatDaemonServiceDowngradeBlockedRecommendation, at as validateSpaceMemberSelectionInput, b as canUseInteractivePrompts, bt as buildBuiltinAgentSelectionExamples, ct as resolveSpaceAddMembersProgressPhase, d as formatDaemonServiceMissingStatus, et as getCommandEntryContract, f as getDaemonDowngradeBlockedTitle, g as formatMessage, h as sanitizeTerminalDisplayText, ht as getCliVersionInfo, i as formatDaemonInstallFailedMessage, j as createSpaceContractSetGuideError, k as createSpaceAddMembersGuideError, kt as formatAgentOverviewPayload, l as formatDaemonServiceMissingRunStepOne, m as createPresenter, mt as formatCliVersionSummary, n as resolveElapsedTimeMs, nt as ROOT_ENTRY_COMMANDS, o as formatDaemonServiceMissingAction, ot as SPACE_ADD_MEMBERS_AGENT_OVERVIEW_STAGES, p as runDaemonInstallDecisionPrompt, q as createSpaceSubcommandTargetGuideError, r as formatDaemonDowngradeBlockedNextStep, rt as ROOT_ENTRY_START_COMMAND, s as formatDaemonServiceMissingMeaning, st as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, t as formatElapsedTime, u as formatDaemonServiceMissingRunStepTwo, v as outJsonLine, w as createProfileCreateGuideError, wt as validateBuiltinAgentSelectionInput, x as createAuthLoginGuideError, xt as getBuiltinAgentSelectionOptionalArguments, y as outLine, yt as buildBuiltinAgentSelectionCommand, z as createSpaceRemoveMembersCreatorGuideError, zt as composeDispatchBrief } from "./elapsed-time-Dd6Ecbev.js";
|
|
15
|
+
import { a as resolveBaseUrl, c as resolveExplicitGatewayUrlOrThrow, d as createDefaultRuntimeAgentControllerSettings, f as getConfiguredDaemonDispatchLimits, g as getConfiguredSkillsConfig, i as normalizeGatewayBaseUrlOrNull, l as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, o as resolveBaseUrlOrNull, r as normalizeGatewayBaseUrl } from "./base-url-CgF_v0Ue.js";
|
|
15
16
|
import { n as toErrorMessage$20, t as sleep } from "./dist-o3UL1EGQ.js";
|
|
16
|
-
import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfileIdentity, f as deriveAuthBaseUrlFromGatewayUrl, i as AuthRequestCredentialError, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, o as buildOpenMeldProfileRequestHeadersWithAuth, p as resolveAuthRequestCompatibility, r as resolveSpaceRequestTimeoutMsForDiagnostics, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation, u as buildOpenMeldRequestContextFromProfile } from "./api-client-foundation-
|
|
17
|
+
import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfileIdentity, f as deriveAuthBaseUrlFromGatewayUrl, i as AuthRequestCredentialError, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, o as buildOpenMeldProfileRequestHeadersWithAuth, p as resolveAuthRequestCompatibility, r as resolveSpaceRequestTimeoutMsForDiagnostics, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation, u as buildOpenMeldRequestContextFromProfile } from "./api-client-foundation-i0M0ZIrQ.js";
|
|
17
18
|
import { A as installDaemon, D as ensureDaemonControlPlaneToken, F as readDaemonServiceRuntimeSnapshot, G as withDaemonServiceRunLock, H as uninstallDaemon, I as releaseDaemonServiceLifecycleLock, K as withDaemonServiceStopLock, L as resolveDaemonControlPlaneEndpoint, R as resolveDaemonServiceRuntimeMetadata, U as withDaemonServiceReconcileLock, V as setDaemonServiceRuntimeState, W as withDaemonServiceRegistrationMutationLock, a as DAEMON_SERVICE_RUNTIME_MODE_ENV, c as acquireDaemonServiceLifecycleLock, d as daemonLifecycleJournalPath, g as daemonRuntimeStateRootPath, i as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, j as isDaemonServiceRuntimeHeartbeatStale, k as getDaemonStatus, l as clearDaemonServiceRuntimeState, m as daemonRuntimeRootPath, o as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, u as daemonDispatchJournalPath, x as daemonServiceRepairJournalPath } from "./daemon-state-C_KmI_0F.js";
|
|
18
19
|
import { a as disableDaemonServiceAutostartIfConfigured, b as resolveDaemonServiceManager, c as getDaemonSystemServiceLogPath, d as isDaemonServiceBackgroundExecutionBlocked, g as readDaemonServiceJobCrashExitCode, o as formatDaemonServiceJobDiagnosticsEvidence, s as getDaemonServiceLaunchdLabel } from "./daemon-service-manager-DRzfyljb.js";
|
|
19
20
|
import { homedir } from "node:os";
|
|
20
|
-
import
|
|
21
|
+
import { basename, delimiter, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
21
22
|
import { createHash, randomUUID } from "node:crypto";
|
|
22
|
-
import { access, appendFile, chmod,
|
|
23
|
+
import { access, appendFile, chmod, link, mkdir, open, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
23
24
|
import * as z$1 from "zod/v4";
|
|
24
25
|
import { z } from "zod/v4";
|
|
25
26
|
import { accessSync, appendFileSync, chmodSync, constants, createReadStream, existsSync, mkdirSync, readFileSync, readSync, renameSync, watch, writeFileSync } from "node:fs";
|
|
@@ -27,7 +28,6 @@ import process$1 from "node:process";
|
|
|
27
28
|
import { execFile, spawn } from "node:child_process";
|
|
28
29
|
import { cancel, confirm, isCancel, multiselect, password, select, text } from "@clack/prompts";
|
|
29
30
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
30
|
-
import { fileURLToPath } from "node:url";
|
|
31
31
|
import { stripVTControlCharacters } from "node:util";
|
|
32
32
|
import { forkSession } from "@anthropic-ai/claude-agent-sdk";
|
|
33
33
|
import { createServer } from "node:net";
|
|
@@ -87,7 +87,10 @@ const daemonStatusServerRequirementSchema = z$1.discriminatedUnion("available",
|
|
|
87
87
|
//#region ../../packages/schemas/dist/schemas/http/organization-join-link.js
|
|
88
88
|
const ORGANIZATION_JOIN_LINK_ACCEPT_RATE_LIMITED_ERROR_CODE = "organization.join_link.accept.rate_limited";
|
|
89
89
|
const organizationJoinLinkTokenSchema = string().regex(/^joinlink_[0-9a-f]{64}$/);
|
|
90
|
-
strictObject({
|
|
90
|
+
const organizationJoinLinkManagementQuerySchema = strictObject({
|
|
91
|
+
organizationId: string().trim().min(1).max(255),
|
|
92
|
+
spaceId: string().trim().min(1).max(255).optional()
|
|
93
|
+
});
|
|
91
94
|
const organizationJoinLinkSchema = strictObject({
|
|
92
95
|
id: string().min(1),
|
|
93
96
|
organizationId: string().min(1),
|
|
@@ -95,14 +98,15 @@ const organizationJoinLinkSchema = strictObject({
|
|
|
95
98
|
url: url(),
|
|
96
99
|
role: literal("member"),
|
|
97
100
|
createdBy: string().min(1),
|
|
98
|
-
createdAt: iso.datetime()
|
|
101
|
+
createdAt: iso.datetime(),
|
|
102
|
+
spaceId: string().min(1).nullable().optional()
|
|
99
103
|
});
|
|
100
104
|
const getOrganizationJoinLinkResponseSchema = strictObject({
|
|
101
105
|
ok: literal(true),
|
|
102
106
|
joinLink: organizationJoinLinkSchema.nullable()
|
|
103
107
|
});
|
|
104
108
|
const CENTER_AGENT_ORGANIZATION_INVITE_LINK_GENERATION_GUIDANCE = {
|
|
105
|
-
requiredRole: "
|
|
109
|
+
requiredRole: "member",
|
|
106
110
|
settingsLocation: "Settings → Workspace → General",
|
|
107
111
|
settingsSection: "Invite link"
|
|
108
112
|
};
|
|
@@ -159,17 +163,21 @@ const revokeOrganizationJoinLinkResponseSchema = strictObject({
|
|
|
159
163
|
ok: literal(true),
|
|
160
164
|
revoked: boolean()
|
|
161
165
|
});
|
|
162
|
-
strictObject({
|
|
166
|
+
strictObject({
|
|
167
|
+
token: organizationJoinLinkTokenSchema,
|
|
168
|
+
responseVersion: literal("2").optional()
|
|
169
|
+
});
|
|
163
170
|
discriminatedUnion("active", [strictObject({
|
|
164
171
|
ok: literal(true),
|
|
165
172
|
active: literal(true),
|
|
166
173
|
organizationName: string().min(1),
|
|
167
|
-
organizationSlug: string().min(1)
|
|
174
|
+
organizationSlug: string().min(1),
|
|
175
|
+
spaceId: string().min(1).nullable().optional()
|
|
168
176
|
}), strictObject({
|
|
169
177
|
ok: literal(true),
|
|
170
178
|
active: literal(false)
|
|
171
179
|
})]);
|
|
172
|
-
strictObject({ token: organizationJoinLinkTokenSchema });
|
|
180
|
+
const acceptOrganizationJoinLinkBodySchema = strictObject({ token: organizationJoinLinkTokenSchema });
|
|
173
181
|
strictObject({
|
|
174
182
|
ok: literal(true),
|
|
175
183
|
organizationId: string().min(1),
|
|
@@ -187,6 +195,7 @@ const organizationJoinLinkErrorCodeSchema = enumFactory([
|
|
|
187
195
|
ORGANIZATION_JOIN_LINK_ACCEPT_RATE_LIMITED_ERROR_CODE,
|
|
188
196
|
"organization.join_link.invalid_input",
|
|
189
197
|
"organization.join_link.authentication_required",
|
|
198
|
+
"organization.join_link.approval_required",
|
|
190
199
|
"organization.join_link.forbidden",
|
|
191
200
|
"organization.join_link.email_verification_required",
|
|
192
201
|
"organization.join_link.inactive",
|
|
@@ -18754,653 +18763,6 @@ async function resolveDaemonServiceParticipationStatus(input) {
|
|
|
18754
18763
|
};
|
|
18755
18764
|
}
|
|
18756
18765
|
//#endregion
|
|
18757
|
-
//#region src/skills/bundled.ts
|
|
18758
|
-
const CLI_PACKAGE_JSON = "package.json";
|
|
18759
|
-
/**
|
|
18760
|
-
* Locate the on-disk bundled skills directory for the npm distribution by
|
|
18761
|
-
* walking up from this module to the CLI package root (a directory that has
|
|
18762
|
-
* both package.json and skills/). Returns null under the binary distribution,
|
|
18763
|
-
* where import.meta.url is a virtual path and the skills are embedded instead —
|
|
18764
|
-
* callers in that mode go through bundled-assets.ts, not this function.
|
|
18765
|
-
*/
|
|
18766
|
-
function resolveBundledSkillsLocation() {
|
|
18767
|
-
const cliRootDir = resolveCliRootDir(path.dirname(fileURLToPath(import.meta.url)));
|
|
18768
|
-
if (!cliRootDir) return null;
|
|
18769
|
-
return {
|
|
18770
|
-
cliRootDir,
|
|
18771
|
-
skillsRootDir: path.join(cliRootDir, "skills")
|
|
18772
|
-
};
|
|
18773
|
-
}
|
|
18774
|
-
function resolveCliRootDir(fromDir) {
|
|
18775
|
-
let current = fromDir;
|
|
18776
|
-
for (;;) {
|
|
18777
|
-
const hasPackageJson = existsSync(path.join(current, CLI_PACKAGE_JSON));
|
|
18778
|
-
const hasSkillsDir = existsSync(path.join(current, "skills"));
|
|
18779
|
-
if (hasPackageJson && hasSkillsDir) return current;
|
|
18780
|
-
const parent = path.dirname(current);
|
|
18781
|
-
if (parent === current) return null;
|
|
18782
|
-
current = parent;
|
|
18783
|
-
}
|
|
18784
|
-
}
|
|
18785
|
-
//#endregion
|
|
18786
|
-
//#region src/skills/bundled-assets-fs.ts
|
|
18787
|
-
/**
|
|
18788
|
-
* npm-distribution source: read the bundled skills from the on-disk `skills/`
|
|
18789
|
-
* directory next to the CLI package. Assets are sorted by relative path so the
|
|
18790
|
-
* order (and therefore any content hash computed from them) is stable and
|
|
18791
|
-
* matches the embedded distribution.
|
|
18792
|
-
*/
|
|
18793
|
-
async function loadFsBundledSkillAssets() {
|
|
18794
|
-
const location = resolveBundledSkillsLocation();
|
|
18795
|
-
if (!location) throw new Error("unable to resolve bundled OpenMeld skills directory");
|
|
18796
|
-
return sortBundledSkillAssets(await collectSkillAssets(location.skillsRootDir, location.skillsRootDir));
|
|
18797
|
-
}
|
|
18798
|
-
function sortBundledSkillAssets(assets) {
|
|
18799
|
-
return [...assets].sort((left, right) => left.relativePath.localeCompare(right.relativePath));
|
|
18800
|
-
}
|
|
18801
|
-
async function collectSkillAssets(dir, rootDir) {
|
|
18802
|
-
const entries = await readdir(dir, { withFileTypes: true });
|
|
18803
|
-
const assets = [];
|
|
18804
|
-
for (const entry of entries) {
|
|
18805
|
-
const absolutePath = join(dir, entry.name);
|
|
18806
|
-
if (entry.isDirectory()) {
|
|
18807
|
-
assets.push(...await collectSkillAssets(absolutePath, rootDir));
|
|
18808
|
-
continue;
|
|
18809
|
-
}
|
|
18810
|
-
if (!entry.isFile()) continue;
|
|
18811
|
-
assets.push({
|
|
18812
|
-
relativePath: toPosixRelativePath(relative(rootDir, absolutePath)),
|
|
18813
|
-
content: await readFile(absolutePath)
|
|
18814
|
-
});
|
|
18815
|
-
}
|
|
18816
|
-
return assets;
|
|
18817
|
-
}
|
|
18818
|
-
function toPosixRelativePath(value) {
|
|
18819
|
-
return value.split("\\").join("/");
|
|
18820
|
-
}
|
|
18821
|
-
//#endregion
|
|
18822
|
-
//#region src/skills/bundled-assets.ts
|
|
18823
|
-
/**
|
|
18824
|
-
* Load the OpenMeld-managed skill files that ship with this CLI build.
|
|
18825
|
-
*
|
|
18826
|
-
* - npm distribution: read from the on-disk `skills/` directory.
|
|
18827
|
-
* - binary distribution: read from files embedded into the single binary at
|
|
18828
|
-
* compile time. The embedded module is a Bun-only island resolved only by
|
|
18829
|
-
* `bun build --compile`; the npm build never reaches this branch and marks
|
|
18830
|
-
* the module external, so its `with { type: "file" }` imports are never
|
|
18831
|
-
* parsed by tsdown.
|
|
18832
|
-
*/
|
|
18833
|
-
async function loadBundledSkillAssets() {
|
|
18834
|
-
if (isBinaryDistribution()) return (await import("./skills/bundled-assets-embedded")).loadEmbeddedBundledSkillAssets();
|
|
18835
|
-
return loadFsBundledSkillAssets();
|
|
18836
|
-
}
|
|
18837
|
-
/**
|
|
18838
|
-
* Content hash over an ordered list of skill assets. Byte-for-byte compatible
|
|
18839
|
-
* with `computeDirectoryContentHash` (same `file:<relativePath>\n<content>\n`
|
|
18840
|
-
* framing) so the embedded and on-disk sources produce identical hashes as long
|
|
18841
|
-
* as `assets` is sorted by relative path (as `loadBundledSkillAssets` returns
|
|
18842
|
-
* it). This is the single skills-hash algorithm for both distribution forms.
|
|
18843
|
-
*/
|
|
18844
|
-
function hashBundledSkillAssets(assets) {
|
|
18845
|
-
const hash = createHash("sha256");
|
|
18846
|
-
for (const asset of assets) {
|
|
18847
|
-
hash.update(`file:${asset.relativePath}\n`);
|
|
18848
|
-
hash.update(asset.content);
|
|
18849
|
-
hash.update("\n");
|
|
18850
|
-
}
|
|
18851
|
-
return hash.digest("hex");
|
|
18852
|
-
}
|
|
18853
|
-
const OPENMELD_CLI_SKILL_ID$1 = "openmeld-cli";
|
|
18854
|
-
/**
|
|
18855
|
-
* Read one OpenMeld CLI skill document by its path relative to the skill root
|
|
18856
|
-
* (e.g. "SKILL.md", "references/commands.md"). Works in both distribution forms
|
|
18857
|
-
* via loadBundledSkillAssets, so `openmeld prompt --raw` renders the bundled
|
|
18858
|
-
* markdown from the embedded binary too.
|
|
18859
|
-
*/
|
|
18860
|
-
async function readBundledOpenMeldCliSkillDocumentByPath(skillRelativePath) {
|
|
18861
|
-
const targetPath = `${OPENMELD_CLI_SKILL_ID$1}/${skillRelativePath}`;
|
|
18862
|
-
const asset = (await loadBundledSkillAssets()).find((item) => item.relativePath === targetPath);
|
|
18863
|
-
if (!asset) throw new Error(`bundled OpenMeld CLI skill document is missing: ${skillRelativePath}`);
|
|
18864
|
-
return asset.content.toString("utf8");
|
|
18865
|
-
}
|
|
18866
|
-
//#endregion
|
|
18867
|
-
//#region src/skills/content-hash.ts
|
|
18868
|
-
async function computeDirectoryContentHash(input) {
|
|
18869
|
-
const ignoredNames = new Set(input.ignoredNames ?? []);
|
|
18870
|
-
const files = await collectFiles({
|
|
18871
|
-
dir: input.rootDir,
|
|
18872
|
-
rootDir: input.rootDir,
|
|
18873
|
-
ignoredNames
|
|
18874
|
-
});
|
|
18875
|
-
const hash = createHash("sha256");
|
|
18876
|
-
for (const file of files) {
|
|
18877
|
-
hash.update(`file:${file.relativePath}\n`);
|
|
18878
|
-
hash.update(file.content);
|
|
18879
|
-
hash.update("\n");
|
|
18880
|
-
}
|
|
18881
|
-
return hash.digest("hex");
|
|
18882
|
-
}
|
|
18883
|
-
async function collectFiles(input) {
|
|
18884
|
-
const entries = await readdir(input.dir, { withFileTypes: true }).catch((error) => {
|
|
18885
|
-
if (getErrorCode$2(error) === "ENOENT") return [];
|
|
18886
|
-
warnDirectoryReadError(input.dir, error);
|
|
18887
|
-
throw error;
|
|
18888
|
-
});
|
|
18889
|
-
entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
18890
|
-
const files = [];
|
|
18891
|
-
for (const entry of entries) {
|
|
18892
|
-
if (input.ignoredNames.has(entry.name)) continue;
|
|
18893
|
-
const absolutePath = join(input.dir, entry.name);
|
|
18894
|
-
if (entry.isDirectory()) {
|
|
18895
|
-
files.push(...await collectFiles({
|
|
18896
|
-
dir: absolutePath,
|
|
18897
|
-
rootDir: input.rootDir,
|
|
18898
|
-
ignoredNames: input.ignoredNames
|
|
18899
|
-
}));
|
|
18900
|
-
continue;
|
|
18901
|
-
}
|
|
18902
|
-
if (!entry.isFile()) continue;
|
|
18903
|
-
const content = await readFile(absolutePath);
|
|
18904
|
-
files.push({
|
|
18905
|
-
relativePath: normalizeRelativePath(relative(input.rootDir, absolutePath)),
|
|
18906
|
-
content
|
|
18907
|
-
});
|
|
18908
|
-
}
|
|
18909
|
-
return files;
|
|
18910
|
-
}
|
|
18911
|
-
function normalizeRelativePath(value) {
|
|
18912
|
-
return value.split("\\").join("/");
|
|
18913
|
-
}
|
|
18914
|
-
function getErrorCode$2(error) {
|
|
18915
|
-
if (!error || typeof error !== "object") return;
|
|
18916
|
-
const code = error.code;
|
|
18917
|
-
return typeof code === "string" ? code : void 0;
|
|
18918
|
-
}
|
|
18919
|
-
function warnDirectoryReadError(dir, error) {
|
|
18920
|
-
const reason = error instanceof Error ? error.message : String(error);
|
|
18921
|
-
process.stderr.write(`[openmeld] failed to read directory while hashing skills content (${dir}): ${reason}\n`);
|
|
18922
|
-
}
|
|
18923
|
-
//#endregion
|
|
18924
|
-
//#region src/skills/store.ts
|
|
18925
|
-
const OPENMELD_SKILL_MARKER_FILE = ".openmeld-skill.json";
|
|
18926
|
-
const OPENMELD_CLI_SKILL_FILE = "SKILL.md";
|
|
18927
|
-
const SKILL_NAME_REGEX = /^name:\s*(.+)$/m;
|
|
18928
|
-
async function ensureLocalSkills() {
|
|
18929
|
-
const storePath = skillsDir();
|
|
18930
|
-
await mkdir(storePath, { recursive: true });
|
|
18931
|
-
const assets = await loadBundledSkillAssets().catch(() => []);
|
|
18932
|
-
if (assets.length === 0) return listLocalSkills();
|
|
18933
|
-
const bundledVersion = resolveBundledCliVersion();
|
|
18934
|
-
const skillGroups = groupAssetsBySkill(assets);
|
|
18935
|
-
for (const [skillId, skillAssets] of skillGroups) {
|
|
18936
|
-
const targetDir = join(storePath, skillId);
|
|
18937
|
-
const sourceContentHash = hashBundledSkillAssets(skillAssets);
|
|
18938
|
-
const existingMarker = await readOpenMeldSkillMarker(targetDir);
|
|
18939
|
-
if (existingMarker?.managedBy === "openmeld" && existingMarker.skillId === skillId && existingMarker.mode === "source" && existingMarker.contentHash === sourceContentHash && (!bundledVersion || existingMarker.version === bundledVersion)) continue;
|
|
18940
|
-
for (const asset of skillAssets) {
|
|
18941
|
-
const filePath = join(targetDir, asset.relativePath);
|
|
18942
|
-
await mkdir(dirname(filePath), { recursive: true });
|
|
18943
|
-
await writeFile(filePath, asset.content);
|
|
18944
|
-
}
|
|
18945
|
-
await writeOpenMeldSkillMarker({
|
|
18946
|
-
skillDir: targetDir,
|
|
18947
|
-
skillId,
|
|
18948
|
-
mode: "source",
|
|
18949
|
-
contentHash: sourceContentHash,
|
|
18950
|
-
...bundledVersion ? { version: bundledVersion } : {}
|
|
18951
|
-
});
|
|
18952
|
-
}
|
|
18953
|
-
return listLocalSkills();
|
|
18954
|
-
}
|
|
18955
|
-
function groupAssetsBySkill(assets) {
|
|
18956
|
-
const groups = /* @__PURE__ */ new Map();
|
|
18957
|
-
for (const asset of assets) {
|
|
18958
|
-
const slashIndex = asset.relativePath.indexOf("/");
|
|
18959
|
-
if (slashIndex < 0) continue;
|
|
18960
|
-
const skillId = asset.relativePath.slice(0, slashIndex);
|
|
18961
|
-
const skillRelativePath = asset.relativePath.slice(slashIndex + 1);
|
|
18962
|
-
const group = groups.get(skillId) ?? [];
|
|
18963
|
-
group.push({
|
|
18964
|
-
relativePath: skillRelativePath,
|
|
18965
|
-
content: asset.content
|
|
18966
|
-
});
|
|
18967
|
-
groups.set(skillId, group);
|
|
18968
|
-
}
|
|
18969
|
-
for (const [skillId, group] of [...groups.entries()]) if (group.some((asset) => asset.relativePath === OPENMELD_CLI_SKILL_FILE)) groups.set(skillId, sortBundledSkillAssets(group));
|
|
18970
|
-
else groups.delete(skillId);
|
|
18971
|
-
return groups;
|
|
18972
|
-
}
|
|
18973
|
-
async function listLocalSkills() {
|
|
18974
|
-
const storePath = skillsDir();
|
|
18975
|
-
const skillDirs = await discoverSkillDirs(storePath, 0, 6);
|
|
18976
|
-
const skills = [];
|
|
18977
|
-
for (const skillDir of skillDirs) {
|
|
18978
|
-
const raw = await readFile(join(skillDir, "SKILL.md"), "utf8").catch(() => "");
|
|
18979
|
-
if (!raw) continue;
|
|
18980
|
-
const skillId = path.basename(skillDir);
|
|
18981
|
-
const skillName = readSkillName(raw) ?? skillId;
|
|
18982
|
-
const marker = await readOpenMeldSkillMarker(skillDir);
|
|
18983
|
-
skills.push({
|
|
18984
|
-
id: skillId,
|
|
18985
|
-
name: skillName,
|
|
18986
|
-
absolutePath: skillDir,
|
|
18987
|
-
relativePath: relative(storePath, skillDir) || skillId,
|
|
18988
|
-
...marker?.contentHash ? { contentHash: marker.contentHash } : {},
|
|
18989
|
-
...marker?.version ? { version: marker.version } : {}
|
|
18990
|
-
});
|
|
18991
|
-
}
|
|
18992
|
-
skills.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
18993
|
-
return skills;
|
|
18994
|
-
}
|
|
18995
|
-
async function writeOpenMeldSkillMarker(input) {
|
|
18996
|
-
const markerPath = join(input.skillDir, OPENMELD_SKILL_MARKER_FILE);
|
|
18997
|
-
const marker = {
|
|
18998
|
-
managedBy: "openmeld",
|
|
18999
|
-
skillId: input.skillId,
|
|
19000
|
-
mode: input.mode,
|
|
19001
|
-
...input.contentHash ? { contentHash: input.contentHash } : {},
|
|
19002
|
-
...input.version ? { version: input.version } : {},
|
|
19003
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
19004
|
-
};
|
|
19005
|
-
await writeFile(markerPath, `${JSON.stringify(marker, null, 2)}\n`, "utf8");
|
|
19006
|
-
}
|
|
19007
|
-
async function isOpenMeldManagedSkillDir(skillDir) {
|
|
19008
|
-
return (await readOpenMeldSkillMarker(skillDir))?.managedBy === "openmeld";
|
|
19009
|
-
}
|
|
19010
|
-
async function readOpenMeldSkillMarker(skillDir) {
|
|
19011
|
-
const raw = await readFile(join(skillDir, OPENMELD_SKILL_MARKER_FILE), "utf8").catch(() => null);
|
|
19012
|
-
if (!raw) return null;
|
|
19013
|
-
try {
|
|
19014
|
-
const parsed = JSON.parse(raw);
|
|
19015
|
-
if (parsed.managedBy !== "openmeld") return null;
|
|
19016
|
-
if (typeof parsed.skillId !== "string" || parsed.skillId.trim().length === 0) return null;
|
|
19017
|
-
if (parsed.mode !== "source" && parsed.mode !== "symlink" && parsed.mode !== "copy") return null;
|
|
19018
|
-
return {
|
|
19019
|
-
managedBy: "openmeld",
|
|
19020
|
-
skillId: parsed.skillId.trim(),
|
|
19021
|
-
mode: parsed.mode,
|
|
19022
|
-
...typeof parsed.contentHash === "string" && parsed.contentHash.trim().length > 0 ? { contentHash: parsed.contentHash.trim() } : {},
|
|
19023
|
-
...typeof parsed.version === "string" && parsed.version.trim().length > 0 ? { version: parsed.version.trim() } : {},
|
|
19024
|
-
updatedAt: typeof parsed.updatedAt === "string" && parsed.updatedAt.trim().length > 0 ? parsed.updatedAt : (/* @__PURE__ */ new Date()).toISOString()
|
|
19025
|
-
};
|
|
19026
|
-
} catch {
|
|
19027
|
-
return null;
|
|
19028
|
-
}
|
|
19029
|
-
}
|
|
19030
|
-
async function discoverSkillDirs(dir, depth, maxDepth) {
|
|
19031
|
-
if (depth > maxDepth) return [];
|
|
19032
|
-
const entries = await readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
19033
|
-
if (entries.length === 0) return [];
|
|
19034
|
-
if (entries.some((entry) => entry.isFile() && entry.name === "SKILL.md")) return [dir];
|
|
19035
|
-
return (await Promise.all(entries.filter((entry) => entry.isDirectory()).map((entry) => discoverSkillDirs(join(dir, entry.name), depth + 1, maxDepth)))).flat();
|
|
19036
|
-
}
|
|
19037
|
-
function readSkillName(rawSkillFile) {
|
|
19038
|
-
const match = rawSkillFile.match(SKILL_NAME_REGEX);
|
|
19039
|
-
if (!match) return;
|
|
19040
|
-
const candidate = match[1]?.trim();
|
|
19041
|
-
return candidate && candidate.length > 0 ? candidate : void 0;
|
|
19042
|
-
}
|
|
19043
|
-
function resolveBundledCliVersion() {
|
|
19044
|
-
const version = OPENMELD_VERSION;
|
|
19045
|
-
return typeof version === "string" && version.trim().length > 0 ? version.trim() : void 0;
|
|
19046
|
-
}
|
|
19047
|
-
//#endregion
|
|
19048
|
-
//#region src/skills/state.ts
|
|
19049
|
-
async function resolveSkillsInstallStates(input) {
|
|
19050
|
-
const states = [];
|
|
19051
|
-
for (const target of input.targets) for (const skill of input.skills) states.push(await resolveSkillInstallStateForTarget({
|
|
19052
|
-
skill,
|
|
19053
|
-
target
|
|
19054
|
-
}));
|
|
19055
|
-
return states;
|
|
19056
|
-
}
|
|
19057
|
-
async function resolveSkillInstallStateForTarget(input) {
|
|
19058
|
-
const base = createBaseResult(input);
|
|
19059
|
-
const source = await resolveSourceSnapshot(input.skill);
|
|
19060
|
-
const target = await resolveTargetSnapshot(base.skillDir);
|
|
19061
|
-
if (!target.exists) return createStateResult({
|
|
19062
|
-
base,
|
|
19063
|
-
source,
|
|
19064
|
-
state: "missing"
|
|
19065
|
-
});
|
|
19066
|
-
if (target.marker?.managedBy !== "openmeld") {
|
|
19067
|
-
if (isLegacyOpenMeldSkillSymlink({
|
|
19068
|
-
skillId: input.skill.id,
|
|
19069
|
-
target
|
|
19070
|
-
})) return createStateResult({
|
|
19071
|
-
base,
|
|
19072
|
-
source,
|
|
19073
|
-
state: "outdated",
|
|
19074
|
-
targetMode: "symlink",
|
|
19075
|
-
reason: "legacy OpenMeld skill link found; update required"
|
|
19076
|
-
});
|
|
19077
|
-
return createStateResult({
|
|
19078
|
-
base,
|
|
19079
|
-
source,
|
|
19080
|
-
state: "external_conflict",
|
|
19081
|
-
reason: "existing non-OpenMeld skill detected; skipped to avoid overwrite"
|
|
19082
|
-
});
|
|
19083
|
-
}
|
|
19084
|
-
if (isUpToDate({
|
|
19085
|
-
source,
|
|
19086
|
-
targetMarker: target.marker,
|
|
19087
|
-
isSymlink: target.isSymlink,
|
|
19088
|
-
symlinkTargetPath: target.symlinkTargetPath,
|
|
19089
|
-
sourceSkillDir: input.skill.absolutePath
|
|
19090
|
-
})) return createStateResult({
|
|
19091
|
-
base,
|
|
19092
|
-
source,
|
|
19093
|
-
targetMarker: target.marker,
|
|
19094
|
-
state: "up_to_date",
|
|
19095
|
-
reason: "already up-to-date"
|
|
19096
|
-
});
|
|
19097
|
-
return createStateResult({
|
|
19098
|
-
base,
|
|
19099
|
-
source,
|
|
19100
|
-
targetMarker: target.marker,
|
|
19101
|
-
state: "outdated",
|
|
19102
|
-
reason: target.isSymlink ? "OpenMeld skill link points to a different OpenMeld skills store; update required" : "OpenMeld skill content changed; update required"
|
|
19103
|
-
});
|
|
19104
|
-
}
|
|
19105
|
-
function createBaseResult(input) {
|
|
19106
|
-
const skillDir = join(input.target.dir, input.skill.id);
|
|
19107
|
-
return {
|
|
19108
|
-
targetId: input.target.id,
|
|
19109
|
-
targetDir: input.target.dir,
|
|
19110
|
-
targetType: input.target.type,
|
|
19111
|
-
skillId: input.skill.id,
|
|
19112
|
-
skillDir
|
|
19113
|
-
};
|
|
19114
|
-
}
|
|
19115
|
-
async function resolveSourceSnapshot(skill) {
|
|
19116
|
-
const sourceMarker = await readOpenMeldSkillMarker(skill.absolutePath);
|
|
19117
|
-
return {
|
|
19118
|
-
...skill.contentHash ?? sourceMarker?.contentHash ? { hash: skill.contentHash ?? sourceMarker?.contentHash } : {},
|
|
19119
|
-
...skill.version ?? sourceMarker?.version ? { version: skill.version ?? sourceMarker?.version } : {}
|
|
19120
|
-
};
|
|
19121
|
-
}
|
|
19122
|
-
async function resolveTargetSnapshot(skillDir) {
|
|
19123
|
-
const stats = await lstat(skillDir).catch(() => null);
|
|
19124
|
-
if (!stats) return { exists: false };
|
|
19125
|
-
let marker = await readOpenMeldSkillMarker(skillDir);
|
|
19126
|
-
let symlinkTargetPath = "";
|
|
19127
|
-
if (stats.isSymbolicLink()) {
|
|
19128
|
-
symlinkTargetPath = await resolveSymlinkTarget(skillDir).catch(() => "");
|
|
19129
|
-
if (!marker && symlinkTargetPath) marker = await readOpenMeldSkillMarker(symlinkTargetPath);
|
|
19130
|
-
}
|
|
19131
|
-
return {
|
|
19132
|
-
exists: true,
|
|
19133
|
-
isSymlink: stats.isSymbolicLink(),
|
|
19134
|
-
marker,
|
|
19135
|
-
symlinkTargetPath
|
|
19136
|
-
};
|
|
19137
|
-
}
|
|
19138
|
-
function isLegacyOpenMeldSkillSymlink(input) {
|
|
19139
|
-
if (!(input.target.isSymlink && input.target.symlinkTargetPath)) return false;
|
|
19140
|
-
return basename(input.target.symlinkTargetPath) === input.skillId;
|
|
19141
|
-
}
|
|
19142
|
-
function isUpToDate(input) {
|
|
19143
|
-
if (input.isSymlink) return input.symlinkTargetPath.length > 0 && pathsEqual(input.symlinkTargetPath, input.sourceSkillDir);
|
|
19144
|
-
return hasMatchingHashAndVersion(input.source, input.targetMarker);
|
|
19145
|
-
}
|
|
19146
|
-
function hasMatchingHashAndVersion(source, targetMarker) {
|
|
19147
|
-
if (!(source.hash && targetMarker.contentHash && source.hash === targetMarker.contentHash)) return false;
|
|
19148
|
-
return !(source.version && targetMarker.version) || source.version === targetMarker.version;
|
|
19149
|
-
}
|
|
19150
|
-
function createStateResult(input) {
|
|
19151
|
-
return {
|
|
19152
|
-
...input.base,
|
|
19153
|
-
state: input.state,
|
|
19154
|
-
...input.source.hash ? { sourceHash: input.source.hash } : {},
|
|
19155
|
-
...input.source.version ? { sourceVersion: input.source.version } : {},
|
|
19156
|
-
...input.targetMarker?.contentHash ? { targetHash: input.targetMarker.contentHash } : {},
|
|
19157
|
-
...input.targetMarker?.mode ? { targetMode: input.targetMarker.mode } : {},
|
|
19158
|
-
...input.targetMode ? { targetMode: input.targetMode } : {},
|
|
19159
|
-
...input.targetMarker?.version ? { targetVersion: input.targetMarker.version } : {},
|
|
19160
|
-
...input.reason ? { reason: input.reason } : {}
|
|
19161
|
-
};
|
|
19162
|
-
}
|
|
19163
|
-
async function resolveSymlinkTarget(linkPath) {
|
|
19164
|
-
const target = await readlink(linkPath);
|
|
19165
|
-
return resolve(dirname(linkPath), target);
|
|
19166
|
-
}
|
|
19167
|
-
function pathsEqual(left, right) {
|
|
19168
|
-
return resolve(left) === resolve(right);
|
|
19169
|
-
}
|
|
19170
|
-
//#endregion
|
|
19171
|
-
//#region src/skills/installation-inventory.ts
|
|
19172
|
-
async function collectSkillsReadinessSnapshot() {
|
|
19173
|
-
const skillsConfig = await getConfiguredSkillsConfig();
|
|
19174
|
-
const registry = resolveSkillsAgentRegistry(skillsConfig);
|
|
19175
|
-
const installedAgents = await detectInstalledSkillsAgents(registry);
|
|
19176
|
-
const localSkills = await ensureLocalSkills();
|
|
19177
|
-
const checkTargets = mergeTargetsByDir({
|
|
19178
|
-
primary: buildAgentTargets(installedAgents, registry),
|
|
19179
|
-
secondary: await resolveTrackedInstallTargets({
|
|
19180
|
-
skillsConfig,
|
|
19181
|
-
registry,
|
|
19182
|
-
localSkills,
|
|
19183
|
-
onlyOpenMeldInstalledTargets: false
|
|
19184
|
-
})
|
|
19185
|
-
});
|
|
19186
|
-
const states = await resolveSkillsInstallStates({
|
|
19187
|
-
skills: localSkills,
|
|
19188
|
-
targets: checkTargets
|
|
19189
|
-
});
|
|
19190
|
-
await persistDetectedInstallStateFromCheck({ states });
|
|
19191
|
-
const summary = summarizeSkillState(states);
|
|
19192
|
-
const hasIssues = summary.outdated > 0 || summary.missing > 0 || summary.externalConflict > 0;
|
|
19193
|
-
let status = "up_to_date";
|
|
19194
|
-
if (checkTargets.length === 0) status = "no_targets";
|
|
19195
|
-
else if (hasIssues) status = "action_required";
|
|
19196
|
-
return {
|
|
19197
|
-
status,
|
|
19198
|
-
targetCount: checkTargets.length,
|
|
19199
|
-
summary
|
|
19200
|
-
};
|
|
19201
|
-
}
|
|
19202
|
-
function buildAgentTargets(agents, registry) {
|
|
19203
|
-
return agents.flatMap((agentName) => {
|
|
19204
|
-
const config = registry[agentName];
|
|
19205
|
-
if (!config?.globalSkillsDir || config.skillsInstallable !== true) return [];
|
|
19206
|
-
return [{
|
|
19207
|
-
id: agentName,
|
|
19208
|
-
dir: config.globalSkillsDir,
|
|
19209
|
-
type: "agent"
|
|
19210
|
-
}];
|
|
19211
|
-
});
|
|
19212
|
-
}
|
|
19213
|
-
function isLikelyCustomTargetId(value) {
|
|
19214
|
-
return value.startsWith("custom-");
|
|
19215
|
-
}
|
|
19216
|
-
function resolveTrackedInstallTargets(input) {
|
|
19217
|
-
const installs = input.skillsConfig?.installs ?? [];
|
|
19218
|
-
const customTargetByDir = buildCustomTargetByDir(input.skillsConfig?.customTargets ?? []);
|
|
19219
|
-
const byTargetDir = /* @__PURE__ */ new Map();
|
|
19220
|
-
seedTrackedTargetsFromCustomTargets({
|
|
19221
|
-
byTargetDir,
|
|
19222
|
-
customTargetByDir
|
|
19223
|
-
});
|
|
19224
|
-
seedTrackedTargetsFromInstallRecords({
|
|
19225
|
-
byTargetDir,
|
|
19226
|
-
installs,
|
|
19227
|
-
registry: input.registry,
|
|
19228
|
-
customTargetByDir
|
|
19229
|
-
});
|
|
19230
|
-
const candidates = sortTrackedTargets([...byTargetDir.values()]);
|
|
19231
|
-
return filterTrackedTargetsByState({
|
|
19232
|
-
candidates: canManageRegistryAgentSkillTargets() ? candidates : candidates.filter((target) => target.type === "custom" || input.registry[target.id]?.globalSkillsDirSource === "config-override"),
|
|
19233
|
-
localSkills: input.localSkills,
|
|
19234
|
-
onlyOpenMeldInstalledTargets: input.onlyOpenMeldInstalledTargets
|
|
19235
|
-
});
|
|
19236
|
-
}
|
|
19237
|
-
function buildCustomTargetByDir(customTargets) {
|
|
19238
|
-
const customTargetByDir = /* @__PURE__ */ new Map();
|
|
19239
|
-
for (const customTarget of customTargets) {
|
|
19240
|
-
const id = resolveRuntimeSkillsCustomTargetId({
|
|
19241
|
-
dir: customTarget.dir,
|
|
19242
|
-
...customTarget.id ? { id: customTarget.id } : {}
|
|
19243
|
-
});
|
|
19244
|
-
customTargetByDir.set(customTarget.dir, {
|
|
19245
|
-
id,
|
|
19246
|
-
name: customTarget.name,
|
|
19247
|
-
dir: customTarget.dir
|
|
19248
|
-
});
|
|
19249
|
-
}
|
|
19250
|
-
return customTargetByDir;
|
|
19251
|
-
}
|
|
19252
|
-
function seedTrackedTargetsFromCustomTargets(input) {
|
|
19253
|
-
for (const customTarget of input.customTargetByDir.values()) input.byTargetDir.set(customTarget.dir, {
|
|
19254
|
-
id: customTarget.id ?? resolveRuntimeSkillsCustomTargetId({ dir: customTarget.dir }),
|
|
19255
|
-
dir: customTarget.dir,
|
|
19256
|
-
type: "custom"
|
|
19257
|
-
});
|
|
19258
|
-
}
|
|
19259
|
-
function seedTrackedTargetsFromInstallRecords(input) {
|
|
19260
|
-
for (const install of input.installs) {
|
|
19261
|
-
const trackedTarget = buildTrackedTargetFromInstallRecord({
|
|
19262
|
-
install,
|
|
19263
|
-
registry: input.registry,
|
|
19264
|
-
customTargetByDir: input.customTargetByDir
|
|
19265
|
-
});
|
|
19266
|
-
input.byTargetDir.set(install.targetDir, trackedTarget);
|
|
19267
|
-
}
|
|
19268
|
-
}
|
|
19269
|
-
function buildTrackedTargetFromInstallRecord(input) {
|
|
19270
|
-
const knownAgentDir = input.registry[input.install.targetId]?.globalSkillsDir;
|
|
19271
|
-
if ((knownAgentDir && knownAgentDir === input.install.targetDir ? "agent" : "custom") === "agent") return {
|
|
19272
|
-
id: input.install.targetId,
|
|
19273
|
-
dir: input.install.targetDir,
|
|
19274
|
-
type: "agent"
|
|
19275
|
-
};
|
|
19276
|
-
const customTarget = input.customTargetByDir.get(input.install.targetDir);
|
|
19277
|
-
const fallbackCustomId = isLikelyCustomTargetId(input.install.targetId) ? input.install.targetId : void 0;
|
|
19278
|
-
const resolvedCustomId = customTarget?.id ?? fallbackCustomId;
|
|
19279
|
-
return {
|
|
19280
|
-
id: resolveRuntimeSkillsCustomTargetId({
|
|
19281
|
-
dir: input.install.targetDir,
|
|
19282
|
-
...resolvedCustomId ? { id: resolvedCustomId } : {}
|
|
19283
|
-
}),
|
|
19284
|
-
dir: input.install.targetDir,
|
|
19285
|
-
type: "custom"
|
|
19286
|
-
};
|
|
19287
|
-
}
|
|
19288
|
-
function sortTrackedTargets(targets) {
|
|
19289
|
-
return [...targets].sort((a, b) => `${a.id}:${a.dir}`.localeCompare(`${b.id}:${b.dir}`));
|
|
19290
|
-
}
|
|
19291
|
-
function mergeTargetsByDir(input) {
|
|
19292
|
-
const byDir = /* @__PURE__ */ new Map();
|
|
19293
|
-
for (const target of input.secondary) byDir.set(target.dir, target);
|
|
19294
|
-
for (const target of input.primary) byDir.set(target.dir, target);
|
|
19295
|
-
return sortTrackedTargets([...byDir.values()]);
|
|
19296
|
-
}
|
|
19297
|
-
async function filterInstalledTrackedTargets(input) {
|
|
19298
|
-
const installedOnly = [];
|
|
19299
|
-
for (const candidate of input.candidates) {
|
|
19300
|
-
if (!await targetHasInstalledOpenMeldSkill({
|
|
19301
|
-
target: candidate,
|
|
19302
|
-
localSkills: input.localSkills
|
|
19303
|
-
})) continue;
|
|
19304
|
-
installedOnly.push(candidate);
|
|
19305
|
-
}
|
|
19306
|
-
return installedOnly;
|
|
19307
|
-
}
|
|
19308
|
-
async function filterTargetsWithInstalledOpenMeldSkills(input) {
|
|
19309
|
-
return filterInstalledTrackedTargets({
|
|
19310
|
-
candidates: await filterExistingTargetDirs(input.targets),
|
|
19311
|
-
localSkills: input.localSkills
|
|
19312
|
-
});
|
|
19313
|
-
}
|
|
19314
|
-
async function filterTrackedTargetsByState(input) {
|
|
19315
|
-
const existingTargets = await filterExistingTargetDirs(input.candidates);
|
|
19316
|
-
if (!input.onlyOpenMeldInstalledTargets) return existingTargets;
|
|
19317
|
-
return filterInstalledTrackedTargets({
|
|
19318
|
-
candidates: existingTargets,
|
|
19319
|
-
localSkills: input.localSkills
|
|
19320
|
-
});
|
|
19321
|
-
}
|
|
19322
|
-
async function filterExistingTargetDirs(candidates) {
|
|
19323
|
-
const existing = [];
|
|
19324
|
-
for (const candidate of candidates) {
|
|
19325
|
-
if (!(await stat(candidate.dir).catch(() => null))?.isDirectory()) continue;
|
|
19326
|
-
existing.push(candidate);
|
|
19327
|
-
}
|
|
19328
|
-
return existing;
|
|
19329
|
-
}
|
|
19330
|
-
function summarizeSkillState(states) {
|
|
19331
|
-
return {
|
|
19332
|
-
upToDate: states.filter((state) => state.state === "up_to_date").length,
|
|
19333
|
-
outdated: states.filter((state) => state.state === "outdated").length,
|
|
19334
|
-
missing: states.filter((state) => state.state === "missing").length,
|
|
19335
|
-
externalConflict: states.filter((state) => state.state === "external_conflict").length
|
|
19336
|
-
};
|
|
19337
|
-
}
|
|
19338
|
-
async function targetHasInstalledOpenMeldSkill(input) {
|
|
19339
|
-
if (!(await stat(input.target.dir).catch(() => null))?.isDirectory()) return false;
|
|
19340
|
-
for (const skill of input.localSkills) {
|
|
19341
|
-
const state = await resolveSkillInstallStateForTarget({
|
|
19342
|
-
skill,
|
|
19343
|
-
target: input.target
|
|
19344
|
-
});
|
|
19345
|
-
if (state.state === "up_to_date" || state.state === "outdated") return true;
|
|
19346
|
-
}
|
|
19347
|
-
return false;
|
|
19348
|
-
}
|
|
19349
|
-
async function persistDetectedInstallStateFromCheck(input) {
|
|
19350
|
-
const discoveredByTargetDir = /* @__PURE__ */ new Map();
|
|
19351
|
-
for (const state of input.states) {
|
|
19352
|
-
if (!(state.state === "up_to_date" || state.state === "outdated")) continue;
|
|
19353
|
-
const list = discoveredByTargetDir.get(state.targetDir) ?? [];
|
|
19354
|
-
list.push(state);
|
|
19355
|
-
discoveredByTargetDir.set(state.targetDir, list);
|
|
19356
|
-
}
|
|
19357
|
-
if (discoveredByTargetDir.size === 0) return;
|
|
19358
|
-
await updateConfiguredSkillsConfig((currentSkillsConfig) => {
|
|
19359
|
-
const byTargetDir = /* @__PURE__ */ new Map();
|
|
19360
|
-
for (const record of currentSkillsConfig?.installs ?? []) byTargetDir.set(record.targetDir, record);
|
|
19361
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
19362
|
-
for (const [targetDir, group] of discoveredByTargetDir) {
|
|
19363
|
-
const first = group[0];
|
|
19364
|
-
if (!first) continue;
|
|
19365
|
-
const mode = group.some((state) => state.targetMode === "copy") ? "copy" : "symlink";
|
|
19366
|
-
const skillIds = Array.from(new Set(group.map((state) => state.skillId))).sort((a, b) => a.localeCompare(b));
|
|
19367
|
-
byTargetDir.set(targetDir, {
|
|
19368
|
-
targetId: first.targetId,
|
|
19369
|
-
targetDir,
|
|
19370
|
-
mode,
|
|
19371
|
-
status: "installed",
|
|
19372
|
-
skillIds,
|
|
19373
|
-
updatedAt: now
|
|
19374
|
-
});
|
|
19375
|
-
}
|
|
19376
|
-
const nextInstalls = [...byTargetDir.values()].sort(compareInstallRecords);
|
|
19377
|
-
const previousInstalls = [...currentSkillsConfig?.installs ?? []].sort(compareInstallRecords).map(normalizeInstallRecordForCompare);
|
|
19378
|
-
const nextComparable = nextInstalls.map(normalizeInstallRecordForCompare);
|
|
19379
|
-
if (JSON.stringify(previousInstalls) === JSON.stringify(nextComparable)) return currentSkillsConfig;
|
|
19380
|
-
return {
|
|
19381
|
-
storeDir: currentSkillsConfig?.storeDir ?? skillsDir(),
|
|
19382
|
-
...currentSkillsConfig?.agents ? { agents: currentSkillsConfig.agents } : {},
|
|
19383
|
-
...currentSkillsConfig?.customTargets ? { customTargets: currentSkillsConfig.customTargets } : {},
|
|
19384
|
-
installs: nextInstalls
|
|
19385
|
-
};
|
|
19386
|
-
});
|
|
19387
|
-
}
|
|
19388
|
-
function compareInstallRecords(left, right) {
|
|
19389
|
-
const byTargetId = left.targetId.localeCompare(right.targetId);
|
|
19390
|
-
if (byTargetId !== 0) return byTargetId;
|
|
19391
|
-
return left.targetDir.localeCompare(right.targetDir);
|
|
19392
|
-
}
|
|
19393
|
-
function normalizeInstallRecordForCompare(input) {
|
|
19394
|
-
return {
|
|
19395
|
-
targetId: input.targetId,
|
|
19396
|
-
targetDir: input.targetDir,
|
|
19397
|
-
mode: input.mode,
|
|
19398
|
-
status: input.status,
|
|
19399
|
-
skillIds: [...input.skillIds].sort((a, b) => a.localeCompare(b)),
|
|
19400
|
-
...input.reason ? { reason: input.reason } : {}
|
|
19401
|
-
};
|
|
19402
|
-
}
|
|
19403
|
-
//#endregion
|
|
19404
18766
|
//#region src/local-components/manifest.ts
|
|
19405
18767
|
const OPENMELD_CLI_COMMAND_CONTRACT_VERSION = "openmeld-cli-command-contract-2026-05-local-components-v1";
|
|
19406
18768
|
const OPENMELD_SKILLS_CONTRACT_VERSION = "openmeld-skills-contract-2026-08-tool-owned-actions-v2";
|
|
@@ -19470,6 +18832,7 @@ async function resolveLocalComponentsStatus(input = {}) {
|
|
|
19470
18832
|
resolveOpenMeldToolsUpdateOperation()
|
|
19471
18833
|
]);
|
|
19472
18834
|
const cli = resolveCliComponentStatus(input);
|
|
18835
|
+
const selectedSkill = await loadSelectedSkillAssets();
|
|
19473
18836
|
const setupAction = resolveLocalComponentsSetupAction({
|
|
19474
18837
|
cliStatus: cli.status,
|
|
19475
18838
|
serviceKind: service.kind,
|
|
@@ -19505,6 +18868,7 @@ async function resolveLocalComponentsStatus(input = {}) {
|
|
|
19505
18868
|
status: service.status
|
|
19506
18869
|
},
|
|
19507
18870
|
skills: {
|
|
18871
|
+
...selectedSkill.contentRelease ? { contentRelease: selectedSkill.contentRelease } : {},
|
|
19508
18872
|
expectedBundleHash: expectedManifest.skills.bundleHash,
|
|
19509
18873
|
installedBundleHash: skills.installedBundleHash,
|
|
19510
18874
|
reasonCodes: skills.reasonCodes,
|
|
@@ -19636,7 +19000,7 @@ async function resolveInstalledSkillsManifest() {
|
|
|
19636
19000
|
return (await readInstalledLocalComponentsSnapshot())?.manifest.skills ?? null;
|
|
19637
19001
|
}
|
|
19638
19002
|
async function resolveBundledSkillsManifest() {
|
|
19639
|
-
const assets = await
|
|
19003
|
+
const assets = await loadSelectedSkillAssets().then((selected) => selected.assets).catch(() => null);
|
|
19640
19004
|
if (!assets || assets.length === 0) return null;
|
|
19641
19005
|
return {
|
|
19642
19006
|
bundleHash: hashBundledSkillAssets(assets),
|
|
@@ -19726,6 +19090,7 @@ function resolveDaemonCapabilities(input) {
|
|
|
19726
19090
|
connectCandidate: true,
|
|
19727
19091
|
connectDeclaredPath: true,
|
|
19728
19092
|
discoverProjects: true,
|
|
19093
|
+
readConnections: true,
|
|
19729
19094
|
moveConnection: true,
|
|
19730
19095
|
removeConnection: true,
|
|
19731
19096
|
removeMissingConnections: true,
|
|
@@ -20300,10 +19665,6 @@ async function discoverLocalProjects(input, dependencies = {}) {
|
|
|
20300
19665
|
if (input.projects.length > MAX_PROJECTS) throw new Error("Local Project discovery accepts at most 500 Projects.");
|
|
20301
19666
|
const now = dependencies.now ?? Date.now;
|
|
20302
19667
|
const deadlineMs = now() + (dependencies.budgetMs ?? DISCOVERY_BUDGET_MS);
|
|
20303
|
-
const verifier = (dependencies.createVerifier ?? createGitRepositoryVerifier)({
|
|
20304
|
-
deadlineMs,
|
|
20305
|
-
now
|
|
20306
|
-
});
|
|
20307
19668
|
const localState = await readLocalDiscoveryState({
|
|
20308
19669
|
deadlineMs,
|
|
20309
19670
|
expectedOrganizationId: input.expectedOrganizationId,
|
|
@@ -20322,6 +19683,20 @@ async function discoverLocalProjects(input, dependencies = {}) {
|
|
|
20322
19683
|
requestId: input.requestId
|
|
20323
19684
|
});
|
|
20324
19685
|
const { bindings, connectionsByProject } = localState;
|
|
19686
|
+
if (input.includeCandidates === false) return buildDiscoveryResponse({
|
|
19687
|
+
candidates: [],
|
|
19688
|
+
checkedAtMs: input.checkedAtMs ?? now(),
|
|
19689
|
+
clientGeneration: input.clientGeneration,
|
|
19690
|
+
connectionsByProject,
|
|
19691
|
+
deviceId: input.deviceId,
|
|
19692
|
+
gitStatus: "not_checked",
|
|
19693
|
+
projects: input.projects,
|
|
19694
|
+
requestId: input.requestId
|
|
19695
|
+
});
|
|
19696
|
+
const verifier = (dependencies.createVerifier ?? createGitRepositoryVerifier)({
|
|
19697
|
+
deadlineMs,
|
|
19698
|
+
now
|
|
19699
|
+
});
|
|
20325
19700
|
let gitStatus = await runWithinDeadline(() => verifier.checkAvailability(), deadlineMs, now).catch((error) => error instanceof DiscoveryDeadlineExceededError ? "timed_out" : "unavailable");
|
|
20326
19701
|
const candidatesByPath = /* @__PURE__ */ new Map();
|
|
20327
19702
|
if (gitStatus === "available") {
|
|
@@ -20592,7 +19967,7 @@ function buildProjectDiscovery(input) {
|
|
|
20592
19967
|
candidates: [],
|
|
20593
19968
|
connections: [],
|
|
20594
19969
|
projectId: input.project.projectId,
|
|
20595
|
-
status: "verification_unavailable"
|
|
19970
|
+
status: input.gitStatus === "not_checked" ? "not_connected" : "verification_unavailable"
|
|
20596
19971
|
};
|
|
20597
19972
|
if (candidates.length > 0) return {
|
|
20598
19973
|
candidates,
|
|
@@ -20716,14 +20091,14 @@ async function executeRequestFrame(frame, input, dependencies) {
|
|
|
20716
20091
|
}
|
|
20717
20092
|
}
|
|
20718
20093
|
async function handleDiscoverFrame(frame, input, dependencies) {
|
|
20719
|
-
const epoch = (dependencies.discoveryEpochs ?? defaultDiscoveryEpochs).begin({ organizationId: frame.payload.request.expectedOrganizationId });
|
|
20094
|
+
const epoch = frame.payload.request.includeCandidates === false ? null : (dependencies.discoveryEpochs ?? defaultDiscoveryEpochs).begin({ organizationId: frame.payload.request.expectedOrganizationId });
|
|
20720
20095
|
const response = await (dependencies.discover ?? discoverLocalProjects)({
|
|
20721
20096
|
...frame.payload.request,
|
|
20722
20097
|
deviceId: input.deviceId,
|
|
20723
20098
|
requestId: frame.payload.requestId,
|
|
20724
20099
|
rootDir: input.rootDir
|
|
20725
20100
|
});
|
|
20726
|
-
const projects = (dependencies.discoveryEpochs ?? defaultDiscoveryEpochs).complete(epoch, response.projects);
|
|
20101
|
+
const projects = epoch ? (dependencies.discoveryEpochs ?? defaultDiscoveryEpochs).complete(epoch, response.projects) : response.projects;
|
|
20727
20102
|
return buildResultFrame("daemon.local_project_control.discover_projects_result", frame.payload.requestId, {
|
|
20728
20103
|
...response,
|
|
20729
20104
|
projects
|
|
@@ -22142,232 +21517,6 @@ function toErrorMessage$9(error) {
|
|
|
22142
21517
|
return error instanceof Error ? error.message : String(error);
|
|
22143
21518
|
}
|
|
22144
21519
|
//#endregion
|
|
22145
|
-
//#region src/skills/installer.ts
|
|
22146
|
-
const LOCK_FILE_NAME = "skills-install.lock";
|
|
22147
|
-
const LOCK_ACQUIRE_MAX_ATTEMPTS = 3;
|
|
22148
|
-
async function withSkillsInstallLock(run) {
|
|
22149
|
-
const logsDir = runtimeLogsDir();
|
|
22150
|
-
await mkdir(logsDir, { recursive: true });
|
|
22151
|
-
const lockPath = join(logsDir, LOCK_FILE_NAME);
|
|
22152
|
-
let acquired = false;
|
|
22153
|
-
const lockContents = `${JSON.stringify({
|
|
22154
|
-
pid: process$1.pid,
|
|
22155
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
22156
|
-
})}\n`;
|
|
22157
|
-
for (let attempt = 0; attempt < LOCK_ACQUIRE_MAX_ATTEMPTS; attempt += 1) try {
|
|
22158
|
-
await writeFile(lockPath, lockContents, {
|
|
22159
|
-
encoding: "utf8",
|
|
22160
|
-
flag: "wx"
|
|
22161
|
-
});
|
|
22162
|
-
acquired = true;
|
|
22163
|
-
break;
|
|
22164
|
-
} catch (error) {
|
|
22165
|
-
if (getErrorCode$1(error) !== "EEXIST") throw error;
|
|
22166
|
-
if (!await recoverStaleSkillsInstallLock(lockPath)) throw new Error("another skills installation is already running; retry after it finishes");
|
|
22167
|
-
try {
|
|
22168
|
-
await writeFile(lockPath, lockContents, {
|
|
22169
|
-
encoding: "utf8",
|
|
22170
|
-
flag: "wx"
|
|
22171
|
-
});
|
|
22172
|
-
acquired = true;
|
|
22173
|
-
break;
|
|
22174
|
-
} catch (retryError) {
|
|
22175
|
-
if (getErrorCode$1(retryError) !== "EEXIST") throw retryError;
|
|
22176
|
-
}
|
|
22177
|
-
}
|
|
22178
|
-
if (!acquired) throw new Error("another skills installation is already running; retry after it finishes");
|
|
22179
|
-
try {
|
|
22180
|
-
return await run();
|
|
22181
|
-
} finally {
|
|
22182
|
-
await rm(lockPath, { force: true }).catch(() => void 0);
|
|
22183
|
-
}
|
|
22184
|
-
}
|
|
22185
|
-
async function recoverStaleSkillsInstallLock(lockPath) {
|
|
22186
|
-
const lockRaw = await readFile(lockPath, "utf8").catch((error) => {
|
|
22187
|
-
if (getErrorCode$1(error) === "ENOENT") return "";
|
|
22188
|
-
throw error;
|
|
22189
|
-
});
|
|
22190
|
-
if (!lockRaw) return true;
|
|
22191
|
-
const pid = resolveLockPid(parseLockMeta(lockRaw));
|
|
22192
|
-
if (pid && isPidAlive$2(pid)) return false;
|
|
22193
|
-
const latestLockRaw = await readFile(lockPath, "utf8").catch((error) => {
|
|
22194
|
-
if (getErrorCode$1(error) === "ENOENT") return "";
|
|
22195
|
-
throw error;
|
|
22196
|
-
});
|
|
22197
|
-
if (!latestLockRaw) return true;
|
|
22198
|
-
if (!isSameLockSnapshot({
|
|
22199
|
-
beforeRaw: lockRaw,
|
|
22200
|
-
beforePid: pid,
|
|
22201
|
-
afterRaw: latestLockRaw,
|
|
22202
|
-
afterPid: resolveLockPid(parseLockMeta(latestLockRaw))
|
|
22203
|
-
})) return false;
|
|
22204
|
-
await rm(lockPath, { force: true }).catch((error) => {
|
|
22205
|
-
if (getErrorCode$1(error) === "ENOENT") return;
|
|
22206
|
-
throw error;
|
|
22207
|
-
});
|
|
22208
|
-
return true;
|
|
22209
|
-
}
|
|
22210
|
-
function parseLockMeta(value) {
|
|
22211
|
-
try {
|
|
22212
|
-
return JSON.parse(value);
|
|
22213
|
-
} catch {
|
|
22214
|
-
return null;
|
|
22215
|
-
}
|
|
22216
|
-
}
|
|
22217
|
-
function resolveLockPid(meta) {
|
|
22218
|
-
if (!meta || typeof meta !== "object") return null;
|
|
22219
|
-
const pid = meta.pid;
|
|
22220
|
-
return typeof pid === "number" && Number.isInteger(pid) ? pid : null;
|
|
22221
|
-
}
|
|
22222
|
-
function isPidAlive$2(pid) {
|
|
22223
|
-
try {
|
|
22224
|
-
process$1.kill(pid, 0);
|
|
22225
|
-
return true;
|
|
22226
|
-
} catch (error) {
|
|
22227
|
-
return getErrorCode$1(error) !== "ESRCH";
|
|
22228
|
-
}
|
|
22229
|
-
}
|
|
22230
|
-
function getErrorCode$1(error) {
|
|
22231
|
-
if (!error || typeof error !== "object") return;
|
|
22232
|
-
const code = error.code;
|
|
22233
|
-
return typeof code === "string" ? code : void 0;
|
|
22234
|
-
}
|
|
22235
|
-
function isSameLockSnapshot(input) {
|
|
22236
|
-
if (input.beforeRaw !== input.afterRaw) return false;
|
|
22237
|
-
return input.beforePid === input.afterPid;
|
|
22238
|
-
}
|
|
22239
|
-
async function installSkillsToTargets(input) {
|
|
22240
|
-
const results = [];
|
|
22241
|
-
for (const target of input.targets) for (const skill of input.skills) {
|
|
22242
|
-
const result = await installOneSkillToTarget({
|
|
22243
|
-
skill,
|
|
22244
|
-
target
|
|
22245
|
-
});
|
|
22246
|
-
results.push(result);
|
|
22247
|
-
}
|
|
22248
|
-
return results;
|
|
22249
|
-
}
|
|
22250
|
-
async function installOneSkillToTarget(input) {
|
|
22251
|
-
const targetDir = input.target.dir;
|
|
22252
|
-
const failInstall = (reason) => ({
|
|
22253
|
-
targetId: input.target.id,
|
|
22254
|
-
targetDir,
|
|
22255
|
-
targetType: input.target.type,
|
|
22256
|
-
skillId: input.skill.id,
|
|
22257
|
-
status: "failed",
|
|
22258
|
-
mode: "unknown",
|
|
22259
|
-
degraded: false,
|
|
22260
|
-
reason
|
|
22261
|
-
});
|
|
22262
|
-
if (!isAbsolute(targetDir)) return failInstall("target dir must be an absolute path");
|
|
22263
|
-
const skillId = input.skill.id;
|
|
22264
|
-
if (skillId.trim().length === 0 || isAbsolute(skillId) || skillId === "." || skillId === ".." || skillId.includes("/") || skillId.includes("\\")) return failInstall("skill id would escape target dir");
|
|
22265
|
-
const resolvedTargetDir = resolve(targetDir);
|
|
22266
|
-
const resolvedSkillDir = resolve(resolvedTargetDir, skillId);
|
|
22267
|
-
const skillRelativePath = relative(resolvedTargetDir, resolvedSkillDir);
|
|
22268
|
-
if (skillRelativePath === ".." || skillRelativePath.startsWith("../") || skillRelativePath.startsWith("..\\")) return failInstall("skill id would escape target dir");
|
|
22269
|
-
const skillTargetDir = resolvedSkillDir;
|
|
22270
|
-
await mkdir(targetDir, { recursive: true });
|
|
22271
|
-
const state = await resolveSkillInstallStateForTarget({
|
|
22272
|
-
skill: input.skill,
|
|
22273
|
-
target: input.target
|
|
22274
|
-
});
|
|
22275
|
-
if (state.state === "external_conflict") return {
|
|
22276
|
-
targetId: input.target.id,
|
|
22277
|
-
targetDir,
|
|
22278
|
-
targetType: input.target.type,
|
|
22279
|
-
skillId: input.skill.id,
|
|
22280
|
-
status: "skipped",
|
|
22281
|
-
mode: resolveSkippedInstallMode(state),
|
|
22282
|
-
degraded: false,
|
|
22283
|
-
reason: state.reason
|
|
22284
|
-
};
|
|
22285
|
-
if (state.state === "up_to_date") return {
|
|
22286
|
-
targetId: input.target.id,
|
|
22287
|
-
targetDir,
|
|
22288
|
-
targetType: input.target.type,
|
|
22289
|
-
skillId: input.skill.id,
|
|
22290
|
-
status: "skipped",
|
|
22291
|
-
mode: resolveSkippedInstallMode(state),
|
|
22292
|
-
degraded: false,
|
|
22293
|
-
reason: state.reason
|
|
22294
|
-
};
|
|
22295
|
-
if (state.state === "outdated") await rm(skillTargetDir, {
|
|
22296
|
-
recursive: true,
|
|
22297
|
-
force: true
|
|
22298
|
-
});
|
|
22299
|
-
if (await tryCreateSymlink({
|
|
22300
|
-
sourceDir: input.skill.absolutePath,
|
|
22301
|
-
targetDir: skillTargetDir
|
|
22302
|
-
})) return {
|
|
22303
|
-
targetId: input.target.id,
|
|
22304
|
-
targetDir,
|
|
22305
|
-
targetType: input.target.type,
|
|
22306
|
-
skillId: input.skill.id,
|
|
22307
|
-
status: "installed",
|
|
22308
|
-
mode: "symlink",
|
|
22309
|
-
degraded: false
|
|
22310
|
-
};
|
|
22311
|
-
try {
|
|
22312
|
-
await rm(skillTargetDir, {
|
|
22313
|
-
recursive: true,
|
|
22314
|
-
force: true
|
|
22315
|
-
});
|
|
22316
|
-
await cp(input.skill.absolutePath, skillTargetDir, {
|
|
22317
|
-
recursive: true,
|
|
22318
|
-
force: true
|
|
22319
|
-
});
|
|
22320
|
-
await writeOpenMeldSkillMarker({
|
|
22321
|
-
skillDir: skillTargetDir,
|
|
22322
|
-
skillId: input.skill.id,
|
|
22323
|
-
mode: "copy",
|
|
22324
|
-
...input.skill.contentHash ? { contentHash: input.skill.contentHash } : {},
|
|
22325
|
-
...input.skill.version ? { version: input.skill.version } : {}
|
|
22326
|
-
});
|
|
22327
|
-
return {
|
|
22328
|
-
targetId: input.target.id,
|
|
22329
|
-
targetDir,
|
|
22330
|
-
targetType: input.target.type,
|
|
22331
|
-
skillId: input.skill.id,
|
|
22332
|
-
status: "installed",
|
|
22333
|
-
mode: "copy",
|
|
22334
|
-
degraded: true,
|
|
22335
|
-
reason: "symlink failed; fell back to copy"
|
|
22336
|
-
};
|
|
22337
|
-
} catch (error) {
|
|
22338
|
-
const reason = error instanceof Error ? error.message : "failed to install skill to target";
|
|
22339
|
-
return {
|
|
22340
|
-
targetId: input.target.id,
|
|
22341
|
-
targetDir,
|
|
22342
|
-
targetType: input.target.type,
|
|
22343
|
-
skillId: input.skill.id,
|
|
22344
|
-
status: "failed",
|
|
22345
|
-
mode: "copy",
|
|
22346
|
-
degraded: true,
|
|
22347
|
-
reason
|
|
22348
|
-
};
|
|
22349
|
-
}
|
|
22350
|
-
}
|
|
22351
|
-
function resolveSkippedInstallMode(state) {
|
|
22352
|
-
if (state.targetMode === "copy") return "copy";
|
|
22353
|
-
if (state.targetMode === "symlink") return "symlink";
|
|
22354
|
-
return "unknown";
|
|
22355
|
-
}
|
|
22356
|
-
async function tryCreateSymlink(input) {
|
|
22357
|
-
try {
|
|
22358
|
-
await rm(input.targetDir, {
|
|
22359
|
-
recursive: true,
|
|
22360
|
-
force: true
|
|
22361
|
-
});
|
|
22362
|
-
await mkdir(dirname(input.targetDir), { recursive: true });
|
|
22363
|
-
const targetParentDir = dirname(input.targetDir);
|
|
22364
|
-
await symlink(relative(await realpath(targetParentDir).catch(() => targetParentDir), await realpath(input.sourceDir).catch(() => input.sourceDir)), input.targetDir, process$1.platform === "win32" ? "junction" : void 0);
|
|
22365
|
-
return true;
|
|
22366
|
-
} catch {
|
|
22367
|
-
return false;
|
|
22368
|
-
}
|
|
22369
|
-
}
|
|
22370
|
-
//#endregion
|
|
22371
21520
|
//#region src/local-service/dispatch/ensure-dispatch-controller-openmeld-skill.ts
|
|
22372
21521
|
const OPENMELD_CLI_SKILL_ID = "openmeld-cli";
|
|
22373
21522
|
/**
|
|
@@ -22424,7 +21573,8 @@ async function repairOpenMeldSkillTarget(input) {
|
|
|
22424
21573
|
}));
|
|
22425
21574
|
if (installResult?.status === "installed") return {
|
|
22426
21575
|
agentId: input.agentId,
|
|
22427
|
-
status: "repaired"
|
|
21576
|
+
status: "repaired",
|
|
21577
|
+
skillPath: join(input.target.dir, OPENMELD_CLI_SKILL_ID, "SKILL.md")
|
|
22428
21578
|
};
|
|
22429
21579
|
if (installResult?.status === "skipped") {
|
|
22430
21580
|
const reconciledResult = await resolveExistingSkillResult(input);
|
|
@@ -22443,7 +21593,8 @@ async function resolveExistingSkillResult(input) {
|
|
|
22443
21593
|
});
|
|
22444
21594
|
if (state.state === "up_to_date") return {
|
|
22445
21595
|
agentId: input.agentId,
|
|
22446
|
-
status: "not_needed"
|
|
21596
|
+
status: "not_needed",
|
|
21597
|
+
skillPath: `${state.skillDir}/SKILL.md`
|
|
22447
21598
|
};
|
|
22448
21599
|
if (state.state === "external_conflict") return {
|
|
22449
21600
|
agentId: input.agentId,
|
|
@@ -22458,6 +21609,21 @@ function resolveBuiltinAgentId$1(value) {
|
|
|
22458
21609
|
const agentId = normalized.slice(8).trim();
|
|
22459
21610
|
return agentId.length > 0 ? agentId : null;
|
|
22460
21611
|
}
|
|
21612
|
+
function applyDispatchSkillInstructions(plan, skill) {
|
|
21613
|
+
const instruction = [
|
|
21614
|
+
"For OpenMeld operations, read the official openmeld-cli Skill entry, then only the topic needed.",
|
|
21615
|
+
...skill.skillPath ? [`Local entry: ${JSON.stringify(skill.skillPath)}.`] : [],
|
|
21616
|
+
`If the local entry is unavailable, read ${OFFICIAL_CLI_SKILL_URL}. Follow its relative topic links; do not preload the full guide.`,
|
|
21617
|
+
"The guide does not grant permissions or add CLI commands. Follow this dispatch's action instructions when publishing a reply."
|
|
21618
|
+
].join("\n");
|
|
21619
|
+
const developerInstructions = `${plan.developerInstructions}\n\n${instruction}`;
|
|
21620
|
+
return {
|
|
21621
|
+
...plan,
|
|
21622
|
+
developerInstructions,
|
|
21623
|
+
fallbackPrompt: `${instruction}\n\n${plan.fallbackPrompt}`,
|
|
21624
|
+
instructionEpoch: `${plan.instructionEpoch}:skill:${createHash("sha256").update(instruction).digest("hex")}`
|
|
21625
|
+
};
|
|
21626
|
+
}
|
|
22461
21627
|
//#endregion
|
|
22462
21628
|
//#region src/local-service/dispatch/execute-dispatch-conversation.ts
|
|
22463
21629
|
function resolveCurrentConversationPolicy(routeConfig) {
|
|
@@ -23757,6 +22923,17 @@ async function handleDispatchDeliverFrame(input) {
|
|
|
23757
22923
|
routeConfig,
|
|
23758
22924
|
targetProfileId: parsedTask.targetProfileId
|
|
23759
22925
|
});
|
|
22926
|
+
const skillPreflight = await ensureDispatchControllerOpenMeldSkill({ agentControllerRef: parsedTask.agentControllerRef });
|
|
22927
|
+
emitRunLine({
|
|
22928
|
+
presenter: input.presenter,
|
|
22929
|
+
code: "daemon.run.skill_preflight",
|
|
22930
|
+
text: "OpenMeld Skill checked for this local agent",
|
|
22931
|
+
payload: {
|
|
22932
|
+
agentId: skillPreflight.agentId,
|
|
22933
|
+
status: skillPreflight.status,
|
|
22934
|
+
reason: skillPreflight.reason
|
|
22935
|
+
}
|
|
22936
|
+
});
|
|
23760
22937
|
const runtimePreparation = await prepareDispatchRuntimeExecution({
|
|
23761
22938
|
agentControllerRef: parsedTask.agentControllerRef,
|
|
23762
22939
|
daemonWorkingDirectory,
|
|
@@ -23885,7 +23062,7 @@ async function handleDispatchDeliverFrame(input) {
|
|
|
23885
23062
|
phase: "ledger_context_ready",
|
|
23886
23063
|
result: "ready"
|
|
23887
23064
|
});
|
|
23888
|
-
const baseRuntimePromptPlan = buildDispatchRuntimePrompt({
|
|
23065
|
+
const baseRuntimePromptPlan = applyDispatchSkillInstructions(buildDispatchRuntimePrompt({
|
|
23889
23066
|
bootstrapContext,
|
|
23890
23067
|
imageAttachmentPreparation,
|
|
23891
23068
|
parsedTask,
|
|
@@ -23893,7 +23070,7 @@ async function handleDispatchDeliverFrame(input) {
|
|
|
23893
23070
|
profileOwnerUserId: input.profileOwnerUserId,
|
|
23894
23071
|
sendTargetReference,
|
|
23895
23072
|
shouldInjectBootstrap: bootstrapPlan.shouldInject
|
|
23896
|
-
});
|
|
23073
|
+
}), skillPreflight);
|
|
23897
23074
|
runtimePromptPlan = computerFileAccessBoundary ? applyComputerFileAccessAwareness({
|
|
23898
23075
|
policy: computerFileAccessBoundary,
|
|
23899
23076
|
promptPlan: baseRuntimePromptPlan
|
|
@@ -64584,6 +63761,6 @@ function isHumanInteractiveSpaceRuntime(runtime) {
|
|
|
64584
63761
|
return runtime.resolvedView === "human" && canUseInteractivePrompts(runtime);
|
|
64585
63762
|
}
|
|
64586
63763
|
//#endregion
|
|
64587
|
-
export { runAgentsList as $,
|
|
63764
|
+
export { runAgentsList as $, isCurrentCommandCheckScopeActive as $n, ensureCommandAuthenticationOrCancel as $t, parseEnvelope as A, resolveLocalAgentControllerReportDecision as An, renderInfoCard as Ar, buildProfileWorkspaceRows as At, resolveHumanControllerDisplayName as B, buildUpdatesReplyWorkflowProjection as Bn, organizationJoinLinkManagementQuerySchema as Br, fetchSpaceMeta as Bt, toSpaceMetaUpsertInput as C, computeRetryDelayMs as Cn, readCodexSessionTitles as Cr, runDaemonRunAfterEntryChecks as Ct, formatHumanReadTargetList as D, collectLocalAgentControllerInventory as Dn, removeProjectOutbox as Dr, runDaemonTeardownStrict as Dt, buildHumanReplyContextSummary as E, submitRuntimeAgentControllerReports as En, readAgentActivityOutboxHealth as Er, runDaemonStop as Et, resolveOpenMeldProfileForSpaceCommand as F, buildDispatchResultReplyWorkflowProjection as Fn, cliJsonSkillsLoadEnvelopeSchema as Fr, runDaemonStartDecisionPrompt as Ft, runAgentsConfig as G, isReturnKeypress as Gn, parseJsonResponse$1 as Gt, resolveAgentProfileSetup as H, formatRemovedCcRelationMessage as Hn, readGatewayJsonResponse as Ht, emitSpaceAgentOverview as I, buildPublicSpaceEntryUrl as In, cliJsonSkillsShowEnvelopeSchema as Ir, runDaemonStartupPreflight as It, runAgentsCustomRemove as J, readDispatchOwnedRuntimeGuard as Jn, resolveDaemonServiceParticipationStatus as Jt, runAgentsCustomAdd as K, runInteractivePrompt as Kn, resolveLocalComponentsStatus as Kt, emitSpaceCliAgentOverview as L, buildSignalIndex as Ln, acceptOrganizationJoinLinkBodySchema as Lr, readDaemonStartFailureLogTailLines as Lt, assertFullSignalIdArgument as M, upsertSpaceConfig as Mn, emitCliJsonEnvelope as Mr, emitDaemonAgentOverview as Mt, assertValidSpaceIdTarget as N, assertNoRemovedCcSpaceAddressingSyntax as Nn, cliJsonOutputEnvelopeSchema as Nr, createDelayedSpinner as Nt, resolveLinkAccessLabel as O, resolveLocalAgentControllerBlockerReasonCodes as On, enqueueControllerTaskLifecycleEventWhileLocked as Or, runDaemonUninstall as Ot, prepareAuthenticatedSpaceCommandContext as P, buildDispatchResultMessageReadProjection as Pn, cliJsonSkillsListEnvelopeSchema as Pr, shouldEmitAgentOverview as Pt, runAgentsEnable as Q, getCurrentCommandCheckState as Qn, buildCommandAuthenticationPromptMessage as Qt, prepareLocalAgentReadiness as R, buildSignalMessageReadProjection as Rn, getOrganizationJoinLinkResponseSchema as Rr, fetchSpaceUpdates as Rt, loadSpaceSignalIndexOrNull as S, assessActionParticipationCandidate as Sn, normalizeSharedSessionTitle as Sr, runDaemonReinstall as St, buildFormalSignalReadPayload as T, submitRuntimeAgentControllerReport as Tn, removeProjectInbox as Tr, runDaemonStatusFlow as Tt, runDaemonServiceParticipationGate as U, promptSearchMultiselect as Un, readGatewayTextResponse as Ut, persistAgentTransportSelection as V, createSpaceMemberIdentityIndex as Vn, revokeOrganizationJoinLinkResponseSchema as Vr, updateSpaceMeta as Vt, runAgents as W, promptSearchSelect as Wn, toStructuredGatewayFailure as Wt, runAgentsDetect as X, writeDispatchSpaceActionRecord as Xn, readRecentDaemonDispatchJournalEvents as Xt, runAgentsCustomUpdate as Y, readDispatchSpaceActionContextFromEnv as Yn, readRuntimeReportingHealthState as Yt, runAgentsDisable as Z, finishCurrentCommandCheckScope as Zn, connectWebSocket as Zt, runSpaceWriteWithPasswordRetry as _, resolveCreateProfileName as _n, syncLocalAgentActivity as _r, runDaemonAutostart as _t, runSpaceDelete as a, exchangeOneTimeTokenAuthSession as an, LocalProjectConnectionError as ar, colorizeDisplayProfileLabel as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, formatServiceParticipationReadinessLabel as bn, buildAgentActivityEvent as br, runDaemonInstall as bt, runSpaceLeave as c, formatActiveOrganizationLabel as cn, registerAgentActivityRoute as cr, renderOpenMeldHeader as ct, runSpaceRemoveMembers as d, requestDeviceToken as dn, AGENT_ACTIVITY_INTEGRATION_OWNER as dr, resolveGatewayWebOrigin as dt, evaluateCommandAuthentication as en, resetCurrentCommandCheckState as er, runAgentsManage as et, runSpaceSend as f, resolveDeviceAuthClientId as fn, defaultManagedIntegrationPaths as fr, resolveSpaceWebGatewayOrigin as ft, runSpaceReadWithPasswordRetry as g, resolveCreateProfileKind as gn, uninstallAgentActivityIntegrations as gr, runDaemon as gt, uploadPreparedSpaceFiles as h, createProfileByKind as hn, resolveAgentActivityDispatcherCommand as hr, isManagedSystemServiceBootstrapRun as ht, runSpaceCreate as i, runAuthStatus as in, renderHumanTextErrorCard as ir, colorizeAgentLabel as it, isSpaceCommandOutputHandledError as j, inspectSpaceCacheFile as jn, renderTextInfoCard as jr, reconcileCliVersionView as jt, resolveOrganizationVisibilityLabel as k, resolveLocalAgentControllerLaunchability as kn, readControllerTaskLifecycleOutboxHealth as kr, buildProfileWorkspacePresentation as kt, runSpaceList as l, extractAuthApiErrorMessage as ln, resolveAgentActivityRouteForPath as lr, renderOpenMeldLogo as lt, prepareRequestedSpaceSendFiles as m, revokeAuthAccessToken as mn, readAgentActivityIntegrationStatus as mr, bestEffortStopCurrentLaneDaemonService as mt, promptAndConfirmSpacePassword as n, runAuthLogout as nn, buildHumanErrorCopy as nr, runAgentsShow as nt, runSpaceHistory as o, buildAuthStatusRows as on, validateLocalProjectConnectionPath as or, printOpenMeldBanner as ot, runSpaceWatch as p, resolveDeviceTokenExpiresAt as pn, installAgentActivityIntegrations as pr, resolveSpaceSendText as pt, runAgentsCustomList as q, assertDispatchOwnedRuntimePublicWriteAllowed as qn, writeInstalledLocalComponentsSnapshot as qt, runSpaceAddMembers as r, runAuthMenu as rn, renderHumanErrorCard as rr, formatTransportModeDisplay as rt, runSpaceJoin as s, buildAuthStatusSnapshot as sn, isAgentActivityRouteRegistered as sr, renderOpenMeldBrandBlockLines as st, buildCreateSpacePasswordPromptConfig as t, runAuthLogin as tn, startCurrentCommandCheckScope as tr, runAgentsRepair as tt, runSpacePassword as u, fetchAuthUserSnapshot as un, unregisterAgentActivityRoute as ur, renderOpenMeldTagline as ut, buildHumanReadSignalsTranscriptItems as v, promptTextEntry as vn, readAgentActivityContextForPath as vr, runDaemonBackgroundStartForDecision as vt, buildFormalDispatchResultReadPayload as w, submitProfileRuntimeAgentControllerReport as wn, enqueueAgentActivityHookEvent as wr, runDaemonSnapshot as wt, loadSpaceIdentityDirectoryOrNull as x, resolveServiceParticipationReadiness as xn, resolveObservedAgentActivityBinding as xr, runDaemonInterrupt as xt, emitHumanReadSignalsTextProjection as y, ensureAgentProfileRuntimeBinding as yn, removeAgentActivityContextCache as yr, runDaemonCancel as yt, buildReplyReadinessGuidance as z, buildSpaceRoundReadProjection as zn, organizationJoinLinkErrorResponseSchema as zr, createCliSpaceApi as zt };
|
|
64588
63765
|
|
|
64589
|
-
//# sourceMappingURL=command-
|
|
63766
|
+
//# sourceMappingURL=command-D9xEikCY.js.map
|