openmeld 0.3.135 → 0.3.137
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-9xY_Cbqw.js → add-me-membership-CZUHkjnP.js} +2 -2
- package/dist/{add-me-membership-9xY_Cbqw.js.map → add-me-membership-CZUHkjnP.js.map} +1 -1
- package/dist/{api-client-foundation--Nr2FS4d.js → api-client-foundation-BPmXnsr9.js} +4 -7
- package/dist/api-client-foundation-BPmXnsr9.js.map +1 -0
- package/dist/{auth-session-CNmIonA7.js → auth-session-B06nfwnD.js} +224 -88
- package/dist/auth-session-B06nfwnD.js.map +1 -0
- package/dist/{base-url-BtqW4aLS.js → base-url-CY_j4bLH.js} +13 -6
- package/dist/base-url-CY_j4bLH.js.map +1 -0
- package/dist/{command-wO4TFiYh.js → command-CU_3raCS.js} +783 -210
- package/dist/{command-wO4TFiYh.js.map → command-CU_3raCS.js.map} +1 -1
- package/dist/{daemon-runtime-lease-D82uDZ5s.js → daemon-runtime-lease-6DIprlJy.js} +2 -2
- package/dist/{daemon-runtime-lease-D82uDZ5s.js.map → daemon-runtime-lease-6DIprlJy.js.map} +1 -1
- package/dist/{dist-DoFr77hZ.js → dist-NJH-sDDB.js} +177 -42
- package/dist/dist-NJH-sDDB.js.map +1 -0
- package/dist/openmeld-dev.js +1 -1
- package/dist/openmeld.js +408 -222
- package/dist/openmeld.js.map +1 -1
- package/dist/{runtime-transport-Ciax1_jb.js → runtime-transport-DYzU1lHC.js} +78 -14
- package/dist/runtime-transport-DYzU1lHC.js.map +1 -0
- package/package.json +2 -2
- package/skills/README.md +5 -2
- package/skills/openmeld-cli/SKILL.md +109 -1151
- package/skills/openmeld-cli/playbooks/space-ops.md +34 -16
- package/skills/openmeld-cli/playbooks/space-reads.md +123 -0
- package/skills/openmeld-cli/references/commands.md +14 -9
- package/skills/openmeld-cli/references/runtime-resolution.md +21 -2
- package/dist/api-client-foundation--Nr2FS4d.js.map +0 -1
- package/dist/auth-session-CNmIonA7.js.map +0 -1
- package/dist/base-url-BtqW4aLS.js.map +0 -1
- package/dist/dist-DoFr77hZ.js.map +0 -1
- package/dist/runtime-transport-Ciax1_jb.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { $ as
|
|
4
|
-
import { A as MAX_TEXT_LENGTH, At as
|
|
5
|
-
import { $r as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, A as runtimeTransportRegisterSessionResponseSchema, Bn as agentInteractionResolutionSchema, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Cn as MESSAGE_MENTION_TYPE_VALUES, D as runtimeTransportOpenMeldToolsControlFramePayloadSchema, Dr as url, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, En as getSpaceMessageAddressingRelationSupportForTargetKind, Fr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Gn as formatLocalSetupActionLabel, H as openMeldDaemonTaskResultEnvelopeWriteSchema, Hn as formatLocalComponentsSummaryDescription, Hr as resolveSpaceMentionLabels, I as runtimeTransportSubmitTaskResultRequestSchema, Ir as runtimeTransportDeliveryExecutionIdentitySchema, J as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, K as openMeldSpaceEgressActionSchema, Kn as installedLocalComponentsSnapshotSchema, Kt as resolveSpaceFileMimeType, L as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, Ln as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, M as runtimeTransportResumeControllerConversationFramePayloadSchema, N as runtimeTransportResumeControllerConversationResultFramePayloadSchema, O as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, On as normalizeMessageEnvelope, P as runtimeTransportRouteCatalogChangedFramePayloadSchema, Qr as openMeldRequestContextSchema, R as isOriginalErrorSafeForMessageDetails, Rt as SPACE_FILE_MAX_SIZE_BYTES, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Sr as string, St as sanitizeSignalTextPreview, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Tn as formatCanonicalMentionLiteral, U as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Un as formatLocalComponentsSummaryLabel, V as openMeldDaemonProviderAccessEvidenceSchema, Vr as resolveSingleSpaceMentionLabels, W as openMeldDaemonTaskResultPayloadSchema, Wn as formatLocalSetupActionDescription, X as localFolderPickerHelperProtocolResultSchema, Xt as spaceFileNameSchema, Y as localFolderPickerDaemonFrameSchema, Z as localFolderPickerHelperResultSchema, Zn as localServiceComponentUpdateProjectionSchema, _ as runtimeTransportHeartbeatRequestSchema, _i as
|
|
3
|
+
import { $ as resolveOpenMeldOrphanedLockIssue, $t as systemDir, At as legacyAccountProfileSpacesDir, B as toSpaceRemoveMembersUrl, C as updateConfiguredDeviceRuntimeState, Ct as accountProfileViewPath, D as normalizeBaseUrl, Dt as deviceOpenClawProfileDir, Et as deviceOpenClawProfileBootstrapPath, Ft as openMeldManagedBinaryPath, G as acquireLock, H as toSpaceUpdatesUrl, I as toSpaceLeaveUrl, It as openMeldManagedVersionBinaryPath, J as isOpenMeldOrphanedLockError, Jt as resolveOpenMeldRootDir, Kt as resolveOpenMeldEnvPreset, L as toSpaceMembersUrl, Lt as openMeldManagedVersionDir, M as toSpaceCursorUrl, Mt as normalizeOpenMeldProfileId, N as toSpaceDeleteUrl, Nt as openMeldBackupsDir, O as toDaemonRouteObservationUrl, Ot as deviceOpenClawProfileWorkspaceDir, Pt as openMeldBinDir, R as toSpaceMetaUrl, Rt as openMeldRootDir, S as setConfiguredSkillsConfig, St as accountProfileSpaceCacheDir, T as updateConfiguredSkillsConfig, Tt as accountsDir, U as toSpaceWsUrl, Ut as resolveDefaultOpenMeldHomeDirname, W as isLoopbackHostname, Wt as resolveExplicitOpenMeldEnvPreset, Xt as runtimeLogsDir, Yt as runtimeDir, Zt as skillsDir, _ as getConfiguredViewCustomization, _n as normalizeBuiltinAgentControllerId, a as resolveBaseUrl, an as runtimeStreamingModeSchema, at as readCliContextState, bt as OPENMELD_HOME_ENV_KEY, c as resolveExplicitGatewayUrlOrThrow, cn as buildAgentControllerConversationRef, ct as writeCliContextState, d as createDefaultRuntimeAgentControllerSettings, dn as HOSTED_CENTER_AGENT_CONTROLLER_REF, en as formatLocalMachineIssueMessage, et as runWithHeldLock, f as getConfiguredDaemonDispatchLimits, fn as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, ft as assessLocalMachineFailure, g as getConfiguredSkillsConfig, gn as canonicalizeBuiltinAgentControllerRef, h as getConfiguredOpenMeldToolsMaintenance, hn as canonicalizeAgentControllerRef, i as normalizeGatewayBaseUrlOrNull, it as listCliContextStates, j as toSpaceCreateUrl, jt as normalizeAccountKey, kt as isPublishedOpenMeldHome, l as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, ln as conversationPolicySchema, mn as buildAgentControllerRoutingKey, mt as createBackgroundExecutionBlockedIssue, nn as runtimeAgentControllerConversationIdMappingSpecSchema, o as resolveBaseUrlOrNull, on as runtimeTransportModeSchema, ot as resolveCliContext, p as getConfiguredDeviceRuntimeState, q as isOpenMeldLockError, qt as resolveOpenMeldPresetOwnedPathInput, r as normalizeGatewayBaseUrl, rn as runtimeAgentControllerLaunchContractSchema, s as resolveDefaultGatewayBaseUrl, st as resolveCliContextId, un as resolveBuiltinAgentControllerConversationKind, ut as resolveOpenMeldLaneDescriptor, v as getRuntimeConfigReadHealth, vn as normalizeKnownBuiltinAgentControllerId, vt as CURRENT_PROCESS_START_IDENTITY, wt as accountProfileWorkspacePath, x as setConfiguredOpenMeldToolsMaintenance, xt as accountProfileLocalMetaPath, y as resolveRuntimeSkillsCustomTargetId, yn as parseAgentControllerRef$1, yt as isProcessIdentityAlive, z as toSpacePasswordUrl, zt as openMeldVersionsDir } from "./base-url-CY_j4bLH.js";
|
|
4
|
+
import { $ as submitAgentControllerTaskLifecycleEventItemSchema, $t as spaceMemberDirectorySchema, A as MAX_TEXT_LENGTH, At as submitFeedbackIssueRequestSchema, B as toErrorMessage$44, Bt as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, C as createSpaceApi, Ct as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, D as toStructuredApiClientFailure, Dt as profileCapabilitiesResponseSchema, E as resolveProfileSpaceHistoryGatewayHost, Et as authProfileManagedRoleSchema, F as OPENMELD_HEADER_PROFILE_ID, Ft as listCenterAgentRoutinesResponseSchema, Gt as agentActivitySnapshotResponseSchema, H as toErrorMessage$43, It as pauseCenterAgentRoutineResponseSchema, Jt as localProjectControlDiscoverProjectsResponseSchema, Kt as localProjectControlConnectionSchema, L as OPENMELD_HEADER_REQUEST_ID, Lt as resumeCenterAgentRoutineResponseSchema, M as parseIncoming$1, Mt as createCenterAgentRoutineResponseSchema, N as parseServerErrorFrame$1, Nt as deleteCenterAgentRoutineResponseSchema, O as DAEMON_STREAM_KEEPALIVE_PING, Ot as profileErrorResponseSchema, P as resolveCustomMentionAliasOverride, Pt as listCenterAgentRoutineRunsResponseSchema, Qt as spaceMemberDirectoryEntrySchema, R as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Rt as updateCenterAgentRoutineResponseSchema, S as createRuntimeReportingApi, St as organizationDirectoryResponseSchema, T as resolveAccountSpaceIndexGatewayHost, U as getSpaceUpdatesResponseSchema, V as sleep, Vt as agentActivityEventSchema, W as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Xt as postSpaceMembersResponseSchema, Yt as leaveSpaceResponseSchema, Zt as removeSpaceMembersResponseSchema, _t as listOrganizationSkillsResponseSchema, a as buildSpaceAttachmentDownloadPath, an as observedLocalAgentSessionSchema, at as gatewayErrorEnvelopeSchema, bn as agentControllerCollaborationModeSchema, bt as organizationSkillSummarySchema, c as createAgentProfileBindingApi, cn as listProjectsResponseSchema, ct as computerFileAccessDaemonFrameSchema, d as createCurrentDeviceApi, dn as centerAgentToolSpeakerSchema, dt as modelCatalogSchema, fn as openCodePermissionConfigSchema, ft as organizationSpaceDirectoryWithMemberCountsResponseSchema, g as createOrganizationApi, gt as getOrganizationSkillResponseSchema, h as createOpenMeldApiClient, ht as spaceMetaSchema, i as buildProfileSpaceHistoryUpsertPath, j as parseEnvelope$1, jt as submitFeedbackIssueResponseSchema, kt as organizationComputersResponseSchema, ln as projectSchema, lt as computerFileAccessPolicyInputSchema, m as createLocalRuntimeExpectedRoutesApi, mt as spaceCreatorSchema, n as OpenMeldApiClientInvalidResponseError, o as createAccountSpaceIndexApi, on as archiveProjectResponseSchema, ot as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, p as createFetchTransport, pt as resolveInitialSpaceAccessMode, qt as localProjectControlDaemonFrameSchema, r as buildProfileSpaceHistoryStatusPath, rn as agentActivitySessionInventoryResponseSchema, s as createAgentActivityApi, sn as createProjectResponseSchema, st as OPENMELD_RUNTIME_CAPABILITIES_HEADER, t as OpenMeldApiClientHttpError, un as updateProjectResponseSchema, ut as computerFileAccessPolicySchema, wt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, xn as toCompatibleSpaceAddressingRequestWireValue, y as createProfileSpaceHistoryApi, yn as agentControllerPermissionModeSchema, yt as organizationSkillReleaseSummarySchema } from "./dist-NJH-sDDB.js";
|
|
5
|
+
import { $r as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, A as runtimeTransportRegisterSessionResponseSchema, Bn as agentInteractionResolutionSchema, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Cn as MESSAGE_MENTION_TYPE_VALUES, D as runtimeTransportOpenMeldToolsControlFramePayloadSchema, Dr as url, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, En as getSpaceMessageAddressingRelationSupportForTargetKind, Fr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Gn as formatLocalSetupActionLabel, H as openMeldDaemonTaskResultEnvelopeWriteSchema, Hn as formatLocalComponentsSummaryDescription, Hr as resolveSpaceMentionLabels, I as runtimeTransportSubmitTaskResultRequestSchema, Ir as runtimeTransportDeliveryExecutionIdentitySchema, J as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, K as openMeldSpaceEgressActionSchema, Kn as installedLocalComponentsSnapshotSchema, Kt as resolveSpaceFileMimeType, L as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, Ln as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, M as runtimeTransportResumeControllerConversationFramePayloadSchema, N as runtimeTransportResumeControllerConversationResultFramePayloadSchema, O as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, On as normalizeMessageEnvelope, P as runtimeTransportRouteCatalogChangedFramePayloadSchema, Qr as openMeldRequestContextSchema, R as isOriginalErrorSafeForMessageDetails, Rt as SPACE_FILE_MAX_SIZE_BYTES, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Si as resolveCommandAgentWorkActivity, Sr as string, St as sanitizeSignalTextPreview, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Tn as formatCanonicalMentionLiteral, U as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Un as formatLocalComponentsSummaryLabel, V as openMeldDaemonProviderAccessEvidenceSchema, Vr as resolveSingleSpaceMentionLabels, W as openMeldDaemonTaskResultPayloadSchema, Wn as formatLocalSetupActionDescription, X as localFolderPickerHelperProtocolResultSchema, Xt as spaceFileNameSchema, Y as localFolderPickerDaemonFrameSchema, Z as localFolderPickerHelperResultSchema, Zn as localServiceComponentUpdateProjectionSchema, Zr as openMeldProfileIdSchema, _ as runtimeTransportHeartbeatRequestSchema, _i as sanitizeDispatchErrorSummary, a as runtimeTransportCapabilitiesSchema, b as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, bt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, c as runtimeTransportDispatchInteractionRequestSchema, cn as conversationExecutionStateSchema, d as runtimeTransportDispatchPreviewEndRequestSchema, di as trimmedStringFromUnknown, dr as enumFactory, ei as agentProfileIdSchema, er as openMeldToolsUpdateAttemptSchema, f as runtimeTransportDispatchPreviewRequestSchema, fi as MAX_TEXT_LENGTH$1, g as runtimeTransportForkAgentSessionResultSchema, gi as resolvePublicAgentFailureRecovery, h as runtimeTransportErrorCodeSchema, hi as resolvePublicAgentAvailabilityCopy, i as localWakeRouteReportSchema, in as openMeldDaemonControlPlaneResponseSchema, ir as openMeldToolsUpdateRequestSourceSchema, j as runtimeTransportRejectedProfileRegistrationSchema, jr as parseOptionalClientMessageId, k as runtimeTransportRegisterSessionRequestSchema, kn as resolveMessageEnvelopeTargetField, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, lr as discriminatedUnion, m as runtimeTransportDispatchToolActivityRequestSchema, mi as resolveMappedPublicAgentFailureReason, mr as literal, mt as CONVERSATION_CONTINUITY_WARNING_PURPOSE, n as daemonExecutionCompatibilitySchema, ni as openMeldRuntimeProfileIdSchema, o as runtimeTransportDeliverDispatchRequestSchema, oi as profileWorkspaceModeSchema, on as skippedDaemonProfileSchema, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pr as iso, q as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, qn as localCliComponentUpdateProjectionSchema, r as daemonStreamFrameSchema, rn as openMeldDaemonControlPlaneRequestSchema, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, sn as providerDispatchRuntimeContextSchema, sr as boolean, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, ti as normalizeOptionalWorkingDirectory, tr as openMeldToolsUpdateOperationPhaseSchema, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportHeartbeatResponseSchema, vi as shouldPreferMappedPublicAgentFailureReason, vt as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, w as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, wn as collectCanonicalMentionTextFragments, x as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, xr as strictObject, y as runtimeTransportLocalAgentControlCancelFramePayloadSchema, yt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, zn as agentInteractionRequestSchema, zr as normalizeSpacePasswordText } from "./runtime-transport-DYzU1lHC.js";
|
|
6
6
|
import { r as daemonServiceLaneSchema, t as daemonServiceContractSchema } from "./service-contract-CRyDcIIf.js";
|
|
7
|
-
import { A as getDaemonRuntimeStatus, B as resolveDaemonServiceRuntimeMetadata, C as daemonServiceRepairJournalPath, D as daemonServiceUpdateWorkerBinaryExecutablePath, E as daemonServiceStableLauncherPath, F as readDaemonServiceLifecycleLockMeta, G as withDaemonServiceReconcileLock, H as rotateDaemonControlPlaneTokenIfExpired, I as readDaemonServiceLifecycleLockMetaWithCleanup, J as withDaemonServiceStopLock, K as withDaemonServiceRegistrationMutationLock, L as readDaemonServiceRuntimeSnapshot, M as installDaemon, N as isDaemonServiceRuntimeHeartbeatStale, O as daemonStatePath, P as readDaemonControlPlaneToken, R as releaseDaemonServiceLifecycleLock, S as daemonServiceRecognizedExecutablePaths$1, T as daemonServiceStableExecutableWrapperPath, U as setDaemonServiceRuntimeState, V as restoreDaemonInstallStateSnapshot, W as uninstallDaemon, X as writeDaemonLocalStateFile, Y as readDaemonLocalStateFile, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceExecutableWrapperPaths$1, c as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, d as clearDaemonServiceRuntimeState, f as daemonDispatchJournalPath, g as daemonRuntimeRootPath, h as daemonRuntimeDataPath, i as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, j as getDaemonStatus, k as ensureDaemonControlPlaneToken, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, q as withDaemonServiceRunLock, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableBinaryExecutablePath, x as daemonServiceLegacyExecutableWrapperPath, y as daemonServiceActiveBundleStatePath, z as resolveDaemonControlPlaneEndpoint } from "./daemon-runtime-lease-
|
|
8
|
-
import { A as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, B as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, C as DAEMON_RUNTIME_CONTRACT_EPOCH$1, D as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, E as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, F as OPENCLAW_CLI_TIMEOUT_MS$1, H as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, I as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, L as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, N as MIN_HEARTBEAT_INTERVAL_MS$2, O as DEFAULT_HEARTBEAT_INTERVAL_MS$1, R as REGISTER_RESPONSE_TIMEOUT_MS$1, S as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, T as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, V as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, a as beginAuthSessionTransition, h as setAuthSession, j as MAX_HEARTBEAT_INTERVAL_MS$2, l as getAuthSessionState, o as clearAuthSession, r as assertAuthSessionMutationAvailable, v as isBinaryDistribution, w as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, x as CATALOG_SYNC_RETRY_INTERVAL_MS$1, y as resolveOpenMeldDistribution } from "./auth-session-
|
|
9
|
-
import { a as AuthRequestCredentialError, c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as buildRequestAuthHeaders, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileIdentityRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldProfileRequestHeadersWithAuth, u as canAttachAuthTokenToRequest } from "./api-client-foundation
|
|
7
|
+
import { A as getDaemonRuntimeStatus, B as resolveDaemonServiceRuntimeMetadata, C as daemonServiceRepairJournalPath, D as daemonServiceUpdateWorkerBinaryExecutablePath, E as daemonServiceStableLauncherPath, F as readDaemonServiceLifecycleLockMeta, G as withDaemonServiceReconcileLock, H as rotateDaemonControlPlaneTokenIfExpired, I as readDaemonServiceLifecycleLockMetaWithCleanup, J as withDaemonServiceStopLock, K as withDaemonServiceRegistrationMutationLock, L as readDaemonServiceRuntimeSnapshot, M as installDaemon, N as isDaemonServiceRuntimeHeartbeatStale, O as daemonStatePath, P as readDaemonControlPlaneToken, R as releaseDaemonServiceLifecycleLock, S as daemonServiceRecognizedExecutablePaths$1, T as daemonServiceStableExecutableWrapperPath, U as setDaemonServiceRuntimeState, V as restoreDaemonInstallStateSnapshot, W as uninstallDaemon, X as writeDaemonLocalStateFile, Y as readDaemonLocalStateFile, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceExecutableWrapperPaths$1, c as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, d as clearDaemonServiceRuntimeState, f as daemonDispatchJournalPath, g as daemonRuntimeRootPath, h as daemonRuntimeDataPath, i as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, j as getDaemonStatus, k as ensureDaemonControlPlaneToken, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, q as withDaemonServiceRunLock, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableBinaryExecutablePath, x as daemonServiceLegacyExecutableWrapperPath, y as daemonServiceActiveBundleStatePath, z as resolveDaemonControlPlaneEndpoint } from "./daemon-runtime-lease-6DIprlJy.js";
|
|
8
|
+
import { A as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, B as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, C as DAEMON_RUNTIME_CONTRACT_EPOCH$1, D as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, E as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, F as OPENCLAW_CLI_TIMEOUT_MS$1, H as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, I as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, L as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, N as MIN_HEARTBEAT_INTERVAL_MS$2, O as DEFAULT_HEARTBEAT_INTERVAL_MS$1, R as REGISTER_RESPONSE_TIMEOUT_MS$1, S as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, T as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, V as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, a as beginAuthSessionTransition, h as setAuthSession, j as MAX_HEARTBEAT_INTERVAL_MS$2, l as getAuthSessionState, o as clearAuthSession, r as assertAuthSessionMutationAvailable, v as isBinaryDistribution, w as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, x as CATALOG_SYNC_RETRY_INTERVAL_MS$1, y as resolveOpenMeldDistribution } from "./auth-session-B06nfwnD.js";
|
|
9
|
+
import { a as AuthRequestCredentialError, c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as buildRequestAuthHeaders, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileIdentityRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldProfileRequestHeadersWithAuth, u as canAttachAuthTokenToRequest } from "./api-client-foundation-BPmXnsr9.js";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { homedir, tmpdir, userInfo } from "node:os";
|
|
12
12
|
import * as z$1 from "zod/v4";
|
|
@@ -6256,8 +6256,6 @@ function normalizePermissionKind(value) {
|
|
|
6256
6256
|
const normalized = String(value ?? "").trim().toLowerCase().replace(UNSAFE_PERMISSION_KIND_CHARACTER_RE, "_").replace(EDGE_UNDERSCORE_RE, "");
|
|
6257
6257
|
return normalized.length > 0 ? normalized : null;
|
|
6258
6258
|
}
|
|
6259
|
-
//#endregion
|
|
6260
|
-
//#region ../../runtime/adapters/core/dist/index.js
|
|
6261
6259
|
const DEFAULT_GRACEFUL_INTERRUPT_TIMEOUT_MS = 1e4;
|
|
6262
6260
|
const DEFAULT_INTERRUPT_REASON = "service.interrupt";
|
|
6263
6261
|
const DEFAULT_CANCEL_REASON = "service.cancel";
|
|
@@ -6496,12 +6494,14 @@ const buildAdapterCancelRequest = (input) => ({
|
|
|
6496
6494
|
});
|
|
6497
6495
|
const toAdapterDispatchFailure = (error, defaultErrorType = "adapter") => {
|
|
6498
6496
|
const errorCode = extractErrorCode$2(error);
|
|
6497
|
+
const agentControllerConversationOccupancy = extractAgentControllerConversationOccupancy(error);
|
|
6499
6498
|
const errorType = extractErrorType(error) ?? defaultErrorType;
|
|
6500
6499
|
const diagnostics = extractDispatchDiagnostics(error);
|
|
6501
6500
|
const providerAccessEvidence = extractProviderAccessEvidence(error);
|
|
6502
6501
|
const originalError = extractProviderOriginalError(error);
|
|
6503
6502
|
const telemetry = extractDispatchTelemetry(error);
|
|
6504
6503
|
return {
|
|
6504
|
+
...agentControllerConversationOccupancy ? { agentControllerConversationOccupancy } : {},
|
|
6505
6505
|
...diagnostics ? { diagnostics } : {},
|
|
6506
6506
|
...errorCode ? { errorCode } : {},
|
|
6507
6507
|
errorMessage: error instanceof Error ? error.message : "adapter dispatch failed",
|
|
@@ -6512,6 +6512,19 @@ const toAdapterDispatchFailure = (error, defaultErrorType = "adapter") => {
|
|
|
6512
6512
|
...telemetry ? { telemetry } : {}
|
|
6513
6513
|
};
|
|
6514
6514
|
};
|
|
6515
|
+
const extractAgentControllerConversationOccupancy = (error) => {
|
|
6516
|
+
if (!(error && typeof error === "object")) return null;
|
|
6517
|
+
const value = error.agentControllerConversationOccupancy;
|
|
6518
|
+
if (!(value && typeof value === "object")) return null;
|
|
6519
|
+
const occupancy = value;
|
|
6520
|
+
const agentControllerConversationId = typeof occupancy.agentControllerConversationId === "string" ? occupancy.agentControllerConversationId.trim() : "";
|
|
6521
|
+
if (!agentControllerConversationId || occupancy.contractVersion !== 1 || occupancy.state !== "occupied") return null;
|
|
6522
|
+
return {
|
|
6523
|
+
agentControllerConversationId,
|
|
6524
|
+
contractVersion: 1,
|
|
6525
|
+
state: "occupied"
|
|
6526
|
+
};
|
|
6527
|
+
};
|
|
6515
6528
|
const extractProviderOriginalError = (error) => {
|
|
6516
6529
|
if (!(error && typeof error === "object")) return null;
|
|
6517
6530
|
return createProviderOriginalError(error.originalError);
|
|
@@ -9249,19 +9262,40 @@ const CODEX_APP_SERVER_VERSION_PATTERN = /\/([^\s]+)/u;
|
|
|
9249
9262
|
const APP_SERVER_PROCESS_KILL_GRACE_MS = 1e3;
|
|
9250
9263
|
const DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS = 15e3;
|
|
9251
9264
|
var CodexAppServerTransportError = class extends Error {
|
|
9265
|
+
agentControllerConversationOccupancy;
|
|
9252
9266
|
code;
|
|
9253
9267
|
errorType;
|
|
9254
9268
|
originalError;
|
|
9255
9269
|
providerAccessEvidence;
|
|
9270
|
+
rpcErrorCode;
|
|
9256
9271
|
constructor(input) {
|
|
9257
9272
|
super(input.message);
|
|
9258
9273
|
this.name = "CodexAppServerTransportError";
|
|
9274
|
+
this.agentControllerConversationOccupancy = input.agentControllerConversationOccupancy;
|
|
9259
9275
|
this.code = input.code;
|
|
9260
9276
|
this.errorType = input.errorType;
|
|
9261
9277
|
this.originalError = input.originalError;
|
|
9262
9278
|
this.providerAccessEvidence = input.providerAccessEvidence;
|
|
9279
|
+
this.rpcErrorCode = input.rpcErrorCode;
|
|
9263
9280
|
}
|
|
9264
9281
|
};
|
|
9282
|
+
function throwIfCodexDispatchCancelled(signal) {
|
|
9283
|
+
if (!signal?.aborted) return;
|
|
9284
|
+
throw new CodexAppServerTransportError({
|
|
9285
|
+
code: "runtime.turn.cancelled",
|
|
9286
|
+
errorType: "adapter",
|
|
9287
|
+
message: "runtime.turn.cancelled: Codex was stopped before starting a turn"
|
|
9288
|
+
});
|
|
9289
|
+
}
|
|
9290
|
+
function classifyCodexThreadWriterConflict(input) {
|
|
9291
|
+
const agentControllerConversationId = input.agentControllerConversationId.trim();
|
|
9292
|
+
if (!agentControllerConversationId || input.operation !== "thread/resume" || input.rpcErrorCode !== -32600 || input.rpcErrorMessage !== `thread ${agentControllerConversationId} already has an active writer`) return null;
|
|
9293
|
+
return {
|
|
9294
|
+
agentControllerConversationId,
|
|
9295
|
+
contractVersion: 1,
|
|
9296
|
+
state: "occupied"
|
|
9297
|
+
};
|
|
9298
|
+
}
|
|
9265
9299
|
async function probeCodexAppServerAccount(input) {
|
|
9266
9300
|
const timeoutMs = input.timeoutMs ?? DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS;
|
|
9267
9301
|
return await withCodexAppServerSession({
|
|
@@ -9281,6 +9315,7 @@ async function probeCodexAppServerAccount(input) {
|
|
|
9281
9315
|
});
|
|
9282
9316
|
}
|
|
9283
9317
|
async function invokeCodexAppServerTransport(input) {
|
|
9318
|
+
throwIfCodexDispatchCancelled(input.cancellationSignal);
|
|
9284
9319
|
const prompt = normalizeOptionalText$59(input.prompt);
|
|
9285
9320
|
if (!prompt) throw new CodexAppServerTransportError({
|
|
9286
9321
|
code: "schema.invalid",
|
|
@@ -9304,7 +9339,9 @@ async function invokeCodexAppServerTransport(input) {
|
|
|
9304
9339
|
onRuntimeEvent: input.onRuntimeEvent,
|
|
9305
9340
|
startupTimeoutMs: input.startupTimeoutMs
|
|
9306
9341
|
}, async (session) => {
|
|
9342
|
+
throwIfCodexDispatchCancelled(input.cancellationSignal);
|
|
9307
9343
|
const threadContext = await resolveDispatchThreadContext({
|
|
9344
|
+
cancellationSignal: input.cancellationSignal,
|
|
9308
9345
|
conversationPolicyParams,
|
|
9309
9346
|
codexWorkdir: input.codexWorkdir,
|
|
9310
9347
|
executionMode: input.executionMode,
|
|
@@ -9327,6 +9364,7 @@ async function invokeCodexAppServerTransport(input) {
|
|
|
9327
9364
|
threadSource: threadContext.threadSource
|
|
9328
9365
|
});
|
|
9329
9366
|
session.emitProviderConversationObserved(continuityThreadId);
|
|
9367
|
+
throwIfCodexDispatchCancelled(input.cancellationSignal);
|
|
9330
9368
|
const turn = readTurnStartResponse(await session.requestControl("turn/start", {
|
|
9331
9369
|
...permissionModeParams.turn,
|
|
9332
9370
|
...collaborationMode ? { collaborationMode } : {},
|
|
@@ -9349,6 +9387,10 @@ async function invokeCodexAppServerTransport(input) {
|
|
|
9349
9387
|
threadId: executionThreadId,
|
|
9350
9388
|
turnId
|
|
9351
9389
|
});
|
|
9390
|
+
if (input.cancellationSignal?.aborted && turn.status !== "completed") await session.request("turn/interrupt", {
|
|
9391
|
+
threadId: executionThreadId,
|
|
9392
|
+
turnId
|
|
9393
|
+
});
|
|
9352
9394
|
let completedTurn;
|
|
9353
9395
|
try {
|
|
9354
9396
|
completedTurn = turn.status === "completed" ? turn : await session.waitForTurnCompleted({
|
|
@@ -9484,16 +9526,37 @@ async function resolveDispatchThreadContext(input) {
|
|
|
9484
9526
|
session: input.session,
|
|
9485
9527
|
sourceThreadId: existingThreadId
|
|
9486
9528
|
});
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
|
|
9529
|
+
let response;
|
|
9530
|
+
try {
|
|
9531
|
+
throwIfCodexDispatchCancelled(input.cancellationSignal);
|
|
9532
|
+
response = await input.session.requestControl("thread/resume", {
|
|
9533
|
+
...input.conversationPolicyParams.model ? { model: input.conversationPolicyParams.model } : {},
|
|
9534
|
+
...input.permissionModeParams,
|
|
9535
|
+
cwd: input.codexWorkdir,
|
|
9536
|
+
excludeTurns: true,
|
|
9537
|
+
threadId: existingThreadId
|
|
9538
|
+
}, {
|
|
9539
|
+
code: "context.resume_timeout",
|
|
9540
|
+
operation: "thread/resume"
|
|
9541
|
+
});
|
|
9542
|
+
} catch (error) {
|
|
9543
|
+
const transportError = error instanceof CodexAppServerTransportError ? error : null;
|
|
9544
|
+
const occupancy = transportError ? classifyCodexThreadWriterConflict({
|
|
9545
|
+
agentControllerConversationId: existingThreadId,
|
|
9546
|
+
operation: "thread/resume",
|
|
9547
|
+
rpcErrorCode: transportError.rpcErrorCode,
|
|
9548
|
+
rpcErrorMessage: transportError.message
|
|
9549
|
+
}) : null;
|
|
9550
|
+
if (!occupancy) throw error;
|
|
9551
|
+
throw new CodexAppServerTransportError({
|
|
9552
|
+
agentControllerConversationOccupancy: occupancy,
|
|
9553
|
+
code: "agent_controller.conversation_occupied",
|
|
9554
|
+
errorType: "adapter",
|
|
9555
|
+
message: transportError?.message ?? "Codex thread writer is occupied",
|
|
9556
|
+
rpcErrorCode: transportError?.rpcErrorCode
|
|
9557
|
+
});
|
|
9558
|
+
}
|
|
9559
|
+
return readThreadContextFromResponse(response);
|
|
9497
9560
|
}
|
|
9498
9561
|
return readThreadContextFromResponse(await input.session.requestControl("thread/start", {
|
|
9499
9562
|
...input.conversationPolicyParams.model ? { model: input.conversationPolicyParams.model } : {},
|
|
@@ -10744,7 +10807,8 @@ function toJsonRpcTransportError$1(error) {
|
|
|
10744
10807
|
return new CodexAppServerTransportError({
|
|
10745
10808
|
code: "upstream_unreachable",
|
|
10746
10809
|
errorType: "adapter",
|
|
10747
|
-
message
|
|
10810
|
+
message,
|
|
10811
|
+
...typeof error.code === "number" ? { rpcErrorCode: error.code } : {}
|
|
10748
10812
|
});
|
|
10749
10813
|
}
|
|
10750
10814
|
function toCodexAppServerTransportError(error, timeoutMs) {
|
|
@@ -11481,6 +11545,7 @@ function normalizeOptionalText$56(value) {
|
|
|
11481
11545
|
//#endregion
|
|
11482
11546
|
//#region ../../runtime/adapters/codex/dist/invoke/codex-invoke.js
|
|
11483
11547
|
var CodexRuntimeError = class extends Error {
|
|
11548
|
+
agentControllerConversationOccupancy;
|
|
11484
11549
|
code;
|
|
11485
11550
|
errorType;
|
|
11486
11551
|
originalError;
|
|
@@ -11488,6 +11553,7 @@ var CodexRuntimeError = class extends Error {
|
|
|
11488
11553
|
constructor(input) {
|
|
11489
11554
|
super(input.message);
|
|
11490
11555
|
this.name = "CodexRuntimeError";
|
|
11556
|
+
this.agentControllerConversationOccupancy = input.agentControllerConversationOccupancy;
|
|
11491
11557
|
this.code = input.code;
|
|
11492
11558
|
this.errorType = input.errorType;
|
|
11493
11559
|
this.originalError = input.originalError;
|
|
@@ -11597,6 +11663,7 @@ function isCodexAppServerContextLostError(error) {
|
|
|
11597
11663
|
function toCodexRuntimeError(error) {
|
|
11598
11664
|
if (error instanceof CodexRuntimeError) return error;
|
|
11599
11665
|
if (error && typeof error === "object" && "code" in error && typeof error.code === "string" && "errorType" in error && typeof error.errorType === "string" && error instanceof Error) return new CodexRuntimeError({
|
|
11666
|
+
agentControllerConversationOccupancy: error.agentControllerConversationOccupancy,
|
|
11600
11667
|
code: error.code,
|
|
11601
11668
|
errorType: error.errorType,
|
|
11602
11669
|
message: error.message,
|
|
@@ -11646,6 +11713,89 @@ function toErrorMessage$37(error) {
|
|
|
11646
11713
|
return String(error);
|
|
11647
11714
|
}
|
|
11648
11715
|
//#endregion
|
|
11716
|
+
//#region ../../runtime/adapters/codex/dist/transport/codex-thread-writer-availability.js
|
|
11717
|
+
const CODEX_THREAD_WRITER_RECOVERY_RETRY_MS = 3e4;
|
|
11718
|
+
const CODEX_THREAD_WRITER_MISSING_LOCK_RETRY_MS = 500;
|
|
11719
|
+
const MIN_MISSING_LOCK_RETRY_MS = 100;
|
|
11720
|
+
const MAX_MISSING_LOCK_RETRY_MS = 2e3;
|
|
11721
|
+
async function waitForCodexThreadWriterAvailability(input) {
|
|
11722
|
+
if (input.signal?.aborted) return "aborted";
|
|
11723
|
+
const lockDirectory = join(input.env?.CODEX_HOME?.trim() || process.env.CODEX_HOME?.trim() || join(homedir(), ".codex"), "thread-writer-locks");
|
|
11724
|
+
const lockFileName = `${input.occupancy.agentControllerConversationId}.lock`;
|
|
11725
|
+
const lockPath = join(lockDirectory, lockFileName);
|
|
11726
|
+
const lockExists = await pathExists$6(lockPath);
|
|
11727
|
+
if (input.signal?.aborted) return "aborted";
|
|
11728
|
+
if (!lockExists) return await waitForRetryOrAbort({
|
|
11729
|
+
delayMs: normalizeMissingLockRetryMs(input.missingLockRetryMs),
|
|
11730
|
+
signal: input.signal
|
|
11731
|
+
});
|
|
11732
|
+
return await new Promise((resolve) => {
|
|
11733
|
+
let settled = false;
|
|
11734
|
+
let recoveryTimer = null;
|
|
11735
|
+
let watcher = null;
|
|
11736
|
+
const finish = (result) => {
|
|
11737
|
+
if (settled) return;
|
|
11738
|
+
settled = true;
|
|
11739
|
+
if (recoveryTimer) {
|
|
11740
|
+
clearTimeout(recoveryTimer);
|
|
11741
|
+
recoveryTimer = null;
|
|
11742
|
+
}
|
|
11743
|
+
watcher?.close();
|
|
11744
|
+
input.signal?.removeEventListener("abort", handleAbort);
|
|
11745
|
+
resolve(result);
|
|
11746
|
+
};
|
|
11747
|
+
const handleAbort = () => finish("aborted");
|
|
11748
|
+
const observeAvailability = () => {
|
|
11749
|
+
pathExists$6(lockPath).then((exists) => {
|
|
11750
|
+
if (!exists) finish("release_observed");
|
|
11751
|
+
}).catch(() => {});
|
|
11752
|
+
};
|
|
11753
|
+
input.signal?.addEventListener("abort", handleAbort, { once: true });
|
|
11754
|
+
recoveryTimer = setTimeout(() => finish("retry_due"), input.recoveryRetryMs ?? CODEX_THREAD_WRITER_RECOVERY_RETRY_MS);
|
|
11755
|
+
recoveryTimer.unref?.();
|
|
11756
|
+
try {
|
|
11757
|
+
watcher = watch(lockDirectory, (_eventType, fileName) => {
|
|
11758
|
+
if (fileName === null || String(fileName) === lockFileName) observeAvailability();
|
|
11759
|
+
});
|
|
11760
|
+
watcher.on("error", () => {});
|
|
11761
|
+
} catch {}
|
|
11762
|
+
observeAvailability();
|
|
11763
|
+
});
|
|
11764
|
+
}
|
|
11765
|
+
async function waitForRetryOrAbort(input) {
|
|
11766
|
+
if (input.signal?.aborted) return "aborted";
|
|
11767
|
+
return await new Promise((resolve) => {
|
|
11768
|
+
let settled = false;
|
|
11769
|
+
let timer = null;
|
|
11770
|
+
const finish = (result) => {
|
|
11771
|
+
if (settled) return;
|
|
11772
|
+
settled = true;
|
|
11773
|
+
if (timer) {
|
|
11774
|
+
clearTimeout(timer);
|
|
11775
|
+
timer = null;
|
|
11776
|
+
}
|
|
11777
|
+
input.signal?.removeEventListener("abort", handleAbort);
|
|
11778
|
+
resolve(result);
|
|
11779
|
+
};
|
|
11780
|
+
const handleAbort = () => finish("aborted");
|
|
11781
|
+
input.signal?.addEventListener("abort", handleAbort, { once: true });
|
|
11782
|
+
timer = setTimeout(() => finish("retry_due"), input.delayMs);
|
|
11783
|
+
timer.unref?.();
|
|
11784
|
+
});
|
|
11785
|
+
}
|
|
11786
|
+
function normalizeMissingLockRetryMs(value) {
|
|
11787
|
+
if (!(typeof value === "number" && Number.isFinite(value))) return CODEX_THREAD_WRITER_MISSING_LOCK_RETRY_MS;
|
|
11788
|
+
return Math.min(MAX_MISSING_LOCK_RETRY_MS, Math.max(MIN_MISSING_LOCK_RETRY_MS, Math.trunc(value)));
|
|
11789
|
+
}
|
|
11790
|
+
async function pathExists$6(path) {
|
|
11791
|
+
try {
|
|
11792
|
+
await access(path);
|
|
11793
|
+
return true;
|
|
11794
|
+
} catch {
|
|
11795
|
+
return false;
|
|
11796
|
+
}
|
|
11797
|
+
}
|
|
11798
|
+
//#endregion
|
|
11649
11799
|
//#region ../../runtime/adapters/codex/dist/usage/codex-usage-limits.js
|
|
11650
11800
|
const DEFAULT_LIMIT_ID = "codex";
|
|
11651
11801
|
const MAX_LIMIT_ID_LENGTH = 160;
|
|
@@ -11743,6 +11893,7 @@ const MAX_COMPUTER_FILE_ACCESS_ATTESTATIONS = 32;
|
|
|
11743
11893
|
const createCodexAdapter = (options) => {
|
|
11744
11894
|
const activeAppServerTurns = /* @__PURE__ */ new Map();
|
|
11745
11895
|
const computerFileAccessAttestations = /* @__PURE__ */ new Map();
|
|
11896
|
+
const occupiedDispatches = /* @__PURE__ */ new Map();
|
|
11746
11897
|
const registerAppServerTurn = (registration) => {
|
|
11747
11898
|
const activeTurn = {
|
|
11748
11899
|
interrupt: registration.interrupt,
|
|
@@ -11772,6 +11923,43 @@ const createCodexAdapter = (options) => {
|
|
|
11772
11923
|
sendInterrupt,
|
|
11773
11924
|
waitForMs: options.waitForMs
|
|
11774
11925
|
});
|
|
11926
|
+
const fallbackCancel = controlShell.cancel;
|
|
11927
|
+
const cancel = async (request) => {
|
|
11928
|
+
if (abortOccupiedCodexDispatch({
|
|
11929
|
+
occupiedDispatches,
|
|
11930
|
+
request
|
|
11931
|
+
}) && !activeAppServerTurns.has(request.taskId)) return {
|
|
11932
|
+
accepted: true,
|
|
11933
|
+
deliveryPath: "cancel",
|
|
11934
|
+
reasonCode: "accepted",
|
|
11935
|
+
signalDelivery: "sent",
|
|
11936
|
+
taskId: request.taskId
|
|
11937
|
+
};
|
|
11938
|
+
if (!fallbackCancel) return {
|
|
11939
|
+
accepted: false,
|
|
11940
|
+
reasonCode: "adapter.unsupported",
|
|
11941
|
+
signalDelivery: "not_sent",
|
|
11942
|
+
taskId: request.taskId
|
|
11943
|
+
};
|
|
11944
|
+
return await fallbackCancel(request);
|
|
11945
|
+
};
|
|
11946
|
+
const interrupt = async (request) => {
|
|
11947
|
+
if (abortOccupiedCodexDispatch({
|
|
11948
|
+
occupiedDispatches,
|
|
11949
|
+
request
|
|
11950
|
+
}) && !activeAppServerTurns.has(request.taskId)) return {
|
|
11951
|
+
accepted: true,
|
|
11952
|
+
plan: buildInterruptPlan(request),
|
|
11953
|
+
reasonCode: "accepted",
|
|
11954
|
+
signalDelivery: "sent",
|
|
11955
|
+
taskId: request.taskId
|
|
11956
|
+
};
|
|
11957
|
+
return await interruptCodexActiveAppServerTurn({
|
|
11958
|
+
activeAppServerTurns,
|
|
11959
|
+
request,
|
|
11960
|
+
fallbackInterrupt: controlShell.interrupt
|
|
11961
|
+
});
|
|
11962
|
+
};
|
|
11775
11963
|
const sharedDispatch = createSharedDispatchShell({
|
|
11776
11964
|
adapterId: "codex",
|
|
11777
11965
|
bridgeSpec: CODEX_CONVERSATION_BRIDGE_SPEC,
|
|
@@ -11784,20 +11972,17 @@ const createCodexAdapter = (options) => {
|
|
|
11784
11972
|
resolveDefaultInvoke: () => resolveDefaultCodexInvoke(options),
|
|
11785
11973
|
runtimeOptions: options
|
|
11786
11974
|
});
|
|
11787
|
-
const dispatch =
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11975
|
+
const dispatch = (request) => dispatchCodexWithConversationOccupancy({
|
|
11976
|
+
occupiedDispatches,
|
|
11977
|
+
request,
|
|
11978
|
+
sharedDispatch,
|
|
11979
|
+
waitForThreadWriterAvailability: options.waitForThreadWriterAvailability ?? waitForCodexThreadWriterAvailability
|
|
11980
|
+
});
|
|
11792
11981
|
return {
|
|
11793
11982
|
adapterId: "codex",
|
|
11794
|
-
cancel
|
|
11983
|
+
cancel,
|
|
11795
11984
|
dispatch,
|
|
11796
|
-
interrupt
|
|
11797
|
-
activeAppServerTurns,
|
|
11798
|
-
request,
|
|
11799
|
-
fallbackInterrupt: controlShell.interrupt
|
|
11800
|
-
}),
|
|
11985
|
+
interrupt,
|
|
11801
11986
|
verifyComputerFileAccessBoundary: async (request) => {
|
|
11802
11987
|
if (request.agentControllerPermissionMode === "codex:customConfig" || request.transportMode !== "codex-app-server" && request.transportMode !== "local-cli") return {
|
|
11803
11988
|
reasonCode: "computer.file_access.controller_unsupported",
|
|
@@ -11862,6 +12047,32 @@ const createCodexAdapter = (options) => {
|
|
|
11862
12047
|
}
|
|
11863
12048
|
};
|
|
11864
12049
|
};
|
|
12050
|
+
function readCodexConversationOccupancy(result, request) {
|
|
12051
|
+
if (result.status !== "failed" || request.transportMode !== "codex-app-server" || !result.agentControllerConversationOccupancy) return null;
|
|
12052
|
+
return result.agentControllerConversationOccupancy;
|
|
12053
|
+
}
|
|
12054
|
+
function abortOccupiedCodexDispatch(input) {
|
|
12055
|
+
const occupiedDispatch = input.occupiedDispatches.get(input.request.taskId);
|
|
12056
|
+
if (!occupiedDispatch) return false;
|
|
12057
|
+
occupiedDispatch.abortController.abort();
|
|
12058
|
+
return true;
|
|
12059
|
+
}
|
|
12060
|
+
function buildCodexWriterWaitCancelledResult() {
|
|
12061
|
+
return {
|
|
12062
|
+
errorCode: "runtime.turn.cancelled",
|
|
12063
|
+
errorMessage: "runtime.turn.cancelled: Codex was stopped while waiting for the Agent Controller conversation",
|
|
12064
|
+
errorType: "adapter",
|
|
12065
|
+
status: "failed"
|
|
12066
|
+
};
|
|
12067
|
+
}
|
|
12068
|
+
async function emitCodexConversationAvailable(input) {
|
|
12069
|
+
await input.request.onRuntimeEvent?.({
|
|
12070
|
+
agentControllerConversationId: input.occupancy.agentControllerConversationId,
|
|
12071
|
+
contractVersion: input.occupancy.contractVersion,
|
|
12072
|
+
phase: "agent_controller_conversation_available",
|
|
12073
|
+
tsMs: Date.now()
|
|
12074
|
+
});
|
|
12075
|
+
}
|
|
11865
12076
|
function rememberComputerFileAccessAttestation(input) {
|
|
11866
12077
|
while (input.attestations.size >= MAX_COMPUTER_FILE_ACCESS_ATTESTATIONS) {
|
|
11867
12078
|
const oldestKey = input.attestations.keys().next().value;
|
|
@@ -11870,6 +12081,93 @@ function rememberComputerFileAccessAttestation(input) {
|
|
|
11870
12081
|
}
|
|
11871
12082
|
input.attestations.set(input.cacheKey, input.value);
|
|
11872
12083
|
}
|
|
12084
|
+
async function dispatchCodexWithConversationOccupancy(input) {
|
|
12085
|
+
const state = {
|
|
12086
|
+
occupancy: null,
|
|
12087
|
+
registration: null
|
|
12088
|
+
};
|
|
12089
|
+
try {
|
|
12090
|
+
while (true) {
|
|
12091
|
+
const cancellationSignal = state.registration?.abortController.signal ?? void 0;
|
|
12092
|
+
if (cancellationSignal?.aborted) return buildCodexWriterWaitCancelledResult();
|
|
12093
|
+
const result = await input.sharedDispatch({
|
|
12094
|
+
...input.request,
|
|
12095
|
+
...cancellationSignal ? { cancellationSignal } : {}
|
|
12096
|
+
});
|
|
12097
|
+
if (state.registration?.abortController.signal.aborted) return buildCodexWriterWaitCancelledResult();
|
|
12098
|
+
const occupancy = readCodexConversationOccupancy(result, input.request);
|
|
12099
|
+
if (occupancy) {
|
|
12100
|
+
if (await waitForOccupiedCodexConversation({
|
|
12101
|
+
...input,
|
|
12102
|
+
occupancy,
|
|
12103
|
+
state
|
|
12104
|
+
}) === "cancelled") return buildCodexWriterWaitCancelledResult();
|
|
12105
|
+
continue;
|
|
12106
|
+
}
|
|
12107
|
+
if (state.occupancy) {
|
|
12108
|
+
await emitCodexConversationAvailable({
|
|
12109
|
+
occupancy: state.occupancy,
|
|
12110
|
+
request: input.request
|
|
12111
|
+
});
|
|
12112
|
+
state.occupancy = null;
|
|
12113
|
+
}
|
|
12114
|
+
return finalizeCodexDispatchResult({
|
|
12115
|
+
request: input.request,
|
|
12116
|
+
result
|
|
12117
|
+
});
|
|
12118
|
+
}
|
|
12119
|
+
} finally {
|
|
12120
|
+
removeOccupiedCodexDispatchRegistration({
|
|
12121
|
+
occupiedDispatches: input.occupiedDispatches,
|
|
12122
|
+
state,
|
|
12123
|
+
taskId: input.request.taskId
|
|
12124
|
+
});
|
|
12125
|
+
}
|
|
12126
|
+
}
|
|
12127
|
+
async function waitForOccupiedCodexConversation(input) {
|
|
12128
|
+
const registration = ensureOccupiedCodexDispatchRegistration(input);
|
|
12129
|
+
if (!input.state.occupancy) {
|
|
12130
|
+
await input.request.onRuntimeEvent?.({
|
|
12131
|
+
agentControllerConversationId: input.occupancy.agentControllerConversationId,
|
|
12132
|
+
contractVersion: input.occupancy.contractVersion,
|
|
12133
|
+
phase: "agent_controller_conversation_occupied",
|
|
12134
|
+
tsMs: Date.now()
|
|
12135
|
+
});
|
|
12136
|
+
input.state.occupancy = input.occupancy;
|
|
12137
|
+
}
|
|
12138
|
+
const waitResult = await input.waitForThreadWriterAvailability({
|
|
12139
|
+
env: input.request.env,
|
|
12140
|
+
occupancy: input.occupancy,
|
|
12141
|
+
signal: registration.abortController.signal
|
|
12142
|
+
});
|
|
12143
|
+
if (waitResult === "aborted" || registration.abortController.signal.aborted) return "cancelled";
|
|
12144
|
+
if (waitResult === "release_observed") {
|
|
12145
|
+
await emitCodexConversationAvailable({
|
|
12146
|
+
occupancy: input.occupancy,
|
|
12147
|
+
request: input.request
|
|
12148
|
+
});
|
|
12149
|
+
input.state.occupancy = null;
|
|
12150
|
+
}
|
|
12151
|
+
return registration.abortController.signal.aborted ? "cancelled" : "retry";
|
|
12152
|
+
}
|
|
12153
|
+
function ensureOccupiedCodexDispatchRegistration(input) {
|
|
12154
|
+
if (input.state.registration) return input.state.registration;
|
|
12155
|
+
const registration = {
|
|
12156
|
+
abortController: new AbortController(),
|
|
12157
|
+
taskId: input.request.taskId
|
|
12158
|
+
};
|
|
12159
|
+
input.state.registration = registration;
|
|
12160
|
+
input.occupiedDispatches.set(input.request.taskId, registration);
|
|
12161
|
+
return registration;
|
|
12162
|
+
}
|
|
12163
|
+
function finalizeCodexDispatchResult(input) {
|
|
12164
|
+
if (input.result.status === "failed" && input.request.computerFileAccessBoundary !== void 0) return redactCodexFileAccessBoundaryDispatchFailure(input.result);
|
|
12165
|
+
return input.result;
|
|
12166
|
+
}
|
|
12167
|
+
function removeOccupiedCodexDispatchRegistration(input) {
|
|
12168
|
+
const registration = input.state.registration;
|
|
12169
|
+
if (registration && input.occupiedDispatches.get(input.taskId) === registration) input.occupiedDispatches.delete(input.taskId);
|
|
12170
|
+
}
|
|
11873
12171
|
const resolveDefaultCodexInvoke = (options) => {
|
|
11874
12172
|
const codexTimeoutMs = options.codexTimeoutMs ?? resolveCodexTimeoutMs();
|
|
11875
12173
|
return async (input) => {
|
|
@@ -11939,6 +12237,7 @@ const resolveDefaultCodexAppServerInvoke = (input) => {
|
|
|
11939
12237
|
} : void 0;
|
|
11940
12238
|
const result = await invokeCodexAppServer({
|
|
11941
12239
|
agentControllerPermissionMode: dispatchInput.agentControllerPermissionMode,
|
|
12240
|
+
cancellationSignal: dispatchInput.cancellationSignal,
|
|
11942
12241
|
computerFileAccessBoundary: dispatchInput.computerFileAccessBoundary,
|
|
11943
12242
|
launchContract,
|
|
11944
12243
|
codexTimeoutMs,
|
|
@@ -18167,7 +18466,7 @@ function resolveOpenMeldAccountContext(input) {
|
|
|
18167
18466
|
};
|
|
18168
18467
|
}
|
|
18169
18468
|
async function resolveCurrentOpenMeldAccountContext() {
|
|
18170
|
-
const { getAuthSessionMetadata } = await import("./auth-session-
|
|
18469
|
+
const { getAuthSessionMetadata } = await import("./auth-session-B06nfwnD.js").then((n) => n.i);
|
|
18171
18470
|
return resolveOpenMeldAccountContext({ session: await getAuthSessionMetadata().catch(() => null) });
|
|
18172
18471
|
}
|
|
18173
18472
|
function resolveHostKey(baseUrl) {
|
|
@@ -18996,7 +19295,7 @@ async function requireOpenMeldProfilesSession() {
|
|
|
18996
19295
|
}
|
|
18997
19296
|
function resolveOpenMeldProfilesApiTimeoutMs(endpoint) {
|
|
18998
19297
|
const url = parseUrlOrNull$1(endpoint);
|
|
18999
|
-
if (url && isLoopbackHostname
|
|
19298
|
+
if (url && isLoopbackHostname(url.hostname)) return LOOPBACK_OPENMELD_PROFILES_API_TIMEOUT_MS;
|
|
19000
19299
|
return DEFAULT_OPENMELD_PROFILES_API_TIMEOUT_MS;
|
|
19001
19300
|
}
|
|
19002
19301
|
function parseUrlOrNull$1(value) {
|
|
@@ -19006,9 +19305,6 @@ function parseUrlOrNull$1(value) {
|
|
|
19006
19305
|
return null;
|
|
19007
19306
|
}
|
|
19008
19307
|
}
|
|
19009
|
-
function isLoopbackHostname$2(hostname) {
|
|
19010
|
-
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1";
|
|
19011
|
-
}
|
|
19012
19308
|
function isSameStoredAuthSession(a, b) {
|
|
19013
19309
|
return a.authBaseUrl === b.authBaseUrl && a.clientId === b.clientId && a.tokenType === b.tokenType && a.accessToken === b.accessToken && (a.expiresAt ?? null) === (b.expiresAt ?? null);
|
|
19014
19310
|
}
|
|
@@ -19155,11 +19451,11 @@ async function findOpenMeldProfileByNameOrHandle(input) {
|
|
|
19155
19451
|
}
|
|
19156
19452
|
function isLoopbackProfileEndpoint(endpoint) {
|
|
19157
19453
|
const url = parseUrlOrNull$1(endpoint);
|
|
19158
|
-
return Boolean(url && isLoopbackHostname
|
|
19454
|
+
return Boolean(url && isLoopbackHostname(url.hostname) && url.pathname.startsWith("/v1/profiles"));
|
|
19159
19455
|
}
|
|
19160
19456
|
function isHostedProfilesEndpoint(endpoint) {
|
|
19161
19457
|
const url = parseUrlOrNull$1(endpoint);
|
|
19162
|
-
return Boolean(url && !isLoopbackHostname
|
|
19458
|
+
return Boolean(url && !isLoopbackHostname(url.hostname) && url.pathname.startsWith("/v1/profiles"));
|
|
19163
19459
|
}
|
|
19164
19460
|
function isRecord$5(value) {
|
|
19165
19461
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -19266,7 +19562,11 @@ function isProfileMissingError(error) {
|
|
|
19266
19562
|
//#region src/config/view-profile-key.ts
|
|
19267
19563
|
async function resolveViewProfileKey(inputProfile) {
|
|
19268
19564
|
const explicit = normalizeOptionalString$13(inputProfile);
|
|
19269
|
-
if (explicit)
|
|
19565
|
+
if (explicit) {
|
|
19566
|
+
const profileId = openMeldProfileIdSchema.safeParse(explicit);
|
|
19567
|
+
if (profileId.success) return profileId.data;
|
|
19568
|
+
return (await resolveOpenMeldProfileByIdOrName({ profileIdentifier: explicit }).catch(() => null))?.openMeldProfileId ?? explicit;
|
|
19569
|
+
}
|
|
19270
19570
|
const selected = await getSelectedOpenMeldProfileId();
|
|
19271
19571
|
if (selected) return selected;
|
|
19272
19572
|
return null;
|
|
@@ -19375,7 +19675,7 @@ const HUMAN_MESSAGES = {
|
|
|
19375
19675
|
"connect.closing": (params) => `Closing the connection (${String(params?.why ?? "")})...`,
|
|
19376
19676
|
"connect.watch_ready": () => "Watching the stream. Press Ctrl+C to quit.",
|
|
19377
19677
|
"connect.connected_no_stdio": (params) => formatConnectedNoStdioMessage("human", params),
|
|
19378
|
-
"connect.chat_mention_hint": () => "Press @ to insert
|
|
19678
|
+
"connect.chat_mention_hint": () => "Press @ to insert an Agent Wake, Agent Reference, or Human Mention.",
|
|
19379
19679
|
"connect.chat_ready": () => "Type your message and press Enter to send.",
|
|
19380
19680
|
"connect.chat_exit_hint": () => "Exit with '/quit', ':q', Ctrl+D, or Ctrl+C.",
|
|
19381
19681
|
"connect.chat_prompt_question": () => "What would you like to say in this space?",
|
|
@@ -19433,7 +19733,7 @@ const AGENT_MESSAGES = {
|
|
|
19433
19733
|
"connect.closing": (params) => `closing connection (${String(params?.why ?? "")})`,
|
|
19434
19734
|
"connect.watch_ready": () => "watch mode active; Ctrl+C to quit",
|
|
19435
19735
|
"connect.connected_no_stdio": (params) => formatConnectedNoStdioMessage("agent", params),
|
|
19436
|
-
"connect.chat_mention_hint": () => "use @Name(wake) or @Name(reference)
|
|
19736
|
+
"connect.chat_mention_hint": () => "use @Name(wake) or @Name(reference) for agents, and @Name(mention) for people",
|
|
19437
19737
|
"connect.chat_ready": () => "chat mode active; type a line to send",
|
|
19438
19738
|
"connect.chat_exit_hint": () => "enter sends; line ending with \\ continues draft; exit with /quit, :q, Ctrl+D, or Ctrl+C",
|
|
19439
19739
|
"connect.chat_prompt_question": () => "what would you like to say?",
|
|
@@ -19708,8 +20008,8 @@ function splitSentences(message) {
|
|
|
19708
20008
|
var package_default = {
|
|
19709
20009
|
$schema: "https://www.schemastore.org/package.json",
|
|
19710
20010
|
name: "openmeld",
|
|
19711
|
-
version: "0.3.
|
|
19712
|
-
openMeldReleaseDate: "2026-
|
|
20011
|
+
version: "0.3.137",
|
|
20012
|
+
openMeldReleaseDate: "2026-09-01",
|
|
19713
20013
|
description: "OpenMeld CLI - https://openmeld.ai",
|
|
19714
20014
|
license: "MIT",
|
|
19715
20015
|
type: "module",
|
|
@@ -22418,6 +22718,16 @@ function resolveDaemonServiceIdentity(input = {}) {
|
|
|
22418
22718
|
}
|
|
22419
22719
|
//#endregion
|
|
22420
22720
|
//#region src/local-service/lifecycle/daemon-service-manager.ts
|
|
22721
|
+
/**
|
|
22722
|
+
* Disables autostart only when the OS definition is already committed.
|
|
22723
|
+
* Setup can run a candidate Service from its stable carrier before that
|
|
22724
|
+
* definition exists; the process can still be stopped without toggling it.
|
|
22725
|
+
*/
|
|
22726
|
+
async function disableDaemonServiceAutostartIfConfigured(input) {
|
|
22727
|
+
if (!(input.status?.installed === true && input.status.enabled === true)) return false;
|
|
22728
|
+
await input.manager.disableAutostart();
|
|
22729
|
+
return true;
|
|
22730
|
+
}
|
|
22421
22731
|
const SHELL_QUOTING_PATTERN = /[\s"\\]/g;
|
|
22422
22732
|
const SHELL_BACKSLASH_PATTERN = /\\/g;
|
|
22423
22733
|
const SHELL_DOUBLE_QUOTE_PATTERN = /"/g;
|
|
@@ -27920,6 +28230,7 @@ const plugin = {
|
|
|
27920
28230
|
additionalProperties: false,
|
|
27921
28231
|
properties: {
|
|
27922
28232
|
message: stringSchema,
|
|
28233
|
+
mentionTargets: stringArraySchema,
|
|
27923
28234
|
referenceTargets: stringArraySchema,
|
|
27924
28235
|
wakeTargets: stringArraySchema,
|
|
27925
28236
|
},
|
|
@@ -27929,9 +28240,11 @@ const plugin = {
|
|
|
27929
28240
|
const message = requiredText(params?.message, "Reply message");
|
|
27930
28241
|
const wakeTargets = optionalStringArray(params?.wakeTargets, "wakeTargets");
|
|
27931
28242
|
const referenceTargets = optionalStringArray(params?.referenceTargets, "referenceTargets");
|
|
28243
|
+
const mentionTargets = optionalStringArray(params?.mentionTargets, "mentionTargets");
|
|
27932
28244
|
const args = ["space", "action", "reply", "--message-file", "-"];
|
|
27933
28245
|
for (const target of wakeTargets) args.push("--wake", target);
|
|
27934
28246
|
for (const target of referenceTargets) args.push("--reference", target);
|
|
28247
|
+
for (const target of mentionTargets) args.push("--mention", target);
|
|
27935
28248
|
return await runAction(args, message);
|
|
27936
28249
|
},
|
|
27937
28250
|
});
|
|
@@ -28745,6 +29058,19 @@ function resolveControllerOptions(agentControllerRef) {
|
|
|
28745
29058
|
function isAgentControllerPermissionModeControllerId(value) {
|
|
28746
29059
|
return Object.hasOwn(AGENT_CONTROLLER_PERMISSION_MODE_OPTIONS_BY_CONTROLLER_ID, value);
|
|
28747
29060
|
}
|
|
29061
|
+
const AGENT_CONTROLLER_USAGE_LIMIT_SUPPORT_MATRIX = {
|
|
29062
|
+
"claude-code": "passive",
|
|
29063
|
+
codex: "native",
|
|
29064
|
+
cursor: "unsupported",
|
|
29065
|
+
"grok-build": "native",
|
|
29066
|
+
opencode: "unsupported",
|
|
29067
|
+
openclaw: "not_evaluated"
|
|
29068
|
+
};
|
|
29069
|
+
function resolveAgentControllerUsageLimitSupport(agentControllerRef) {
|
|
29070
|
+
const parsedRef = parseAgentControllerRef(agentControllerRef);
|
|
29071
|
+
if (parsedRef?.kind !== "builtin") return "not_evaluated";
|
|
29072
|
+
return AGENT_CONTROLLER_USAGE_LIMIT_SUPPORT_MATRIX[parsedRef.id] ?? "not_evaluated";
|
|
29073
|
+
}
|
|
28748
29074
|
const DUPLICATE_REPLY_CONVERSATION_REASON = "This agent shares a reply conversation with another Agent Profile.";
|
|
28749
29075
|
function resolveAgentExecutionStatus(input) {
|
|
28750
29076
|
const executionFamily = input.executionFamily ?? "workstation";
|
|
@@ -29077,6 +29403,7 @@ function resolveServicePrimaryAction(input) {
|
|
|
29077
29403
|
function resolveRuntimeRoutePrimaryAction(input) {
|
|
29078
29404
|
if (!(input.localService.reachable || input.route.online)) return "run_prepare";
|
|
29079
29405
|
if (input.providerAccount.blocked) return "fix_provider_account";
|
|
29406
|
+
if (input.runtime.reasonCodes.includes("usage_exhausted")) return "check_status";
|
|
29080
29407
|
if (!input.runtime.ready) return resolveRuntimeNotReadyPrimaryAction({
|
|
29081
29408
|
localService: input.localService,
|
|
29082
29409
|
runtime: input.runtime
|
|
@@ -29117,7 +29444,7 @@ function resolveRuntimeNotReadyPrimaryAction(input) {
|
|
|
29117
29444
|
return "run_prepare";
|
|
29118
29445
|
}
|
|
29119
29446
|
function hasRuntimeAgentControllerReportRefreshReason(reasonCodes) {
|
|
29120
|
-
return reasonCodes.some((reasonCode) => reasonCode === "controller.interface.check_failed" || reasonCode === "runtime.agent_controller_report_stale" || reasonCode === "runtime.agent_controller_report_missing" || reasonCode === "runtime.projection_missing" || reasonCode === "claim_eligibility.agent_controller_report_missing" || reasonCode === "claim_eligibility.agent_controller_report_stale");
|
|
29447
|
+
return reasonCodes.some((reasonCode) => reasonCode === "controller.interface.check_failed" || reasonCode === "usage_checking" || reasonCode === "runtime.agent_controller_report_stale" || reasonCode === "runtime.agent_controller_report_missing" || reasonCode === "runtime.projection_missing" || reasonCode === "claim_eligibility.agent_controller_report_missing" || reasonCode === "claim_eligibility.agent_controller_report_stale");
|
|
29121
29448
|
}
|
|
29122
29449
|
function isAgentExecutionReadyOrConnecting(readiness) {
|
|
29123
29450
|
return readiness.displayState === "ready";
|
|
@@ -33878,13 +34205,20 @@ function createPendingAgentInteractionRegistry() {
|
|
|
33878
34205
|
}
|
|
33879
34206
|
//#endregion
|
|
33880
34207
|
//#region ../../runtime/local-service/src/post-message-envelope.ts
|
|
33881
|
-
const TARGET_VALIDATION_RULES = [
|
|
33882
|
-
|
|
33883
|
-
|
|
33884
|
-
|
|
33885
|
-
|
|
33886
|
-
|
|
33887
|
-
|
|
34208
|
+
const TARGET_VALIDATION_RULES = [
|
|
34209
|
+
{
|
|
34210
|
+
fieldName: "activationTargets",
|
|
34211
|
+
relationName: "wake"
|
|
34212
|
+
},
|
|
34213
|
+
{
|
|
34214
|
+
fieldName: "referenceTargets",
|
|
34215
|
+
relationName: "reference"
|
|
34216
|
+
},
|
|
34217
|
+
{
|
|
34218
|
+
fieldName: "mentionTargets",
|
|
34219
|
+
relationName: "mention"
|
|
34220
|
+
}
|
|
34221
|
+
];
|
|
33888
34222
|
function normalizeDispatchPostMessageAction(input) {
|
|
33889
34223
|
const normalizedEnvelope = normalizeMessageEnvelope(input.action.messageEnvelope);
|
|
33890
34224
|
const replyToSignalId = normalizeReplyToSignalId$1({
|
|
@@ -33908,6 +34242,7 @@ function normalizeDispatchPostMessageAction(input) {
|
|
|
33908
34242
|
activationTargetsCount: canonicalAction.messageEnvelope.activationTargets.length,
|
|
33909
34243
|
inputKind: input.inputKind,
|
|
33910
34244
|
memberDirectoryLoaded: input.sendTargetReference.status === "loaded",
|
|
34245
|
+
mentionTargetsCount: canonicalAction.messageEnvelope.mentionTargets?.length ?? 0,
|
|
33911
34246
|
referenceTargetsCount: canonicalAction.messageEnvelope.referenceTargets.length,
|
|
33912
34247
|
replyToSignalIdResolved: Boolean(canonicalAction.messageEnvelope.replyToSignalId)
|
|
33913
34248
|
}
|
|
@@ -33923,11 +34258,12 @@ function normalizeReplyToSignalId$1(input) {
|
|
|
33923
34258
|
}
|
|
33924
34259
|
function validateDispatchPostMessageTargets(input) {
|
|
33925
34260
|
const { activationTargets, referenceTargets } = input.action.messageEnvelope;
|
|
33926
|
-
|
|
34261
|
+
const mentionTargets = input.action.messageEnvelope.mentionTargets ?? [];
|
|
34262
|
+
if (activationTargets.length === 0 && referenceTargets.length === 0 && mentionTargets.length === 0) return;
|
|
33927
34263
|
if (input.sendTargetReference.status !== "loaded") throw new Error("post_message.messageEnvelope targets require a current Space member directory");
|
|
33928
34264
|
const targetByProfileId = new Map(input.sendTargetReference.projection.map((target) => [target.profileId, target]));
|
|
33929
34265
|
for (const rule of TARGET_VALIDATION_RULES) {
|
|
33930
|
-
const targets = input.action.messageEnvelope[rule.fieldName];
|
|
34266
|
+
const targets = input.action.messageEnvelope[rule.fieldName] ?? [];
|
|
33931
34267
|
for (const [index, targetProfileId] of targets.entries()) validateDispatchTargetProfileId({
|
|
33932
34268
|
fieldName: rule.fieldName,
|
|
33933
34269
|
index,
|
|
@@ -33943,6 +34279,7 @@ function validateDispatchTargetProfileId(input) {
|
|
|
33943
34279
|
if (!target) throw new Error(`${fieldPath} must reference an active profile in this space`);
|
|
33944
34280
|
if (input.relationName === "wake" && !target.allowedRelations.wake) throw new Error(`${fieldPath} must reference an agent profile in this space`);
|
|
33945
34281
|
if (input.relationName === "reference" && !target.allowedRelations.reference) throw new Error(`${fieldPath} must reference an active profile in this space`);
|
|
34282
|
+
if (input.relationName === "mention" && !target.allowedRelations.mention) throw new Error(`${fieldPath} must reference a human profile in this space`);
|
|
33946
34283
|
}
|
|
33947
34284
|
//#endregion
|
|
33948
34285
|
//#region ../../runtime/local-service/src/reply-context.ts
|
|
@@ -34044,12 +34381,13 @@ function isDaemonReconcileInProgressError(error) {
|
|
|
34044
34381
|
//#region ../../runtime/local-service/src/space-action-target-guidance.ts
|
|
34045
34382
|
const SPACE_ACTION_CONTEXT_GUIDANCE_LINES = ["- Keep private work, drafts, tool logs, and unauthorized sensitive context local. Treat this Wake as the current source; tie other context to the claims it supports, and reply in its current thread unless explicitly redirected.", "- A plain reply or bare @name does not hand off work; use Wake or Reply + Wake. Never wake another Agent Profile just to thank, acknowledge, or confirm receipt; wake only when new work moves the goal forward."];
|
|
34046
34383
|
const SPACE_ACTION_TARGET_GUIDANCE_LINES = [
|
|
34047
|
-
"Use OpenMeld Space Action target fields such as wakeTargets and
|
|
34384
|
+
"Use OpenMeld Space Action target fields such as wakeTargets, referenceTargets, and mentionTargets. With the CLI fallback, use --wake, --reference, and --mention.",
|
|
34048
34385
|
"Any @name text in the body is only prose in the agent path; it does not define OpenMeld targets.",
|
|
34049
34386
|
"activationTargets is only for waking another Agent Profile in this Space.",
|
|
34050
34387
|
"activationTargets must reference an active Agent Profile member in this Space.",
|
|
34051
34388
|
"Never put a Human Profile ID, sender ID, or reply recipient in activationTargets.",
|
|
34052
|
-
"
|
|
34389
|
+
"referenceTargets must reference active Agent Profile members; mentionTargets must reference active Human Profile members.",
|
|
34390
|
+
"For a normal reply to the current Wake, leave activationTargets, referenceTargets, and mentionTargets empty."
|
|
34053
34391
|
];
|
|
34054
34392
|
//#endregion
|
|
34055
34393
|
//#region ../../runtime/local-service/src/startup-command-capability.ts
|
|
@@ -34220,12 +34558,16 @@ const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
|
|
|
34220
34558
|
permissionModes: true,
|
|
34221
34559
|
structuredUserInput: false
|
|
34222
34560
|
},
|
|
34561
|
+
conversationOccupancy: {
|
|
34562
|
+
contractVersion: 1,
|
|
34563
|
+
mode: "unsupported"
|
|
34564
|
+
},
|
|
34223
34565
|
installResolver: {
|
|
34224
34566
|
resolveInstalledLaunchCandidates: resolveInstalledClaudeCodeLaunchCandidates,
|
|
34225
34567
|
verifyLaunchContract: verifyClaudeCodeLaunchContract
|
|
34226
34568
|
},
|
|
34227
34569
|
nativeInterface: "claude-agent-sdk",
|
|
34228
|
-
usageLimitSupport: "
|
|
34570
|
+
usageLimitSupport: resolveAgentControllerUsageLimitSupport("builtin:claude-code"),
|
|
34229
34571
|
versionMaintenance: {
|
|
34230
34572
|
homebrewPackage: {
|
|
34231
34573
|
kind: "cask",
|
|
@@ -34251,12 +34593,16 @@ const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
|
|
|
34251
34593
|
permissionModes: true,
|
|
34252
34594
|
structuredUserInput: false
|
|
34253
34595
|
},
|
|
34596
|
+
conversationOccupancy: {
|
|
34597
|
+
contractVersion: 1,
|
|
34598
|
+
mode: "official_atomic_admission_and_release_signal"
|
|
34599
|
+
},
|
|
34254
34600
|
installResolver: {
|
|
34255
34601
|
resolveInstalledLaunchCandidates: resolveInstalledCodexLaunchCandidates,
|
|
34256
34602
|
verifyLaunchContract: verifyCodexLaunchContract
|
|
34257
34603
|
},
|
|
34258
34604
|
nativeInterface: "codex-app-server",
|
|
34259
|
-
usageLimitSupport: "
|
|
34605
|
+
usageLimitSupport: resolveAgentControllerUsageLimitSupport("builtin:codex"),
|
|
34260
34606
|
versionMaintenance: {
|
|
34261
34607
|
homebrewPackage: {
|
|
34262
34608
|
kind: "cask",
|
|
@@ -34270,12 +34616,16 @@ const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
|
|
|
34270
34616
|
adapterId: "openclaw",
|
|
34271
34617
|
agentId: "openclaw",
|
|
34272
34618
|
capabilities: EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES,
|
|
34619
|
+
conversationOccupancy: {
|
|
34620
|
+
contractVersion: 1,
|
|
34621
|
+
mode: "unsupported"
|
|
34622
|
+
},
|
|
34273
34623
|
installResolver: {
|
|
34274
34624
|
resolveInstalledLaunchCandidates: resolveInstalledOpenClawLaunchCandidates,
|
|
34275
34625
|
verifyLaunchContract: verifyOpenClawLaunchContract
|
|
34276
34626
|
},
|
|
34277
34627
|
nativeInterface: "local-cli",
|
|
34278
|
-
usageLimitSupport: "
|
|
34628
|
+
usageLimitSupport: resolveAgentControllerUsageLimitSupport("builtin:openclaw")
|
|
34279
34629
|
},
|
|
34280
34630
|
{
|
|
34281
34631
|
adapterId: "cursor",
|
|
@@ -34289,13 +34639,17 @@ const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
|
|
|
34289
34639
|
permissionModes: true,
|
|
34290
34640
|
structuredUserInput: false
|
|
34291
34641
|
},
|
|
34642
|
+
conversationOccupancy: {
|
|
34643
|
+
contractVersion: 1,
|
|
34644
|
+
mode: "unsupported"
|
|
34645
|
+
},
|
|
34292
34646
|
installResolver: {
|
|
34293
34647
|
refreshPersistedLaunchContract: refreshCursorPersistedLaunchContract,
|
|
34294
34648
|
resolveInstalledLaunchCandidates: resolveInstalledCursorLaunchCandidates,
|
|
34295
34649
|
verifyLaunchContract: verifyCursorLaunchContract
|
|
34296
34650
|
},
|
|
34297
34651
|
nativeInterface: "acp",
|
|
34298
|
-
usageLimitSupport: "
|
|
34652
|
+
usageLimitSupport: resolveAgentControllerUsageLimitSupport("builtin:cursor"),
|
|
34299
34653
|
versionMaintenance: {
|
|
34300
34654
|
homebrewPackage: {
|
|
34301
34655
|
kind: "cask",
|
|
@@ -34320,12 +34674,16 @@ const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
|
|
|
34320
34674
|
permissionModes: true,
|
|
34321
34675
|
structuredUserInput: true
|
|
34322
34676
|
},
|
|
34677
|
+
conversationOccupancy: {
|
|
34678
|
+
contractVersion: 1,
|
|
34679
|
+
mode: "unsupported"
|
|
34680
|
+
},
|
|
34323
34681
|
installResolver: {
|
|
34324
34682
|
resolveInstalledLaunchCandidates: resolveInstalledGrokBuildLaunchCandidates,
|
|
34325
34683
|
verifyLaunchContract: verifyGrokBuildLaunchContract
|
|
34326
34684
|
},
|
|
34327
34685
|
nativeInterface: "acp",
|
|
34328
|
-
usageLimitSupport: "
|
|
34686
|
+
usageLimitSupport: resolveAgentControllerUsageLimitSupport("builtin:grok-build"),
|
|
34329
34687
|
versionMaintenance: { officialChannels: [{
|
|
34330
34688
|
latest: {
|
|
34331
34689
|
kind: "http-text",
|
|
@@ -34347,12 +34705,16 @@ const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
|
|
|
34347
34705
|
permissionModes: false,
|
|
34348
34706
|
structuredUserInput: false
|
|
34349
34707
|
},
|
|
34708
|
+
conversationOccupancy: {
|
|
34709
|
+
contractVersion: 1,
|
|
34710
|
+
mode: "unsupported"
|
|
34711
|
+
},
|
|
34350
34712
|
installResolver: {
|
|
34351
34713
|
resolveInstalledLaunchCandidates: resolveInstalledOpenCodeLaunchCandidates,
|
|
34352
34714
|
verifyLaunchContract: verifyOpenCodeLaunchContract
|
|
34353
34715
|
},
|
|
34354
34716
|
nativeInterface: "local-cli",
|
|
34355
|
-
usageLimitSupport: "
|
|
34717
|
+
usageLimitSupport: resolveAgentControllerUsageLimitSupport("builtin:opencode"),
|
|
34356
34718
|
versionMaintenance: {
|
|
34357
34719
|
homebrewPackage: {
|
|
34358
34720
|
kind: "formula",
|
|
@@ -38974,9 +39336,9 @@ function createModelCatalogReadSession(input) {
|
|
|
38974
39336
|
async function readModelCatalogOnce(baseUrl) {
|
|
38975
39337
|
try {
|
|
38976
39338
|
const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
|
|
38977
|
-
import("./dist-
|
|
38978
|
-
import("./base-url-
|
|
38979
|
-
import("./api-client-foundation
|
|
39339
|
+
import("./dist-NJH-sDDB.js").then((n) => n.w),
|
|
39340
|
+
import("./base-url-CY_j4bLH.js").then((n) => n.n),
|
|
39341
|
+
import("./api-client-foundation-BPmXnsr9.js").then((n) => n.t)
|
|
38980
39342
|
]);
|
|
38981
39343
|
if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
|
|
38982
39344
|
const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
|
|
@@ -45035,8 +45397,10 @@ async function stopLifecycleRuntime(input) {
|
|
|
45035
45397
|
if (!(await forceKillStalledDaemonAfterStopTimeout({ stage: "stop_or_drain" })).killed) throw new DaemonServiceLifecycleDrainTimeoutError(input.drainWaitMs);
|
|
45036
45398
|
}
|
|
45037
45399
|
async function stopLifecycleSystemServiceRuntime(input) {
|
|
45038
|
-
const restoreAutostartOnDrainFailure =
|
|
45039
|
-
|
|
45400
|
+
const restoreAutostartOnDrainFailure = await disableDaemonServiceAutostartIfConfigured({
|
|
45401
|
+
manager: input.serviceManager,
|
|
45402
|
+
status: input.inventory.serviceManagerStatus
|
|
45403
|
+
});
|
|
45040
45404
|
let drained = false;
|
|
45041
45405
|
try {
|
|
45042
45406
|
drained = hasActiveLifecycleRuntimeEvidence(input.inventory) && !input.forceKillAfterDrainTimeout && await requestControlledSystemServiceDrain({
|
|
@@ -48635,7 +48999,7 @@ function createSpaceSendInputRequiredGuideError() {
|
|
|
48635
48999
|
notes: [
|
|
48636
49000
|
"Prefer --stdin/--text-file for multiline or shell-sensitive message text.",
|
|
48637
49001
|
"Use repeatable --file options to share up to 10 Space Files with or without message text.",
|
|
48638
|
-
"Use --plain only when @Name(wake) or @Name(
|
|
49002
|
+
"Use --plain only when @Name(wake), @Name(reference), or @Name(mention) should be sent as literal text."
|
|
48639
49003
|
]
|
|
48640
49004
|
}
|
|
48641
49005
|
});
|
|
@@ -48656,7 +49020,7 @@ function createSpaceSendInputConflictGuideError() {
|
|
|
48656
49020
|
notes: [
|
|
48657
49021
|
"Do not combine positional text with --stdin or --text-file.",
|
|
48658
49022
|
"A --file attachment may be combined with any one message text source.",
|
|
48659
|
-
"Use --plain only when @Name(wake) or @Name(
|
|
49023
|
+
"Use --plain only when @Name(wake), @Name(reference), or @Name(mention) should be sent as literal text."
|
|
48660
49024
|
]
|
|
48661
49025
|
}
|
|
48662
49026
|
});
|
|
@@ -50818,6 +51182,8 @@ function resolveBareMentionCandidateAt(input) {
|
|
|
50818
51182
|
function toBareMentionDiagnostic(input) {
|
|
50819
51183
|
const label = input.candidate.entry.primaryMentionLabel;
|
|
50820
51184
|
const suggestedWakeText = input.candidate.entry.profileKind === "agent" && input.candidate.entry.allowedRelations.wake ? `@${label}(wake)` : null;
|
|
51185
|
+
const suggestedReferenceText = input.candidate.entry.profileKind === "agent" && input.candidate.entry.allowedRelations.reference ? `@${label}(reference)` : null;
|
|
51186
|
+
const suggestedMentionText = input.candidate.entry.profileKind === "human" && input.candidate.entry.allowedRelations.mention ? `@${label}(mention)` : null;
|
|
50821
51187
|
return {
|
|
50822
51188
|
end: input.end,
|
|
50823
51189
|
mentionText: input.mentionText,
|
|
@@ -50825,7 +51191,8 @@ function toBareMentionDiagnostic(input) {
|
|
|
50825
51191
|
profileKind: input.candidate.entry.profileKind,
|
|
50826
51192
|
profileName: input.candidate.entry.profileName,
|
|
50827
51193
|
start: input.start,
|
|
50828
|
-
|
|
51194
|
+
suggestedMentionText,
|
|
51195
|
+
suggestedReferenceText,
|
|
50829
51196
|
suggestedWakeText
|
|
50830
51197
|
};
|
|
50831
51198
|
}
|
|
@@ -50838,19 +51205,19 @@ function isBareMentionBoundary(value) {
|
|
|
50838
51205
|
return BARE_MENTION_BOUNDARY_PATTERN.test(value);
|
|
50839
51206
|
}
|
|
50840
51207
|
function isCanonicalMentionRelationSuffix(value) {
|
|
50841
|
-
return value.startsWith("(wake)") || value.startsWith("(reference)") || value.startsWith("(cc)");
|
|
51208
|
+
return value.startsWith("(wake)") || value.startsWith("(reference)") || value.startsWith("(mention)") || value.startsWith("(cc)");
|
|
50842
51209
|
}
|
|
50843
51210
|
function normalizeLabel(value) {
|
|
50844
51211
|
const normalized = String(value ?? "").replaceAll(WHITESPACE_PATTERN, " ").trim();
|
|
50845
51212
|
return normalized.length > 0 ? normalized : null;
|
|
50846
51213
|
}
|
|
50847
51214
|
const CANONICAL_MENTION_TYPES = new Set(MESSAGE_MENTION_TYPE_VALUES);
|
|
50848
|
-
const DUPLICATE_TARGET_ISSUE_PATTERN = /^(activationTargets|referenceTargets) must not contain duplicate profileId$/u;
|
|
50849
|
-
const DISTINCT_TARGET_ISSUE_PATTERN = /^(activationTargets|referenceTargets) must not reuse profileId from (activationTargets|referenceTargets)$/u;
|
|
51215
|
+
const DUPLICATE_TARGET_ISSUE_PATTERN = /^(activationTargets|referenceTargets|mentionTargets) must not contain duplicate profileId$/u;
|
|
51216
|
+
const DISTINCT_TARGET_ISSUE_PATTERN = /^(activationTargets|referenceTargets|mentionTargets) must not reuse profileId from (activationTargets|referenceTargets|mentionTargets)$/u;
|
|
50850
51217
|
const REMOVED_CC_RELATION_SUFFIX_PATTERN = /\(cc\)$/u;
|
|
50851
51218
|
const INVALID_MENTION_GUIDANCE = "That mention is not valid. Type @ and choose a member from the list.";
|
|
50852
51219
|
const MISSING_MENTION_TARGET_GUIDANCE = "That mention does not match a current member. Type @ and choose a member from the list.";
|
|
50853
|
-
const INVALID_MENTION_ACTION_GUIDANCE = "Mention action must be Wake or
|
|
51220
|
+
const INVALID_MENTION_ACTION_GUIDANCE = "Mention action must be Wake, Reference, or Mention. Type @ and choose from the list.";
|
|
50854
51221
|
function formatRemovedCcRelationMessage(replacement) {
|
|
50855
51222
|
return `CC has been removed from Space Message Addressing. Use ${replacement} instead.`;
|
|
50856
51223
|
}
|
|
@@ -50881,6 +51248,7 @@ function prepareSpaceComposerSubmission(input) {
|
|
|
50881
51248
|
messageEnvelope: createMessageEnvelopeOrNull({
|
|
50882
51249
|
activationTargets: [],
|
|
50883
51250
|
referenceTargets: [],
|
|
51251
|
+
mentionTargets: [],
|
|
50884
51252
|
...replyToSignalId ? { replyToSignalId } : {},
|
|
50885
51253
|
text: normalizedText
|
|
50886
51254
|
}),
|
|
@@ -51029,6 +51397,7 @@ function createEnvelopeInput(text, replyToSignalId) {
|
|
|
51029
51397
|
return {
|
|
51030
51398
|
activationTargets: [],
|
|
51031
51399
|
referenceTargets: [],
|
|
51400
|
+
mentionTargets: [],
|
|
51032
51401
|
...replyToSignalId ? { replyToSignalId } : {},
|
|
51033
51402
|
text
|
|
51034
51403
|
};
|
|
@@ -51079,6 +51448,7 @@ function normalizePlainTextOrThrow(text) {
|
|
|
51079
51448
|
return normalizeEnvelopeOrThrow({
|
|
51080
51449
|
activationTargets: [],
|
|
51081
51450
|
referenceTargets: [],
|
|
51451
|
+
mentionTargets: [],
|
|
51082
51452
|
text
|
|
51083
51453
|
}).text;
|
|
51084
51454
|
}
|
|
@@ -51087,7 +51457,7 @@ function normalizeOptionalText$6$1(value) {
|
|
|
51087
51457
|
return normalized.length > 0 ? normalized : null;
|
|
51088
51458
|
}
|
|
51089
51459
|
function createMessageEnvelopeOrNull(input) {
|
|
51090
|
-
if (!(input.activationTargets.length > 0 || input.referenceTargets.length > 0 || input.replyToSignalId)) return null;
|
|
51460
|
+
if (!(input.activationTargets.length > 0 || input.referenceTargets.length > 0 || input.mentionTargets.length > 0 || input.replyToSignalId)) return null;
|
|
51091
51461
|
return normalizeEnvelopeOrThrow(input);
|
|
51092
51462
|
}
|
|
51093
51463
|
function buildInvalidCanonicalMentionSyntaxMessage(mentionText) {
|
|
@@ -51108,7 +51478,7 @@ function buildInvalidCanonicalMentionRelationMessage(input) {
|
|
|
51108
51478
|
}
|
|
51109
51479
|
function describeRelationSupport(relation) {
|
|
51110
51480
|
if (relation === "wake") return "agent targets";
|
|
51111
|
-
return "
|
|
51481
|
+
return relation === "reference" ? "agent targets" : "human targets";
|
|
51112
51482
|
}
|
|
51113
51483
|
function formatCanonicalMentionEnvelopeError(error) {
|
|
51114
51484
|
const issues = extractEnvelopeIssueMessages(error);
|
|
@@ -51118,7 +51488,7 @@ function formatCanonicalMentionEnvelopeError(error) {
|
|
|
51118
51488
|
const distinctMatch = issueMessage.match(DISTINCT_TARGET_ISSUE_PATTERN);
|
|
51119
51489
|
if (distinctMatch?.[1] && distinctMatch[2]) return `same target cannot appear in both ${toRelationName(distinctMatch[2])} and ${toRelationName(distinctMatch[1])}`;
|
|
51120
51490
|
}
|
|
51121
|
-
return (issues[0] ?? (error instanceof Error ? error.message.trim() : "Invalid message envelope.")).replaceAll("activationTargets", "wake").replaceAll("referenceTargets", "reference").replaceAll("profileId", "target");
|
|
51491
|
+
return (issues[0] ?? (error instanceof Error ? error.message.trim() : "Invalid message envelope.")).replaceAll("activationTargets", "wake").replaceAll("referenceTargets", "reference").replaceAll("mentionTargets", "mention").replaceAll("profileId", "target");
|
|
51122
51492
|
}
|
|
51123
51493
|
function resolveCanonicalMentionEnvelopeErrorCode(error) {
|
|
51124
51494
|
const issues = extractEnvelopeIssueMessages(error);
|
|
@@ -51247,7 +51617,11 @@ function listRecentMentionProfileIdsFromText(input) {
|
|
|
51247
51617
|
}
|
|
51248
51618
|
return recentProfileIds;
|
|
51249
51619
|
}
|
|
51250
|
-
const CANONICAL_MENTION_RELATIONS = [
|
|
51620
|
+
const CANONICAL_MENTION_RELATIONS = [
|
|
51621
|
+
"wake",
|
|
51622
|
+
"reference",
|
|
51623
|
+
"mention"
|
|
51624
|
+
];
|
|
51251
51625
|
function buildMentionRelationKey(mentionLabel, relation) {
|
|
51252
51626
|
return `${relation}:${mentionLabel}`;
|
|
51253
51627
|
}
|
|
@@ -51266,14 +51640,20 @@ function normalizeReasonText(value) {
|
|
|
51266
51640
|
const MAX_RECENT_MENTION_PROFILE_IDS = 20;
|
|
51267
51641
|
const MENTION_PREFIX_PATTERN = /^@+/;
|
|
51268
51642
|
const MULTI_SPACE_PATTERN$1 = /\s+/g;
|
|
51269
|
-
const MENTION_RELATION_ORDER = [
|
|
51643
|
+
const MENTION_RELATION_ORDER = [
|
|
51644
|
+
"wake",
|
|
51645
|
+
"reference",
|
|
51646
|
+
"mention"
|
|
51647
|
+
];
|
|
51270
51648
|
const RELATION_LABELS = {
|
|
51271
51649
|
wake: "Wake",
|
|
51272
|
-
reference: "Reference"
|
|
51650
|
+
reference: "Reference",
|
|
51651
|
+
mention: "Mention"
|
|
51273
51652
|
};
|
|
51274
51653
|
const RELATION_DESCRIPTIONS = {
|
|
51275
51654
|
wake: "Ask this agent to reply.",
|
|
51276
|
-
reference: "Add context without asking for a reply."
|
|
51655
|
+
reference: "Add context without asking for a reply.",
|
|
51656
|
+
mention: "Notify this person about the message."
|
|
51277
51657
|
};
|
|
51278
51658
|
function listSpaceMentionSuggestions(input) {
|
|
51279
51659
|
const snapshot = input.snapshot;
|
|
@@ -51743,6 +52123,7 @@ function buildSignalMessageReadProjection(input) {
|
|
|
51743
52123
|
threadRef: input.threadRef ?? null,
|
|
51744
52124
|
wakeTargets: resolveTargetRefs(envelope?.activationTargets, memberIdentityIndex),
|
|
51745
52125
|
referenceTargets: resolveTargetRefs(envelope?.referenceTargets, memberIdentityIndex),
|
|
52126
|
+
mentionTargets: resolveTargetRefs(envelope?.mentionTargets, memberIdentityIndex),
|
|
51746
52127
|
replyToSignalId,
|
|
51747
52128
|
replyToContext: resolveReplyToContext({
|
|
51748
52129
|
replyToSignalId,
|
|
@@ -51762,6 +52143,7 @@ function buildDispatchResultMessageReadProjection(input) {
|
|
|
51762
52143
|
threadRef: input.result.threadContext ?? null,
|
|
51763
52144
|
wakeTargets: resolveTargetRefs(envelope?.activationTargets, memberIdentityIndex),
|
|
51764
52145
|
referenceTargets: resolveTargetRefs(envelope?.referenceTargets, memberIdentityIndex),
|
|
52146
|
+
mentionTargets: resolveTargetRefs(envelope?.mentionTargets, memberIdentityIndex),
|
|
51765
52147
|
replyToSignalId,
|
|
51766
52148
|
replyToContext: resolveReplyToContext({
|
|
51767
52149
|
replyToSignalId,
|
|
@@ -51824,6 +52206,10 @@ function buildSpaceMessageReadRelationSummary(input) {
|
|
|
51824
52206
|
relation: "reference",
|
|
51825
52207
|
targets: input.referenceTargets
|
|
51826
52208
|
});
|
|
52209
|
+
if (input.mentionTargets.length > 0) summary.push({
|
|
52210
|
+
relation: "mention",
|
|
52211
|
+
targets: input.mentionTargets
|
|
52212
|
+
});
|
|
51827
52213
|
return summary;
|
|
51828
52214
|
}
|
|
51829
52215
|
function readSignalMessageEnvelope(signal) {
|
|
@@ -51845,7 +52231,8 @@ function buildSignalRelationSummary(input) {
|
|
|
51845
52231
|
if (!envelope) return null;
|
|
51846
52232
|
const summary = buildSpaceMessageReadRelationSummary({
|
|
51847
52233
|
wakeTargets: resolveTargetRefs(envelope.activationTargets, input.memberIdentityIndex),
|
|
51848
|
-
referenceTargets: resolveTargetRefs(envelope.referenceTargets, input.memberIdentityIndex)
|
|
52234
|
+
referenceTargets: resolveTargetRefs(envelope.referenceTargets, input.memberIdentityIndex),
|
|
52235
|
+
mentionTargets: resolveTargetRefs(envelope.mentionTargets, input.memberIdentityIndex)
|
|
51849
52236
|
});
|
|
51850
52237
|
return summary.length > 0 ? summary : null;
|
|
51851
52238
|
}
|
|
@@ -51937,15 +52324,23 @@ function buildSpaceRoundReadProjection(input) {
|
|
|
51937
52324
|
}
|
|
51938
52325
|
function buildInitialRoundTargets(sourceMessageReadProjection) {
|
|
51939
52326
|
if (!sourceMessageReadProjection) return [];
|
|
51940
|
-
return [
|
|
51941
|
-
|
|
51942
|
-
|
|
51943
|
-
|
|
51944
|
-
|
|
51945
|
-
|
|
51946
|
-
|
|
51947
|
-
|
|
51948
|
-
|
|
52327
|
+
return [
|
|
52328
|
+
...buildRelationTargets({
|
|
52329
|
+
dispatchState: null,
|
|
52330
|
+
relation: "wake",
|
|
52331
|
+
targets: sourceMessageReadProjection.wakeTargets
|
|
52332
|
+
}),
|
|
52333
|
+
...buildRelationTargets({
|
|
52334
|
+
dispatchState: "no_dispatch",
|
|
52335
|
+
relation: "reference",
|
|
52336
|
+
targets: sourceMessageReadProjection.referenceTargets
|
|
52337
|
+
}),
|
|
52338
|
+
...buildRelationTargets({
|
|
52339
|
+
dispatchState: "no_dispatch",
|
|
52340
|
+
relation: "mention",
|
|
52341
|
+
targets: sourceMessageReadProjection.mentionTargets
|
|
52342
|
+
})
|
|
52343
|
+
];
|
|
51949
52344
|
}
|
|
51950
52345
|
function buildRelationTargets(input) {
|
|
51951
52346
|
return input.targets.map((target) => ({
|
|
@@ -55291,6 +55686,7 @@ function projectAgentControllerInterfaceForCloud(snapshot) {
|
|
|
55291
55686
|
skills: [],
|
|
55292
55687
|
status: snapshot.status,
|
|
55293
55688
|
...snapshot.usageLimits ? { usageLimits: snapshot.usageLimits.map((limit) => ({ ...limit })) } : {},
|
|
55689
|
+
usageLimitsSupportMatrixVersion: 1,
|
|
55294
55690
|
version: snapshot.version,
|
|
55295
55691
|
...snapshot.versionAdvisory ? { versionAdvisory: {
|
|
55296
55692
|
checkedAt: snapshot.versionAdvisory.checkedAt,
|
|
@@ -55695,7 +56091,7 @@ async function submitAgentControllerReportsWithCompatibilityRetry(input) {
|
|
|
55695
56091
|
let compatibilityError = error;
|
|
55696
56092
|
if (shouldRetryWithoutUsageLimits({
|
|
55697
56093
|
error,
|
|
55698
|
-
|
|
56094
|
+
submittedReports: input.initialInput.reports
|
|
55699
56095
|
})) {
|
|
55700
56096
|
warnDaemonEvent("[openmeld.runtime_reporting.usage_limits_downgraded]", {
|
|
55701
56097
|
error: toErrorMessage$16(error),
|
|
@@ -55729,8 +56125,8 @@ function omitUsageLimitsFromReports(input) {
|
|
|
55729
56125
|
return {
|
|
55730
56126
|
...input,
|
|
55731
56127
|
reports: input.reports.map((report) => {
|
|
55732
|
-
if (!report.agentControllerInterface?.usageLimits) return report;
|
|
55733
|
-
const { usageLimits: _usageLimits, ...agentControllerInterface } = report.agentControllerInterface;
|
|
56128
|
+
if (!(report.agentControllerInterface?.usageLimits || report.agentControllerInterface?.usageLimitsSupportMatrixVersion)) return report;
|
|
56129
|
+
const { usageLimits: _usageLimits, usageLimitsSupportMatrixVersion: _usageLimitsSupportMatrixVersion, ...agentControllerInterface } = report.agentControllerInterface;
|
|
55734
56130
|
return {
|
|
55735
56131
|
...report,
|
|
55736
56132
|
agentControllerInterface
|
|
@@ -55739,7 +56135,7 @@ function omitUsageLimitsFromReports(input) {
|
|
|
55739
56135
|
};
|
|
55740
56136
|
}
|
|
55741
56137
|
function shouldRetryWithoutUsageLimits(input) {
|
|
55742
|
-
if (!input.
|
|
56138
|
+
if (!input.submittedReports.some((report) => report.agentControllerInterface?.usageLimits || report.agentControllerInterface?.usageLimitsSupportMatrixVersion)) return false;
|
|
55743
56139
|
const failure = toStructuredApiClientFailure(input.error);
|
|
55744
56140
|
if (failure.status !== 400) return false;
|
|
55745
56141
|
return collectCompatibilityDiagnosticText(failure).includes("usagelimits");
|
|
@@ -58332,7 +58728,10 @@ async function ensureCommandAuthenticationOrCancel(input) {
|
|
|
58332
58728
|
const currentState = getCurrentCommandCheckState();
|
|
58333
58729
|
if (isCurrentCommandCheckScopeActive() && currentState.signIn && currentState.signIn.status === "valid" && currentState.signIn.checkedGatewayUrl === normalizeOptionalString$6(input.gatewayUrl)) return true;
|
|
58334
58730
|
const auth = input.evaluated ?? await evaluateCommandAuthentication({ gatewayUrl: input.gatewayUrl });
|
|
58335
|
-
if (auth.status === "valid" && auth.session)
|
|
58731
|
+
if (auth.status === "valid" && auth.session) {
|
|
58732
|
+
input.onAuthenticatedSession?.(auth.session);
|
|
58733
|
+
return true;
|
|
58734
|
+
}
|
|
58336
58735
|
const canPrompt = input.allowPrompt ?? input.runtime.interactive;
|
|
58337
58736
|
const guidance = resolveAuthenticationGuidance({
|
|
58338
58737
|
reason: auth.status === "mismatch" ? "mismatch" : resolveAuthReason(auth),
|
|
@@ -58385,6 +58784,7 @@ async function ensureCommandAuthenticationOrCancel(input) {
|
|
|
58385
58784
|
cancel("Cancelled.");
|
|
58386
58785
|
return false;
|
|
58387
58786
|
}
|
|
58787
|
+
input.onAuthenticatedSession?.(afterLogin.session);
|
|
58388
58788
|
if (isCurrentCommandCheckScopeActive()) currentState.signIn = {
|
|
58389
58789
|
checkedGatewayUrl: normalizeOptionalString$6(input.gatewayUrl),
|
|
58390
58790
|
status: "valid"
|
|
@@ -59193,6 +59593,7 @@ function sendDispatchLifecycleFrame(input) {
|
|
|
59193
59593
|
leaseEpoch: input.leaseEpoch,
|
|
59194
59594
|
phase: input.phase,
|
|
59195
59595
|
lifecycleAtMs: Date.now(),
|
|
59596
|
+
...input.agentControllerConversationOccupancy === void 0 || input.agentControllerConversationOccupancy === null ? {} : { agentControllerConversationOccupancy: input.agentControllerConversationOccupancy },
|
|
59196
59597
|
...input.localQueue === void 0 || input.localQueue === null ? {} : { localQueue: input.localQueue }
|
|
59197
59598
|
});
|
|
59198
59599
|
if (!lifecycleRequest.success) throw new DaemonServiceRunError({
|
|
@@ -59422,7 +59823,7 @@ function buildFailedTaskResultPayload(input) {
|
|
|
59422
59823
|
return payload.data;
|
|
59423
59824
|
}
|
|
59424
59825
|
function sendDaemonFrame$1(inputSocket, input) {
|
|
59425
|
-
inputSocket.send(JSON.stringify(
|
|
59826
|
+
inputSocket.send(JSON.stringify(toCompatibleSpaceAddressingRequestWireValue({
|
|
59426
59827
|
v: 1,
|
|
59427
59828
|
code: input.code,
|
|
59428
59829
|
payload: input.payload
|
|
@@ -68977,11 +69378,14 @@ async function fetchSpaceUpdates(input) {
|
|
|
68977
69378
|
const raw = await readGatewayTextResponse({ response: await fetchSpaceRequestWithTimeout({
|
|
68978
69379
|
url: endpoint.toString(),
|
|
68979
69380
|
operation: "space.updates.read",
|
|
68980
|
-
init: { headers:
|
|
68981
|
-
|
|
68982
|
-
|
|
68983
|
-
|
|
68984
|
-
|
|
69381
|
+
init: { headers: {
|
|
69382
|
+
...await buildOpenMeldRequestContextHeadersWithAuth({
|
|
69383
|
+
requestUrl: endpoint.toString(),
|
|
69384
|
+
requestContext: input.requestContext,
|
|
69385
|
+
spacePassword: input.password
|
|
69386
|
+
}),
|
|
69387
|
+
[OPENMELD_HEADER_SPACE_ADDRESSING_VERSION]: "1"
|
|
69388
|
+
} }
|
|
68985
69389
|
}) });
|
|
68986
69390
|
const parsed = getSpaceUpdatesResponseSchema.safeParse(parseJsonResponse$1(raw));
|
|
68987
69391
|
if (!parsed.success) throw new Error("invalid space updates response");
|
|
@@ -70065,6 +70469,7 @@ function formatAllowedRelations(target) {
|
|
|
70065
70469
|
const relations = [];
|
|
70066
70470
|
if (target.allowedRelations.wake) relations.push("wake");
|
|
70067
70471
|
if (target.allowedRelations.reference) relations.push("reference");
|
|
70472
|
+
if (target.allowedRelations.mention) relations.push("mention");
|
|
70068
70473
|
return relations.join(" | ");
|
|
70069
70474
|
}
|
|
70070
70475
|
function normalizeTargetProfileName(value) {
|
|
@@ -70084,6 +70489,7 @@ const resolveStructuredActionRequirementFailure = resolveStructuredActionRequire
|
|
|
70084
70489
|
const CLI_SPACE_ACTION_RECORD_POLL_INTERVAL_MS = 25;
|
|
70085
70490
|
const CLI_SPACE_ACTION_RECORD_RUNTIME_COMPLETION_GRACE_MS = 1500;
|
|
70086
70491
|
const CLI_SPACE_ACTION_PROVIDER_CONVERSATION_GRACE_MS = 1500;
|
|
70492
|
+
const AGENT_CONTROLLER_OCCUPANCY_KEEPALIVE_REASSERT_INTERVALS = 4;
|
|
70087
70493
|
function enqueueDispatchDeliverFrame(input) {
|
|
70088
70494
|
const currentSocketRef = input.currentSocketRef ?? {
|
|
70089
70495
|
connectionGeneration: normalizePositiveInteger(input.payload.connectionGeneration),
|
|
@@ -70953,6 +71359,43 @@ async function handleDispatchDeliverFrame(input) {
|
|
|
70953
71359
|
};
|
|
70954
71360
|
let agentToolActivitySequence = 0;
|
|
70955
71361
|
let usageObservationAuthPromise = null;
|
|
71362
|
+
const syncAgentControllerConversationOccupancyLifecycle = (event) => {
|
|
71363
|
+
if (event.phase !== "agent_controller_conversation_available" && event.phase !== "agent_controller_conversation_occupied") return;
|
|
71364
|
+
const occupancy = {
|
|
71365
|
+
agentControllerConversationId: event.agentControllerConversationId,
|
|
71366
|
+
contractVersion: event.contractVersion,
|
|
71367
|
+
state: event.phase === "agent_controller_conversation_occupied" ? "occupied" : "available"
|
|
71368
|
+
};
|
|
71369
|
+
stopRunningKeepalive?.();
|
|
71370
|
+
emitDispatchLifecycleTransition({
|
|
71371
|
+
agentControllerConversationOccupancy: occupancy,
|
|
71372
|
+
attemptId: parsedTask.attemptId,
|
|
71373
|
+
connectionGeneration: input.deliverRequest.connectionGeneration,
|
|
71374
|
+
currentSocketRef,
|
|
71375
|
+
daemonSessionId: input.daemonSessionId,
|
|
71376
|
+
dispatchId: parsedTask.dispatchId,
|
|
71377
|
+
leaseEpoch: input.deliverRequest.leaseEpoch,
|
|
71378
|
+
phase: "running",
|
|
71379
|
+
presenter: input.presenter,
|
|
71380
|
+
executionTokenEcho: parsedTask.executionTokenEcho,
|
|
71381
|
+
runtimeCoordinatorExecutionId: parsedTask.runtimeCoordinatorExecutionId,
|
|
71382
|
+
taskId: parsedTask.taskId
|
|
71383
|
+
});
|
|
71384
|
+
stopRunningKeepalive = startDispatchLifecycleKeepalive({
|
|
71385
|
+
agentControllerConversationOccupancy: occupancy,
|
|
71386
|
+
attemptId: parsedTask.attemptId,
|
|
71387
|
+
connectionGeneration: input.deliverRequest.connectionGeneration,
|
|
71388
|
+
currentSocketRef,
|
|
71389
|
+
daemonSessionId: input.daemonSessionId,
|
|
71390
|
+
dispatchId: parsedTask.dispatchId,
|
|
71391
|
+
leaseEpoch: input.deliverRequest.leaseEpoch,
|
|
71392
|
+
phase: "running",
|
|
71393
|
+
presenter: input.presenter,
|
|
71394
|
+
executionTokenEcho: parsedTask.executionTokenEcho,
|
|
71395
|
+
runtimeCoordinatorExecutionId: parsedTask.runtimeCoordinatorExecutionId,
|
|
71396
|
+
taskId: parsedTask.taskId
|
|
71397
|
+
});
|
|
71398
|
+
};
|
|
70956
71399
|
const runtimeExecutionPromise = Promise.resolve(runDispatchRuntimeExecution({
|
|
70957
71400
|
computerFileAccessBoundary,
|
|
70958
71401
|
contextId: contextIdForDispatch,
|
|
@@ -70974,6 +71417,7 @@ async function handleDispatchDeliverFrame(input) {
|
|
|
70974
71417
|
});
|
|
70975
71418
|
},
|
|
70976
71419
|
onRuntimeEvent: (event) => {
|
|
71420
|
+
syncAgentControllerConversationOccupancyLifecycle(event);
|
|
70977
71421
|
if (event.phase === "tool_activity") {
|
|
70978
71422
|
agentToolActivitySequence += 1;
|
|
70979
71423
|
emitDispatchAgentToolActivityFrame({
|
|
@@ -72534,6 +72978,7 @@ function normalizeResolvedPostMessageAction(input) {
|
|
|
72534
72978
|
failureReason,
|
|
72535
72979
|
inputKind: "direct_payload",
|
|
72536
72980
|
memberDirectoryLoaded: input.sendTargetReference.status === "loaded",
|
|
72981
|
+
mentionTargetsCount: action.messageEnvelope.mentionTargets?.length ?? 0,
|
|
72537
72982
|
referenceTargetsCount: action.messageEnvelope.referenceTargets.length,
|
|
72538
72983
|
replyToSignalIdResolved: Boolean(action.messageEnvelope.replyToSignalId),
|
|
72539
72984
|
targetProfileId: input.parsedTask.targetProfileId,
|
|
@@ -73470,6 +73915,7 @@ function toRuntimeTransportDispatchLocalQueueDiagnostics(input) {
|
|
|
73470
73915
|
function emitDispatchLifecycleTransition(input) {
|
|
73471
73916
|
try {
|
|
73472
73917
|
sendCurrentDispatchLifecycleFrame({
|
|
73918
|
+
agentControllerConversationOccupancy: input.agentControllerConversationOccupancy ?? null,
|
|
73473
73919
|
attemptId: input.attemptId,
|
|
73474
73920
|
connectionGeneration: input.connectionGeneration,
|
|
73475
73921
|
currentSocketRef: input.currentSocketRef,
|
|
@@ -73541,9 +73987,19 @@ function emitDispatchLifecycleTransition(input) {
|
|
|
73541
73987
|
});
|
|
73542
73988
|
}
|
|
73543
73989
|
function startDispatchLifecycleKeepalive(input) {
|
|
73990
|
+
let intervalCount = 0;
|
|
73991
|
+
let lastOccupancyConnectionGeneration = null;
|
|
73544
73992
|
const intervalId = setInterval(() => {
|
|
73545
73993
|
try {
|
|
73994
|
+
const currentConnectionGeneration = resolveCurrentConnectionGeneration({
|
|
73995
|
+
currentSocketRef: input.currentSocketRef,
|
|
73996
|
+
fallbackConnectionGeneration: input.connectionGeneration
|
|
73997
|
+
});
|
|
73998
|
+
const shouldReassertOccupancy = Boolean(input.agentControllerConversationOccupancy && (intervalCount % AGENT_CONTROLLER_OCCUPANCY_KEEPALIVE_REASSERT_INTERVALS === 0 || lastOccupancyConnectionGeneration !== currentConnectionGeneration));
|
|
73999
|
+
intervalCount += 1;
|
|
74000
|
+
if (shouldReassertOccupancy) lastOccupancyConnectionGeneration = currentConnectionGeneration;
|
|
73546
74001
|
sendCurrentDispatchLifecycleFrame({
|
|
74002
|
+
agentControllerConversationOccupancy: shouldReassertOccupancy ? input.agentControllerConversationOccupancy ?? null : null,
|
|
73547
74003
|
attemptId: input.attemptId,
|
|
73548
74004
|
connectionGeneration: input.connectionGeneration,
|
|
73549
74005
|
currentSocketRef: input.currentSocketRef,
|
|
@@ -73575,6 +74031,7 @@ function startDispatchLifecycleKeepalive(input) {
|
|
|
73575
74031
|
}
|
|
73576
74032
|
function sendCurrentDispatchLifecycleFrame(input) {
|
|
73577
74033
|
sendDispatchLifecycleFrame({
|
|
74034
|
+
agentControllerConversationOccupancy: input.agentControllerConversationOccupancy ?? null,
|
|
73578
74035
|
attemptId: input.attemptId,
|
|
73579
74036
|
connectionGeneration: resolveCurrentConnectionGeneration({
|
|
73580
74037
|
currentSocketRef: input.currentSocketRef,
|
|
@@ -75971,10 +76428,17 @@ async function resolveDaemonServiceOwnerContext(input) {
|
|
|
75971
76428
|
persistSelection: false
|
|
75972
76429
|
}).catch(() => null);
|
|
75973
76430
|
if (fallbackProfile) return resolveDaemonServiceOwnerContextFromProfile(fallbackProfile, "resolved OpenMeld profile is missing owner user id");
|
|
75974
|
-
if (authState?.state !== "valid" || authSession === null)
|
|
75975
|
-
|
|
75976
|
-
|
|
75977
|
-
|
|
76431
|
+
if (authState?.state !== "valid" || authSession === null) {
|
|
76432
|
+
console.warn("[openmeld.daemon.owner_auth_not_ready]", {
|
|
76433
|
+
error: authState?.errorMessage,
|
|
76434
|
+
reasonCode: authState?.reasonCode ?? "session_state_unavailable",
|
|
76435
|
+
state: authState?.state ?? "unavailable"
|
|
76436
|
+
});
|
|
76437
|
+
throw new DaemonServiceRunError({
|
|
76438
|
+
code: "daemon.run.auth_required",
|
|
76439
|
+
message: "authentication required before starting OpenMeld Service"
|
|
76440
|
+
});
|
|
76441
|
+
}
|
|
75978
76442
|
throw new DaemonServiceRunError({
|
|
75979
76443
|
code: "daemon.run.owner_missing",
|
|
75980
76444
|
message: "authenticated session is missing user id and no OpenMeld profile could be resolved"
|
|
@@ -80119,8 +80583,10 @@ async function stopManagedCurrentLaneDaemonService(input) {
|
|
|
80119
80583
|
async function prepareManagedDaemonServiceForStop(input) {
|
|
80120
80584
|
const serviceManager = input.ownerSnapshot.serviceManager;
|
|
80121
80585
|
if (!serviceManager) return null;
|
|
80122
|
-
const shouldRestoreAutostart =
|
|
80123
|
-
|
|
80586
|
+
const shouldRestoreAutostart = await disableDaemonServiceAutostartIfConfigured({
|
|
80587
|
+
manager: serviceManager,
|
|
80588
|
+
status: input.ownerSnapshot.serviceManagerStatus
|
|
80589
|
+
});
|
|
80124
80590
|
if (input.force === true) return null;
|
|
80125
80591
|
try {
|
|
80126
80592
|
const shutdown = await requestLocalDaemonShutdown({
|
|
@@ -81598,17 +82064,27 @@ async function runDaemonStatusFlow(input) {
|
|
|
81598
82064
|
return "completed";
|
|
81599
82065
|
}
|
|
81600
82066
|
async function resolveDaemonRunAuthReadiness(input) {
|
|
81601
|
-
const authState = await Promise.resolve(getAuthSessionState({ validateRemote: false })).catch(() =>
|
|
82067
|
+
const authState = await Promise.resolve(getAuthSessionState({ validateRemote: false })).catch((error) => {
|
|
82068
|
+
console.warn("[openmeld.service.auth_session_read_failed]", { error: toErrorMessage$43(error) });
|
|
82069
|
+
return null;
|
|
82070
|
+
});
|
|
81602
82071
|
const session = authState?.session ?? null;
|
|
81603
|
-
if (authState?.state !== "valid" || !session)
|
|
81604
|
-
|
|
81605
|
-
|
|
81606
|
-
|
|
81607
|
-
|
|
81608
|
-
|
|
81609
|
-
|
|
81610
|
-
|
|
81611
|
-
|
|
82072
|
+
if (authState?.state !== "valid" || !session) {
|
|
82073
|
+
console.warn("[openmeld.service.auth_session_not_ready]", {
|
|
82074
|
+
error: authState?.errorMessage,
|
|
82075
|
+
reasonCode: authState?.reasonCode ?? "session_state_unavailable",
|
|
82076
|
+
state: authState?.state ?? "unavailable"
|
|
82077
|
+
});
|
|
82078
|
+
return {
|
|
82079
|
+
ready: false,
|
|
82080
|
+
reason: "authentication_required",
|
|
82081
|
+
guidance: resolveAuthenticationGuidance({
|
|
82082
|
+
reason: "required",
|
|
82083
|
+
action: "starting OpenMeld Service"
|
|
82084
|
+
}),
|
|
82085
|
+
nextSteps: [formatInlineOpenMeldCliCommands("Run `openmeld login` in an interactive terminal."), formatInlineOpenMeldCliCommands("After sign-in succeeds, run `openmeld service start` again.")]
|
|
82086
|
+
};
|
|
82087
|
+
}
|
|
81612
82088
|
const resolvedGatewayUrl = await resolveBaseUrlOrNull(input.gatewayUrl);
|
|
81613
82089
|
if (resolvedGatewayUrl && !canAttachAuthTokenToRequest(session, resolvedGatewayUrl)) {
|
|
81614
82090
|
const authBaseUrl = String(session.authBaseUrl ?? "").trim();
|
|
@@ -83967,14 +84443,10 @@ function buildSpaceWebUrl(baseUrl, organizationSlug, spaceId, options) {
|
|
|
83967
84443
|
}
|
|
83968
84444
|
function resolveGatewayWebOrigin(baseUrl) {
|
|
83969
84445
|
const url = new URL(baseUrl);
|
|
83970
|
-
if (isLoopbackHostname
|
|
83971
|
-
|
|
83972
|
-
|
|
83973
|
-
url.
|
|
83974
|
-
url.protocol = "https:";
|
|
83975
|
-
}
|
|
83976
|
-
if (url.hostname === "gateway.openmeld.invalid") {
|
|
83977
|
-
url.hostname = "openmeld.invalid";
|
|
84446
|
+
if (isLoopbackHostname(url.hostname) && url.port === LOCAL_GATEWAY_PORT) url.port = LOCAL_WEB_PORT;
|
|
84447
|
+
const pair = OPENMELD_ORIGIN_HOST_PAIRS.find(({ gateway }) => gateway === url.hostname);
|
|
84448
|
+
if (pair) {
|
|
84449
|
+
url.hostname = pair.web;
|
|
83978
84450
|
url.port = "";
|
|
83979
84451
|
url.protocol = "https:";
|
|
83980
84452
|
}
|
|
@@ -83983,8 +84455,18 @@ function resolveGatewayWebOrigin(baseUrl) {
|
|
|
83983
84455
|
url.hash = "";
|
|
83984
84456
|
return url.origin;
|
|
83985
84457
|
}
|
|
83986
|
-
function
|
|
83987
|
-
|
|
84458
|
+
function resolveSpaceWebGatewayOrigin(spaceUrl) {
|
|
84459
|
+
const url = new URL(spaceUrl.toString());
|
|
84460
|
+
const pair = OPENMELD_ORIGIN_HOST_PAIRS.find(({ web }) => web === url.hostname);
|
|
84461
|
+
if (pair) {
|
|
84462
|
+
if (url.protocol !== "https:" || url.port.length > 0) throw new Error(TRUSTED_SPACE_WEB_ORIGIN_ERROR);
|
|
84463
|
+
url.hostname = pair.gateway;
|
|
84464
|
+
} else if (isLoopbackHostname(url.hostname) && (url.protocol === "http:" || url.protocol === "https:") && url.port === LOCAL_WEB_PORT) url.port = LOCAL_GATEWAY_PORT;
|
|
84465
|
+
else throw new Error(TRUSTED_SPACE_WEB_ORIGIN_ERROR);
|
|
84466
|
+
url.pathname = "";
|
|
84467
|
+
url.search = "";
|
|
84468
|
+
url.hash = "";
|
|
84469
|
+
return url.origin;
|
|
83988
84470
|
}
|
|
83989
84471
|
function normalizeOptionalText$6(value) {
|
|
83990
84472
|
const normalized = String(value ?? "").trim();
|
|
@@ -83995,6 +84477,23 @@ function requireOrganizationSlug(value) {
|
|
|
83995
84477
|
if (!normalized) throw new Error("Active organization slug is required to build a Space URL.");
|
|
83996
84478
|
return normalized;
|
|
83997
84479
|
}
|
|
84480
|
+
const OPENMELD_ORIGIN_HOST_PAIRS = [
|
|
84481
|
+
{
|
|
84482
|
+
gateway: "gateway.openmeld.ai",
|
|
84483
|
+
web: "openmeld.ai"
|
|
84484
|
+
},
|
|
84485
|
+
{
|
|
84486
|
+
gateway: "gateway.staging.openmeld.ai",
|
|
84487
|
+
web: "staging.openmeld.ai"
|
|
84488
|
+
},
|
|
84489
|
+
{
|
|
84490
|
+
gateway: "gateway.openmeld.invalid",
|
|
84491
|
+
web: "openmeld.invalid"
|
|
84492
|
+
}
|
|
84493
|
+
];
|
|
84494
|
+
const LOCAL_GATEWAY_PORT = "8080";
|
|
84495
|
+
const LOCAL_WEB_PORT = "3000";
|
|
84496
|
+
const TRUSTED_SPACE_WEB_ORIGIN_ERROR = "Space URL must use a trusted OpenMeld Web origin. For a custom local environment, pass --gateway-url explicitly.";
|
|
83998
84497
|
//#endregion
|
|
83999
84498
|
//#region src/ui/brand.ts
|
|
84000
84499
|
const ANSI_RESET = "\x1B[0m";
|
|
@@ -88629,60 +89128,11 @@ function buildAgentPreparationPromptMessage(profiles) {
|
|
|
88629
89128
|
return `${String(profiles.length)} local agent profiles still need setup on this device before they can wake or reply in the background. Set them up now?`;
|
|
88630
89129
|
}
|
|
88631
89130
|
//#endregion
|
|
88632
|
-
//#region src/ui/
|
|
88633
|
-
const
|
|
88634
|
-
function
|
|
88635
|
-
switch (input.accessMode) {
|
|
88636
|
-
case "public": return "anyone_can_join";
|
|
88637
|
-
case "public_view_join_password": return "anyone_can_view";
|
|
88638
|
-
case "members_only":
|
|
88639
|
-
case "protected": return null;
|
|
88640
|
-
default: return input.passwordProtected === false ? "anyone_can_join" : null;
|
|
88641
|
-
}
|
|
88642
|
-
}
|
|
88643
|
-
function buildPublicSpaceWarningLines(exposure) {
|
|
88644
|
-
return [exposure === "anyone_can_join" ? "Anyone with this Space link can read what is shared here and join." : "Anyone with this Space link can read what is shared here. A password is required to join.", "Only bring an agent if you're comfortable sharing anything it posts with people who have the link."];
|
|
88645
|
-
}
|
|
88646
|
-
function buildPublicSpaceJoinConfirmPromptConfig(input) {
|
|
88647
|
-
return {
|
|
88648
|
-
active: "Yes, join this Space",
|
|
88649
|
-
inactive: "No, go back",
|
|
88650
|
-
message: buildPublicSpacePromptMessage("Do you want to join this Space?", input.exposure),
|
|
88651
|
-
vertical: true
|
|
88652
|
-
};
|
|
88653
|
-
}
|
|
88654
|
-
function buildPublicSpaceBringAgentsConfirmPromptConfig(input) {
|
|
88655
|
-
const singular = input.agentCount === 1;
|
|
88656
|
-
return {
|
|
88657
|
-
active: singular ? "Yes, bring this agent" : "Yes, bring these agents",
|
|
88658
|
-
inactive: singular ? "No, join without this agent" : "No, join without these agents",
|
|
88659
|
-
message: buildPublicSpacePromptMessage(singular ? "Bring this agent into a Space that anyone with the link can read?" : "Bring these agents into a Space that anyone with the link can read?", input.exposure),
|
|
88660
|
-
vertical: true
|
|
88661
|
-
};
|
|
88662
|
-
}
|
|
88663
|
-
function buildPublicSpacePasswordPromptConfig(input) {
|
|
88664
|
-
return {
|
|
88665
|
-
message: buildPublicSpacePromptCardMessage({
|
|
88666
|
-
lines: [
|
|
88667
|
-
"Without a password, anyone with this Space link can read what is shared here and join.",
|
|
88668
|
-
"With a password, only people who have it can open and join the Space.",
|
|
88669
|
-
`Passwords must be at least ${input.minimumLength} characters.`
|
|
88670
|
-
],
|
|
88671
|
-
question: "Require a password to open and join?"
|
|
88672
|
-
}),
|
|
88673
|
-
setPasswordLabel: "Yes, require a password to open and join",
|
|
88674
|
-
skipPasswordLabel: "No, anyone with the link can join"
|
|
88675
|
-
};
|
|
88676
|
-
}
|
|
88677
|
-
function buildPublicSpacePromptMessage(question, exposure) {
|
|
88678
|
-
return buildPublicSpacePromptCardMessage({
|
|
88679
|
-
lines: buildPublicSpaceWarningLines(exposure),
|
|
88680
|
-
question
|
|
88681
|
-
});
|
|
88682
|
-
}
|
|
88683
|
-
function buildPublicSpacePromptCardMessage(input) {
|
|
89131
|
+
//#region src/ui/space-access-prompt-card.ts
|
|
89132
|
+
const SPACE_ACCESS_WARNING_TITLE = "⚠️ Check Before You Continue";
|
|
89133
|
+
function buildSpaceAccessPromptCardMessage(input) {
|
|
88684
89134
|
const frame = buildUnifiedCardFrame({
|
|
88685
|
-
title:
|
|
89135
|
+
title: SPACE_ACCESS_WARNING_TITLE,
|
|
88686
89136
|
rowTextList: input.lines,
|
|
88687
89137
|
minContentWidth: 76
|
|
88688
89138
|
});
|
|
@@ -88696,6 +89146,25 @@ function buildPublicSpacePromptCardMessage(input) {
|
|
|
88696
89146
|
].join("\n");
|
|
88697
89147
|
}
|
|
88698
89148
|
//#endregion
|
|
89149
|
+
//#region src/ui/space-create-password-prompt.ts
|
|
89150
|
+
function buildSpaceCreatePasswordPromptConfig(input) {
|
|
89151
|
+
return {
|
|
89152
|
+
message: buildSpaceAccessPromptCardMessage({
|
|
89153
|
+
lines: [
|
|
89154
|
+
resolveSpaceCreatePasswordlessAccessText(input.accessMode),
|
|
89155
|
+
"With a password, only people who have it can open and join the Space.",
|
|
89156
|
+
`Passwords must be at least ${input.minimumLength} characters.`
|
|
89157
|
+
],
|
|
89158
|
+
question: "Require a password to open and join?"
|
|
89159
|
+
}),
|
|
89160
|
+
setPasswordLabel: "Yes, require a password to open and join",
|
|
89161
|
+
skipPasswordLabel: input.accessMode === "public" ? "No, anyone with the link can join" : "No, keep access members-only"
|
|
89162
|
+
};
|
|
89163
|
+
}
|
|
89164
|
+
function resolveSpaceCreatePasswordlessAccessText(accessMode) {
|
|
89165
|
+
return accessMode === "public" ? "Without a password, anyone with this Space link can read what is shared here and join." : "Without a password, only current members can open this Space. New participants must be added explicitly.";
|
|
89166
|
+
}
|
|
89167
|
+
//#endregion
|
|
88699
89168
|
//#region src/space/command-context.ts
|
|
88700
89169
|
const SPACE_ID_HEX_REGEX$1 = /^[0-9a-f]{64}$/i;
|
|
88701
89170
|
const SIGNAL_ID_UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -90896,7 +91365,8 @@ function parseSpaceCursorResponse(input) {
|
|
|
90896
91365
|
function makeHello(profile) {
|
|
90897
91366
|
return {
|
|
90898
91367
|
type: "hello",
|
|
90899
|
-
profile
|
|
91368
|
+
profile,
|
|
91369
|
+
capabilities: { spaceMessageAddressing: true }
|
|
90900
91370
|
};
|
|
90901
91371
|
}
|
|
90902
91372
|
function makeTextSignal(text, options) {
|
|
@@ -91122,7 +91592,8 @@ function buildHumanMessageRelationLines(projection) {
|
|
|
91122
91592
|
if (!projection) return [];
|
|
91123
91593
|
return buildSpaceMessageReadRelationSummary({
|
|
91124
91594
|
wakeTargets: projection.wakeTargets,
|
|
91125
|
-
referenceTargets: projection.referenceTargets
|
|
91595
|
+
referenceTargets: projection.referenceTargets,
|
|
91596
|
+
mentionTargets: projection.mentionTargets
|
|
91126
91597
|
}).map(formatHumanRelationSummaryLine);
|
|
91127
91598
|
}
|
|
91128
91599
|
function buildHumanReplyContextLine(replyContext) {
|
|
@@ -91196,6 +91667,43 @@ function renderPositiveAccentText(text) {
|
|
|
91196
91667
|
return `\u001B[38;2;${String(POSITIVE_ACCENT_RGB.r)};${String(POSITIVE_ACCENT_RGB.g)};${String(POSITIVE_ACCENT_RGB.b)}m${text}\u001B[39m`;
|
|
91197
91668
|
}
|
|
91198
91669
|
//#endregion
|
|
91670
|
+
//#region src/ui/public-space-warning.ts
|
|
91671
|
+
function resolvePublicSpaceExposure(input) {
|
|
91672
|
+
switch (input.accessMode) {
|
|
91673
|
+
case "public": return "anyone_can_join";
|
|
91674
|
+
case "public_view_join_password": return "anyone_can_view";
|
|
91675
|
+
case "members_only":
|
|
91676
|
+
case "protected": return null;
|
|
91677
|
+
default: return input.passwordProtected === false ? "anyone_can_join" : null;
|
|
91678
|
+
}
|
|
91679
|
+
}
|
|
91680
|
+
function buildPublicSpaceWarningLines(exposure) {
|
|
91681
|
+
return [exposure === "anyone_can_join" ? "Anyone with this Space link can read what is shared here and join." : "Anyone with this Space link can read what is shared here. A password is required to join.", "Only bring an agent if you're comfortable sharing anything it posts with people who have the link."];
|
|
91682
|
+
}
|
|
91683
|
+
function buildPublicSpaceJoinConfirmPromptConfig(input) {
|
|
91684
|
+
return {
|
|
91685
|
+
active: "Yes, join this Space",
|
|
91686
|
+
inactive: "No, go back",
|
|
91687
|
+
message: buildPublicSpacePromptMessage("Do you want to join this Space?", input.exposure),
|
|
91688
|
+
vertical: true
|
|
91689
|
+
};
|
|
91690
|
+
}
|
|
91691
|
+
function buildPublicSpaceBringAgentsConfirmPromptConfig(input) {
|
|
91692
|
+
const singular = input.agentCount === 1;
|
|
91693
|
+
return {
|
|
91694
|
+
active: singular ? "Yes, bring this agent" : "Yes, bring these agents",
|
|
91695
|
+
inactive: singular ? "No, join without this agent" : "No, join without these agents",
|
|
91696
|
+
message: buildPublicSpacePromptMessage(singular ? "Bring this agent into a Space that anyone with the link can read?" : "Bring these agents into a Space that anyone with the link can read?", input.exposure),
|
|
91697
|
+
vertical: true
|
|
91698
|
+
};
|
|
91699
|
+
}
|
|
91700
|
+
function buildPublicSpacePromptMessage(question, exposure) {
|
|
91701
|
+
return buildSpaceAccessPromptCardMessage({
|
|
91702
|
+
lines: buildPublicSpaceWarningLines(exposure),
|
|
91703
|
+
question
|
|
91704
|
+
});
|
|
91705
|
+
}
|
|
91706
|
+
//#endregion
|
|
91199
91707
|
//#region src/ui/space-mention-highlight.ts
|
|
91200
91708
|
function buildSpaceMentionHighlightIndex(snapshot) {
|
|
91201
91709
|
return buildSpaceMentionProfileIndex(snapshot);
|
|
@@ -92615,11 +93123,56 @@ async function prepareCliSpaceComposerSubmission(input) {
|
|
|
92615
93123
|
snapshot: membersSnapshot,
|
|
92616
93124
|
text: input.text
|
|
92617
93125
|
});
|
|
93126
|
+
const publishedMessage = resolvePublishedMessage({
|
|
93127
|
+
membersSnapshot,
|
|
93128
|
+
preparedSubmission
|
|
93129
|
+
});
|
|
93130
|
+
const outboundText = publishedMessage.text;
|
|
93131
|
+
const outboundMessageEnvelope = preparedSubmission.messageEnvelope ? {
|
|
93132
|
+
...preparedSubmission.messageEnvelope,
|
|
93133
|
+
text: outboundText
|
|
93134
|
+
} : void 0;
|
|
92618
93135
|
return {
|
|
92619
|
-
...
|
|
93136
|
+
...outboundMessageEnvelope ? { outboundMessageEnvelope } : {},
|
|
92620
93137
|
...preparedSubmission.replyTo ? { outboundReplyTo: preparedSubmission.replyTo } : {},
|
|
92621
|
-
outboundText
|
|
92622
|
-
preparedSubmission
|
|
93138
|
+
outboundText,
|
|
93139
|
+
preparedSubmission,
|
|
93140
|
+
resolvedAddressingTargets: publishedMessage.resolvedAddressingTargets
|
|
93141
|
+
};
|
|
93142
|
+
}
|
|
93143
|
+
function resolvePublishedMessage(input) {
|
|
93144
|
+
const text = input.preparedSubmission.text;
|
|
93145
|
+
const canonicalMentions = collectCanonicalMentionTextFragments(text).flatMap((fragment) => fragment.parsedLiteral ? [{
|
|
93146
|
+
...fragment,
|
|
93147
|
+
parsedLiteral: fragment.parsedLiteral
|
|
93148
|
+
}] : []);
|
|
93149
|
+
if (canonicalMentions.length === 0) return {
|
|
93150
|
+
resolvedAddressingTargets: [],
|
|
93151
|
+
text
|
|
93152
|
+
};
|
|
93153
|
+
if (!input.membersSnapshot) throw new Error("Space message addressing invariant failed: resolved mentions require the current members snapshot.");
|
|
93154
|
+
const targetCatalog = createSpaceTargetCatalog(input.membersSnapshot);
|
|
93155
|
+
let cursor = 0;
|
|
93156
|
+
const parts = [];
|
|
93157
|
+
for (const mention of canonicalMentions) {
|
|
93158
|
+
const target = targetCatalog.byExactMentionLabel.get(mention.parsedLiteral.name);
|
|
93159
|
+
if (!target) throw new Error(`Space message addressing invariant failed: resolved target ${mention.parsedLiteral.name} is not in the current members snapshot.`);
|
|
93160
|
+
parts.push(text.slice(cursor, mention.start));
|
|
93161
|
+
parts.push(`@${target.primaryMentionLabel}`);
|
|
93162
|
+
cursor = mention.end;
|
|
93163
|
+
}
|
|
93164
|
+
parts.push(text.slice(cursor));
|
|
93165
|
+
return {
|
|
93166
|
+
resolvedAddressingTargets: input.preparedSubmission.canonicalMentionsInTextOrder.map((mention) => {
|
|
93167
|
+
const target = targetCatalog.byProfileId.get(mention.profileId);
|
|
93168
|
+
if (!target) throw new Error(`Space message addressing invariant failed: resolved profile ${mention.profileId} is not in the current members snapshot.`);
|
|
93169
|
+
return {
|
|
93170
|
+
primaryMentionLabel: target.primaryMentionLabel,
|
|
93171
|
+
profileId: target.profileId,
|
|
93172
|
+
relation: mention.type
|
|
93173
|
+
};
|
|
93174
|
+
}),
|
|
93175
|
+
text: parts.join("")
|
|
92623
93176
|
};
|
|
92624
93177
|
}
|
|
92625
93178
|
//#endregion
|
|
@@ -96956,7 +97509,7 @@ var SpaceSessionRuntime = class {
|
|
|
96956
97509
|
}
|
|
96957
97510
|
const clientMessageId = crypto.randomUUID();
|
|
96958
97511
|
try {
|
|
96959
|
-
this.#ws.send(JSON.stringify(
|
|
97512
|
+
this.#ws.send(JSON.stringify(toCompatibleSpaceAddressingRequestWireValue(makeTextSignal(text, {
|
|
96960
97513
|
...input.messageEnvelope ? { messageEnvelope: input.messageEnvelope } : {},
|
|
96961
97514
|
meta: { clientMessageId }
|
|
96962
97515
|
}))));
|
|
@@ -101498,7 +102051,7 @@ async function runConnect(input) {
|
|
|
101498
102051
|
const outboundText = preparedOutboundText.text;
|
|
101499
102052
|
const clientMessageId = crypto.randomUUID();
|
|
101500
102053
|
try {
|
|
101501
|
-
ws.send(JSON.stringify(
|
|
102054
|
+
ws.send(JSON.stringify(toCompatibleSpaceAddressingRequestWireValue(makeTextSignal(outboundText, {
|
|
101502
102055
|
...preparedOutboundText.messageEnvelope ? { messageEnvelope: preparedOutboundText.messageEnvelope } : {},
|
|
101503
102056
|
meta: { clientMessageId }
|
|
101504
102057
|
}))));
|
|
@@ -103497,6 +104050,7 @@ function buildSpaceHistoryBriefMessage(input) {
|
|
|
103497
104050
|
replyTo: messageReadProjection?.replyToSignalId ?? null,
|
|
103498
104051
|
wakeTargets: messageReadProjection?.wakeTargets ?? [],
|
|
103499
104052
|
referenceTargets: messageReadProjection?.referenceTargets ?? [],
|
|
104053
|
+
mentionTargets: messageReadProjection?.mentionTargets ?? [],
|
|
103500
104054
|
thread: input.thread ?? null
|
|
103501
104055
|
};
|
|
103502
104056
|
}
|
|
@@ -105243,9 +105797,10 @@ async function runSend(input) {
|
|
|
105243
105797
|
summary: input.plainText ? "Preparing message text without Space mention parsing." : "Preparing message text and canonical Space mentions.",
|
|
105244
105798
|
spaceId: space
|
|
105245
105799
|
});
|
|
105246
|
-
const { outboundMessageEnvelope, outboundText } = text.value.length === 0 ? {
|
|
105800
|
+
const { outboundMessageEnvelope, outboundText, resolvedAddressingTargets } = text.value.length === 0 ? {
|
|
105247
105801
|
outboundMessageEnvelope: void 0,
|
|
105248
|
-
outboundText: ""
|
|
105802
|
+
outboundText: "",
|
|
105803
|
+
resolvedAddressingTargets: []
|
|
105249
105804
|
} : await resolveOutboundSubmission({
|
|
105250
105805
|
openMeldProfile,
|
|
105251
105806
|
password: input.password,
|
|
@@ -105259,6 +105814,7 @@ async function runSend(input) {
|
|
|
105259
105814
|
emitSendAddressingSummary({
|
|
105260
105815
|
outboundMessageEnvelope,
|
|
105261
105816
|
presenter,
|
|
105817
|
+
resolvedAddressingTargets,
|
|
105262
105818
|
resolvedView: runtime.resolvedView
|
|
105263
105819
|
});
|
|
105264
105820
|
presenter.line({
|
|
@@ -105355,7 +105911,8 @@ async function postReplyIntoThread(input) {
|
|
|
105355
105911
|
async function resolveOutboundSubmission(input) {
|
|
105356
105912
|
if (input.plainText) return {
|
|
105357
105913
|
bareMentionDiagnostics: [],
|
|
105358
|
-
outboundText: input.text
|
|
105914
|
+
outboundText: input.text,
|
|
105915
|
+
resolvedAddressingTargets: []
|
|
105359
105916
|
};
|
|
105360
105917
|
let loadedMembersSnapshot = null;
|
|
105361
105918
|
const preparedSubmission = await prepareCliSpaceComposerSubmission({
|
|
@@ -105402,7 +105959,8 @@ async function resolveOutboundSubmission(input) {
|
|
|
105402
105959
|
return {
|
|
105403
105960
|
bareMentionDiagnostics,
|
|
105404
105961
|
outboundMessageEnvelope: preparedSubmission.outboundMessageEnvelope,
|
|
105405
|
-
outboundText: preparedSubmission.outboundText
|
|
105962
|
+
outboundText: preparedSubmission.outboundText,
|
|
105963
|
+
resolvedAddressingTargets: preparedSubmission.resolvedAddressingTargets
|
|
105406
105964
|
};
|
|
105407
105965
|
}
|
|
105408
105966
|
async function resolveBareMentionDiagnostics(input) {
|
|
@@ -105458,11 +106016,14 @@ function emitSendAddressingSummary(input) {
|
|
|
105458
106016
|
const envelope = input.outboundMessageEnvelope;
|
|
105459
106017
|
const wakeCount = envelope?.activationTargets.length ?? 0;
|
|
105460
106018
|
const referenceCount = envelope?.referenceTargets.length ?? 0;
|
|
106019
|
+
const mentionCount = envelope?.mentionTargets?.length ?? 0;
|
|
105461
106020
|
input.presenter.line({
|
|
105462
106021
|
code: "space.send.addressing_summary",
|
|
105463
|
-
text: `Space Message Addressing: wake=${wakeCount}, reference=${referenceCount}.`,
|
|
106022
|
+
text: `Space Message Addressing: wake=${wakeCount}, reference=${referenceCount}, mention=${mentionCount}.`,
|
|
105464
106023
|
data: {
|
|
106024
|
+
mentionTargetCount: mentionCount,
|
|
105465
106025
|
referenceTargetCount: referenceCount,
|
|
106026
|
+
...input.resolvedAddressingTargets.length > 0 ? { targets: input.resolvedAddressingTargets } : {},
|
|
105466
106027
|
wakeTargetCount: wakeCount
|
|
105467
106028
|
}
|
|
105468
106029
|
});
|
|
@@ -105471,7 +106032,8 @@ function emitBareMentionDiagnostics(input) {
|
|
|
105471
106032
|
if (input.diagnostics.length === 0) return;
|
|
105472
106033
|
const first = input.diagnostics[0];
|
|
105473
106034
|
if (!first) return;
|
|
105474
|
-
const suggestion = first.suggestedWakeText ?? first.suggestedReferenceText;
|
|
106035
|
+
const suggestion = first.suggestedWakeText ?? first.suggestedReferenceText ?? first.suggestedMentionText;
|
|
106036
|
+
if (!suggestion) return;
|
|
105475
106037
|
const text = `Bare mention ${first.mentionText} is plain text and does not create a Wake. Use ${suggestion} when you want OpenMeld to address that profile.`;
|
|
105476
106038
|
if (input.resolvedView === "agent") {
|
|
105477
106039
|
input.presenter.line({
|
|
@@ -105482,6 +106044,7 @@ function emitBareMentionDiagnostics(input) {
|
|
|
105482
106044
|
profileId: diagnostic.profileId,
|
|
105483
106045
|
profileKind: diagnostic.profileKind,
|
|
105484
106046
|
profileName: diagnostic.profileName,
|
|
106047
|
+
suggestedMentionText: diagnostic.suggestedMentionText,
|
|
105485
106048
|
suggestedReferenceText: diagnostic.suggestedReferenceText,
|
|
105486
106049
|
suggestedWakeText: diagnostic.suggestedWakeText
|
|
105487
106050
|
})) }
|
|
@@ -105860,11 +106423,13 @@ async function resolveSpaceCreateInput(input) {
|
|
|
105860
106423
|
openMeldProfileId: input.openMeldProfile.openMeldProfileId,
|
|
105861
106424
|
resolvedView: input.runtime.resolvedView,
|
|
105862
106425
|
providedPassword: input.providedPassword,
|
|
105863
|
-
interactive: input.interactive
|
|
106426
|
+
interactive: input.interactive,
|
|
106427
|
+
visibility
|
|
105864
106428
|
});
|
|
105865
106429
|
const password = await resolveCreateSpacePasswordInput({
|
|
105866
106430
|
providedPassword: input.providedPassword,
|
|
105867
|
-
interactive: input.interactive
|
|
106431
|
+
interactive: input.interactive,
|
|
106432
|
+
visibility
|
|
105868
106433
|
});
|
|
105869
106434
|
if (password === null) return { status: "cancelled" };
|
|
105870
106435
|
const normalizedGuide = normalizeGuideInput(input.providedGuide);
|
|
@@ -106168,9 +106733,6 @@ function parseUrlOrNull(value) {
|
|
|
106168
106733
|
return null;
|
|
106169
106734
|
}
|
|
106170
106735
|
}
|
|
106171
|
-
function isLoopbackHostname(hostname) {
|
|
106172
|
-
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1";
|
|
106173
|
-
}
|
|
106174
106736
|
function requireActiveOrganizationSlug(organization) {
|
|
106175
106737
|
const slug = normalizeOptionalString$1(organization?.slug);
|
|
106176
106738
|
if (!slug) throw new Error("Active organization slug is required to build a Space URL.");
|
|
@@ -106266,7 +106828,7 @@ async function resolveCreateSpacePasswordInput(input) {
|
|
|
106266
106828
|
if (typeof input.providedPassword === "string") return normalizeSpacePasswordText(input.providedPassword);
|
|
106267
106829
|
if (!input.interactive) return;
|
|
106268
106830
|
const shouldSetPassword = await confirm({
|
|
106269
|
-
message: buildCreateSpacePasswordPromptMessage(),
|
|
106831
|
+
message: buildCreateSpacePasswordPromptMessage(input.visibility),
|
|
106270
106832
|
initialValue: false
|
|
106271
106833
|
});
|
|
106272
106834
|
if (isCancel(shouldSetPassword)) {
|
|
@@ -106296,7 +106858,10 @@ async function promptInteractiveSpaceCreateFlow(input) {
|
|
|
106296
106858
|
while (stepIndex < steps.length) {
|
|
106297
106859
|
const step = steps[stepIndex];
|
|
106298
106860
|
if (!step) break;
|
|
106299
|
-
const result = await promptInteractiveSpaceCreateFlowStep(
|
|
106861
|
+
const result = await promptInteractiveSpaceCreateFlowStep({
|
|
106862
|
+
state,
|
|
106863
|
+
step
|
|
106864
|
+
});
|
|
106300
106865
|
const navigation = resolveSpaceCreateFlowStepNavigation({
|
|
106301
106866
|
stepIndex,
|
|
106302
106867
|
result
|
|
@@ -106341,7 +106906,8 @@ function normalizePromptedSpaceGuide(value) {
|
|
|
106341
106906
|
const normalized = value.trim();
|
|
106342
106907
|
return normalized.length > 0 ? normalized : void 0;
|
|
106343
106908
|
}
|
|
106344
|
-
async function promptInteractiveSpaceCreateFlowStep(
|
|
106909
|
+
async function promptInteractiveSpaceCreateFlowStep(input) {
|
|
106910
|
+
const { step } = input;
|
|
106345
106911
|
if (step === "name") {
|
|
106346
106912
|
const result = await promptRequiredInteractiveSpaceName();
|
|
106347
106913
|
return result.status === "submitted" ? {
|
|
@@ -106367,7 +106933,8 @@ async function promptInteractiveSpaceCreateFlowStep(step) {
|
|
|
106367
106933
|
} : result;
|
|
106368
106934
|
}
|
|
106369
106935
|
if (step === "password") {
|
|
106370
|
-
|
|
106936
|
+
if (!input.state.visibility) throw new Error("Space create password prompt requires a selected visibility.");
|
|
106937
|
+
const result = await promptInteractiveSpaceCreatePassword(input.state.visibility);
|
|
106371
106938
|
return result.status === "submitted" ? {
|
|
106372
106939
|
status: "submitted",
|
|
106373
106940
|
step,
|
|
@@ -106476,9 +107043,9 @@ function promptInteractiveSpaceGuide() {
|
|
|
106476
107043
|
backLabel: "Back"
|
|
106477
107044
|
});
|
|
106478
107045
|
}
|
|
106479
|
-
async function promptInteractiveSpaceCreatePassword() {
|
|
107046
|
+
async function promptInteractiveSpaceCreatePassword(visibility) {
|
|
106480
107047
|
for (;;) {
|
|
106481
|
-
const promptConfig = buildCreateSpacePasswordPromptConfig();
|
|
107048
|
+
const promptConfig = buildCreateSpacePasswordPromptConfig(visibility);
|
|
106482
107049
|
const action = await select({
|
|
106483
107050
|
message: promptConfig.message,
|
|
106484
107051
|
options: [
|
|
@@ -106545,7 +107112,7 @@ function emitSpaceCreatePasswordOptionalHint(input) {
|
|
|
106545
107112
|
if (input.interactive) return;
|
|
106546
107113
|
input.presenter.line({
|
|
106547
107114
|
code: "space.create.password.optional_hint",
|
|
106548
|
-
text:
|
|
107115
|
+
text: buildSpaceCreatePasswordOptionalHintText(input.visibility),
|
|
106549
107116
|
data: {
|
|
106550
107117
|
optional: true,
|
|
106551
107118
|
requirements: {
|
|
@@ -106559,11 +107126,17 @@ function emitSpaceCreatePasswordOptionalHint(input) {
|
|
|
106559
107126
|
}
|
|
106560
107127
|
});
|
|
106561
107128
|
}
|
|
106562
|
-
function
|
|
106563
|
-
return
|
|
107129
|
+
function buildSpaceCreatePasswordOptionalHintText(visibility) {
|
|
107130
|
+
return `Password is optional. ${resolveSpaceCreatePasswordlessAccessText(resolveInitialSpaceAccessMode(visibility))} To require a password to open and join, use --password <value>. Password rule: ` + buildSpacePasswordRequirementsText();
|
|
106564
107131
|
}
|
|
106565
|
-
function
|
|
106566
|
-
return
|
|
107132
|
+
function buildCreateSpacePasswordPromptMessage(visibility) {
|
|
107133
|
+
return buildCreateSpacePasswordPromptConfig(visibility).message;
|
|
107134
|
+
}
|
|
107135
|
+
function buildCreateSpacePasswordPromptConfig(visibility) {
|
|
107136
|
+
return buildSpaceCreatePasswordPromptConfig({
|
|
107137
|
+
accessMode: resolveInitialSpaceAccessMode(visibility),
|
|
107138
|
+
minimumLength: 6
|
|
107139
|
+
});
|
|
106567
107140
|
}
|
|
106568
107141
|
function resolveCancelledSpacePasswordPromptResult(input) {
|
|
106569
107142
|
if (input.allowBack) return { status: "back" };
|
|
@@ -110435,6 +111008,6 @@ function isHumanInteractiveSpaceRuntime(runtime) {
|
|
|
110435
111008
|
return runtime.resolvedView === "human" && canUseInteractivePrompts(runtime);
|
|
110436
111009
|
}
|
|
110437
111010
|
//#endregion
|
|
110438
|
-
export { runAgentsManage as $, LocalProjectConnectionError as $a, resetCurrentCommandCheckState as $i, isCliUpdateCheckApplicable as $n, cliJsonOutputEnvelopeSchema as $o, resolveServiceReadinessFromServiceStatus as $r, ensureLocalSkills as $t, parseEnvelope as A, resolveViewProfileKey as Aa, getAgentControllerPermissionModeFieldLabel as Ai, submitProfileRuntimeAgentControllerReport as An, enqueueAgentActivityHookEvent as Ao, registerSpaceMemberSelectionOptions as Ar, createDelayedSpinner as At, resolveHumanControllerDisplayName as B, updateOpenMeldProfile as Ba, buildOnboardingPlan as Bi, buildDispatchResultMessageReadProjection as Bn, setDefaultProjectConnection as Bo, buildDualViewGuideMessage as Br, toStructuredGatewayFailure as Bt, toSpaceMetaUpsertInput as C, buildHumanErrorCopy as Ca, reconcileNewRunnableBuiltinAgentsForSetup as Ci, resolveCreateProfileName as Cn, upsertDaemonServiceContract as Co, createSpaceTargetGuideError as Cr, runDaemonStop as Ct, formatHumanReadTargetList as D, formatMessage as Da, buildAgentControllerRef as Di, resolveServiceParticipationReadiness as Dn, resolveObservedAgentActivityBinding as Do, createUpgradeConfirmationGuideError as Dr, buildProfileWorkspaceRows as Dt, buildHumanReplyContextSummary as E, createPresenter as Ea, resolveLocalRegistryAgentIdFromAgentControllerRef as Ei, formatServiceParticipationReadinessLabel as En, buildAgentActivityEvent as Eo, createStartAuthenticationGuideError as Er, buildProfileWorkspacePresentation as Et, resolveOpenMeldProfileForSpaceCommand as F, createOpenMeldHumanProfile as Fa, resolveAgentProfileEditCapabilities as Fi, resolveLocalAgentControllerLaunchability as Fn, listProjectBindings as Fo, registerAuthLoginRequestOptions as Fr, createCliSpaceApi as Ft, runAgentsCustomAdd as G, buildAgentAuthenticationGuide as Ga, classifyDaemonServiceWakeability as Gi, buildUpdatesReplyWorkflowProjection as Gn, renderInfoCard as Go, buildAgentFacingPublicationModeGuideLines as Gr, runDaemonServiceParticipationGate as Gt, resolveAgentProfileSetup as H, clearSelectedOpenMeldProfileId as Ha, buildDaemonServiceTargetSpec as Hi, buildSignalIndex as Hn, canonicalizeLocalProjectPath as Ho, OPENMELD_AGENT_MENTAL_MODEL_LINES as Hr, resolveLocalComponentsStatus as Ht, emitSpaceAgentOverview as I, deleteOpenMeldProfile as Ia, resolveEvidenceSyncHealth as Ii, resolveLocalAgentControllerReportDecision as In, listProjectConnectionsWithStatus as Io, registerBuiltinAgentSelectionOptions as Ir, fetchSpaceMeta as It, runAgentsCustomUpdate as J, resolveAuthenticationGuidance as Ja, resolveOpenMeldEnvironmentTarget as Ji, promptSearchMultiselect as Jn, emitCliJsonEnvelope as Jo, runPendingDaemonServiceUpdate as Jr, runSkillsCheck as Jt, runAgentsCustomList as K, buildHumanAuthenticationCard as Ka, resolveServiceUpdateUrgency as Ki, createSpaceMemberIdentityIndex as Kn, renderTextInfoCard as Ko, canonicalizeAllowedActions as Kr, runDaemonStartDecisionPrompt as Kt, emitSpaceCliAgentOverview as L, listOpenMeldProfiles as La, resolveNativeAgentControllerPermissionModeForController as Li, inspectSpaceCacheFile as Ln, migrateProjectBindingStore as Lo, buildAgentOverviewFromContract as Lr, updateSpaceMeta as Lt, assertFullSignalIdArgument as M, requireOpenMeldProfile as Ma, parseAgentControllerRef as Mi, submitRuntimeAgentControllerReports as Mn, readAgentActivityOutboxHealth as Mo, registerSkillsTargetSelectionOptions as Mr, runDaemonStartupPreflight as Mt, assertValidSpaceIdTarget as N, resolveOpenMeldProfileOrNull as Na, resolveAgentControllerPermissionModeForController as Ni, collectLocalAgentControllerInventory as Nn, removeProjectOutbox as No, getCliVersionInfo as Nr, readDaemonStartFailureLogTailLines as Nt, resolveLinkAccessLabel as O, parseCliViewMode as Oa, createAgentExecutionStatusDisplayRows as Oi, assessActionParticipationCandidate as On, normalizeSharedSessionTitle as Oo, getCommandEntryContract as Or, reconcileCliVersionView as Ot, prepareAuthenticatedSpaceCommandContext as P, createOpenMeldAgentProfile as Pa, resolveAgentExecutionStatus as Pi, resolveLocalAgentControllerBlockerReasonCodes as Pn, bindProject as Po, registerDaemonControlTargetOptions as Pr, fetchSpaceUpdates as Pt, runAgentsList as Q, setProfileDefaultView as Qa, isCurrentCommandCheckScopeActive as Qi, assessCliUpdate as Qn, cliBinaryDeltaPatchSchema as Qo, formatDaemonFailureContextText as Qr, runSkillsUpdate as Qt, prepareLocalAgentReadiness as R, primeOpenMeldProfilesSessionCache as Ra, PREPARE_SESSION_RECONNECT_GRACE_MS as Ri, upsertSpaceConfig as Rn, removeProjectConnection as Ro, DualViewGuideError as Rr, readGatewayJsonResponse as Rt, loadSpaceSignalIndexOrNull as S, OPENMELD_VERSION as Sa, listAgentTargetStates as Si, resolveCreateProfileKind as Sn, readDaemonServiceContract as So, createSpaceSubcommandTargetGuideError as Sr, runDaemonStatusFlow as St, buildFormalSignalReadPayload as T, renderHumanTextErrorCard as Ta, notifyDaemonRouteCatalogChanged as Ti, ensureAgentProfileRuntimeBinding as Tn, removeAgentActivityContextCache as To, createStartAgentIdentityGuideError as Tr, runDaemonUninstall as Tt, runAgents as U, getSelectedOpenMeldProfileId as Ua, resolveDaemonServiceAlignmentDecision as Ui, buildSignalMessageReadProjection as Un, enqueueControllerTaskLifecycleEventWhileLocked as Uo, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Ur, writeInstalledLocalComponentsSnapshot as Ut, persistAgentTransportSelection as V, alignSelectedOpenMeldProfileStorage as Va, getSetupFlowCopy as Vi, buildDispatchResultReplyWorkflowProjection as Vn, unbindProject as Vo, formatAgentOverviewPayload as Vr, parseJsonResponse$1 as Vt, runAgentsConfig as W, setSelectedOpenMeldProfileId as Wa, classifyDaemonServiceRunStartability as Wi, buildSpaceRoundReadProjection as Wn, readControllerTaskLifecycleOutboxHealth as Wo, areAllowedActionsEquivalent as Wr, resolveDaemonServiceParticipationStatus as Wt, runAgentsDisable as X, resolveAuthenticationGuidanceFromMessage as Xa, finishCurrentCommandCheckScope as Xi, isReturnKeypress as Xn, outJsonLine as Xo, ensureDaemonRuntimePaths as Xr, runSkillsInstall as Xt, runAgentsDetect as Y, resolveAuthenticationGuidanceFromError as Ya, resolveAuthBaseUrl as Yi, promptSearchSelect as Yn, errLine as Yo, scheduleDaemonServiceUpdate as Yr, runSkillsEnsure as Yt, runAgentsEnable as Z, getProfileDefaultView as Za, getCurrentCommandCheckState as Zi, runInteractivePrompt as Zn, outLine as Zo, resolveDaemonDeviceId as Zr, runSkillsUninstall as Zt, runSpaceWriteWithPasswordRetry as _, readVersionState as _a, validateCustomProfileWorkspacePath as _i, requestDeviceToken as _n, formatOpenMeldCliTextBlock as _o, createSpaceLeaveGuideError as _r, runDaemonInstall as _t, runSpaceDelete as a, getDaemonSystemServiceLogPath as aa, mapAgentReplyReadinessToLegacyAutoReply as ai, ensureCommandAuthenticationOrCancel as an, resolveAgentActivityRouteForPath as ao, resolveElapsedTimeMs as ar, revokeOrganizationJoinLinkResponseSchema as as, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, toStartBackgroundHelperExecutionCompatibility as ba, createPrimaryBindingReadSession as bi, revokeAuthAccessToken as bn, resolveUserFacingCliEntryCommand as bo, createSpaceRemoveMembersGuideError as br, runDaemonRunAfterEntryChecks as bt, runSpaceLeave as c, resolveDaemonServiceManager as ca, syncProfileWorkspaceState as ci, runAuthLogout as cn, defaultManagedIntegrationPaths as co, canUseInteractivePrompts as cr, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, performManagedInstall as da, ensureOpenMeldManagedProfileWorkspace as di, exchangeOneTimeTokenAuthSession as dn, resolveAgentActivityDispatcherCommand as do, createProfileCreateGuideError as dr, resolveSpaceSendText as dt, startCurrentCommandCheckScope as ea, resolveDaemonServiceFreshnessWarning as ei, readBundledOpenMeldCliSkillDocumentByPath as en, validateLocalProjectConnectionPath as eo, assertDispatchOwnedRuntimePublicWriteAllowed as er, cliJsonSkillsListEnvelopeSchema as es, runAgentsRepair as et, runSpaceSend as f, buildNextVersionState as fa, normalizeCustomProfileWorkspacePath as fi, buildAuthStatusRows as fn, uninstallAgentActivityIntegrations as fo, createProfileMenuGuideError as fr, bestEffortStopCurrentLaneDaemonService as ft, runSpaceReadWithPasswordRetry as g, fetchLatestPackageInfo as ga, setOpenMeldManagedProfileWorkspace as gi, fetchAuthUserSnapshot as gn, formatOpenMeldCliLine as go, createSpaceContractSetGuideError as gr, runDaemonCancel as gt, uploadPreparedSpaceFiles as h, fetchLatestCliBinaryRelease as ha, setCustomProfileWorkspace as hi, extractAuthApiErrorMessage as hn, formatOpenMeldCliCommands as ho, createSpaceAliasTargetGuideError as hr, runDaemonBackgroundStartForDecision as ht, runSpaceCreate as i, readCurrentObservedDaemonRuntimeStatus as ia, formatHumanReplyReadinessReason as ii, buildCommandAuthenticationPromptMessage as in, registerAgentActivityRoute as io, formatElapsedTime as ir, organizationJoinLinkErrorResponseSchema as is, colorizeDisplayProfileLabel as it, isSpaceCommandOutputHandledError as j, isSelectedOpenMeldProfileRequiredError as ja, listAgentControllerPermissionModeOptions as ji, submitRuntimeAgentControllerReport as jn, removeProjectInbox as jo, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as jr, shouldEmitAgentOverview as jt, resolveOrganizationVisibilityLabel as k, resolveRuntimeContext as ka, getAgentControllerPermissionModeDisplayMetadata as ki, computeRetryDelayMs as kn, readCodexSessionTitles as ko, getCommandHintsFromContract as kr, emitDaemonAgentOverview as kt, runSpaceList as l, readRecentDaemonLifecycleEvents as la, createModelCatalogReadSession as li, runAuthMenu as ln, installAgentActivityIntegrations as lo, createDoctorFailedGuideError as lr, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, ensureVersionStateReady as ma, resolveConfiguredProfileWorkspacePath as mi, formatActiveOrganizationLabel as mn, formatOpenMeldCliCommand as mo, createSpaceAddMembersGuideError as mr, runDaemonAutostart as mt, promptAndConfirmSpacePassword as n, resolveVersionChangeDirection as na, formatAgentReplyReadinessLabel as ni, readRecentDaemonDispatchJournalEvents as nn, requestLocalAgentActivitySync as no, readDispatchSpaceActionContextFromEnv as nr, cliJsonSkillsShowEnvelopeSchema as ns, formatTransportModeDisplay as nt, runSpaceHistory as o, isDaemonServiceJobNeverSpawned as oa, resolveGatewayChainReadiness as oi, evaluateCommandAuthentication as on, unregisterAgentActivityRoute as oo, formatDaemonServiceDowngradeBlockedRecommendation as or, compareAgentControllerRefsForDisplay as os, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, compareSemver as pa, readProfileWorkspaceConfig as pi, buildAuthStatusSnapshot as pn, formatInlineOpenMeldCliCommands as po, createResetConfirmationGuideError as pr, runDaemon as pt, runAgentsCustomRemove as q, createAuthenticationError as qa, assessServerRequiredVersion as qi, formatRemovedCcRelationMessage as qn, sanitizeTerminalDisplayText as qo, readOpenMeldToolsUpdateContextFromEnv as qr, collectSkillsReadinessSnapshot as qt, runSpaceAddMembers as r, readCurrentDaemonRuntimeContext as ra, formatDeviceReplyReadinessLabel as ri, connectWebSocket as rn, isAgentActivityRouteRegistered as ro, writeDispatchSpaceActionRecord as rr, getOrganizationJoinLinkResponseSchema as rs, colorizeAgentLabel as rt, runSpaceJoin as s, readDaemonServiceJobCrashExitCode as sa, resolveOpenClawLocalDiagnosticsValue as si, runAuthLogin as sn, AGENT_ACTIVITY_INTEGRATION_OWNER as so, formatDaemonServiceMissingRecommendation as sr, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, inspectDaemonServiceInventory as ta, resolveCurrentReplyReadinessSnapshot as ti, readRuntimeReportingHealthState as tn, LocalDaemonControlPlaneClientError as to, readDispatchOwnedRuntimeGuard as tr, cliJsonSkillsLoadEnvelopeSchema as ts, runAgentsShow as tt, runSpacePassword as u, buildInstallSelfJsonPayload as ua, resolveProfileWorkspaceRuntime as ui, runAuthStatus as un, readAgentActivityIntegrationStatus as uo, createProfileActionGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, writeVersionState as va, describeProfileWorkspacePathValidationFailure as vi, resolveDeviceAuthClientId as vn, formatProfileAwareOpenMeldCliCommands as vo, createSpaceMenuGuideError as vr, runDaemonInterrupt as vt, buildFormalDispatchResultReadPayload as w, renderHumanErrorCard as wa, listBuiltinAgentsRegistryEntries as wi, promptTextEntry as wn, readAgentActivityContextForPath as wo, createSpaceUpdatesGuideError as wr, runDaemonTeardownStrict as wt, loadSpaceIdentityDirectoryOrNull as x, resolveCurrentDaemonExpectedVersion as xa, resolveAgentProfilePrimaryAgentControllerReport as xi, createProfileByKind as xn, syncLocalAgentActivity as xo, createSpaceResultGuideError as xr, runDaemonSnapshot as xt, emitHumanReadSignalsTextProjection as y, resolveDaemonRuntimeContractCompatibility as ya, syncDeviceRuntimeStateProjection as yi, resolveDeviceTokenExpiresAt as yn, resolveSetupFollowUpCliEntryCommand as yo, createSpacePublicationSetGuideError as yr, runDaemonReinstall as yt, buildReplyReadinessGuidance as z, resolveOpenMeldProfile as za, buildDaemonRouteObservationPresentation as zi, assertNoRemovedCcSpaceAddressingSyntax as zn, runIfAgentActivityBindingGenerationIsCurrent as zo, formatDualViewGuideForDisplay as zr, readGatewayTextResponse as zt };
|
|
111011
|
+
export { runAgentsManage as $, setProfileDefaultView as $a, isCurrentCommandCheckScopeActive as $i, assessCliUpdate as $n, cliBinaryDeltaPatchSchema as $o, formatDaemonFailureContextText as $r, runSkillsUpdate as $t, parseEnvelope as A, resolveRuntimeContext as Aa, getAgentControllerPermissionModeDisplayMetadata as Ai, computeRetryDelayMs as An, readCodexSessionTitles as Ao, getCommandHintsFromContract as Ar, emitDaemonAgentOverview as At, resolveHumanControllerDisplayName as B, resolveOpenMeldProfile as Ba, buildDaemonRouteObservationPresentation as Bi, assertNoRemovedCcSpaceAddressingSyntax as Bn, runIfAgentActivityBindingGenerationIsCurrent as Bo, formatDualViewGuideForDisplay as Br, readGatewayTextResponse as Bt, toSpaceMetaUpsertInput as C, OPENMELD_VERSION as Ca, listAgentTargetStates as Ci, resolveCreateProfileKind as Cn, readDaemonServiceContract as Co, createSpaceSubcommandTargetGuideError as Cr, runDaemonStatusFlow as Ct, formatHumanReadTargetList as D, createPresenter as Da, resolveLocalRegistryAgentIdFromAgentControllerRef as Di, formatServiceParticipationReadinessLabel as Dn, buildAgentActivityEvent as Do, createStartAuthenticationGuideError as Dr, buildProfileWorkspacePresentation as Dt, buildHumanReplyContextSummary as E, renderHumanTextErrorCard as Ea, notifyDaemonRouteCatalogChanged as Ei, ensureAgentProfileRuntimeBinding as En, removeAgentActivityContextCache as Eo, createStartAgentIdentityGuideError as Er, runDaemonUninstall as Et, resolveOpenMeldProfileForSpaceCommand as F, createOpenMeldAgentProfile as Fa, resolveAgentExecutionStatus as Fi, resolveLocalAgentControllerBlockerReasonCodes as Fn, bindProject as Fo, registerDaemonControlTargetOptions as Fr, fetchSpaceUpdates as Ft, runAgentsCustomAdd as G, setSelectedOpenMeldProfileId as Ga, classifyDaemonServiceRunStartability as Gi, buildSpaceRoundReadProjection as Gn, readControllerTaskLifecycleOutboxHealth as Go, areAllowedActionsEquivalent as Gr, resolveDaemonServiceParticipationStatus as Gt, resolveAgentProfileSetup as H, alignSelectedOpenMeldProfileStorage as Ha, getSetupFlowCopy as Hi, buildDispatchResultReplyWorkflowProjection as Hn, unbindProject as Ho, formatAgentOverviewPayload as Hr, parseJsonResponse$1 as Ht, emitSpaceAgentOverview as I, createOpenMeldHumanProfile as Ia, resolveAgentProfileEditCapabilities as Ii, resolveLocalAgentControllerLaunchability as In, listProjectBindings as Io, registerAuthLoginRequestOptions as Ir, createCliSpaceApi as It, runAgentsCustomUpdate as J, createAuthenticationError as Ja, assessServerRequiredVersion as Ji, formatRemovedCcRelationMessage as Jn, sanitizeTerminalDisplayText as Jo, readOpenMeldToolsUpdateContextFromEnv as Jr, collectSkillsReadinessSnapshot as Jt, runAgentsCustomList as K, buildAgentAuthenticationGuide as Ka, classifyDaemonServiceWakeability as Ki, buildUpdatesReplyWorkflowProjection as Kn, renderInfoCard as Ko, buildAgentFacingPublicationModeGuideLines as Kr, runDaemonServiceParticipationGate as Kt, emitSpaceCliAgentOverview as L, deleteOpenMeldProfile as La, resolveEvidenceSyncHealth as Li, resolveLocalAgentControllerReportDecision as Ln, listProjectConnectionsWithStatus as Lo, registerBuiltinAgentSelectionOptions as Lr, fetchSpaceMeta as Lt, assertFullSignalIdArgument as M, isSelectedOpenMeldProfileRequiredError as Ma, listAgentControllerPermissionModeOptions as Mi, submitRuntimeAgentControllerReport as Mn, removeProjectInbox as Mo, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as Mr, shouldEmitAgentOverview as Mt, assertValidSpaceIdTarget as N, requireOpenMeldProfile as Na, parseAgentControllerRef as Ni, submitRuntimeAgentControllerReports as Nn, readAgentActivityOutboxHealth as No, registerSkillsTargetSelectionOptions as Nr, runDaemonStartupPreflight as Nt, resolveLinkAccessLabel as O, formatMessage as Oa, buildAgentControllerRef as Oi, resolveServiceParticipationReadiness as On, resolveObservedAgentActivityBinding as Oo, createUpgradeConfirmationGuideError as Or, buildProfileWorkspaceRows as Ot, prepareAuthenticatedSpaceCommandContext as P, resolveOpenMeldProfileOrNull as Pa, resolveAgentControllerPermissionModeForController as Pi, collectLocalAgentControllerInventory as Pn, removeProjectOutbox as Po, getCliVersionInfo as Pr, readDaemonStartFailureLogTailLines as Pt, runAgentsList as Q, getProfileDefaultView as Qa, getCurrentCommandCheckState as Qi, runInteractivePrompt as Qn, outLine as Qo, resolveDaemonDeviceId as Qr, runSkillsUninstall as Qt, prepareLocalAgentReadiness as R, listOpenMeldProfiles as Ra, resolveNativeAgentControllerPermissionModeForController as Ri, inspectSpaceCacheFile as Rn, migrateProjectBindingStore as Ro, buildAgentOverviewFromContract as Rr, updateSpaceMeta as Rt, loadSpaceSignalIndexOrNull as S, resolveCurrentDaemonExpectedVersion as Sa, resolveAgentProfilePrimaryAgentControllerReport as Si, createProfileByKind as Sn, syncLocalAgentActivity as So, createSpaceResultGuideError as Sr, runDaemonSnapshot as St, buildFormalSignalReadPayload as T, renderHumanErrorCard as Ta, listBuiltinAgentsRegistryEntries as Ti, promptTextEntry as Tn, readAgentActivityContextForPath as To, createSpaceUpdatesGuideError as Tr, runDaemonTeardownStrict as Tt, runAgents as U, clearSelectedOpenMeldProfileId as Ua, buildDaemonServiceTargetSpec as Ui, buildSignalIndex as Un, canonicalizeLocalProjectPath as Uo, OPENMELD_AGENT_MENTAL_MODEL_LINES as Ur, resolveLocalComponentsStatus as Ut, persistAgentTransportSelection as V, updateOpenMeldProfile as Va, buildOnboardingPlan as Vi, buildDispatchResultMessageReadProjection as Vn, setDefaultProjectConnection as Vo, buildDualViewGuideMessage as Vr, toStructuredGatewayFailure as Vt, runAgentsConfig as W, getSelectedOpenMeldProfileId as Wa, resolveDaemonServiceAlignmentDecision as Wi, buildSignalMessageReadProjection as Wn, enqueueControllerTaskLifecycleEventWhileLocked as Wo, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Wr, writeInstalledLocalComponentsSnapshot as Wt, runAgentsDisable as X, resolveAuthenticationGuidanceFromError as Xa, resolveAuthBaseUrl as Xi, promptSearchSelect as Xn, errLine as Xo, scheduleDaemonServiceUpdate as Xr, runSkillsEnsure as Xt, runAgentsDetect as Y, resolveAuthenticationGuidance as Ya, resolveOpenMeldEnvironmentTarget as Yi, promptSearchMultiselect as Yn, emitCliJsonEnvelope as Yo, runPendingDaemonServiceUpdate as Yr, runSkillsCheck as Yt, runAgentsEnable as Z, resolveAuthenticationGuidanceFromMessage as Za, finishCurrentCommandCheckScope as Zi, isReturnKeypress as Zn, outJsonLine as Zo, ensureDaemonRuntimePaths as Zr, runSkillsInstall as Zt, runSpaceWriteWithPasswordRetry as _, fetchLatestPackageInfo as _a, setOpenMeldManagedProfileWorkspace as _i, fetchAuthUserSnapshot as _n, formatOpenMeldCliLine as _o, createSpaceContractSetGuideError as _r, runDaemonCancel as _t, runSpaceDelete as a, readCurrentObservedDaemonRuntimeStatus as aa, formatHumanReplyReadinessReason as ai, buildCommandAuthenticationPromptMessage as an, registerAgentActivityRoute as ao, formatElapsedTime as ar, organizationJoinLinkErrorResponseSchema as as, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, resolveDaemonRuntimeContractCompatibility as ba, syncDeviceRuntimeStateProjection as bi, resolveDeviceTokenExpiresAt as bn, resolveSetupFollowUpCliEntryCommand as bo, createSpacePublicationSetGuideError as br, runDaemonReinstall as bt, runSpaceLeave as c, readDaemonServiceJobCrashExitCode as ca, resolveOpenClawLocalDiagnosticsValue as ci, runAuthLogin as cn, AGENT_ACTIVITY_INTEGRATION_OWNER as co, formatDaemonServiceMissingRecommendation as cr, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, buildInstallSelfJsonPayload as da, resolveProfileWorkspaceRuntime as di, runAuthStatus as dn, readAgentActivityIntegrationStatus as do, createProfileActionGuideError as dr, resolveSpaceWebGatewayOrigin as dt, resetCurrentCommandCheckState as ea, resolveServiceReadinessFromServiceStatus as ei, ensureLocalSkills as en, LocalProjectConnectionError as eo, isCliUpdateCheckApplicable as er, cliJsonOutputEnvelopeSchema as es, runAgentsRepair as et, runSpaceSend as f, performManagedInstall as fa, ensureOpenMeldManagedProfileWorkspace as fi, exchangeOneTimeTokenAuthSession as fn, resolveAgentActivityDispatcherCommand as fo, createProfileCreateGuideError as fr, resolveSpaceSendText as ft, runSpaceReadWithPasswordRetry as g, fetchLatestCliBinaryRelease as ga, setCustomProfileWorkspace as gi, extractAuthApiErrorMessage as gn, formatOpenMeldCliCommands as go, createSpaceAliasTargetGuideError as gr, runDaemonBackgroundStartForDecision as gt, uploadPreparedSpaceFiles as h, ensureVersionStateReady as ha, resolveConfiguredProfileWorkspacePath as hi, formatActiveOrganizationLabel as hn, formatOpenMeldCliCommand as ho, createSpaceAddMembersGuideError as hr, runDaemonAutostart as ht, runSpaceCreate as i, readCurrentDaemonRuntimeContext as ia, formatDeviceReplyReadinessLabel as ii, connectWebSocket as in, isAgentActivityRouteRegistered as io, writeDispatchSpaceActionRecord as ir, getOrganizationJoinLinkResponseSchema as is, colorizeDisplayProfileLabel as it, isSpaceCommandOutputHandledError as j, resolveViewProfileKey as ja, getAgentControllerPermissionModeFieldLabel as ji, submitProfileRuntimeAgentControllerReport as jn, enqueueAgentActivityHookEvent as jo, registerSpaceMemberSelectionOptions as jr, createDelayedSpinner as jt, resolveOrganizationVisibilityLabel as k, parseCliViewMode as ka, createAgentExecutionStatusDisplayRows as ki, assessActionParticipationCandidate as kn, normalizeSharedSessionTitle as ko, getCommandEntryContract as kr, reconcileCliVersionView as kt, runSpaceList as l, resolveDaemonServiceManager as la, syncProfileWorkspaceState as li, runAuthLogout as ln, defaultManagedIntegrationPaths as lo, canUseInteractivePrompts as lr, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, compareSemver as ma, readProfileWorkspaceConfig as mi, buildAuthStatusSnapshot as mn, formatInlineOpenMeldCliCommands as mo, createResetConfirmationGuideError as mr, runDaemon as mt, promptAndConfirmSpacePassword as n, inspectDaemonServiceInventory as na, resolveCurrentReplyReadinessSnapshot as ni, readRuntimeReportingHealthState as nn, LocalDaemonControlPlaneClientError as no, readDispatchOwnedRuntimeGuard as nr, cliJsonSkillsLoadEnvelopeSchema as ns, formatTransportModeDisplay as nt, runSpaceHistory as o, getDaemonSystemServiceLogPath as oa, mapAgentReplyReadinessToLegacyAutoReply as oi, ensureCommandAuthenticationOrCancel as on, resolveAgentActivityRouteForPath as oo, resolveElapsedTimeMs as or, revokeOrganizationJoinLinkResponseSchema as os, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, buildNextVersionState as pa, normalizeCustomProfileWorkspacePath as pi, buildAuthStatusRows as pn, uninstallAgentActivityIntegrations as po, createProfileMenuGuideError as pr, bestEffortStopCurrentLaneDaemonService as pt, runAgentsCustomRemove as q, buildHumanAuthenticationCard as qa, resolveServiceUpdateUrgency as qi, createSpaceMemberIdentityIndex as qn, renderTextInfoCard as qo, canonicalizeAllowedActions as qr, runDaemonStartDecisionPrompt as qt, runSpaceAddMembers as r, resolveVersionChangeDirection as ra, formatAgentReplyReadinessLabel as ri, readRecentDaemonDispatchJournalEvents as rn, requestLocalAgentActivitySync as ro, readDispatchSpaceActionContextFromEnv as rr, cliJsonSkillsShowEnvelopeSchema as rs, colorizeAgentLabel as rt, runSpaceJoin as s, isDaemonServiceJobNeverSpawned as sa, resolveGatewayChainReadiness as si, evaluateCommandAuthentication as sn, unregisterAgentActivityRoute as so, formatDaemonServiceDowngradeBlockedRecommendation as sr, compareAgentControllerRefsForDisplay as ss, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, startCurrentCommandCheckScope as ta, resolveDaemonServiceFreshnessWarning as ti, readBundledOpenMeldCliSkillDocumentByPath as tn, validateLocalProjectConnectionPath as to, assertDispatchOwnedRuntimePublicWriteAllowed as tr, cliJsonSkillsListEnvelopeSchema as ts, runAgentsShow as tt, runSpacePassword as u, readRecentDaemonLifecycleEvents as ua, createModelCatalogReadSession as ui, runAuthMenu as un, installAgentActivityIntegrations as uo, createDoctorFailedGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, readVersionState as va, validateCustomProfileWorkspacePath as vi, requestDeviceToken as vn, formatOpenMeldCliTextBlock as vo, createSpaceLeaveGuideError as vr, runDaemonInstall as vt, buildFormalDispatchResultReadPayload as w, buildHumanErrorCopy as wa, reconcileNewRunnableBuiltinAgentsForSetup as wi, resolveCreateProfileName as wn, upsertDaemonServiceContract as wo, createSpaceTargetGuideError as wr, runDaemonStop as wt, loadSpaceIdentityDirectoryOrNull as x, toStartBackgroundHelperExecutionCompatibility as xa, createPrimaryBindingReadSession as xi, revokeAuthAccessToken as xn, resolveUserFacingCliEntryCommand as xo, createSpaceRemoveMembersGuideError as xr, runDaemonRunAfterEntryChecks as xt, emitHumanReadSignalsTextProjection as y, writeVersionState as ya, describeProfileWorkspacePathValidationFailure as yi, resolveDeviceAuthClientId as yn, formatProfileAwareOpenMeldCliCommands as yo, createSpaceMenuGuideError as yr, runDaemonInterrupt as yt, buildReplyReadinessGuidance as z, primeOpenMeldProfilesSessionCache as za, PREPARE_SESSION_RECONNECT_GRACE_MS as zi, upsertSpaceConfig as zn, removeProjectConnection as zo, DualViewGuideError as zr, readGatewayJsonResponse as zt };
|
|
110439
111012
|
|
|
110440
|
-
//# sourceMappingURL=command-
|
|
111013
|
+
//# sourceMappingURL=command-CU_3raCS.js.map
|