openmeld 0.3.144 → 0.3.146

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.
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
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-QiJwpnJk.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-Cl9HGiaA.js";
5
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-QslOj6uZ.js";
6
6
  import { r as daemonServiceLaneSchema, t as daemonServiceContractSchema } from "./service-contract-CRyDcIIf.js";
7
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
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-BFa5tO5y.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-C9xMaR4i.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-BXB-m4ub.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";
@@ -3276,6 +3276,9 @@ function isSameContractState(current, candidate) {
3276
3276
  function resolveOpenCodeDatabasePath(input) {
3277
3277
  return join(normalizeOptionalText$76(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "opencode.db");
3278
3278
  }
3279
+ function resolveOpenCodeAuthPath(input) {
3280
+ return join(normalizeOptionalText$76(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "auth.json");
3281
+ }
3279
3282
  function normalizeOptionalText$76(value) {
3280
3283
  const normalized = value?.trim();
3281
3284
  return normalized ? normalized : null;
@@ -5838,7 +5841,7 @@ function resolveFileWorkActivity(input, operation) {
5838
5841
  };
5839
5842
  }
5840
5843
  function readCommand(value) {
5841
- const command = toRecord$17(value)?.command;
5844
+ const command = toRecord$18(value)?.command;
5842
5845
  if (typeof command === "string" && command.trim().length > 0) return command;
5843
5846
  if (Array.isArray(command)) {
5844
5847
  const joined = command.filter((part) => typeof part === "string").join(" ").trim();
@@ -5847,14 +5850,14 @@ function readCommand(value) {
5847
5850
  return null;
5848
5851
  }
5849
5852
  function readFilePath$1(value) {
5850
- const record = toRecord$17(value);
5853
+ const record = toRecord$18(value);
5851
5854
  for (const candidate of [
5852
5855
  record?.file_path,
5853
5856
  record?.filePath,
5854
5857
  record?.path
5855
5858
  ]) if (typeof candidate === "string" && candidate.trim().length > 0) return candidate.trim();
5856
5859
  if (Array.isArray(record?.changes)) for (const change of record.changes) {
5857
- const path = toRecord$17(change)?.path;
5860
+ const path = toRecord$18(change)?.path;
5858
5861
  if (typeof path === "string" && path.trim().length > 0) return path.trim();
5859
5862
  }
5860
5863
  return null;
@@ -5862,7 +5865,7 @@ function readFilePath$1(value) {
5862
5865
  function normalizeProviderToolName(value) {
5863
5866
  return typeof value === "string" ? value.trim().toLowerCase() : "";
5864
5867
  }
5865
- function toRecord$17(value) {
5868
+ function toRecord$18(value) {
5866
5869
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
5867
5870
  }
5868
5871
  //#endregion
@@ -5906,10 +5909,10 @@ function createAcpToolActivityTracker() {
5906
5909
  } };
5907
5910
  }
5908
5911
  function extractAcpToolActivityObservation(value) {
5909
- const message = toRecord$16(value);
5912
+ const message = toRecord$17(value);
5910
5913
  if (message?.method !== "session/update") return null;
5911
- const params = toRecord$16(message.params);
5912
- const update = toRecord$16(params?.update);
5914
+ const params = toRecord$17(message.params);
5915
+ const update = toRecord$17(params?.update);
5913
5916
  const updateType = normalizeOptionalText$73(update?.sessionUpdate);
5914
5917
  if (!(update && (updateType === "tool_call" || updateType === "tool_call_update"))) return null;
5915
5918
  const toolCallId = normalizeOptionalText$73(update.toolCallId ?? update.tool_call_id);
@@ -5949,7 +5952,7 @@ function resolveAcpToolWorkActivity(input) {
5949
5952
  return resolveAdapterToolWorkActivity(input.providerToolName, input.providerInput);
5950
5953
  }
5951
5954
  function resolveAcpFileEvidenceInput(input) {
5952
- const providerInput = toRecord$16(input.providerInput);
5955
+ const providerInput = toRecord$17(input.providerInput);
5953
5956
  if (providerInput && readFilePath(providerInput)) return providerInput;
5954
5957
  const locationPath = readLocationPath(input.providerLocations);
5955
5958
  if (!locationPath) return null;
@@ -5968,7 +5971,7 @@ function readFilePath(value) {
5968
5971
  if (path) return path;
5969
5972
  }
5970
5973
  if (Array.isArray(value.changes)) for (const change of value.changes) {
5971
- const path = normalizeOptionalText$73(toRecord$16(change)?.path);
5974
+ const path = normalizeOptionalText$73(toRecord$17(change)?.path);
5972
5975
  if (path) return path;
5973
5976
  }
5974
5977
  return null;
@@ -5976,15 +5979,15 @@ function readFilePath(value) {
5976
5979
  function readLocationPath(value) {
5977
5980
  if (!Array.isArray(value)) return null;
5978
5981
  for (const location of value) {
5979
- const path = normalizeOptionalText$73(toRecord$16(location)?.path);
5982
+ const path = normalizeOptionalText$73(toRecord$17(location)?.path);
5980
5983
  if (path) return path;
5981
5984
  }
5982
5985
  return null;
5983
5986
  }
5984
5987
  function mergeProviderPatch(current, patch) {
5985
5988
  if (patch === void 0 || patch === null) return current;
5986
- const currentRecord = toRecord$16(current);
5987
- const patchRecord = toRecord$16(patch);
5989
+ const currentRecord = toRecord$17(current);
5990
+ const patchRecord = toRecord$17(patch);
5988
5991
  if (currentRecord && patchRecord) return {
5989
5992
  ...currentRecord,
5990
5993
  ...patchRecord
@@ -6001,7 +6004,7 @@ function normalizeOptionalText$73(value) {
6001
6004
  const normalized = typeof value === "string" ? value.trim() : "";
6002
6005
  return normalized.length > 0 ? normalized : null;
6003
6006
  }
6004
- function toRecord$16(value) {
6007
+ function toRecord$17(value) {
6005
6008
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
6006
6009
  }
6007
6010
  //#endregion
@@ -6117,17 +6120,18 @@ function normalizeOptionalText$72(value) {
6117
6120
  //#region ../../runtime/adapters/core/dist/provider-usage-limits.js
6118
6121
  const PROVIDER_USAGE_LIMIT_KEY = "provider";
6119
6122
  const PROVIDER_USAGE_LIMIT_LABEL = "Usage limits";
6120
- function createUnsupportedProviderUsageLimits(observedAt) {
6121
- return [createProviderUsageLimitWithoutFacts("unsupported", observedAt)];
6123
+ function createUnsupportedProviderUsageLimits(observedAt, provider) {
6124
+ return [createProviderUsageLimitWithoutFacts("unsupported", observedAt, provider)];
6122
6125
  }
6123
- function createUnavailableProviderUsageLimits(observedAt) {
6124
- return [createProviderUsageLimitWithoutFacts("unavailable", observedAt)];
6126
+ function createUnavailableProviderUsageLimits(observedAt, provider) {
6127
+ return [createProviderUsageLimitWithoutFacts("unavailable", observedAt, provider)];
6125
6128
  }
6126
- function createProviderUsageLimitWithoutFacts(status, observedAt) {
6129
+ function createProviderUsageLimitWithoutFacts(status, observedAt, provider) {
6127
6130
  return {
6128
- key: PROVIDER_USAGE_LIMIT_KEY,
6131
+ key: provider ? `${provider.id}:${PROVIDER_USAGE_LIMIT_KEY}` : PROVIDER_USAGE_LIMIT_KEY,
6129
6132
  label: PROVIDER_USAGE_LIMIT_LABEL,
6130
6133
  observedAt,
6134
+ ...provider ? { provider } : {},
6131
6135
  resetsAt: null,
6132
6136
  status,
6133
6137
  usedPercent: null
@@ -6863,7 +6867,7 @@ function createClaudeAgentSdkToolActivityTracker() {
6863
6867
  } };
6864
6868
  }
6865
6869
  function extractClaudeToolLifecycleObservations(message) {
6866
- const record = toRecord$15(message);
6870
+ const record = toRecord$16(message);
6867
6871
  if (!record) return [];
6868
6872
  if (record.type === "tool_progress") {
6869
6873
  const toolCallId = normalizeOptionalText$68(record.tool_use_id);
@@ -6901,14 +6905,14 @@ function extractClaudeToolLifecycleObservations(message) {
6901
6905
  });
6902
6906
  }
6903
6907
  function readMessageContent(message) {
6904
- const record = toRecord$15(message);
6908
+ const record = toRecord$16(message);
6905
6909
  if (!(record && Array.isArray(record.content))) return [];
6906
6910
  return record.content.flatMap((block) => {
6907
- const parsed = toRecord$15(block);
6911
+ const parsed = toRecord$16(block);
6908
6912
  return parsed ? [parsed] : [];
6909
6913
  });
6910
6914
  }
6911
- function toRecord$15(value) {
6915
+ function toRecord$16(value) {
6912
6916
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
6913
6917
  }
6914
6918
  function normalizeOptionalText$68(value) {
@@ -6943,15 +6947,15 @@ const WINDOW_DISPLAY_BY_TYPE = {
6943
6947
  }
6944
6948
  };
6945
6949
  function projectClaudeCodeUsageLimits(input) {
6946
- const event = toRecord$14(input.event);
6950
+ const event = toRecord$15(input.event);
6947
6951
  if (event?.type !== "rate_limit_event") return [];
6948
- const info = toRecord$14(event.rate_limit_info);
6952
+ const info = toRecord$15(event.rate_limit_info);
6949
6953
  if (!info) return [];
6950
- const unifiedWindows = toRecord$14(info.unifiedWindows);
6954
+ const unifiedWindows = toRecord$15(info.unifiedWindows);
6951
6955
  const unifiedLimits = unifiedWindows ? SUPPORTED_RATE_LIMIT_TYPES.flatMap((rateLimitType) => projectUsageLimit({
6952
6956
  observedAt: input.observedAt,
6953
6957
  rateLimitType,
6954
- window: toRecord$14(unifiedWindows[rateLimitType])
6958
+ window: toRecord$15(unifiedWindows[rateLimitType])
6955
6959
  })) : [];
6956
6960
  if (unifiedLimits.length > 0) return unifiedLimits;
6957
6961
  const rateLimitType = readRateLimitType(info?.rateLimitType);
@@ -6987,7 +6991,7 @@ function readResetTime$1(value) {
6987
6991
  const date = /* @__PURE__ */ new Date(value * SECONDS_PER_MILLISECOND$1);
6988
6992
  return Number.isNaN(date.getTime()) ? null : date.toISOString();
6989
6993
  }
6990
- function toRecord$14(value) {
6994
+ function toRecord$15(value) {
6991
6995
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
6992
6996
  }
6993
6997
  //#endregion
@@ -7190,12 +7194,12 @@ async function resolveAskUserQuestion(input) {
7190
7194
  };
7191
7195
  }
7192
7196
  function mapClaudeQuestion(value, questionIndex) {
7193
- const question = toRecord$13(value) ?? {};
7197
+ const question = toRecord$14(value) ?? {};
7194
7198
  const providerQuestion = normalizeBoundedText$4(question.question, 4e3) ?? `Question ${questionIndex + 1}`;
7195
7199
  const questionId = `claude-question-${questionIndex}`;
7196
7200
  const optionLabelById = /* @__PURE__ */ new Map();
7197
7201
  const options = (Array.isArray(question.options) ? question.options : []).slice(0, 20).map((value, optionIndex) => {
7198
- const option = toRecord$13(value) ?? {};
7202
+ const option = toRecord$14(value) ?? {};
7199
7203
  const label = normalizeBoundedText$4(option.label, 240) ?? `Option ${optionIndex + 1}`;
7200
7204
  const optionId = `${questionId}-option-${optionIndex}`;
7201
7205
  optionLabelById.set(optionId, label);
@@ -7276,7 +7280,7 @@ async function resolveUrlElicitation(input) {
7276
7280
  }
7277
7281
  async function resolveFormElicitation(input) {
7278
7282
  const schema = input.request.requestedSchema;
7279
- const properties = toRecord$13(schema?.properties);
7283
+ const properties = toRecord$14(schema?.properties);
7280
7284
  if (!properties) return { action: "decline" };
7281
7285
  const fields = Object.entries(properties).map(([name, value], index) => mapElicitationField(name, value, index));
7282
7286
  if (fields.length === 0) return { action: "decline" };
@@ -7305,8 +7309,8 @@ async function resolveFormElicitation(input) {
7305
7309
  };
7306
7310
  }
7307
7311
  function mapElicitationField(name, value, fieldIndex) {
7308
- const field = toRecord$13(value) ?? {};
7309
- const rawValues = resolveElicitationOptionValues(field, toRecord$13(field.items));
7312
+ const field = toRecord$14(value) ?? {};
7313
+ const rawValues = resolveElicitationOptionValues(field, toRecord$14(field.items));
7310
7314
  const questionId = `claude-elicitation-field-${fieldIndex}`;
7311
7315
  const optionValueById = /* @__PURE__ */ new Map();
7312
7316
  const options = rawValues.slice(0, 20).map((rawValue, optionIndex) => {
@@ -7354,7 +7358,7 @@ function normalizeBoundedText$4(value, maxLength) {
7354
7358
  const normalized = String(value ?? "").trim();
7355
7359
  return normalized ? normalized.slice(0, maxLength) : null;
7356
7360
  }
7357
- function toRecord$13(value) {
7361
+ function toRecord$14(value) {
7358
7362
  if (!value || typeof value !== "object" || Array.isArray(value)) return null;
7359
7363
  return value;
7360
7364
  }
@@ -8949,12 +8953,12 @@ const CODEX_TOOL_ITEM_TYPES = /* @__PURE__ */ new Set([
8949
8953
  "web_search"
8950
8954
  ]);
8951
8955
  function extractCodexToolActivityEvent(value, fallbackObservedAtMs = Date.now()) {
8952
- const record = toRecord$12(value);
8956
+ const record = toRecord$13(value);
8953
8957
  if (!record) return null;
8954
8958
  const lifecycle = resolveLifecycle(record);
8955
8959
  if (!lifecycle) return null;
8956
- const params = toRecord$12(record.params);
8957
- const item = toRecord$12(params?.item ?? record.item);
8960
+ const params = toRecord$13(record.params);
8961
+ const item = toRecord$13(params?.item ?? record.item);
8958
8962
  const itemType = normalizeCompactName(item?.type);
8959
8963
  const toolCallId = normalizeOptionalText$61(item?.id);
8960
8964
  if (!(item && toolCallId && CODEX_TOOL_ITEM_TYPES.has(itemType))) return null;
@@ -8984,14 +8988,14 @@ function resolveLifecycle(record) {
8984
8988
  }
8985
8989
  function resolveCodexToolActivityName(itemType, item) {
8986
8990
  if (itemType === "websearch" || itemType === "web_search") {
8987
- const actionType = normalizeCompactName(toRecord$12(item.action)?.type);
8991
+ const actionType = normalizeCompactName(toRecord$13(item.action)?.type);
8988
8992
  return actionType === "openpage" || actionType === "open_page" ? "agent_open_webpage" : "agent_search_web";
8989
8993
  }
8990
8994
  return resolveAdapterToolActivityName(itemType);
8991
8995
  }
8992
8996
  function isFailedCodexItem(item) {
8993
8997
  const status = normalizeCompactName(item.status);
8994
- return status === "failed" || status === "declined" || item.success === false || toRecord$12(item.error) !== null;
8998
+ return status === "failed" || status === "declined" || item.success === false || toRecord$13(item.error) !== null;
8995
8999
  }
8996
9000
  function resolveObservedAtMs(input) {
8997
9001
  const candidate = input.lifecycle === "started" ? input.params?.startedAtMs ?? input.record.startedAtMs : input.params?.completedAtMs ?? input.record.completedAtMs;
@@ -9004,7 +9008,7 @@ function normalizeOptionalText$61(value) {
9004
9008
  const normalized = typeof value === "string" ? value.trim() : "";
9005
9009
  return normalized.length > 0 ? normalized : null;
9006
9010
  }
9007
- function toRecord$12(value) {
9011
+ function toRecord$13(value) {
9008
9012
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
9009
9013
  }
9010
9014
  //#endregion
@@ -9325,10 +9329,10 @@ async function probeCodexAppServerAccount(input) {
9325
9329
  launchContract: input.launchContract,
9326
9330
  startupTimeoutMs: timeoutMs
9327
9331
  }, async (session, initialized) => {
9328
- const response = toRecord$11(await session.request("account/read", {}));
9332
+ const response = toRecord$12(await session.request("account/read", {}));
9329
9333
  return {
9330
9334
  authStatus: resolveCodexAppServerAuthStatus({
9331
- account: toRecord$11(response?.account),
9335
+ account: toRecord$12(response?.account),
9332
9336
  response
9333
9337
  }),
9334
9338
  version: parseCodexAppServerVersion(initialized)
@@ -9625,7 +9629,7 @@ async function resolveCodexAppServerCollaborationMode(input) {
9625
9629
  errorType: "adapter",
9626
9630
  message: "protocol.invalid: Codex Plan collaboration mode requires a resolved model"
9627
9631
  });
9628
- const response = toRecord$11(await input.session.requestControl("collaborationMode/list", {}, {
9632
+ const response = toRecord$12(await input.session.requestControl("collaborationMode/list", {}, {
9629
9633
  code: "runtime.control_timeout",
9630
9634
  operation: "collaborationMode/list"
9631
9635
  }));
@@ -9653,7 +9657,7 @@ async function resolveCodexAppServerTurnCollaborationMode(input) {
9653
9657
  });
9654
9658
  }
9655
9659
  function readCodexAppServerCollaborationModePreset(value) {
9656
- const preset = toRecord$11(value);
9660
+ const preset = toRecord$12(value);
9657
9661
  const mode = normalizeOptionalText$60(preset?.mode);
9658
9662
  if (mode !== "default" && mode !== "plan") return null;
9659
9663
  return {
@@ -10023,10 +10027,10 @@ var CodexAppServerSession = class {
10023
10027
  });
10024
10028
  }
10025
10029
  async waitForTurnCompleted(input) {
10026
- const turn = toRecord$11(toRecord$11((await this.#waitForNotification((candidate) => {
10030
+ const turn = toRecord$12(toRecord$12((await this.#waitForNotification((candidate) => {
10027
10031
  if (candidate.method !== "turn/completed") return false;
10028
- const params = toRecord$11(candidate.params);
10029
- const turn = toRecord$11(params?.turn);
10032
+ const params = toRecord$12(candidate.params);
10033
+ const turn = toRecord$12(params?.turn);
10030
10034
  return params?.threadId === input.threadId && normalizeOptionalText$60(turn?.id) === input.turnId;
10031
10035
  })).params)?.turn);
10032
10036
  if (!turn) throw new CodexAppServerTransportError({
@@ -10141,11 +10145,11 @@ var CodexAppServerSession = class {
10141
10145
  }
10142
10146
  #observeContextTelemetry(message) {
10143
10147
  if (message.method === "thread/tokenUsage/updated") {
10144
- const tokenUsage = readCodexTokenUsage(toRecord$11(message.params)?.tokenUsage);
10148
+ const tokenUsage = readCodexTokenUsage(toRecord$12(message.params)?.tokenUsage);
10145
10149
  if (tokenUsage) this.#latestTokenUsage = tokenUsage;
10146
10150
  return;
10147
10151
  }
10148
- if ((message.method === "item/started" || message.method === "item/completed") && toRecord$11(toRecord$11(message.params)?.item)?.type === "contextCompaction") this.#contextCompactionObserved = true;
10152
+ if ((message.method === "item/started" || message.method === "item/completed") && toRecord$12(toRecord$12(message.params)?.item)?.type === "contextCompaction") this.#contextCompactionObserved = true;
10149
10153
  }
10150
10154
  async #handleServerRequest(message) {
10151
10155
  const id = message.id;
@@ -10153,7 +10157,7 @@ var CodexAppServerSession = class {
10153
10157
  const result = this.#onInteractionRequest ? await resolveCodexServerInteraction({
10154
10158
  method: message.method,
10155
10159
  onCancel: async () => {
10156
- const params = toRecord$11(message.params) ?? {};
10160
+ const params = toRecord$12(message.params) ?? {};
10157
10161
  const threadId = readRequiredText(params.threadId, "requestUserInput params.threadId");
10158
10162
  const turnId = readRequiredText(params.turnId, "requestUserInput params.turnId");
10159
10163
  this.#interactionFailure = {
@@ -10198,7 +10202,7 @@ var CodexAppServerSession = class {
10198
10202
  }
10199
10203
  #collectAgentMessageDelta(message) {
10200
10204
  if (message.method !== "item/agentMessage/delta") return;
10201
- const params = toRecord$11(message.params);
10205
+ const params = toRecord$12(message.params);
10202
10206
  const itemId = normalizeOptionalText$60(params?.itemId);
10203
10207
  const delta = readAgentMessageDeltaText(params?.delta);
10204
10208
  if (!(itemId && delta)) return;
@@ -10288,10 +10292,10 @@ var CodexAppServerSession = class {
10288
10292
  }
10289
10293
  };
10290
10294
  function readThreadIdFromResponse(value) {
10291
- return readRequiredText(toRecord$11(value)?.thread?.id, "thread response thread.id");
10295
+ return readRequiredText(toRecord$12(value)?.thread?.id, "thread response thread.id");
10292
10296
  }
10293
10297
  function readThreadContextFromResponse(value) {
10294
- const response = toRecord$11(value);
10298
+ const response = toRecord$12(value);
10295
10299
  return {
10296
10300
  model: normalizeOptionalText$60(response?.model),
10297
10301
  threadId: readRequiredText(response?.thread?.id, "thread response thread.id"),
@@ -10299,7 +10303,7 @@ function readThreadContextFromResponse(value) {
10299
10303
  };
10300
10304
  }
10301
10305
  function readTurnStartResponse(value) {
10302
- const turn = toRecord$11(value)?.turn;
10306
+ const turn = toRecord$12(value)?.turn;
10303
10307
  if (!turn || typeof turn !== "object") throw new CodexAppServerTransportError({
10304
10308
  code: "protocol.invalid",
10305
10309
  errorType: "adapter",
@@ -10318,7 +10322,7 @@ function readTurnFailureCodexErrorInfo(turn) {
10318
10322
  return normalizeOptionalText$60(turn.error?.codexErrorInfo);
10319
10323
  }
10320
10324
  function readCodexTokenUsage(value) {
10321
- const usage = toRecord$11(value);
10325
+ const usage = toRecord$12(value);
10322
10326
  const last = readCodexTokenUsageBreakdown(usage?.last);
10323
10327
  const total = readCodexTokenUsageBreakdown(usage?.total);
10324
10328
  const rawModelContextWindow = usage?.modelContextWindow;
@@ -10331,7 +10335,7 @@ function readCodexTokenUsage(value) {
10331
10335
  };
10332
10336
  }
10333
10337
  function readCodexTokenUsageBreakdown(value) {
10334
- const usage = toRecord$11(value);
10338
+ const usage = toRecord$12(value);
10335
10339
  const cachedInputTokens = readNonNegativeInteger(usage?.cachedInputTokens);
10336
10340
  const inputTokens = readNonNegativeInteger(usage?.inputTokens);
10337
10341
  const outputTokens = readNonNegativeInteger(usage?.outputTokens);
@@ -10398,7 +10402,7 @@ async function resolveCodexServerInteraction(input) {
10398
10402
  }
10399
10403
  }
10400
10404
  async function resolveCommandApprovalInteraction(input) {
10401
- const params = toRecord$11(input.params) ?? {};
10405
+ const params = toRecord$12(input.params) ?? {};
10402
10406
  const command = normalizeBoundedText$3(input.legacy && Array.isArray(params.command) ? params.command.map(String).join(" ") : params.command, 16e3) ?? "Command details were not provided.";
10403
10407
  const cwd = normalizeBoundedText$3(params.cwd, 4096);
10404
10408
  const mappedOptions = (input.legacy ? [
@@ -10463,7 +10467,7 @@ function presentCommandApprovalDecision(decision) {
10463
10467
  label: "Deny"
10464
10468
  };
10465
10469
  if (decision === "cancel" || decision === "abort") return null;
10466
- const record = toRecord$11(decision);
10470
+ const record = toRecord$12(decision);
10467
10471
  if (record?.acceptWithExecpolicyAmendment) return {
10468
10472
  intent: "allow_always",
10469
10473
  label: "Allow matching commands"
@@ -10475,7 +10479,7 @@ function presentCommandApprovalDecision(decision) {
10475
10479
  return null;
10476
10480
  }
10477
10481
  async function resolveFileChangeApprovalInteraction(input) {
10478
- const params = toRecord$11(input.params) ?? {};
10482
+ const params = toRecord$12(input.params) ?? {};
10479
10483
  const resource = input.legacy ? normalizeBoundedText$3(safeJsonStringify(params.fileChanges), 4096) : normalizeBoundedText$3(params.grantRoot, 4096);
10480
10484
  const options = [
10481
10485
  {
@@ -10519,7 +10523,7 @@ async function resolveFileChangeApprovalInteraction(input) {
10519
10523
  return { decision: input.legacy ? { denied: { rejection: "Denied by the user." } } : "decline" };
10520
10524
  }
10521
10525
  async function resolveUserInputInteraction(input) {
10522
- const params = toRecord$11(input.params) ?? {};
10526
+ const params = toRecord$12(input.params) ?? {};
10523
10527
  const rawQuestions = Array.isArray(params.questions) ? params.questions : [];
10524
10528
  const answers = {};
10525
10529
  for (let offset = 0; offset < rawQuestions.length; offset += 3) {
@@ -10543,12 +10547,12 @@ async function resolveUserInputInteraction(input) {
10543
10547
  return { answers };
10544
10548
  }
10545
10549
  function mapCodexQuestion(value, questionIndex) {
10546
- const question = toRecord$11(value) ?? {};
10550
+ const question = toRecord$12(value) ?? {};
10547
10551
  const questionId = normalizeBoundedText$3(question.id, 256) ?? `codex-question-${questionIndex}`;
10548
10552
  const rawOptions = Array.isArray(question.options) ? question.options.slice(0, 20) : [];
10549
10553
  const optionValueById = /* @__PURE__ */ new Map();
10550
10554
  const options = rawOptions.map((rawOption, optionIndex) => {
10551
- const option = toRecord$11(rawOption) ?? {};
10555
+ const option = toRecord$12(rawOption) ?? {};
10552
10556
  const label = normalizeBoundedText$3(option.label, 240) ?? `Option ${optionIndex + 1}`;
10553
10557
  const optionId = `${questionId}-option-${optionIndex}`;
10554
10558
  optionValueById.set(optionId, label);
@@ -10576,8 +10580,8 @@ async function resolveAdditionalPermissionsInteraction(input) {
10576
10580
  const allowTurnOptionId = "codex-additional-permissions-turn";
10577
10581
  const allowSessionOptionId = "codex-additional-permissions-session";
10578
10582
  const denyOptionId = "codex-additional-permissions-deny";
10579
- const params = toRecord$11(input.params) ?? {};
10580
- const requestedPermissions = toRecord$11(params.permissions) ?? {};
10583
+ const params = toRecord$12(input.params) ?? {};
10584
+ const requestedPermissions = toRecord$12(params.permissions) ?? {};
10581
10585
  const grantedPermissions = Object.fromEntries(Object.entries(requestedPermissions).filter(([, value]) => value !== null));
10582
10586
  const options = [
10583
10587
  {
@@ -10625,7 +10629,7 @@ async function resolveAdditionalPermissionsInteraction(input) {
10625
10629
  };
10626
10630
  }
10627
10631
  async function resolveMcpServerElicitationInteraction(input) {
10628
- const params = toRecord$11(input.params) ?? {};
10632
+ const params = toRecord$12(input.params) ?? {};
10629
10633
  if (params.mode === "url") return await resolveMcpServerUrlElicitation({
10630
10634
  onInteractionRequest: input.onInteractionRequest,
10631
10635
  params
@@ -10637,8 +10641,8 @@ async function resolveMcpServerElicitationInteraction(input) {
10637
10641
  });
10638
10642
  }
10639
10643
  async function resolveMcpServerFormElicitation(input) {
10640
- const requestedSchema = toRecord$11(input.params.requestedSchema);
10641
- const properties = toRecord$11(requestedSchema?.properties);
10644
+ const requestedSchema = toRecord$12(input.params.requestedSchema);
10645
+ const properties = toRecord$12(requestedSchema?.properties);
10642
10646
  if (!properties) return { action: "decline" };
10643
10647
  const requiredNames = new Set(Array.isArray(requestedSchema?.required) ? requestedSchema.required.map(String) : []);
10644
10648
  const fields = Object.entries(properties).map(([name, value], index) => mapCodexMcpElicitationField({
@@ -10700,7 +10704,7 @@ async function resolveMcpServerUrlElicitation(input) {
10700
10704
  return { action: response.kind === "cancel" ? "cancel" : "decline" };
10701
10705
  }
10702
10706
  function mapCodexMcpElicitationField(input) {
10703
- const schema = toRecord$11(input.schema) ?? {};
10707
+ const schema = toRecord$12(input.schema) ?? {};
10704
10708
  const questionId = `codex-mcp-field-${input.fieldIndex}`;
10705
10709
  const skipOptionId = input.required ? null : `${questionId}-skip`;
10706
10710
  const optionValueById = /* @__PURE__ */ new Map();
@@ -10741,12 +10745,12 @@ function listCodexMcpElicitationOptions(schema) {
10741
10745
  label: "No",
10742
10746
  value: false
10743
10747
  }];
10744
- const itemSchema = toRecord$11(schema.items);
10748
+ const itemSchema = toRecord$12(schema.items);
10745
10749
  let titledOptions = null;
10746
10750
  if (Array.isArray(schema.oneOf)) titledOptions = schema.oneOf;
10747
10751
  else if (Array.isArray(itemSchema?.anyOf)) titledOptions = itemSchema.anyOf;
10748
10752
  if (titledOptions) return titledOptions.map((value) => {
10749
- const option = toRecord$11(value) ?? {};
10753
+ const option = toRecord$12(value) ?? {};
10750
10754
  const rawValue = option.const ?? "";
10751
10755
  return {
10752
10756
  label: normalizeBoundedText$3(option.title, 240) ?? String(rawValue).slice(0, 240),
@@ -10871,7 +10875,7 @@ function readRequiredText(value, label) {
10871
10875
  message: `protocol.invalid: missing ${label}`
10872
10876
  });
10873
10877
  }
10874
- function toRecord$11(value) {
10878
+ function toRecord$12(value) {
10875
10879
  if (!value || typeof value !== "object" || Array.isArray(value)) return null;
10876
10880
  return value;
10877
10881
  }
@@ -10883,7 +10887,7 @@ function normalizeOptionalText$60(value) {
10883
10887
  return normalized.length > 0 ? normalized : null;
10884
10888
  }
10885
10889
  function parseCodexAppServerVersion(response) {
10886
- return normalizeOptionalText$60(toRecord$11(response)?.userAgent)?.match(CODEX_APP_SERVER_VERSION_PATTERN)?.[1] ?? null;
10890
+ return normalizeOptionalText$60(toRecord$12(response)?.userAgent)?.match(CODEX_APP_SERVER_VERSION_PATTERN)?.[1] ?? null;
10887
10891
  }
10888
10892
  function resolveCodexAppServerAuthStatus(input) {
10889
10893
  if (input.account) return "authenticated";
@@ -11861,16 +11865,16 @@ function projectCodexUsageLimits(input) {
11861
11865
  return [...uniqueLimits.values()];
11862
11866
  }
11863
11867
  function readRateLimitBuckets(response) {
11864
- const record = toRecord$10(response);
11865
- const bucketsById = toRecord$10(record?.rateLimitsByLimitId);
11868
+ const record = toRecord$11(response);
11869
+ const bucketsById = toRecord$11(record?.rateLimitsByLimitId);
11866
11870
  if (bucketsById && Object.keys(bucketsById).length > 0) return Object.entries(bucketsById).flatMap(([bucketKey, snapshot]) => {
11867
- const recordSnapshot = toRecord$10(snapshot);
11871
+ const recordSnapshot = toRecord$11(snapshot);
11868
11872
  return recordSnapshot ? [{
11869
11873
  bucketKey,
11870
11874
  snapshot: recordSnapshot
11871
11875
  }] : [];
11872
11876
  });
11873
- const legacySnapshot = toRecord$10(record?.rateLimits);
11877
+ const legacySnapshot = toRecord$11(record?.rateLimits);
11874
11878
  return legacySnapshot ? [{
11875
11879
  bucketKey: DEFAULT_LIMIT_ID,
11876
11880
  snapshot: legacySnapshot
@@ -11880,7 +11884,7 @@ function projectRateLimitBucket(input) {
11880
11884
  const limitId = resolveLimitId(input);
11881
11885
  const limitName = normalizeLabel$1(input.snapshot.limitName);
11882
11886
  return ["primary", "secondary"].flatMap((windowKind) => {
11883
- const window = toRecord$10(input.snapshot[windowKind]);
11887
+ const window = toRecord$11(input.snapshot[windowKind]);
11884
11888
  const usedPercent = normalizeUsedPercent(window?.usedPercent);
11885
11889
  if (usedPercent === null) return [];
11886
11890
  const windowLabel = formatWindowLabel({
@@ -11930,7 +11934,7 @@ function formatWindowLabel(input) {
11930
11934
  if (input.windowDurationMins === 10080) return "Weekly usage";
11931
11935
  return input.windowKind === "primary" ? "Short-term usage" : "Long-term usage";
11932
11936
  }
11933
- function toRecord$10(value) {
11937
+ function toRecord$11(value) {
11934
11938
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
11935
11939
  }
11936
11940
  //#endregion
@@ -12428,10 +12432,10 @@ function normalizeOptionalText$55(value) {
12428
12432
  //#region ../../runtime/adapters/grok-build/dist/usage/grok-build-usage-limits.js
12429
12433
  const GROK_BUILD_USAGE_LIMIT_KEY = "grok-build:included-credits";
12430
12434
  function projectGrokBuildUsageLimits(input) {
12431
- const config = toRecord$9(toRecord$9(input.response)?.config);
12435
+ const config = toRecord$10(toRecord$10(input.response)?.config);
12432
12436
  const usedPercent = readUsedPercent(config?.creditUsagePercent);
12433
12437
  if (usedPercent === null) return createUnavailableProviderUsageLimits(input.observedAt);
12434
- const currentPeriod = toRecord$9(config?.currentPeriod);
12438
+ const currentPeriod = toRecord$10(config?.currentPeriod);
12435
12439
  return [{
12436
12440
  key: GROK_BUILD_USAGE_LIMIT_KEY,
12437
12441
  label: resolvePeriodLabel(currentPeriod?.type),
@@ -12455,7 +12459,7 @@ function resolvePeriodLabel(value) {
12455
12459
  if (normalized === "monthly" || normalized === "usage_period_type_monthly") return "Monthly usage limit";
12456
12460
  return "Included credits";
12457
12461
  }
12458
- function toRecord$9(value) {
12462
+ function toRecord$10(value) {
12459
12463
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
12460
12464
  }
12461
12465
  //#endregion
@@ -12484,9 +12488,9 @@ function isGrokBuildPlanMethod(method) {
12484
12488
  return EXIT_PLAN_MODE_METHODS.has(method);
12485
12489
  }
12486
12490
  function readGrokBuildPermissionOptions(params) {
12487
- const record = toRecord$8(params);
12491
+ const record = toRecord$9(params);
12488
12492
  return (Array.isArray(record?.options) ? record.options : []).flatMap((option) => {
12489
- const optionRecord = toRecord$8(option);
12493
+ const optionRecord = toRecord$9(option);
12490
12494
  const kind = normalizeText$8(optionRecord?.kind);
12491
12495
  const optionId = normalizeText$8(optionRecord?.optionId);
12492
12496
  if (!(kind && optionId)) return [];
@@ -12498,7 +12502,7 @@ function readGrokBuildPermissionOptions(params) {
12498
12502
  });
12499
12503
  }
12500
12504
  async function resolvePermissionInteraction$1(input) {
12501
- const toolCall = toRecord$8(toRecord$8(input.params)?.toolCall);
12505
+ const toolCall = toRecord$9(toRecord$9(input.params)?.toolCall);
12502
12506
  const options = readGrokBuildPermissionOptions(input.params).flatMap((option) => {
12503
12507
  const intent = mapPermissionIntent$1(option.kind);
12504
12508
  return intent ? [{
@@ -12527,7 +12531,7 @@ async function resolvePermissionInteraction$1(input) {
12527
12531
  function buildPermissionSubject$2(toolCall) {
12528
12532
  const kind = normalizeText$8(toolCall?.kind);
12529
12533
  const title = normalizeBoundedText$2(toolCall?.title, 4096);
12530
- const command = normalizeBoundedText$2(toRecord$8(toolCall?.rawInput)?.command, 16e3) ?? normalizeBoundedText$2(toolCall?.command, 16e3);
12534
+ const command = normalizeBoundedText$2(toRecord$9(toolCall?.rawInput)?.command, 16e3) ?? normalizeBoundedText$2(toolCall?.command, 16e3);
12531
12535
  if (kind === "execute") return {
12532
12536
  ...command ? { command } : {},
12533
12537
  ...title ? { resource: title } : {},
@@ -12552,7 +12556,7 @@ function buildPermissionTitle$2(toolCall) {
12552
12556
  }
12553
12557
  }
12554
12558
  async function resolveQuestionInteraction$1(input) {
12555
- const params = toRecord$8(input.params);
12559
+ const params = toRecord$9(input.params);
12556
12560
  const rawQuestions = Array.isArray(params?.questions) ? params.questions : [];
12557
12561
  if (rawQuestions.length === 0) return { outcome: "cancelled" };
12558
12562
  const answers = {};
@@ -12588,11 +12592,11 @@ async function resolveQuestionInteraction$1(input) {
12588
12592
  };
12589
12593
  }
12590
12594
  function mapGrokQuestion(value, index) {
12591
- const question = toRecord$8(value);
12595
+ const question = toRecord$9(value);
12592
12596
  const providerQuestionKey = normalizeBoundedText$2(question?.question, 4e3) ?? `Grok question ${index + 1}`;
12593
12597
  const providerLabelByOptionId = /* @__PURE__ */ new Map();
12594
12598
  const options = (Array.isArray(question?.options) ? question.options : []).flatMap((option, optionIndex) => {
12595
- const record = toRecord$8(option);
12599
+ const record = toRecord$9(option);
12596
12600
  const label = normalizeBoundedText$2(record?.label, 240);
12597
12601
  if (!label) return [];
12598
12602
  const optionId = `grok-option-${index + 1}-${optionIndex + 1}`;
@@ -12616,7 +12620,7 @@ function mapGrokQuestion(value, index) {
12616
12620
  };
12617
12621
  }
12618
12622
  async function resolvePlanInteraction$1(input) {
12619
- const plan = normalizeBoundedText$2(toRecord$8(input.params)?.planContent, 64e3) ?? "Grok requested approval without a plan summary.";
12623
+ const plan = normalizeBoundedText$2(toRecord$9(input.params)?.planContent, 64e3) ?? "Grok requested approval without a plan summary.";
12620
12624
  const response = await input.onInteractionRequest({
12621
12625
  allowFeedback: true,
12622
12626
  kind: "plan_review",
@@ -12655,7 +12659,7 @@ function normalizeText$8(value) {
12655
12659
  const normalized = typeof value === "string" ? value.trim() : "";
12656
12660
  return normalized.length > 0 ? normalized : null;
12657
12661
  }
12658
- function toRecord$8(value) {
12662
+ function toRecord$9(value) {
12659
12663
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
12660
12664
  }
12661
12665
  //#endregion
@@ -12834,7 +12838,7 @@ var GrokBuildAcpSession = class {
12834
12838
  this.#process.start();
12835
12839
  }
12836
12840
  async initialize(input) {
12837
- const initializeResult = toRecord$7(await this.request("initialize", {
12841
+ const initializeResult = toRecord$8(await this.request("initialize", {
12838
12842
  clientCapabilities: { fs: {
12839
12843
  readTextFile: false,
12840
12844
  writeTextFile: false
@@ -12851,15 +12855,15 @@ var GrokBuildAcpSession = class {
12851
12855
  errorType: "adapter",
12852
12856
  message: `protocol.invalid: Grok Build negotiated unsupported ACP version '${String(initializeResult?.protocolVersion ?? "missing")}'`
12853
12857
  });
12854
- const sessionCapabilities = toRecord$7(toRecord$7(initializeResult.agentCapabilities)?.sessionCapabilities);
12855
- this.#supportsResume = toRecord$7(sessionCapabilities?.resume) !== null;
12856
- this.#supportsClose = toRecord$7(sessionCapabilities?.close) !== null;
12858
+ const sessionCapabilities = toRecord$8(toRecord$8(initializeResult.agentCapabilities)?.sessionCapabilities);
12859
+ this.#supportsResume = toRecord$8(sessionCapabilities?.resume) !== null;
12860
+ this.#supportsClose = toRecord$8(sessionCapabilities?.close) !== null;
12857
12861
  if (!(this.#supportsResume && this.#supportsClose)) throw new GrokBuildAcpTransportError({
12858
12862
  code: "protocol.invalid",
12859
12863
  errorType: "adapter",
12860
12864
  message: "protocol.invalid: Grok Build ACP must advertise session resume and close"
12861
12865
  });
12862
- this.#initializeModelState = readModelState(toRecord$7(initializeResult._meta)?.modelState);
12866
+ this.#initializeModelState = readModelState(toRecord$8(initializeResult._meta)?.modelState);
12863
12867
  if (!this.#initializeModelState) throw new GrokBuildAcpTransportError({
12864
12868
  code: "model.inventory_unavailable",
12865
12869
  errorType: "adapter",
@@ -12915,7 +12919,7 @@ var GrokBuildAcpSession = class {
12915
12919
  });
12916
12920
  throw error;
12917
12921
  }
12918
- const record = toRecord$7(result);
12922
+ const record = toRecord$8(result);
12919
12923
  const sessionId = normalizeOptionalText$54(record?.sessionId) ?? input.sessionId ?? null;
12920
12924
  if (!sessionId) throw new GrokBuildAcpTransportError({
12921
12925
  code: "protocol.invalid",
@@ -13031,7 +13035,7 @@ var GrokBuildAcpSession = class {
13031
13035
  if (toolActivity) this.#emitRuntimeEvent(toolActivity);
13032
13036
  }
13033
13037
  async #handleClientRequest(request) {
13034
- const requestSessionId = normalizeOptionalText$54(toRecord$7(request.params)?.sessionId);
13038
+ const requestSessionId = normalizeOptionalText$54(toRecord$8(request.params)?.sessionId);
13035
13039
  if (!(this.#turnActive && requestSessionId !== null && this.#sessionId !== null && requestSessionId === this.#sessionId)) {
13036
13040
  this.#recordInteractionFailure("interaction.session_mismatch", "interaction.session_mismatch: Grok Build requested input for a different session");
13037
13041
  return { error: {
@@ -13067,9 +13071,9 @@ var GrokBuildAcpSession = class {
13067
13071
  }
13068
13072
  #collectAgentMessageChunk(notification) {
13069
13073
  if (notification.method !== "session/update") return;
13070
- const update = toRecord$7(toRecord$7(notification.params)?.update);
13074
+ const update = toRecord$8(toRecord$8(notification.params)?.update);
13071
13075
  if (update?.sessionUpdate !== "agent_message_chunk") return;
13072
- const content = toRecord$7(update.content);
13076
+ const content = toRecord$8(update.content);
13073
13077
  const text = content?.type === "text" ? normalizeOutputText$2(content.text) : null;
13074
13078
  if (!text) return;
13075
13079
  this.#firstOutputAtMs ??= Date.now();
@@ -13134,15 +13138,15 @@ function buildSessionDescriptor(input) {
13134
13138
  };
13135
13139
  }
13136
13140
  function readModelState(value) {
13137
- const record = toRecord$7(value);
13141
+ const record = toRecord$8(value);
13138
13142
  const currentModelId = normalizeOptionalText$54(record?.currentModelId);
13139
13143
  const models = (Array.isArray(record?.availableModels) ? record.availableModels : []).flatMap((candidate) => {
13140
- const model = toRecord$7(candidate);
13144
+ const model = toRecord$8(candidate);
13141
13145
  const modelId = normalizeOptionalText$54(model?.modelId);
13142
13146
  if (!modelId) return [];
13143
- const meta = toRecord$7(model?._meta);
13147
+ const meta = toRecord$8(model?._meta);
13144
13148
  const efforts = Array.isArray(meta?.reasoningEfforts) ? uniqueStrings(meta.reasoningEfforts.map((effort) => {
13145
- const record = toRecord$7(effort);
13149
+ const record = toRecord$8(effort);
13146
13150
  return record?.value ?? record?.id;
13147
13151
  })) : [];
13148
13152
  return [{
@@ -13189,10 +13193,10 @@ function buildModelNegotiationDiagnostics$1(input) {
13189
13193
  }
13190
13194
  function resolveNonInteractiveAuthMethod(initializeResult) {
13191
13195
  const authMethodIds = (Array.isArray(initializeResult.authMethods) ? initializeResult.authMethods : []).flatMap((method) => {
13192
- const methodId = normalizeOptionalText$54(toRecord$7(method)?.id);
13196
+ const methodId = normalizeOptionalText$54(toRecord$8(method)?.id);
13193
13197
  return methodId ? [methodId] : [];
13194
13198
  });
13195
- const preferred = normalizeOptionalText$54(toRecord$7(initializeResult._meta)?.defaultAuthMethodId);
13199
+ const preferred = normalizeOptionalText$54(toRecord$8(initializeResult._meta)?.defaultAuthMethodId);
13196
13200
  if (preferred && (/* @__PURE__ */ new Set(["cached_token", "xai.api_key"])).has(preferred) && authMethodIds.includes(preferred)) return preferred;
13197
13201
  if (authMethodIds.includes("cached_token")) return "cached_token";
13198
13202
  if (authMethodIds.includes("xai.api_key")) return "xai.api_key";
@@ -13237,7 +13241,7 @@ async function resolveCanonicalDirectory(value) {
13237
13241
  }
13238
13242
  }
13239
13243
  function assertSuccessfulStopReason$1(value) {
13240
- const stopReason = normalizeOptionalText$54(toRecord$7(value)?.stopReason);
13244
+ const stopReason = normalizeOptionalText$54(toRecord$8(value)?.stopReason);
13241
13245
  if (!stopReason) throw new GrokBuildAcpTransportError({
13242
13246
  code: "protocol.invalid",
13243
13247
  errorType: "adapter",
@@ -13341,7 +13345,7 @@ function normalizeOptionalText$54(value) {
13341
13345
  const normalized = typeof value === "string" ? value.trim() : "";
13342
13346
  return normalized.length > 0 ? normalized : null;
13343
13347
  }
13344
- function toRecord$7(value) {
13348
+ function toRecord$8(value) {
13345
13349
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
13346
13350
  }
13347
13351
  function toErrorMessage$35(error) {
@@ -14544,7 +14548,7 @@ async function runOpenCodeServerStartAttempt(input) {
14544
14548
  }
14545
14549
  async function assertOpenCodeServerHealthy(input) {
14546
14550
  const healthTimeoutMs = Math.min(readRemainingTimeoutMs(input.deadlineMs) ?? Number.POSITIVE_INFINITY, SERVER_HEALTH_TIMEOUT_MS);
14547
- if (toRecord$6(unwrapSdkData(await Promise.race([createOpencodeClient({
14551
+ if (toRecord$7(unwrapSdkData(await Promise.race([createOpencodeClient({
14548
14552
  baseUrl: input.serverUrl,
14549
14553
  directory: input.directory,
14550
14554
  responseStyle: "data",
@@ -14746,7 +14750,7 @@ async function consumeOpenCodeEvents(input) {
14746
14750
  if (!ready) input.eventReady.reject(/* @__PURE__ */ new Error("OpenCode event stream closed before becoming ready."));
14747
14751
  }
14748
14752
  function dispatchOpenCodeEvent(input, event) {
14749
- const properties = toRecord$6(event.properties);
14753
+ const properties = toRecord$7(event.properties);
14750
14754
  if (!properties) return;
14751
14755
  observeOpenCodeSessionTree(input.turnState, event.type, properties);
14752
14756
  if (!eventBelongsToTurn(properties, input.turnState)) return;
@@ -14781,19 +14785,19 @@ function detachOpenCodeEventTask(task, eventFailure) {
14781
14785
  task.catch(eventFailure.reject);
14782
14786
  }
14783
14787
  function eventBelongsToTurn(properties, turnState) {
14784
- const eventSessionId = normalizeOptionalText$49(properties.sessionID) ?? normalizeOptionalText$49(toRecord$6(properties.part)?.sessionID);
14788
+ const eventSessionId = normalizeOptionalText$49(properties.sessionID) ?? normalizeOptionalText$49(toRecord$7(properties.part)?.sessionID);
14785
14789
  return eventSessionId === null || turnState.acceptedSessionIds.has(eventSessionId);
14786
14790
  }
14787
14791
  function observeOpenCodeSessionTree(turnState, eventType, properties) {
14788
14792
  if (eventType !== "session.created" && eventType !== "session.updated") return;
14789
- const session = toRecord$6(properties.info);
14793
+ const session = toRecord$7(properties.info);
14790
14794
  const sessionId = normalizeOptionalText$49(properties.sessionID) ?? normalizeOptionalText$49(session?.id);
14791
14795
  const parentId = normalizeOptionalText$49(session?.parentID);
14792
14796
  if (sessionId && parentId && turnState.acceptedSessionIds.has(parentId)) turnState.acceptedSessionIds.add(sessionId);
14793
14797
  }
14794
14798
  function observeOpenCodeTurnLifecycle(turnState, eventType, properties) {
14795
14799
  if (eventType === "message.updated") {
14796
- const message = toRecord$6(properties.info);
14800
+ const message = toRecord$7(properties.info);
14797
14801
  const messageId = normalizeOptionalText$49(message?.id);
14798
14802
  const messageSessionId = normalizeOptionalText$49(message?.sessionID) ?? normalizeOptionalText$49(properties.sessionID);
14799
14803
  if (turnState.promptDispatchStarted && turnState.promptMessageId === null && message?.role === "user" && messageSessionId === turnState.rootSessionId && messageId) turnState.promptMessageId = messageId;
@@ -14802,7 +14806,7 @@ function observeOpenCodeTurnLifecycle(turnState, eventType, properties) {
14802
14806
  return;
14803
14807
  }
14804
14808
  const isRootSession = normalizeOptionalText$49(properties.sessionID) === turnState.rootSessionId;
14805
- const status = toRecord$6(properties.status);
14809
+ const status = toRecord$7(properties.status);
14806
14810
  const isIdle = eventType === "session.idle" || eventType === "session.status" && status?.type === "idle";
14807
14811
  if (isRootSession && isIdle && turnState.promptMessageObserved && turnState.assistantMessageIds.size > 0) {
14808
14812
  turnState.rootIdleObserved = true;
@@ -14819,12 +14823,12 @@ function maybeResolveOpenCodeTurn(turnState) {
14819
14823
  function readOpenCodeTurnEventFailure(turnState, eventType, properties) {
14820
14824
  if (eventType === "session.error") return readOpenCodeProviderFailure(properties.error) ?? "OpenCode reported a session error.";
14821
14825
  if (eventType !== "message.updated") return null;
14822
- const message = toRecord$6(properties.info);
14826
+ const message = toRecord$7(properties.info);
14823
14827
  if (message?.role !== "assistant" || normalizeOptionalText$49(message.parentID) !== turnState.promptMessageId) return null;
14824
14828
  return readOpenCodeProviderFailure(message.error);
14825
14829
  }
14826
14830
  async function updateOpenCodePreview(input) {
14827
- const part = toRecord$6(input.part);
14831
+ const part = toRecord$7(input.part);
14828
14832
  const partId = normalizeOptionalText$49(part?.id);
14829
14833
  const messageId = normalizeOptionalText$49(part?.messageID);
14830
14834
  const text = part?.type === "text" && part?.ignored !== true ? normalizeOutputText$1(part.text) : null;
@@ -14841,20 +14845,20 @@ async function readOpenCodeTurnOutput(input) {
14841
14845
  responseStyle: "data",
14842
14846
  throwOnError: true
14843
14847
  }));
14844
- const reply = toRecord$6((Array.isArray(messages) ? messages.filter((value) => {
14845
- const info = toRecord$6(toRecord$6(value)?.info);
14848
+ const reply = toRecord$7((Array.isArray(messages) ? messages.filter((value) => {
14849
+ const info = toRecord$7(toRecord$7(value)?.info);
14846
14850
  return info?.role === "assistant" && normalizeOptionalText$49(info.parentID) === input.promptMessageId;
14847
14851
  }) : []).at(-1));
14848
- const providerFailure = readOpenCodeProviderFailure(toRecord$6(reply?.info)?.error);
14852
+ const providerFailure = readOpenCodeProviderFailure(toRecord$7(reply?.info)?.error);
14849
14853
  if (providerFailure) throw new Error(providerFailure);
14850
14854
  return (Array.isArray(reply?.parts) ? reply.parts : []).flatMap((value) => {
14851
- const part = toRecord$6(value);
14855
+ const part = toRecord$7(value);
14852
14856
  return part?.type === "text" && part.ignored !== true && typeof part.text === "string" ? [part.text] : [];
14853
14857
  }).join("").trim();
14854
14858
  }
14855
14859
  function unwrapOpenCodeEvent(value) {
14856
- const record = toRecord$6(value);
14857
- const payload = toRecord$6(record?.payload) ?? record;
14860
+ const record = toRecord$7(value);
14861
+ const payload = toRecord$7(record?.payload) ?? record;
14858
14862
  const type = normalizeOptionalText$49(payload?.type);
14859
14863
  if (!type) return null;
14860
14864
  return {
@@ -14870,13 +14874,13 @@ function readPermissionRequest(properties) {
14870
14874
  return {
14871
14875
  always: readStringArray(properties.always ?? properties.save),
14872
14876
  id,
14873
- metadata: toRecord$6(properties.metadata) ?? {},
14877
+ metadata: toRecord$7(properties.metadata) ?? {},
14874
14878
  patterns: readStringArray(properties.patterns ?? properties.resources),
14875
14879
  permission,
14876
14880
  sessionID,
14877
- ...toRecord$6(properties.tool) ? { tool: {
14878
- callID: normalizeOptionalText$49(toRecord$6(properties.tool)?.callID) ?? "",
14879
- messageID: normalizeOptionalText$49(toRecord$6(properties.tool)?.messageID) ?? ""
14881
+ ...toRecord$7(properties.tool) ? { tool: {
14882
+ callID: normalizeOptionalText$49(toRecord$7(properties.tool)?.callID) ?? "",
14883
+ messageID: normalizeOptionalText$49(toRecord$7(properties.tool)?.messageID) ?? ""
14880
14884
  } } : {}
14881
14885
  };
14882
14886
  }
@@ -14884,7 +14888,7 @@ function readQuestionRequest(properties) {
14884
14888
  const id = normalizeOptionalText$49(properties.id);
14885
14889
  const sessionID = normalizeOptionalText$49(properties.sessionID);
14886
14890
  const questions = Array.isArray(properties.questions) ? properties.questions.flatMap((value) => {
14887
- const question = toRecord$6(value);
14891
+ const question = toRecord$7(value);
14888
14892
  const prompt = normalizeOptionalText$49(question?.question ?? question?.prompt);
14889
14893
  if (!prompt) return [];
14890
14894
  return [{
@@ -14892,7 +14896,7 @@ function readQuestionRequest(properties) {
14892
14896
  header: normalizeOptionalText$49(question?.header) ?? "Question",
14893
14897
  multiple: question?.multiple === true,
14894
14898
  options: (Array.isArray(question?.options) ? question.options : []).flatMap((optionValue) => {
14895
- const option = toRecord$6(optionValue);
14899
+ const option = toRecord$7(optionValue);
14896
14900
  const label = normalizeOptionalText$49(option?.label);
14897
14901
  return label ? [{
14898
14902
  description: normalizeOptionalText$49(option?.description) ?? "",
@@ -15254,11 +15258,11 @@ function parseOpenCodeSessionModel(policy) {
15254
15258
  };
15255
15259
  }
15256
15260
  function readOpenCodeProviderFailure(value) {
15257
- const error = toRecord$6(value);
15258
- return normalizeOptionalText$49(toRecord$6(error?.data)?.message) ?? normalizeOptionalText$49(error?.message) ?? normalizeOptionalText$49(value);
15261
+ const error = toRecord$7(value);
15262
+ return normalizeOptionalText$49(toRecord$7(error?.data)?.message) ?? normalizeOptionalText$49(error?.message) ?? normalizeOptionalText$49(value);
15259
15263
  }
15260
15264
  function readOpenCodeSessionId(value) {
15261
- const sessionId = normalizeOptionalText$49(toRecord$6(unwrapSdkData(value))?.id);
15265
+ const sessionId = normalizeOptionalText$49(toRecord$7(unwrapSdkData(value))?.id);
15262
15266
  if (!sessionId) throw new OpenCodeServerTransportError({
15263
15267
  code: "protocol.invalid",
15264
15268
  errorType: "adapter",
@@ -15267,7 +15271,7 @@ function readOpenCodeSessionId(value) {
15267
15271
  return sessionId;
15268
15272
  }
15269
15273
  function unwrapSdkData(value) {
15270
- const record = toRecord$6(value);
15274
+ const record = toRecord$7(value);
15271
15275
  return record && "data" in record ? record.data : value;
15272
15276
  }
15273
15277
  function toOpenCodeServerTransportError(error, stderr) {
@@ -15298,7 +15302,7 @@ function normalizeOptionalText$49(value) {
15298
15302
  const normalized = typeof value === "string" ? value.trim() : "";
15299
15303
  return normalized.length > 0 ? normalized : null;
15300
15304
  }
15301
- function toRecord$6(value) {
15305
+ function toRecord$7(value) {
15302
15306
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
15303
15307
  }
15304
15308
  function formatStderrSuffix(stderr) {
@@ -15410,6 +15414,41 @@ function toErrorMessage$33(error) {
15410
15414
  return String(error);
15411
15415
  }
15412
15416
  //#endregion
15417
+ //#region ../../runtime/adapters/opencode/dist/usage/opencode-go-usage-limits.js
15418
+ const OPENCODE_GO_PROVIDER = {
15419
+ displayName: "OpenCode Go",
15420
+ id: "opencode-go"
15421
+ };
15422
+ function parseOpenCodeGoUsageResponse(input) {
15423
+ const usage = toRecord$6(toRecord$6(input.value)?.usage);
15424
+ const parsed = [
15425
+ ["rolling", "5-hour usage"],
15426
+ ["weekly", "Weekly usage"],
15427
+ ["monthly", "Monthly usage"]
15428
+ ].map(([key, label]) => {
15429
+ const value = toRecord$6(usage?.[key]);
15430
+ const percent = value?.percent;
15431
+ const resetsAt = value?.resetsAt;
15432
+ const sourceStatus = value?.status;
15433
+ if (typeof percent !== "number" || !Number.isFinite(percent) || percent < 0 || percent > 100 || typeof resetsAt !== "string" || !Number.isFinite(Date.parse(resetsAt)) || sourceStatus !== "ok" && sourceStatus !== "rate-limited") return null;
15434
+ const exhausted = sourceStatus === "rate-limited" || percent === 100;
15435
+ return {
15436
+ key: `opencode-go:${key}`,
15437
+ label,
15438
+ observedAt: input.observedAt,
15439
+ provider: OPENCODE_GO_PROVIDER,
15440
+ resetsAt,
15441
+ status: exhausted ? "exhausted" : "available",
15442
+ usedPercent: exhausted ? 100 : percent
15443
+ };
15444
+ });
15445
+ if (parsed.some((limit) => limit === null)) return createUnavailableProviderUsageLimits(input.observedAt, OPENCODE_GO_PROVIDER);
15446
+ return parsed.filter((limit) => limit !== null);
15447
+ }
15448
+ function toRecord$6(value) {
15449
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
15450
+ }
15451
+ //#endregion
15413
15452
  //#region ../../runtime/adapters/opencode/dist/index.js
15414
15453
  const OPENCODE_CONVERSATION_BRIDGE_SPEC = resolveBuiltinAdapterConversationBridgeSpec("opencode");
15415
15454
  const OPENCODE_PERMISSION_ENV = "OPENCODE_PERMISSION";
@@ -20057,7 +20096,7 @@ function splitSentences(message) {
20057
20096
  var package_default = {
20058
20097
  $schema: "https://www.schemastore.org/package.json",
20059
20098
  name: "openmeld",
20060
- version: "0.3.144",
20099
+ version: "0.3.146",
20061
20100
  openMeldReleaseDate: "2026-09-02",
20062
20101
  description: "OpenMeld CLI - https://openmeld.ai",
20063
20102
  license: "MIT",
@@ -29119,7 +29158,7 @@ const AGENT_CONTROLLER_USAGE_LIMIT_SUPPORT_MATRIX = {
29119
29158
  codex: "native",
29120
29159
  cursor: "unsupported",
29121
29160
  "grok-build": "native",
29122
- opencode: "unsupported",
29161
+ opencode: "provider_scoped",
29123
29162
  openclaw: "not_evaluated"
29124
29163
  };
29125
29164
  function resolveAgentControllerUsageLimitSupport(agentControllerRef) {
@@ -39430,9 +39469,9 @@ function createModelCatalogReadSession(input) {
39430
39469
  async function readModelCatalogOnce(baseUrl) {
39431
39470
  try {
39432
39471
  const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
39433
- import("./dist-QiJwpnJk.js").then((n) => n.w),
39472
+ import("./dist-Cl9HGiaA.js").then((n) => n.w),
39434
39473
  import("./base-url-CY_j4bLH.js").then((n) => n.n),
39435
- import("./api-client-foundation-C9xMaR4i.js").then((n) => n.t)
39474
+ import("./api-client-foundation-BXB-m4ub.js").then((n) => n.t)
39436
39475
  ]);
39437
39476
  if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
39438
39477
  const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
@@ -54335,6 +54374,8 @@ const OPENCODE_PROBE_HOSTNAME = "127.0.0.1";
54335
54374
  const OPENCODE_SERVER_READY_PREFIX = "opencode server listening";
54336
54375
  const OPENCODE_SERVER_URL_RE = /on\s+(https?:\/\/[^\s]+)/u;
54337
54376
  const ANSI_ESCAPE = String.fromCharCode(27);
54377
+ const OPENCODE_GO_PROVIDER_ID = "opencode-go";
54378
+ const OPENCODE_GO_USAGE_URL = "https://opencode.ai/zen/go/v1/usage";
54338
54379
  async function probeOpenCodeReadiness(input) {
54339
54380
  let server = null;
54340
54381
  try {
@@ -54342,11 +54383,20 @@ async function probeOpenCodeReadiness(input) {
54342
54383
  launchContract: input.launchContract,
54343
54384
  timeoutMs: input.timeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS
54344
54385
  });
54345
- return resolveOpenCodeReadinessFromProviderList((await rejectAfterTimeout(createOpencodeClient({
54386
+ const providerListResult = await rejectAfterTimeout(createOpencodeClient({
54346
54387
  baseUrl: server.url,
54347
54388
  directory: process.cwd(),
54348
54389
  throwOnError: true
54349
- }).provider.list(), SDK_READ_TIMEOUT_MS, `Timed out while reading OpenCode provider status after ${SDK_READ_TIMEOUT_MS}ms.`)).data);
54390
+ }).provider.list(), SDK_READ_TIMEOUT_MS, `Timed out while reading OpenCode provider status after ${SDK_READ_TIMEOUT_MS}ms.`);
54391
+ const readiness = resolveOpenCodeReadinessFromProviderList(providerListResult.data);
54392
+ const usageLimits = providerListResult.data ? await readOpenCodeProviderUsageLimits({
54393
+ observedAt: (/* @__PURE__ */ new Date()).toISOString(),
54394
+ providerList: providerListResult.data
54395
+ }) : void 0;
54396
+ return {
54397
+ ...readiness,
54398
+ ...usageLimits ? { usageLimits } : {}
54399
+ };
54350
54400
  } catch (error) {
54351
54401
  const auth = resolveOpenCodeAuthSnapshotFromProbeError(error);
54352
54402
  return {
@@ -54360,6 +54410,59 @@ async function probeOpenCodeReadiness(input) {
54360
54410
  if (server) await stopOpenCodeProbeServer(server.child);
54361
54411
  }
54362
54412
  }
54413
+ async function readOpenCodeProviderUsageLimits(input) {
54414
+ const providersById = /* @__PURE__ */ new Map();
54415
+ for (const connectedProviderId of input.providerList.connected) {
54416
+ const id = normalizeOptionalText$16(connectedProviderId);
54417
+ if (!(id && id.length <= 256) || providersById.has(id)) continue;
54418
+ const displayName = (normalizeOptionalText$16(input.providerList.all.find((provider) => provider.id === id)?.name) ?? id).slice(0, 256);
54419
+ providersById.set(id, {
54420
+ displayName,
54421
+ id
54422
+ });
54423
+ }
54424
+ const providers = [...providersById.values()];
54425
+ return (await Promise.all(providers.map(async (provider) => {
54426
+ if (provider.id !== OPENCODE_GO_PROVIDER_ID) return createUnsupportedProviderUsageLimits(input.observedAt, provider);
54427
+ const apiKey = await resolveOpenCodeProviderApiKey({
54428
+ authContent: input.authContent,
54429
+ providerId: provider.id,
54430
+ readAuthFile: input.readAuthFile
54431
+ });
54432
+ if (!apiKey) return createUnavailableProviderUsageLimits(input.observedAt, provider);
54433
+ try {
54434
+ const response = await (input.fetchFn ?? fetch)(OPENCODE_GO_USAGE_URL, {
54435
+ headers: { authorization: `Bearer ${apiKey}` },
54436
+ signal: AbortSignal.timeout(SDK_READ_TIMEOUT_MS)
54437
+ });
54438
+ if (!response.ok) return createUnavailableProviderUsageLimits(input.observedAt, provider);
54439
+ return parseOpenCodeGoUsageResponse({
54440
+ observedAt: input.observedAt,
54441
+ value: await response.json()
54442
+ });
54443
+ } catch {
54444
+ return createUnavailableProviderUsageLimits(input.observedAt, provider);
54445
+ }
54446
+ }))).flat().slice(0, 32);
54447
+ }
54448
+ async function resolveOpenCodeProviderApiKey(input) {
54449
+ let authContent = input.authContent ?? process.env.OPENCODE_AUTH_CONTENT;
54450
+ if (!authContent) try {
54451
+ const authPath = resolveOpenCodeAuthPath({
54452
+ homeDir: homedir(),
54453
+ xdgDataHome: process.env.XDG_DATA_HOME
54454
+ });
54455
+ authContent = input.readAuthFile ? await input.readAuthFile(authPath) : await readFile(authPath, "utf8");
54456
+ } catch {
54457
+ return null;
54458
+ }
54459
+ try {
54460
+ const providerAuth = toRecord$2(JSON.parse(authContent)?.[input.providerId]);
54461
+ return providerAuth?.type === "api" ? normalizeOptionalText$16(providerAuth.key) : null;
54462
+ } catch {
54463
+ return null;
54464
+ }
54465
+ }
54363
54466
  async function startOpenCodeProbeServer(input) {
54364
54467
  const port = await findAvailableLocalPort();
54365
54468
  const invocation = buildCliLaunchInvocation({
@@ -55157,6 +55260,7 @@ async function resolveOpenCodeInterfaceSnapshot(input) {
55157
55260
  message: readinessProbe.message ?? input.baseSnapshot.message,
55158
55261
  models: readinessProbe.models,
55159
55262
  status: readinessProbe.status,
55263
+ ...readinessProbe.usageLimits ? { usageLimits: readinessProbe.usageLimits } : {},
55160
55264
  version,
55161
55265
  versionAdvisory: await resolveControllerVersionAdvisory({
55162
55266
  checkedAt: input.baseSnapshot.checkedAt,
@@ -55824,8 +55928,11 @@ function projectAgentControllerInterfaceForCloud(snapshot) {
55824
55928
  schemaVersion: snapshot.schemaVersion,
55825
55929
  skills: [],
55826
55930
  status: snapshot.status,
55827
- ...snapshot.usageLimits ? { usageLimits: snapshot.usageLimits.map((limit) => ({ ...limit })) } : {},
55828
- usageLimitsSupportMatrixVersion: 1,
55931
+ ...snapshot.usageLimits ? { usageLimits: snapshot.usageLimits.map((limit) => ({
55932
+ ...limit,
55933
+ ...limit.provider ? { provider: { ...limit.provider } } : {}
55934
+ })) } : {},
55935
+ usageLimitsSupportMatrixVersion: 2,
55829
55936
  version: snapshot.version,
55830
55937
  ...snapshot.versionAdvisory ? { versionAdvisory: {
55831
55938
  checkedAt: snapshot.versionAdvisory.checkedAt,
@@ -56277,7 +56384,9 @@ function shouldRetryWithoutUsageLimits(input) {
56277
56384
  if (!input.submittedReports.some((report) => report.agentControllerInterface?.usageLimits || report.agentControllerInterface?.usageLimitsSupportMatrixVersion)) return false;
56278
56385
  const failure = toStructuredApiClientFailure(input.error);
56279
56386
  if (failure.status !== 400) return false;
56280
- return collectCompatibilityDiagnosticText(failure).includes("usagelimits");
56387
+ const diagnosticText = collectCompatibilityDiagnosticText(failure);
56388
+ if (diagnosticText.includes("usagelimits")) return true;
56389
+ return diagnosticText.includes("provider") && input.submittedReports.some((report) => report.agentControllerInterface?.usageLimits?.some((limit) => limit.provider));
56281
56390
  }
56282
56391
  function shouldRetryWithoutAgentControllerInterface(input) {
56283
56392
  if (!input.requestedReports.some((report) => report.agentControllerInterface)) return false;
@@ -111121,4 +111230,4 @@ function isHumanInteractiveSpaceRuntime(runtime) {
111121
111230
  //#endregion
111122
111231
  export { runAgentsManage as $, resolveAuthenticationGuidanceFromMessage as $a, getCurrentCommandCheckState as $i, assessCliUpdate as $n, outJsonLine as $o, resolveDaemonDeviceId as $r, runSkillsUpdate as $t, parseEnvelope as A, formatMessage as Aa, createAgentExecutionStatusDisplayRows as Ai, computeRetryDelayMs as An, resolveObservedAgentActivityBinding as Ao, getCommandHintsFromContract as Ar, emitDaemonAgentOverview as At, resolveHumanControllerDisplayName as B, listOpenMeldProfiles as Ba, PREPARE_SESSION_RECONNECT_GRACE_MS as Bi, assertNoRemovedCcSpaceAddressingSyntax as Bn, migrateProjectBindingStore as Bo, formatDualViewGuideForDisplay as Br, readGatewayTextResponse as Bt, toSpaceMetaUpsertInput as C, toStartBackgroundHelperExecutionCompatibility as Ca, resolveAgentProfilePrimaryAgentControllerReport as Ci, resolveCreateProfileKind as Cn, resolveUserFacingCliEntryCommand as Co, createSpaceSubcommandTargetGuideError as Cr, runDaemonStatusFlow as Ct, formatHumanReadTargetList as D, renderHumanErrorCard as Da, notifyDaemonRouteCatalogChanged as Di, formatServiceParticipationReadinessLabel as Dn, readAgentActivityContextForPath as Do, createStartAuthenticationGuideError as Dr, buildProfileWorkspacePresentation as Dt, buildHumanReplyContextSummary as E, buildHumanErrorCopy as Ea, listBuiltinAgentsRegistryEntries as Ei, ensureAgentProfileRuntimeBinding as En, upsertDaemonServiceContract as Eo, createStartAgentIdentityGuideError as Er, runDaemonUninstall as Et, resolveOpenMeldProfileForSpaceCommand as F, requireOpenMeldProfile as Fa, resolveAgentControllerPermissionModeForController as Fi, resolveLocalAgentControllerBlockerReasonCodes as Fn, readAgentActivityOutboxHealth as Fo, registerDaemonControlTargetOptions as Fr, fetchSpaceUpdates as Ft, runAgentsCustomAdd as G, clearSelectedOpenMeldProfileId as Ga, resolveDaemonServiceAlignmentDecision as Gi, buildSpaceRoundReadProjection as Gn, canonicalizeLocalProjectPath as Go, areAllowedActionsEquivalent as Gr, resolveDaemonServiceParticipationStatus as Gt, resolveAgentProfileSetup as H, resolveOpenMeldProfile as Ha, buildOnboardingPlan as Hi, buildDispatchResultReplyWorkflowProjection as Hn, runIfAgentActivityBindingGenerationIsCurrent as Ho, formatAgentOverviewPayload as Hr, parseJsonResponse$1 as Ht, emitSpaceAgentOverview as I, resolveOpenMeldProfileOrNull as Ia, resolveAgentExecutionStatus as Ii, resolveLocalAgentControllerLaunchability as In, removeProjectOutbox as Io, registerAuthLoginRequestOptions as Ir, createCliSpaceApi as It, runAgentsCustomUpdate as J, buildAgentAuthenticationGuide as Ja, resolveServiceUpdateUrgency as Ji, formatRemovedCcRelationMessage as Jn, renderInfoCard as Jo, readPendingOpenMeldToolsUpdateAttempt as Jr, collectSkillsReadinessSnapshot as Jt, runAgentsCustomList as K, getSelectedOpenMeldProfileId as Ka, classifyDaemonServiceRunStartability as Ki, buildUpdatesReplyWorkflowProjection as Kn, enqueueControllerTaskLifecycleEventWhileLocked as Ko, buildAgentFacingPublicationModeGuideLines as Kr, runDaemonServiceParticipationGate as Kt, emitSpaceCliAgentOverview as L, createOpenMeldAgentProfile as La, resolveAgentProfileEditCapabilities as Li, resolveLocalAgentControllerReportDecision as Ln, bindProject as Lo, registerBuiltinAgentSelectionOptions as Lr, fetchSpaceMeta as Lt, assertFullSignalIdArgument as M, resolveRuntimeContext as Ma, getAgentControllerPermissionModeFieldLabel as Mi, submitRuntimeAgentControllerReport as Mn, readCodexSessionTitles as Mo, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as Mr, shouldEmitAgentOverview as Mt, assertValidSpaceIdTarget as N, resolveViewProfileKey as Na, listAgentControllerPermissionModeOptions as Ni, submitRuntimeAgentControllerReports as Nn, enqueueAgentActivityHookEvent as No, registerSkillsTargetSelectionOptions as Nr, runDaemonStartupPreflight as Nt, resolveLinkAccessLabel as O, renderHumanTextErrorCard as Oa, resolveLocalRegistryAgentIdFromAgentControllerRef as Oi, resolveServiceParticipationReadiness as On, removeAgentActivityContextCache as Oo, createUpgradeConfirmationGuideError as Or, buildProfileWorkspaceRows as Ot, prepareAuthenticatedSpaceCommandContext as P, isSelectedOpenMeldProfileRequiredError as Pa, parseAgentControllerRef as Pi, collectLocalAgentControllerInventory as Pn, removeProjectInbox as Po, getCliVersionInfo as Pr, readDaemonStartFailureLogTailLines as Pt, runAgentsList as Q, resolveAuthenticationGuidanceFromError as Qa, finishCurrentCommandCheckScope as Qi, runInteractivePrompt as Qn, errLine as Qo, ensureDaemonRuntimePaths as Qr, runSkillsUninstall as Qt, prepareLocalAgentReadiness as R, createOpenMeldHumanProfile as Ra, resolveEvidenceSyncHealth as Ri, inspectSpaceCacheFile as Rn, listProjectBindings as Ro, buildAgentOverviewFromContract as Rr, updateSpaceMeta as Rt, loadSpaceSignalIndexOrNull as S, resolveDaemonRuntimeContractCompatibility as Sa, createPrimaryBindingReadSession as Si, createProfileByKind as Sn, resolveSetupFollowUpCliEntryCommand as So, createSpaceResultGuideError as Sr, runDaemonSnapshot as St, buildFormalSignalReadPayload as T, OPENMELD_VERSION as Ta, reconcileNewRunnableBuiltinAgentsForSetup as Ti, promptTextEntry as Tn, readDaemonServiceContract as To, createSpaceUpdatesGuideError as Tr, runDaemonTeardownStrict as Tt, runAgents as U, updateOpenMeldProfile as Ua, getSetupFlowCopy as Ui, buildSignalIndex as Un, setDefaultProjectConnection as Uo, OPENMELD_AGENT_MENTAL_MODEL_LINES as Ur, resolveLocalComponentsStatus as Ut, persistAgentTransportSelection as V, primeOpenMeldProfilesSessionCache as Va, buildDaemonRouteObservationPresentation as Vi, buildDispatchResultMessageReadProjection as Vn, removeProjectConnection as Vo, buildDualViewGuideMessage as Vr, toStructuredGatewayFailure as Vt, runAgentsConfig as W, alignSelectedOpenMeldProfileStorage as Wa, buildDaemonServiceTargetSpec as Wi, buildSignalMessageReadProjection as Wn, unbindProject as Wo, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Wr, writeInstalledLocalComponentsSnapshot as Wt, runAgentsDisable as X, createAuthenticationError as Xa, resolveOpenMeldEnvironmentTarget as Xi, promptSearchSelect as Xn, sanitizeTerminalDisplayText as Xo, runPendingDaemonServiceUpdate as Xr, runSkillsEnsure as Xt, runAgentsDetect as Y, buildHumanAuthenticationCard as Ya, assessServerRequiredVersion as Yi, promptSearchMultiselect as Yn, renderTextInfoCard as Yo, readOpenMeldToolsUpdateContextFromEnv as Yr, runSkillsCheck as Yt, runAgentsEnable as Z, resolveAuthenticationGuidance as Za, resolveAuthBaseUrl as Zi, isReturnKeypress as Zn, emitCliJsonEnvelope as Zo, scheduleDaemonServiceUpdate as Zr, runSkillsInstall as Zt, runSpaceWriteWithPasswordRetry as _, ensureVersionStateReady as _a, setCustomProfileWorkspace as _i, fetchAuthUserSnapshot as _n, formatOpenMeldCliCommand as _o, createSpaceContractSetGuideError as _r, runDaemonCancel as _t, runSpaceDelete as a, readCurrentDaemonRuntimeContext as aa, formatDeviceReplyReadinessLabel as ai, buildCommandAuthenticationPromptMessage as an, requestLocalAgentActivitySync as ao, formatElapsedTime as ar, cliJsonSkillsShowEnvelopeSchema as as, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, readVersionState as ba, describeProfileWorkspacePathValidationFailure as bi, resolveDeviceTokenExpiresAt as bn, formatOpenMeldCliTextBlock as bo, createSpacePublicationSetGuideError as br, runDaemonReinstall as bt, runSpaceLeave as c, isDaemonServiceJobNeverSpawned as ca, resolveGatewayChainReadiness as ci, runAuthLogin as cn, resolveAgentActivityRouteForPath as co, formatDaemonServiceMissingRecommendation as cr, revokeOrganizationJoinLinkResponseSchema as cs, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, readRecentDaemonLifecycleEvents as da, createModelCatalogReadSession as di, runAuthStatus as dn, defaultManagedIntegrationPaths as do, createProfileActionGuideError as dr, resolveSpaceWebGatewayOrigin as dt, isCurrentCommandCheckScopeActive as ea, formatDaemonFailureContextText as ei, ensureLocalSkills as en, getProfileDefaultView as eo, isCliUpdateCheckApplicable as er, outLine as es, runAgentsRepair as et, runSpaceSend as f, buildInstallSelfJsonPayload as fa, resolveProfileWorkspaceRuntime as fi, exchangeOneTimeTokenAuthSession as fn, installAgentActivityIntegrations as fo, createProfileCreateGuideError as fr, resolveSpaceSendText as ft, runSpaceReadWithPasswordRetry as g, compareSemver as ga, resolveConfiguredProfileWorkspacePath as gi, extractAuthApiErrorMessage as gn, formatInlineOpenMeldCliCommands as go, createSpaceAliasTargetGuideError as gr, runDaemonBackgroundStartForDecision as gt, uploadPreparedSpaceFiles as h, buildNextVersionState as ha, readProfileWorkspaceConfig as hi, formatActiveOrganizationLabel as hn, uninstallAgentActivityIntegrations as ho, createSpaceAddMembersGuideError as hr, runDaemonAutostart as ht, runSpaceCreate as i, resolveVersionChangeDirection as ia, formatAgentReplyReadinessLabel as ii, connectWebSocket as in, LocalDaemonControlPlaneClientError as io, writeDispatchSpaceActionRecord as ir, cliJsonSkillsLoadEnvelopeSchema as is, colorizeDisplayProfileLabel as it, isSpaceCommandOutputHandledError as j, parseCliViewMode as ja, getAgentControllerPermissionModeDisplayMetadata as ji, submitProfileRuntimeAgentControllerReport as jn, normalizeSharedSessionTitle as jo, registerSpaceMemberSelectionOptions as jr, createDelayedSpinner as jt, resolveOrganizationVisibilityLabel as k, createPresenter as ka, buildAgentControllerRef as ki, assessActionParticipationCandidate as kn, buildAgentActivityEvent as ko, getCommandEntryContract as kr, reconcileCliVersionView as kt, runSpaceList as l, readDaemonServiceJobCrashExitCode as la, resolveOpenClawLocalDiagnosticsValue as li, runAuthLogout as ln, unregisterAgentActivityRoute as lo, canUseInteractivePrompts as lr, compareAgentControllerRefsForDisplay as ls, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, readPendingDaemonServiceUpdate as ma, normalizeCustomProfileWorkspacePath as mi, buildAuthStatusSnapshot as mn, resolveAgentActivityDispatcherCommand as mo, createResetConfirmationGuideError as mr, runDaemon as mt, promptAndConfirmSpacePassword as n, startCurrentCommandCheckScope as na, resolveDaemonServiceFreshnessWarning as ni, readRuntimeReportingHealthState as nn, LocalProjectConnectionError as no, readDispatchOwnedRuntimeGuard as nr, cliJsonOutputEnvelopeSchema as ns, formatTransportModeDisplay as nt, runSpaceHistory as o, readCurrentObservedDaemonRuntimeStatus as oa, formatHumanReplyReadinessReason as oi, ensureCommandAuthenticationOrCancel as on, isAgentActivityRouteRegistered as oo, resolveElapsedTimeMs as or, getOrganizationJoinLinkResponseSchema as os, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, performManagedInstall as pa, ensureOpenMeldManagedProfileWorkspace as pi, buildAuthStatusRows as pn, readAgentActivityIntegrationStatus as po, createProfileMenuGuideError as pr, bestEffortStopCurrentLaneDaemonService as pt, runAgentsCustomRemove as q, setSelectedOpenMeldProfileId as qa, classifyDaemonServiceWakeability as qi, createSpaceMemberIdentityIndex as qn, readControllerTaskLifecycleOutboxHealth as qo, canonicalizeAllowedActions as qr, runDaemonStartDecisionPrompt as qt, runSpaceAddMembers as r, inspectDaemonServiceInventory as ra, resolveCurrentReplyReadinessSnapshot as ri, readRecentDaemonDispatchJournalEvents as rn, validateLocalProjectConnectionPath as ro, readDispatchSpaceActionContextFromEnv as rr, cliJsonSkillsListEnvelopeSchema as rs, colorizeAgentLabel as rt, runSpaceJoin as s, getDaemonSystemServiceLogPath as sa, mapAgentReplyReadinessToLegacyAutoReply as si, evaluateCommandAuthentication as sn, registerAgentActivityRoute as so, formatDaemonServiceDowngradeBlockedRecommendation as sr, organizationJoinLinkErrorResponseSchema as ss, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, resetCurrentCommandCheckState as ta, resolveServiceReadinessFromServiceStatus as ti, readBundledOpenMeldCliSkillDocumentByPath as tn, setProfileDefaultView as to, assertDispatchOwnedRuntimePublicWriteAllowed as tr, cliBinaryDeltaPatchSchema as ts, runAgentsShow as tt, runSpacePassword as u, resolveDaemonServiceManager as ua, syncProfileWorkspaceState as ui, runAuthMenu as un, AGENT_ACTIVITY_INTEGRATION_OWNER as uo, createDoctorFailedGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, fetchLatestCliBinaryRelease as va, setOpenMeldManagedProfileWorkspace as vi, requestDeviceToken as vn, formatOpenMeldCliCommands as vo, createSpaceLeaveGuideError as vr, runDaemonInstall as vt, buildFormalDispatchResultReadPayload as w, resolveCurrentDaemonExpectedVersion as wa, listAgentTargetStates as wi, resolveCreateProfileName as wn, syncLocalAgentActivity as wo, createSpaceTargetGuideError as wr, runDaemonStop as wt, loadSpaceIdentityDirectoryOrNull as x, writeVersionState as xa, syncDeviceRuntimeStateProjection as xi, revokeAuthAccessToken as xn, formatProfileAwareOpenMeldCliCommands as xo, createSpaceRemoveMembersGuideError as xr, runDaemonRunAfterEntryChecks as xt, emitHumanReadSignalsTextProjection as y, fetchLatestPackageInfo as ya, validateCustomProfileWorkspacePath as yi, resolveDeviceAuthClientId as yn, formatOpenMeldCliLine as yo, createSpaceMenuGuideError as yr, runDaemonInterrupt as yt, buildReplyReadinessGuidance as z, deleteOpenMeldProfile as za, resolveNativeAgentControllerPermissionModeForController as zi, upsertSpaceConfig as zn, listProjectConnectionsWithStatus as zo, DualViewGuideError as zr, readGatewayJsonResponse as zt };
111123
111232
 
111124
- //# sourceMappingURL=command-Be-JdIkv.js.map
111233
+ //# sourceMappingURL=command-DH6wJoZy.js.map