openmeld 0.3.207 → 0.3.209

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.
Files changed (56) hide show
  1. package/dist/{add-me-membership-1JHMjZoR.js → add-me-membership-Ck31xM9l.js} +2 -2
  2. package/dist/{add-me-membership-1JHMjZoR.js.map → add-me-membership-Ck31xM9l.js.map} +1 -1
  3. package/dist/{agents-CIDsThyG.js → agents-Caxxitma.js} +1190 -188
  4. package/dist/agents-Caxxitma.js.map +1 -0
  5. package/dist/{api-client-foundation-DSurenul.js → api-client-foundation-BGGVYxgq.js} +3 -3
  6. package/dist/{api-client-foundation-DSurenul.js.map → api-client-foundation-BGGVYxgq.js.map} +1 -1
  7. package/dist/{api-client-foundation-D6_NXHPV.js → api-client-foundation-LfQQZwak.js} +1 -1
  8. package/dist/{auth-session-CO5XtFaq.js → auth-session-CVxflepT.js} +2 -2
  9. package/dist/{auth-session-CO5XtFaq.js.map → auth-session-CVxflepT.js.map} +1 -1
  10. package/dist/auth-session-LTSqq_Tb.js +4 -0
  11. package/dist/{command-Bzt9zgnI.js → command-DqXu9TET.js} +48 -9
  12. package/dist/command-DqXu9TET.js.map +1 -0
  13. package/dist/{computer-connection-BOl79Ftf.js → computer-connection-TgsnU0K9.js} +2 -2
  14. package/dist/{computer-connection-BOl79Ftf.js.map → computer-connection-TgsnU0K9.js.map} +1 -1
  15. package/dist/{computer-connection-review-BTOvbJYL.js → computer-connection-review-Dg4TZc8O.js} +6 -6
  16. package/dist/{computer-connection-review-BTOvbJYL.js.map → computer-connection-review-Dg4TZc8O.js.map} +1 -1
  17. package/dist/{computer-setup-continuation-DmKdhR5u.js → computer-setup-continuation-Imn8Ykr-.js} +4 -4
  18. package/dist/{computer-setup-continuation-DmKdhR5u.js.map → computer-setup-continuation-Imn8Ykr-.js.map} +1 -1
  19. package/dist/{daemon-service-runtime-DQW9gSLT.js → daemon-service-runtime-CRHAVnEX.js} +3 -3
  20. package/dist/{daemon-service-runtime-DQW9gSLT.js.map → daemon-service-runtime-CRHAVnEX.js.map} +1 -1
  21. package/dist/{dist-D-kJdWZE.js → dist-CtoP6msP.js} +252 -188
  22. package/dist/dist-CtoP6msP.js.map +1 -0
  23. package/dist/dist-DVciurWV.js +4 -0
  24. package/dist/{elapsed-time-CcoM2R3N.js → elapsed-time-D6DCEnz7.js} +4 -4
  25. package/dist/{elapsed-time-CcoM2R3N.js.map → elapsed-time-D6DCEnz7.js.map} +1 -1
  26. package/dist/{installation-inventory-DJlwXa1q.js → installation-inventory-uRDaBzO_.js} +3 -3
  27. package/dist/{installation-inventory-DJlwXa1q.js.map → installation-inventory-uRDaBzO_.js.map} +1 -1
  28. package/dist/{openmeld-CiL4AiB0.js → openmeld-DYSsGBFL.js} +260 -38
  29. package/dist/openmeld-DYSsGBFL.js.map +1 -0
  30. package/dist/{openmeld-maintenance-worker-DjdmRASI.js → openmeld-maintenance-worker-sNN5314u.js} +5 -5
  31. package/dist/{openmeld-maintenance-worker-DjdmRASI.js.map → openmeld-maintenance-worker-sNN5314u.js.map} +1 -1
  32. package/dist/{openmeld-tools-update-coordinator-D9Skj8IE.js → openmeld-tools-update-coordinator-jJrVAHgC.js} +516 -104
  33. package/dist/openmeld-tools-update-coordinator-jJrVAHgC.js.map +1 -0
  34. package/dist/openmeld.js +3 -3
  35. package/dist/{prepare-session-executor-B0NtjHEL.js → prepare-session-executor-DtWDB9RM.js} +9 -9
  36. package/dist/{prepare-session-executor-B0NtjHEL.js.map → prepare-session-executor-DtWDB9RM.js.map} +1 -1
  37. package/dist/{runtime-transport-QIZmAo4-.js → runtime-transport-BrzIQru0.js} +3657 -3521
  38. package/dist/runtime-transport-BrzIQru0.js.map +1 -0
  39. package/dist/{service-account-authorization-Dt8kGvq8.js → service-account-authorization-Aft4cBFn.js} +3 -3
  40. package/dist/{service-account-authorization-Dt8kGvq8.js.map → service-account-authorization-Aft4cBFn.js.map} +1 -1
  41. package/dist/{service-control-capabilities-CzUB1ovW.js → service-control-capabilities-12ePIPVW.js} +1 -1
  42. package/dist/{service-control-capabilities-BU5F75zi.js → service-control-capabilities-B8pv0P4V.js} +2 -2
  43. package/dist/{service-control-capabilities-BU5F75zi.js.map → service-control-capabilities-B8pv0P4V.js.map} +1 -1
  44. package/dist/upgrade-Cie6yXZc.js +4 -0
  45. package/dist/{upgrade-NxpTydHp.js → upgrade-DrUXCeru.js} +4 -4
  46. package/dist/{upgrade-NxpTydHp.js.map → upgrade-DrUXCeru.js.map} +1 -1
  47. package/package.json +2 -2
  48. package/dist/agents-CIDsThyG.js.map +0 -1
  49. package/dist/auth-session-B7QMhHwh.js +0 -4
  50. package/dist/command-Bzt9zgnI.js.map +0 -1
  51. package/dist/dist-D-kJdWZE.js.map +0 -1
  52. package/dist/dist-DTG_Vqc7.js +0 -4
  53. package/dist/openmeld-CiL4AiB0.js.map +0 -1
  54. package/dist/openmeld-tools-update-coordinator-D9Skj8IE.js.map +0 -1
  55. package/dist/runtime-transport-QIZmAo4-.js.map +0 -1
  56. package/dist/upgrade-DLECkjMt.js +0 -4
@@ -3,15 +3,15 @@
3
3
  import { n as toDaemonRouteObservationUrl } from "./urls-CY2uzH2-.js";
4
4
  import { t as isLoopbackHostname } from "./loopback-hostname-DHQPKq8N.js";
5
5
  import { B as deviceOpenClawProfileBootstrapPath, C as isProcessIdentityAlive, H as deviceOpenClawProfileWorkspaceDir, I as accountProfileViewPath, L as accountProfileWorkspacePath, N as OPENMELD_HOME_ENV_KEY, P as accountProfileLocalMetaPath, Q as openMeldBackupsDir, S as CURRENT_PROCESS_START_IDENTITY, V as deviceOpenClawProfileDir, X as normalizeAccountKey, Z as normalizeOpenMeldProfileId, _ as resolveCliContext, a as isOpenMeldOrphanedLockError, d as runWithHeldLock, dt as resolveOpenMeldEnvPreset, ft as resolveOpenMeldRootDir, g as readCliContextState, h as listCliContextStates, ht as runtimeDir, i as isOpenMeldLockError, q as isPublishedOpenMeldHome, rt as openMeldRootDir, t as acquireLock, tt as openMeldManagedVersionBinaryPath, y as writeCliContextState, yt as systemDir } from "./lock-Dxp6o_t_.js";
6
- import { Cn as toStructuredApiClientFailure, Gt as createLocalRuntimeExpectedRoutesApi, Hn as toErrorMessage$24, Ln as OPENMELD_HEADER_PROFILE_ID, Mt as createAgentProfileBindingApi, Rt as createCurrentDeviceApi, ci as agentControllerPermissionModeSchema, gr as modelCatalogSchema, li as agentControllerCollaborationModeSchema, si as openCodePermissionConfigSchema, t as OpenMeldApiClientHttpError } from "./dist-D-kJdWZE.js";
6
+ import { Bn as OPENMELD_HEADER_PROFILE_ID, En as toStructuredApiClientFailure, Gn as toErrorMessage$24, Kt as createLocalRuntimeExpectedRoutesApi, Mt as createAgentProfileBindingApi, br as modelCatalogSchema, di as openCodePermissionConfigSchema, fi as agentControllerPermissionModeSchema, pi as agentControllerCollaborationModeSchema, t as OpenMeldApiClientHttpError, zt as createCurrentDeviceApi } from "./dist-CtoP6msP.js";
7
7
  import { _ as canonicalizeAgentControllerRef, b as normalizeKnownBuiltinAgentControllerId, d as resolveBuiltinAgentControllerConversationKind, f as HOSTED_CENTER_AGENT_CONTROLLER_REF, g as buildAgentControllerRoutingKey, l as buildAgentControllerConversationRef, m as HOSTED_REMOTE_AGENT_CONTROLLER_REF, n as runtimeAgentControllerConversationIdMappingSpecSchema, o as runtimeStreamingModeSchema, p as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, r as runtimeAgentControllerLaunchContractSchema, s as runtimeTransportModeSchema, u as conversationPolicySchema, v as canonicalizeBuiltinAgentControllerRef, x as parseAgentControllerRef$1 } from "./controller-contract-pe3_Re-c.js";
8
- import { B as isOriginalErrorSafeForMessageDetails, Br as profileCapabilitiesResponseSchema, Fr as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, G as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Gr as openMeldProfileIdSchema, Ir as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, Jr as resolveCommandAgentWorkActivity, N as runtimeTransportRejectedProfileRegistrationSchema, Nr as localAgentCatalogSchema, O as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, Rr as authProfileManagedRoleSchema, U as openMeldDaemonProviderAccessEvidenceSchema, Vr as profileErrorResponseSchema, W as openMeldDaemonTaskResultEnvelopeWriteSchema, _ as runtimeTransportErrorCodeSchema, _n as formatCanonicalMentionLiteral, _t as agentInteractionResolutionSchema, bn as normalizeMessageEnvelope, br as resolvePublicAgentAvailabilityCopy, i as localWakeRouteReportSchema, n as daemonExecutionCompatibilitySchema, o as runtimeTransportCapabilitiesSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, xr as resolvePublicAgentFailureRecovery, z as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH } from "./runtime-transport-QIZmAo4-.js";
8
+ import { An as normalizeMessageEnvelope, B as isOriginalErrorSafeForMessageDetails, Br as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, Dn as formatCanonicalMentionLiteral, G as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Gr as profileErrorResponseSchema, Hr as authProfileManagedRoleSchema, Jn as agentInteractionResolutionSchema, Lr as localAgentCatalogSchema, N as runtimeTransportRejectedProfileRegistrationSchema, O as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, Qr as resolveCommandAgentWorkActivity, U as openMeldDaemonProviderAccessEvidenceSchema, W as openMeldDaemonTaskResultEnvelopeWriteSchema, Wr as profileCapabilitiesResponseSchema, X as resolvePublicAgentAvailabilityCopy, Yr as openMeldProfileIdSchema, Z as resolvePublicAgentFailureRecovery, _ as runtimeTransportErrorCodeSchema, i as localWakeRouteReportSchema, n as daemonExecutionCompatibilitySchema, o as runtimeTransportCapabilitiesSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, z as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, zr as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE } from "./runtime-transport-BrzIQru0.js";
9
9
  import { L as openMeldToolsUpdateAttemptSchema, St as profileWorkspaceModeSchema, V as openMeldToolsUpdateRequestSourceSchema, _ as providerDispatchRuntimeContextSchema, a as openMeldDaemonControlPlaneResponseSchema, g as skippedDaemonProfileSchema, ht as normalizeOptionalWorkingDirectory, i as openMeldDaemonControlPlaneRequestSchema, mt as agentProfileIdSchema, pt as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, y as conversationExecutionStateSchema } from "./control-plane-D9jDcbMZ.js";
10
10
  import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
11
- import { $ as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, F as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, H as MAX_HEARTBEAT_INTERVAL_MS$2, I as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, J as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, K as OPENCLAW_CLI_TIMEOUT_MS$1, L as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, M as CATALOG_SYNC_RETRY_INTERVAL_MS$1, N as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, P as DAEMON_RUNTIME_CONTRACT_EPOCH$1, Q as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, R as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, V as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, W as MIN_HEARTBEAT_INTERVAL_MS$2, Y as REGISTER_RESPONSE_TIMEOUT_MS$1, Z as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, p as hasPendingComputerSetupContinuation, q as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, u as getAuthSessionState, z as DEFAULT_HEARTBEAT_INTERVAL_MS$1 } from "./auth-session-CO5XtFaq.js";
11
+ import { $ as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, F as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, H as MAX_HEARTBEAT_INTERVAL_MS$2, I as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, J as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, K as OPENCLAW_CLI_TIMEOUT_MS$1, L as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, M as CATALOG_SYNC_RETRY_INTERVAL_MS$1, N as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, P as DAEMON_RUNTIME_CONTRACT_EPOCH$1, Q as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, R as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, V as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, W as MIN_HEARTBEAT_INTERVAL_MS$2, Y as REGISTER_RESPONSE_TIMEOUT_MS$1, Z as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, p as hasPendingComputerSetupContinuation, q as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, u as getAuthSessionState, z as DEFAULT_HEARTBEAT_INTERVAL_MS$1 } from "./auth-session-CVxflepT.js";
12
12
  import { n as resolveOpenMeldDistribution, t as isBinaryDistribution } from "./distribution-DY2fBeSW.js";
13
13
  import { r as readDaemonRuntimeLease } from "./daemon-runtime-lease-Dd4hdHNo.js";
14
- import { $ as readManagedCliInstallation, A as prepareDaemonServiceBundle, B as resolveDaemonServiceArtifact, Bt as readDaemonServiceContract, C as daemonServiceExecutableWrapperPath, Ct as resolveDaemonServiceUpdateWorkerLaunchdPlistPath, D as ensureDaemonServiceStableBinaryExecutable, Dt as resolveDaemonServiceUpdateWorkerWindowsScriptPath, E as discardPreparedDaemonServiceBundle, Et as resolveDaemonServiceUpdateWorkerSystemdUnitPath, F as restoreDaemonActiveBundleStateSnapshot, Ft as requestLocalSyncRouteCatalog, I as runAuditedServiceManagerCarrierMutation, L as verifyDaemonActiveBundleIntegrity, Lt as clearDaemonServiceContract, N as resolveDaemonBundleEntryPathFromState, Nt as requestLocalDaemonServiceUpdateReadiness, O as ensureDaemonServiceUpdateWorkerBinaryExecutable, P as resolveInstalledDaemonBundleFingerprint, Pt as requestLocalDaemonShutdown, Q as pruneManagedInstallVersions, R as writeDaemonServiceExecutableWrapper, Rt as isDaemonServiceContractIdentityReusable, S as daemonServiceBinaryExecutablePath, St as resolveDaemonServiceUpdateWorkerIdentity, T as daemonServiceUpdateWorkerBinaryPath, Tt as resolveDaemonServiceUpdateWorkerSystemdTimerUnitPath, U as readLatestDaemonLifecycleConnectionStateEvent, V as emitDaemonLifecycleEvent, Vt as upsertDaemonServiceContract, W as readLatestDaemonLifecycleOriginEvent, _ as matchesExpectedDaemonServiceManagerDefinition, a as resolveDaemonRuntimeState, at as persistPendingDaemonServiceUpdate, bt as daemonServiceUpdateWorkerNpmEntryPath, c as resolveObservedDaemonRuntimeStatus, ct as buildNextVersionState, d as inspectLegacySharedDaemonService, et as resolveCliSelfVersion, f as listDaemonOwnedProcesses, ft as fetchLatestPackageInfo, g as assertDaemonMaintenanceInstallationOwnership, gt as resolveBundledServiceRelease, ht as writeVersionState, i as readCurrentObservedDaemonRuntimeStatus, it as completePendingDaemonServiceUpdate, j as readDaemonActiveBundleState, jt as LocalDaemonControlPlaneClientError, k as isDaemonBundleSourceAllowedForLane, l as resolveObservedRuntimeCommandEntryPath, lt as compareSemver, m as normalizeDaemonCommandPath, mt as readVersionState, n as getEffectiveDaemonRuntimeStatus, nt as OPENMELD_VERSION, o as resolveDaemonServiceManagerForRuntimeState, pt as isPlainReleaseVersion, q as runDaemonServiceManagerAction, r as readCurrentDaemonRuntimeContext, rt as DAEMON_SERVICE_UPDATE_JOB_SCHEMA, s as waitForDaemonSystemServiceToStop, st as readPendingDaemonServiceUpdate, t as clearDaemonRuntimeStateIfDefinitelyStopped, tt as withManagedInstallTransaction, u as cleanupLegacySharedDaemonServiceState, vt as INDEPENDENT_MAINTENANCE_REGISTRATION, w as daemonServiceLauncherPath, wt as resolveDaemonServiceUpdateWorkerSystemdPathUnitPath, x as clearDaemonServiceUpdateWorkerBinaryExecutable, xt as hasIndependentMaintenanceRegistration, y as activateDaemonServiceBundle, yt as configureDaemonMaintenanceEnvironment, z as writeDaemonServiceLauncher, zt as isUnsafeProductionDeviceId } from "./daemon-service-runtime-DQW9gSLT.js";
14
+ import { $ as readManagedCliInstallation, A as prepareDaemonServiceBundle, B as resolveDaemonServiceArtifact, Bt as readDaemonServiceContract, C as daemonServiceExecutableWrapperPath, Ct as resolveDaemonServiceUpdateWorkerLaunchdPlistPath, D as ensureDaemonServiceStableBinaryExecutable, Dt as resolveDaemonServiceUpdateWorkerWindowsScriptPath, E as discardPreparedDaemonServiceBundle, Et as resolveDaemonServiceUpdateWorkerSystemdUnitPath, F as restoreDaemonActiveBundleStateSnapshot, Ft as requestLocalSyncRouteCatalog, I as runAuditedServiceManagerCarrierMutation, L as verifyDaemonActiveBundleIntegrity, Lt as clearDaemonServiceContract, N as resolveDaemonBundleEntryPathFromState, Nt as requestLocalDaemonServiceUpdateReadiness, O as ensureDaemonServiceUpdateWorkerBinaryExecutable, P as resolveInstalledDaemonBundleFingerprint, Pt as requestLocalDaemonShutdown, Q as pruneManagedInstallVersions, R as writeDaemonServiceExecutableWrapper, Rt as isDaemonServiceContractIdentityReusable, S as daemonServiceBinaryExecutablePath, St as resolveDaemonServiceUpdateWorkerIdentity, T as daemonServiceUpdateWorkerBinaryPath, Tt as resolveDaemonServiceUpdateWorkerSystemdTimerUnitPath, U as readLatestDaemonLifecycleConnectionStateEvent, V as emitDaemonLifecycleEvent, Vt as upsertDaemonServiceContract, W as readLatestDaemonLifecycleOriginEvent, _ as matchesExpectedDaemonServiceManagerDefinition, a as resolveDaemonRuntimeState, at as persistPendingDaemonServiceUpdate, bt as daemonServiceUpdateWorkerNpmEntryPath, c as resolveObservedDaemonRuntimeStatus, ct as buildNextVersionState, d as inspectLegacySharedDaemonService, et as resolveCliSelfVersion, f as listDaemonOwnedProcesses, ft as fetchLatestPackageInfo, g as assertDaemonMaintenanceInstallationOwnership, gt as resolveBundledServiceRelease, ht as writeVersionState, i as readCurrentObservedDaemonRuntimeStatus, it as completePendingDaemonServiceUpdate, j as readDaemonActiveBundleState, jt as LocalDaemonControlPlaneClientError, k as isDaemonBundleSourceAllowedForLane, l as resolveObservedRuntimeCommandEntryPath, lt as compareSemver, m as normalizeDaemonCommandPath, mt as readVersionState, n as getEffectiveDaemonRuntimeStatus, nt as OPENMELD_VERSION, o as resolveDaemonServiceManagerForRuntimeState, pt as isPlainReleaseVersion, q as runDaemonServiceManagerAction, r as readCurrentDaemonRuntimeContext, rt as DAEMON_SERVICE_UPDATE_JOB_SCHEMA, s as waitForDaemonSystemServiceToStop, st as readPendingDaemonServiceUpdate, t as clearDaemonRuntimeStateIfDefinitelyStopped, tt as withManagedInstallTransaction, u as cleanupLegacySharedDaemonServiceState, vt as INDEPENDENT_MAINTENANCE_REGISTRATION, w as daemonServiceLauncherPath, wt as resolveDaemonServiceUpdateWorkerSystemdPathUnitPath, x as clearDaemonServiceUpdateWorkerBinaryExecutable, xt as hasIndependentMaintenanceRegistration, y as activateDaemonServiceBundle, yt as configureDaemonMaintenanceEnvironment, z as writeDaemonServiceLauncher, zt as isUnsafeProductionDeviceId } from "./daemon-service-runtime-CRHAVnEX.js";
15
15
  import { i as windowsTaskActionArguments, n as runWindowsUserTask, r as windowsPowerShellPath } from "./windows-user-task-DqJWtlAm.js";
16
16
  import { C as updateConfiguredDeviceRuntimeState, T as updateConfiguredSkillsConfig, _ as getConfiguredViewCustomization, a as resolveBaseUrl, c as resolveExplicitGatewayUrlOrThrow, d as createDefaultRuntimeAgentControllerSettings, g as getConfiguredSkillsConfig, h as getConfiguredOpenMeldToolsMaintenance, i as normalizeGatewayBaseUrlOrNull, o as resolveBaseUrlOrNull, p as getConfiguredDeviceRuntimeState, v as getRuntimeConfigReadHealth, x as setConfiguredOpenMeldToolsMaintenance, y as resolveRuntimeSkillsCustomTargetId } from "./base-url-C6sHRNGu.js";
17
17
  import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
@@ -19,7 +19,7 @@ import { A as getDaemonStatus, B as restoreDaemonInstallStateSnapshot, F as read
19
19
  import { O as assertSafePublishedProductionServiceRegistrationMutation, S as resolveDaemonServiceManager, T as waitForLaunchdJobUnloaded, a as disableDaemonServiceAutostartIfConfigured, c as getDaemonSystemServiceLogPath, o as formatDaemonServiceJobDiagnosticsEvidence, s as getDaemonServiceLaunchdLabel, v as readDaemonServiceStartupPolicyCurrent, w as startLaunchdService } from "./daemon-service-manager-GiMCiTmu.js";
20
20
  import { a as formatOpenMeldCliCommand, c as formatOpenMeldCliTextBlock, i as formatInlineOpenMeldCliCommands, n as resolveOpenMeldEnvironmentTargetFromEnv, o as formatOpenMeldCliCommands, r as resolveAuthBaseUrl, t as resolveOpenMeldEnvironmentTarget } from "./openmeld-environment-target-NtJYJe1D.js";
21
21
  import { n as toErrorMessage$25, t as sleep } from "./dist-o3UL1EGQ.js";
22
- import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-DSurenul.js";
22
+ import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-BGGVYxgq.js";
23
23
  import { createRequire } from "node:module";
24
24
  import { createHash, randomUUID } from "node:crypto";
25
25
  import { homedir, loadavg, tmpdir, userInfo } from "node:os";
@@ -645,7 +645,7 @@ async function requestOpenMeldProfilesApi(input) {
645
645
  })
646
646
  });
647
647
  }
648
- const record = isRecord$4(payload) ? payload : {};
648
+ const record = isRecord$5(payload) ? payload : {};
649
649
  if (!readBooleanField(record, "ok")) {
650
650
  const parsedError = profileErrorResponseSchema.safeParse(payload);
651
651
  const code = parsedError.success ? parsedError.data.code : null;
@@ -723,7 +723,7 @@ async function emitRouteCatalogSync(reason) {
723
723
  await touchDaemonCatalogSyncSignal({ reason }).catch(() => void 0);
724
724
  }
725
725
  function parseOpenMeldProfileItem(value) {
726
- const record = isRecord$4(value) ? value : {};
726
+ const record = isRecord$5(value) ? value : {};
727
727
  const openMeldProfileId = readOptionalStringField(record, "openMeldProfileId");
728
728
  if (!openMeldProfileId) throw new Error("invalid profile payload: missing openMeldProfileId");
729
729
  const profileName = readRequiredStringField(record, "profileName");
@@ -781,13 +781,13 @@ function readOptionalManagedRoleField(input, field) {
781
781
  }
782
782
  function readRecordField(input, field) {
783
783
  const value = input[field];
784
- if (isRecord$4(value)) return value;
784
+ if (isRecord$5(value)) return value;
785
785
  throw new Error(`invalid api payload: missing ${field}`);
786
786
  }
787
787
  function readArrayField(input, field) {
788
788
  const value = input[field];
789
789
  if (!Array.isArray(value)) throw new Error(`invalid api payload: missing ${field}`);
790
- return value.filter(isRecord$4);
790
+ return value.filter(isRecord$5);
791
791
  }
792
792
  function readRequiredStringField(input, field) {
793
793
  const value = normalizeOptionalString$6(input[field]);
@@ -830,7 +830,7 @@ async function parseResponseJson(response) {
830
830
  }
831
831
  }
832
832
  function extractApiErrorMessage(payload, status) {
833
- const record = isRecord$4(payload) ? payload : {};
833
+ const record = isRecord$5(payload) ? payload : {};
834
834
  const message = normalizeOptionalString$6(record.message) ?? normalizeOptionalString$6(record.error_description) ?? normalizeOptionalString$6(record.error);
835
835
  if (message) return message;
836
836
  return `request failed with status ${status}`;
@@ -868,7 +868,7 @@ function isHostedProfilesEndpoint(endpoint) {
868
868
  const url = parseUrlOrNull(endpoint);
869
869
  return Boolean(url && !isLoopbackHostname(url.hostname) && url.pathname.startsWith("/v1/profiles"));
870
870
  }
871
- function isRecord$4(value) {
871
+ function isRecord$5(value) {
872
872
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
873
873
  }
874
874
  //#endregion
@@ -1875,7 +1875,7 @@ function resolveOpenMeldAccountContext(input) {
1875
1875
  };
1876
1876
  }
1877
1877
  async function resolveCurrentOpenMeldAccountContext() {
1878
- const { getAuthSessionMetadata } = await import("./auth-session-B7QMhHwh.js");
1878
+ const { getAuthSessionMetadata } = await import("./auth-session-LTSqq_Tb.js");
1879
1879
  return resolveOpenMeldAccountContext({ session: await getAuthSessionMetadata().catch(() => null) });
1880
1880
  }
1881
1881
  function resolveHostKey(baseUrl) {
@@ -2338,7 +2338,7 @@ var DaemonServiceRunError = class extends Error {
2338
2338
  //#region src/local-service/state/runtime-contract-guard.ts
2339
2339
  const RUNTIME_CONTRACT_META_SCHEMA = "daemon.runtime.contract.meta";
2340
2340
  const RUNTIME_CONTRACT_REPAIR_REPORT_SCHEMA = "daemon.runtime.contract.repair.report";
2341
- const isRecord$3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
2341
+ const isRecord$4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
2342
2342
  const createRuntimeContractMeta = (input) => ({
2343
2343
  schema: RUNTIME_CONTRACT_META_SCHEMA,
2344
2344
  v: 1,
@@ -2358,7 +2358,7 @@ const createRuntimeContractRepairReport = (input) => ({
2358
2358
  errorMessage: input.errorMessage
2359
2359
  });
2360
2360
  const parseRuntimeContractMeta = (value) => {
2361
- if (!isRecord$3(value)) return null;
2361
+ if (!isRecord$4(value)) return null;
2362
2362
  if (typeof value.v === "number" && value.v > 1) throw new Error("This OpenMeld version cannot read the newer local runtime state. Update OpenMeld to continue. Your local data has been preserved.");
2363
2363
  if (value.schema !== RUNTIME_CONTRACT_META_SCHEMA || value.v !== 1) return null;
2364
2364
  const contractEpoch = normalizeOptionalText$52(value.contractEpoch);
@@ -2372,7 +2372,7 @@ const parseRuntimeContractMeta = (value) => {
2372
2372
  };
2373
2373
  };
2374
2374
  const parseRuntimeContractRepairReport = (value) => {
2375
- if (!isRecord$3(value)) return null;
2375
+ if (!isRecord$4(value)) return null;
2376
2376
  if (value.schema !== RUNTIME_CONTRACT_REPAIR_REPORT_SCHEMA || value.v !== 1) return null;
2377
2377
  const status = value.status;
2378
2378
  const reason = value.reason;
@@ -3165,9 +3165,9 @@ function createAgentControllerProcessTableSnapshotReader(input) {
3165
3165
  if (!(Number.isFinite(input.maxAgeMs) && input.maxAgeMs > 0)) throw new Error("process table snapshot max age must be positive");
3166
3166
  const now = input.now ?? Date.now;
3167
3167
  let snapshot = null;
3168
- return async () => {
3168
+ return async (options) => {
3169
3169
  const readAtMs = now();
3170
- if (snapshot) {
3170
+ if (snapshot && !options?.fresh) {
3171
3171
  const ageMs = readAtMs - snapshot.capturedAtMs;
3172
3172
  if (snapshot.pending || ageMs >= 0 && ageMs < input.maxAgeMs) return await snapshot.processTable;
3173
3173
  }
@@ -3253,7 +3253,7 @@ function isProcessDiscoveryTimeoutError(error) {
3253
3253
  const processDiscoveryDiagnostics = createAgentControllerProcessDiscoveryDiagnosticAggregator();
3254
3254
  function spawnAgentControllerProcess(input) {
3255
3255
  const signalTarget = resolveAgentControllerProcessSignalTarget();
3256
- const supervisionId = randomUUID();
3256
+ const supervisionId = input.supervisionId ?? randomUUID();
3257
3257
  const child = spawn(input.bin, input.args, {
3258
3258
  cwd: input.cwd,
3259
3259
  detached: signalTarget === "process_group",
@@ -3433,7 +3433,7 @@ const listAgentControllerSupervisedProcessIds = async (input) => {
3433
3433
  processTable
3434
3434
  });
3435
3435
  }
3436
- const processTable = await readMacOsSupervisedProcessTable();
3436
+ const processTable = await readMacOsSupervisedProcessTable({ fresh: input.fresh });
3437
3437
  processDiscoveryDiagnostics.recovered("supervision_marker");
3438
3438
  return resolveAgentControllerSupervisedProcessIds({
3439
3439
  ...input,
@@ -3462,6 +3462,7 @@ function resolveAgentControllerProcessIdsFromTable(input) {
3462
3462
  processGroupByProcessId.set(processId, processGroupId);
3463
3463
  if (input.supervisionMarker !== void 0 && commandParts.includes(input.supervisionMarker)) markedProcessIds.add(processId);
3464
3464
  }
3465
+ if (input.processId === null) return [...markedProcessIds];
3465
3466
  return resolveOutOfGroupAgentControllerProcessIds({
3466
3467
  childrenByParentProcessId,
3467
3468
  markedProcessIds,
@@ -5301,6 +5302,7 @@ const SPACE_ACTION_TOOL_COMMAND_PATH_ENV = "OPENMELD_SPACE_ACTION_TOOL_COMMAND_P
5301
5302
  const OPENMELD_SPACE_ACTION_MCP_SERVER_ID = "openmeld_internal_dispatch_space_action";
5302
5303
  const OPENMELD_SPACE_ACTION_MCP_TOOL_NAMES = [
5303
5304
  "read_file",
5305
+ "read_history",
5304
5306
  "reply",
5305
5307
  "status",
5306
5308
  "stay_silent"
@@ -7296,6 +7298,7 @@ async function invokeClaudeAgentSdkTransport(input) {
7296
7298
  try {
7297
7299
  queryRuntime = (input.createQuery ?? createDefaultClaudeAgentSdkQuery)({
7298
7300
  options: buildClaudeAgentSdkOptions({
7301
+ executionContext: input.executionContext,
7299
7302
  onRuntimeEvent: input.onRuntimeEvent,
7300
7303
  abortController,
7301
7304
  agentControllerPermissionMode: input.agentControllerPermissionMode,
@@ -7558,6 +7561,7 @@ async function resolveClaudeAgentSdkExecutable(input) {
7558
7561
  }
7559
7562
  function buildClaudeAgentSdkOptions(input) {
7560
7563
  const spaceActionMcpServer = resolveDispatchSpaceActionMcpServer(input.env);
7564
+ if (input.executionContext && input.executionContext.access !== "space_context") throw new Error("execution_context.file_access_unsupported");
7561
7565
  const permissionMode = resolveClaudePermissionMode({
7562
7566
  agentControllerPermissionMode: input.agentControllerPermissionMode,
7563
7567
  executionMode: input.executionMode
@@ -7604,6 +7608,14 @@ function buildClaudeAgentSdkOptions(input) {
7604
7608
  onElicitation: createClaudeOnElicitation({ onInteractionRequest: input.onInteractionRequest })
7605
7609
  } : {}
7606
7610
  };
7611
+ if (input.executionContext) {
7612
+ options.tools = [];
7613
+ options.strictMcpConfig = true;
7614
+ options.settingSources = ["user"];
7615
+ options.settings = { disableAllHooks: true };
7616
+ options.additionalDirectories = [];
7617
+ options.allowedTools = spaceActionMcpServer ? buildDispatchSpaceActionMcpToolIds("__").map((toolId) => `mcp__${toolId}`) : [];
7618
+ }
7607
7619
  const sessionId = normalizeOptionalText$40(input.sessionId);
7608
7620
  if (sessionId) {
7609
7621
  options.resume = sessionId;
@@ -7823,7 +7835,7 @@ var ClaudeRuntimeError = class extends Error {
7823
7835
  async function invokeClaudeWithSingleContextHeal(input) {
7824
7836
  const result = await invokeWithSingleContextHeal({
7825
7837
  contextId: input.sessionId,
7826
- contextLossPolicy: input.executionMode === "repair" ? "fail" : "rebuild",
7838
+ contextLossPolicy: input.executionContext || input.executionMode === "repair" ? "fail" : "rebuild",
7827
7839
  createRebuildFailedError: (error) => {
7828
7840
  const providerAccessEvidence = getClaudeProviderAccessEvidence(error);
7829
7841
  const originalError = getClaudeOriginalError(error);
@@ -7838,6 +7850,7 @@ async function invokeClaudeWithSingleContextHeal(input) {
7838
7850
  });
7839
7851
  },
7840
7852
  invokeOnce: (sessionId) => invokeClaudeOnce({
7853
+ executionContext: input.executionContext,
7841
7854
  agentControllerPermissionMode: input.agentControllerPermissionMode,
7842
7855
  launchContract: input.launchContract,
7843
7856
  claudeTimeoutMs: input.claudeTimeoutMs,
@@ -7874,7 +7887,10 @@ async function invokeClaudeWithSingleContextHeal(input) {
7874
7887
  }
7875
7888
  async function invokeClaudeOnce(input) {
7876
7889
  try {
7877
- if ((input.claudeTransport ?? "agent-sdk") === "cli") return await invokeClaudeOnceWithCli(input);
7890
+ if ((input.claudeTransport ?? "agent-sdk") === "cli") {
7891
+ if (input.executionContext) throw new Error("execution_context.transport_unsupported");
7892
+ return await invokeClaudeOnceWithCli(input);
7893
+ }
7878
7894
  return await invokeClaudeOnceWithAgentSdk(input);
7879
7895
  } catch (error) {
7880
7896
  if (error instanceof ClaudeRuntimeError) throw error;
@@ -7917,6 +7933,7 @@ function invokeClaudeOnceWithCli(input) {
7917
7933
  }
7918
7934
  function invokeClaudeOnceWithAgentSdk(input) {
7919
7935
  return invokeClaudeAgentSdkTransport({
7936
+ executionContext: input.executionContext,
7920
7937
  agentControllerPermissionMode: input.agentControllerPermissionMode,
7921
7938
  launchContract: input.launchContract,
7922
7939
  claudeTimeoutMs: input.claudeTimeoutMs,
@@ -8066,6 +8083,7 @@ const resolveDefaultClaudeCodeInvoke = (input) => {
8066
8083
  });
8067
8084
  } : void 0;
8068
8085
  const result = await invokeClaudeWithSingleContextHeal({
8086
+ executionContext: dispatchInput.executionContext,
8069
8087
  agentControllerPermissionMode: dispatchInput.agentControllerPermissionMode,
8070
8088
  launchContract,
8071
8089
  claudeTimeoutMs,
@@ -8302,6 +8320,8 @@ function toRecord$9(value) {
8302
8320
  const FAST_METADATA_ADMISSION_TIMEOUT_MS = 15e3;
8303
8321
  const COLD_CONTROLLER_ADMISSION_TIMEOUT_MS = 9e4;
8304
8322
  const CONTROL_REQUEST_TIMEOUT_MS_BY_OPERATION = {
8323
+ "command/exec": FAST_METADATA_ADMISSION_TIMEOUT_MS,
8324
+ "mcpServerStatus/list": FAST_METADATA_ADMISSION_TIMEOUT_MS,
8305
8325
  "collaborationMode/list": FAST_METADATA_ADMISSION_TIMEOUT_MS,
8306
8326
  "thread/fork": COLD_CONTROLLER_ADMISSION_TIMEOUT_MS,
8307
8327
  "thread/name/set": FAST_METADATA_ADMISSION_TIMEOUT_MS,
@@ -8441,7 +8461,8 @@ function resolveManagedByEnvName(input) {
8441
8461
  }
8442
8462
  //#endregion
8443
8463
  //#region ../../runtime/adapters/codex/dist/transport/codex-file-access-boundary.js
8444
- const PROFILE_NAME = "openmeld_computer_boundary";
8464
+ const CODEX_FILE_ACCESS_PERMISSION_PROFILE = "openmeld_computer_boundary";
8465
+ const PROFILE_NAME = CODEX_FILE_ACCESS_PERMISSION_PROFILE;
8445
8466
  const TRAILING_PATH_SEPARATORS_PATTERN = /[\\/]+$/u;
8446
8467
  function redactCodexFileAccessBoundaryDispatchFailure(failure) {
8447
8468
  const errorCode = failure.errorCode ?? "upstream_unreachable";
@@ -8459,7 +8480,25 @@ function buildCodexFileAccessBoundaryGlobalArgs(input) {
8459
8480
  const permissionMode = resolveCodexPermissionMode(input.permissionMode);
8460
8481
  if (permissionMode === "codex:customConfig") throw new Error("computer.file_access.unverified: Codex custom configuration cannot be safely intersected with the Computer file access boundary");
8461
8482
  return [
8462
- "--strict-config",
8483
+ ...input.boundary.executionContextAccess === "space_context" ? ["-c", "project_root_markers=[]"] : [],
8484
+ ...input.boundary.executionContextAccess ? [
8485
+ "-c",
8486
+ "features.hooks=false",
8487
+ "-c",
8488
+ "features.plugins=false",
8489
+ "-c",
8490
+ "features.apps=false",
8491
+ "-c",
8492
+ "features.computer_use=false",
8493
+ "-c",
8494
+ "features.browser_use=false",
8495
+ "-c",
8496
+ "features.browser_use_external=false",
8497
+ "-c",
8498
+ "features.in_app_browser=false",
8499
+ "-c",
8500
+ "features.skill_mcp_dependency_install=false"
8501
+ ] : ["--strict-config"],
8463
8502
  "-c",
8464
8503
  buildPermissionProfile({
8465
8504
  boundary: input.boundary,
@@ -8468,12 +8507,29 @@ function buildCodexFileAccessBoundaryGlobalArgs(input) {
8468
8507
  }),
8469
8508
  "-c",
8470
8509
  `default_permissions=${tomlString(PROFILE_NAME)}`,
8471
- ...buildApprovalArgs({
8510
+ ...input.boundary.executionContextAccess ? ["-a", "never"] : buildApprovalArgs({
8472
8511
  executionMode: input.executionMode,
8473
8512
  permissionMode
8474
8513
  })
8475
8514
  ];
8476
8515
  }
8516
+ function isCodexExecutionContextFileAccessConfirmed(value, boundary, workingDirectory, executionMode) {
8517
+ if (!boundary.executionContextAccess) return true;
8518
+ const response = recordValue(value);
8519
+ const profile = recordValue(response?.activePermissionProfile);
8520
+ const sandbox = recordValue(response?.sandbox);
8521
+ const roots = response?.runtimeWorkspaceRoots;
8522
+ if (!Array.isArray(roots) || roots.length !== 1 || roots[0] !== workingDirectory) return false;
8523
+ if (profile?.id !== PROFILE_NAME || profile.extends != null || response?.cwd !== workingDirectory || response.approvalPolicy !== "never") return false;
8524
+ if (resolveCodexExecutionContextAccess(boundary, executionMode) !== "workspace") return sandbox?.type === "readOnly";
8525
+ return sandbox?.type === "workspaceWrite" && sandbox.excludeTmpdirEnvVar === true && sandbox.excludeSlashTmp === true && Array.isArray(sandbox.writableRoots) && sandbox.writableRoots.every((root) => typeof root === "string" && boundary.folders.includes(root));
8526
+ }
8527
+ function resolveCodexExecutionContextAccess(boundary, executionMode) {
8528
+ return executionMode === "repair" && boundary.executionContextAccess === "workspace" ? "read_only" : boundary.executionContextAccess;
8529
+ }
8530
+ function recordValue(value) {
8531
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
8532
+ }
8477
8533
  function buildPermissionProfile(input) {
8478
8534
  const fileAccess = resolveFileAccess(input);
8479
8535
  const fields = [
@@ -8485,6 +8541,18 @@ function buildPermissionProfile(input) {
8485
8541
  }
8486
8542
  function resolveFileAccess(input) {
8487
8543
  const isRepair = input.executionMode === "repair";
8544
+ if (input.boundary.executionContextAccess) {
8545
+ if (input.boundary.mode !== "only_selected_folders") throw new Error("execution_context.file_access_unverified");
8546
+ return {
8547
+ extendsProfile: null,
8548
+ filesystemEntries: [
8549
+ "\":root\" = \"deny\"",
8550
+ "\":minimal\" = \"read\"",
8551
+ ...buildFolderEntries(input.boundary.folders, resolveCodexExecutionContextAccess(input.boundary, input.executionMode) === "workspace" ? "write" : "read")
8552
+ ],
8553
+ fullNetwork: !isRepair && input.permissionMode === "codex:fullAccess"
8554
+ };
8555
+ }
8488
8556
  const isFullAccess = !isRepair && input.permissionMode === "codex:fullAccess";
8489
8557
  const selectedFolderAccess = isFullAccess ? "write" : "read";
8490
8558
  const extendsProfile = resolveBaseProfile({
@@ -8537,6 +8605,100 @@ function tomlString(value) {
8537
8605
  return JSON.stringify(value);
8538
8606
  }
8539
8607
  //#endregion
8608
+ //#region ../../runtime/adapters/codex/dist/transport/codex-scoped-mcp.js
8609
+ const execFileAsync$2 = promisify(execFile);
8610
+ const MCP_INVENTORY_TIMEOUT_MS = 15e3;
8611
+ const MCP_INVENTORY_MAX_BYTES = 1024 * 1024;
8612
+ const MCP_AUTH_STATUSES = /* @__PURE__ */ new Set([
8613
+ "unknown",
8614
+ "unsupported",
8615
+ "notLoggedIn",
8616
+ "bearerToken",
8617
+ "oAuth"
8618
+ ]);
8619
+ const DISPATCH_TOOL_NAMES = new Set(OPENMELD_SPACE_ACTION_MCP_TOOL_NAMES);
8620
+ async function buildCodexScopedMcpDisableArgs(input) {
8621
+ const launch = buildCodexAppServerLaunch({
8622
+ args: [
8623
+ "mcp",
8624
+ "list",
8625
+ "--json"
8626
+ ],
8627
+ env: input.env,
8628
+ launchContract: input.launchContract
8629
+ });
8630
+ let stdout;
8631
+ try {
8632
+ ({stdout} = await execFileAsync$2(launch.bin, launch.args, {
8633
+ cwd: input.workingDirectory,
8634
+ encoding: "utf8",
8635
+ env: launch.env,
8636
+ killSignal: "SIGKILL",
8637
+ maxBuffer: MCP_INVENTORY_MAX_BYTES,
8638
+ shell: launch.shell,
8639
+ timeout: MCP_INVENTORY_TIMEOUT_MS,
8640
+ windowsHide: true
8641
+ }));
8642
+ } catch {
8643
+ throw isolationError("the native MCP configuration inventory failed");
8644
+ }
8645
+ let value;
8646
+ try {
8647
+ value = JSON.parse(stdout);
8648
+ } catch {
8649
+ throw isolationError("the native MCP configuration inventory is not JSON");
8650
+ }
8651
+ if (!Array.isArray(value)) throw isolationError("the native MCP configuration inventory is malformed");
8652
+ const servers = /* @__PURE__ */ new Map();
8653
+ for (const row of value) {
8654
+ if (!isRecord$3(row) || typeof row.name !== "string" || row.name.length === 0 || typeof row.enabled !== "boolean" || servers.has(row.name)) throw isolationError("the native MCP configuration inventory is malformed");
8655
+ if (row.name === "openmeld_internal_dispatch_space_action") throw new Error("execution_context.mcp_server_namespace_conflict: the native MCP configuration uses the reserved dispatch server name");
8656
+ if (!isRecord$3(row.transport) || row.transport.type !== "stdio" && row.transport.type !== "streamable_http") throw isolationError("the native MCP configuration has an unknown transport");
8657
+ servers.set(row.name, row.transport.type);
8658
+ }
8659
+ if (servers.size === 0) return [];
8660
+ return ["-c", `mcp_servers={${[...servers].map(([name, type]) => {
8661
+ const transport = type === "stdio" ? `command=${JSON.stringify(launch.bin)},args=["--version"]` : "url=\"http://127.0.0.1:9\"";
8662
+ return `${JSON.stringify(name)}={${transport},enabled=false}`;
8663
+ }).join(",")}}`];
8664
+ }
8665
+ /** Checks effective tool exposure; dispatch ownership and permissions are separate checks. */
8666
+ function assertCodexScopedMcpInventory(value, options = {}) {
8667
+ if (!(isRecord$3(value) && Array.isArray(value.data)) || value.nextCursor !== void 0 && value.nextCursor !== null) throw isolationError("the effective MCP inventory is malformed or incomplete");
8668
+ const names = /* @__PURE__ */ new Set();
8669
+ let hasDispatchServer = false;
8670
+ for (const item of value.data) {
8671
+ const row = parseMcpServerInventory(item);
8672
+ if (names.has(row.name)) throw isolationError("the effective MCP inventory contains duplicate servers");
8673
+ names.add(row.name);
8674
+ if (row.runtimeStatus === "disabled" && Object.keys(row.tools).length === 0) continue;
8675
+ if (!(options.expectDispatchServer ?? true) || row.name !== "openmeld_internal_dispatch_space_action" || row.pluginId !== void 0 && row.pluginId !== null || row.runtimeStatus !== void 0 && row.runtimeStatus !== "connected") throw isolationError("the effective MCP inventory contains an unapproved server");
8676
+ assertDispatchTools(row.tools);
8677
+ hasDispatchServer = true;
8678
+ }
8679
+ if ((options.expectDispatchServer ?? true) && !hasDispatchServer) throw isolationError("the dispatch MCP server is missing from the effective inventory");
8680
+ }
8681
+ function assertDispatchTools(tools) {
8682
+ const toolEntries = Object.entries(tools);
8683
+ if (toolEntries.length !== DISPATCH_TOOL_NAMES.size) throw isolationError("the effective MCP inventory has an unexpected tool catalog");
8684
+ for (const [name, tool] of toolEntries) if (!(DISPATCH_TOOL_NAMES.has(name) && isRecord$3(tool)) || tool.name !== name || !Object.hasOwn(tool, "inputSchema")) throw isolationError("the effective MCP inventory contains an unapproved tool");
8685
+ }
8686
+ function parseMcpServerInventory(row) {
8687
+ if (!isRecord$3(row) || typeof row.name !== "string" || row.name.length === 0 || typeof row.authStatus !== "string" || !MCP_AUTH_STATUSES.has(row.authStatus) || !isRecord$3(row.tools) || !Array.isArray(row.resources) || row.resources.length !== 0 || !Array.isArray(row.resourceTemplates) || row.resourceTemplates.length !== 0 || row.toolsError !== void 0 && row.toolsError !== null) throw isolationError("the effective MCP inventory contains unverified data");
8688
+ return {
8689
+ name: row.name,
8690
+ pluginId: row.pluginId,
8691
+ runtimeStatus: row.runtimeStatus,
8692
+ tools: row.tools
8693
+ };
8694
+ }
8695
+ function isRecord$3(value) {
8696
+ return typeof value === "object" && value !== null && !Array.isArray(value);
8697
+ }
8698
+ function isolationError(reason) {
8699
+ return /* @__PURE__ */ new Error(`context.mcp_isolation_unverified: ${reason}`);
8700
+ }
8701
+ //#endregion
8540
8702
  //#region ../../runtime/adapters/codex/dist/transport/codex-space-action-mcp-config.js
8541
8703
  function buildCodexSpaceActionMcpGlobalArgs(env) {
8542
8704
  const config = resolveDispatchSpaceActionMcpServer(env);
@@ -8568,8 +8730,62 @@ function toTomlStringArray(values) {
8568
8730
  return `[${values.map(toTomlString).join(",")}]`;
8569
8731
  }
8570
8732
  //#endregion
8733
+ //#region ../../runtime/adapters/codex/dist/transport/codex-workspace-access-probe.js
8734
+ const PROBE_SCRIPT = `
8735
+ outside_read=denied
8736
+ outside_write=denied
8737
+ inside_read=denied
8738
+ inside_write=denied
8739
+ if ( IFS= read -r line < "$1" ) 2>/dev/null; then outside_read=allowed; fi
8740
+ if ( printf 'changed\\n' > "$1" ) 2>/dev/null; then outside_write=allowed; fi
8741
+ if ( IFS= read -r line < "$2" ) 2>/dev/null; then inside_read=allowed; fi
8742
+ if ( printf 'changed\\n' > "$2" ) 2>/dev/null; then inside_write=allowed; fi
8743
+ printf '%s:%s:%s:%s' "$outside_read" "$outside_write" "$inside_read" "$inside_write"
8744
+ `;
8745
+ async function verifyCodexWorkspaceAccess(input) {
8746
+ if (!input.boundary.executionContextAccess) return;
8747
+ const boundaryRoot = input.boundary.folders[0];
8748
+ if (process.platform === "win32" || input.boundary.folders.length !== 1 || !boundaryRoot) throw new Error("execution_context.workspace_probe_unsupported");
8749
+ const outsideDirectory = await mkdtemp(join(dirname(boundaryRoot), ".openmeld-access-probe-"));
8750
+ const outsidePath = join(outsideDirectory, "sentinel");
8751
+ const insidePath = join(input.workingDirectory, `.openmeld-access-probe-${randomUUID()}`);
8752
+ try {
8753
+ await writeFile(outsidePath, "unchanged\n", {
8754
+ flag: "wx",
8755
+ mode: 384
8756
+ });
8757
+ await writeFile(insidePath, "unchanged\n", {
8758
+ flag: "wx",
8759
+ mode: 384
8760
+ });
8761
+ const result = await input.execute({
8762
+ command: [
8763
+ "/bin/sh",
8764
+ "-c",
8765
+ PROBE_SCRIPT,
8766
+ "openmeld-probe",
8767
+ outsidePath,
8768
+ insidePath
8769
+ ],
8770
+ cwd: input.workingDirectory,
8771
+ permissionProfile: CODEX_FILE_ACCESS_PERMISSION_PROFILE,
8772
+ timeoutMs: 5e3,
8773
+ outputBytesCap: 1024
8774
+ });
8775
+ const expected = resolveCodexExecutionContextAccess(input.boundary, input.executionMode) === "workspace" ? "denied:denied:allowed:allowed" : "denied:denied:allowed:denied";
8776
+ if (!result || typeof result !== "object" || !("exitCode" in result) || result.exitCode !== 0 || !("stdout" in result) || result.stdout !== expected || await readFile(outsidePath, "utf8") !== "unchanged\n") throw new Error("execution_context.workspace_access_unverified");
8777
+ } finally {
8778
+ await rm(insidePath, { force: true });
8779
+ await rm(outsideDirectory, {
8780
+ recursive: true,
8781
+ force: true
8782
+ });
8783
+ }
8784
+ }
8785
+ //#endregion
8571
8786
  //#region ../../runtime/adapters/codex/dist/transport/codex-app-server-transport.js
8572
8787
  const CODEX_APP_SERVER_VERSION_PATTERN = /\/([^\s]+)/u;
8788
+ const EXECUTION_CONTEXT_ERROR_PATTERN = /^(execution_context\.[a-z_]+|context\.mcp_isolation_unverified)(?::|$)/u;
8573
8789
  const APP_SERVER_PROCESS_KILL_GRACE_MS = 1e3;
8574
8790
  const DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS = 15e3;
8575
8791
  var CodexAppServerTransportError = class extends Error {
@@ -8635,7 +8851,7 @@ async function invokeCodexAppServerTransport(input) {
8635
8851
  });
8636
8852
  const invokedAtMs = Date.now();
8637
8853
  const reasoningSummary = input.onRuntimeEvent ? { summary: "auto" } : {};
8638
- const permissionModeParams = resolveCodexAppServerPermissionModeParams(input.agentControllerPermissionMode, input.executionMode, input.computerFileAccessBoundary !== void 0);
8854
+ const permissionModeParams = resolveCodexAppServerPermissionModeParams(input.agentControllerPermissionMode, input.executionMode, input.computerFileAccessBoundary !== void 0, input.computerFileAccessBoundary?.executionContextAccess !== void 0);
8639
8855
  const conversationPolicyParams = resolveCodexAppServerConversationPolicyParams(input.conversationPolicy);
8640
8856
  return await withCodexAppServerSession({
8641
8857
  codexTimeoutMs: input.codexTimeoutMs,
@@ -8653,6 +8869,7 @@ async function invokeCodexAppServerTransport(input) {
8653
8869
  }, async (session) => {
8654
8870
  throwIfCodexDispatchCancelled(input.cancellationSignal);
8655
8871
  const threadContext = await resolveDispatchThreadContext({
8872
+ executionContextScoped: input.computerFileAccessBoundary?.executionContextAccess !== void 0,
8656
8873
  cancellationSignal: input.cancellationSignal,
8657
8874
  conversationPolicyParams,
8658
8875
  codexWorkdir: input.codexWorkdir,
@@ -8662,6 +8879,8 @@ async function invokeCodexAppServerTransport(input) {
8662
8879
  threadId: input.threadId,
8663
8880
  instructionPrompt: input.instructionPrompt
8664
8881
  });
8882
+ assertFileAccessBeforeTurn(threadContext.permissionResponse, input.computerFileAccessBoundary, input.codexWorkdir, input.executionMode);
8883
+ await session.verifyScopedMcp(threadContext.threadId);
8665
8884
  const collaborationMode = await resolveCodexAppServerTurnCollaborationMode({
8666
8885
  conversationPolicy: input.conversationPolicy,
8667
8886
  conversationPolicyParams,
@@ -8812,15 +9031,29 @@ async function forkCodexAppServerThread(input) {
8812
9031
  errorType: "config",
8813
9032
  message: "schema.invalid: sourceThreadId is required"
8814
9033
  });
9034
+ if (input.computerFileAccessBoundary?.executionContextAccess && !normalizeOptionalText$36(input.sourceCompletedTurnId)) throw new CodexAppServerTransportError({
9035
+ code: "execution_context.fork_checkpoint_unavailable",
9036
+ errorType: "config",
9037
+ message: "execution_context.fork_checkpoint_unavailable: a completed turn is required for a scoped fork"
9038
+ });
8815
9039
  return await withCodexAppServerSession({
8816
9040
  codexTimeoutMs: input.codexTimeoutMs,
8817
- codexWorkdir: input.codexWorkdir,
9041
+ codexWorkdir: input.targetWorkingDirectory ?? input.codexWorkdir,
8818
9042
  env: input.env,
8819
- launchContract: input.launchContract
9043
+ launchContract: input.launchContract,
9044
+ computerFileAccessBoundary: input.computerFileAccessBoundary,
9045
+ onRuntimeEvent: input.onRuntimeEvent
8820
9046
  }, async (session) => {
8821
9047
  const threadId = readThreadIdFromResponse(await session.requestControl("thread/fork", {
8822
9048
  excludeTurns: true,
8823
- threadId: sourceThreadId
9049
+ threadId: sourceThreadId,
9050
+ ...input.computerFileAccessBoundary?.executionContextAccess ? {
9051
+ permissions: CODEX_FILE_ACCESS_PERMISSION_PROFILE,
9052
+ approvalPolicy: "never",
9053
+ runtimeWorkspaceRoots: [input.targetWorkingDirectory ?? input.codexWorkdir]
9054
+ } : {},
9055
+ ...input.sourceCompletedTurnId ? { lastTurnId: input.sourceCompletedTurnId } : {},
9056
+ ...input.targetWorkingDirectory ? { cwd: input.targetWorkingDirectory } : {}
8824
9057
  }, {
8825
9058
  code: "context.fork_timeout",
8826
9059
  operation: "thread/fork"
@@ -8843,10 +9076,20 @@ async function forkCodexAppServerThread(input) {
8843
9076
  return { threadId };
8844
9077
  });
8845
9078
  }
9079
+ function assertFileAccessBeforeTurn(response, boundary, workingDirectory, executionMode) {
9080
+ if (boundary && !isCodexExecutionContextFileAccessConfirmed(response, boundary, workingDirectory, executionMode)) throw new CodexAppServerTransportError({
9081
+ code: "computer.file_access.unverified",
9082
+ errorType: "config",
9083
+ message: "Codex did not confirm the task's isolated file access profile."
9084
+ });
9085
+ }
9086
+ function scopedRuntimeWorkspaceParams(permissions, workingDirectory) {
9087
+ return permissions.permissions ? { runtimeWorkspaceRoots: [workingDirectory] } : {};
9088
+ }
8846
9089
  async function resolveDispatchThreadContext(input) {
8847
9090
  const existingThreadId = normalizeOptionalText$36(input.threadId);
8848
9091
  if (existingThreadId) {
8849
- if (input.executionMode === "repair") return await forkEphemeralCodexRepairThread({
9092
+ if (input.executionMode === "repair" && !input.executionContextScoped) return await forkEphemeralCodexRepairThread({
8850
9093
  conversationPolicyParams: input.conversationPolicyParams,
8851
9094
  codexWorkdir: input.codexWorkdir,
8852
9095
  permissionModeParams: input.permissionModeParams,
@@ -8860,6 +9103,7 @@ async function resolveDispatchThreadContext(input) {
8860
9103
  ...input.conversationPolicyParams.model ? { model: input.conversationPolicyParams.model } : {},
8861
9104
  ...input.permissionModeParams,
8862
9105
  cwd: input.codexWorkdir,
9106
+ ...scopedRuntimeWorkspaceParams(input.permissionModeParams, input.codexWorkdir),
8863
9107
  excludeTurns: true,
8864
9108
  threadId: existingThreadId
8865
9109
  }, {
@@ -8889,6 +9133,7 @@ async function resolveDispatchThreadContext(input) {
8889
9133
  ...input.conversationPolicyParams.model ? { model: input.conversationPolicyParams.model } : {},
8890
9134
  ...input.permissionModeParams,
8891
9135
  cwd: input.codexWorkdir,
9136
+ ...scopedRuntimeWorkspaceParams(input.permissionModeParams, input.codexWorkdir),
8892
9137
  ...input.instructionPrompt ? {
8893
9138
  developerInstructions: input.instructionPrompt.developerInstructions,
8894
9139
  threadSource: buildOpenMeldCodexThreadSource(input.instructionPrompt.instructionEpoch)
@@ -8903,6 +9148,7 @@ async function forkEphemeralCodexRepairThread(input) {
8903
9148
  ...input.conversationPolicyParams.model ? { model: input.conversationPolicyParams.model } : {},
8904
9149
  ...input.permissionModeParams,
8905
9150
  cwd: input.codexWorkdir,
9151
+ ...scopedRuntimeWorkspaceParams(input.permissionModeParams, input.codexWorkdir),
8906
9152
  ephemeral: true,
8907
9153
  excludeTurns: true,
8908
9154
  threadId: input.sourceThreadId
@@ -8964,7 +9210,14 @@ function readCodexAppServerCollaborationModePreset(value) {
8964
9210
  reasoningEffort: normalizeOptionalText$36(preset?.reasoning_effort)
8965
9211
  };
8966
9212
  }
8967
- function resolveCodexAppServerPermissionModeParams(value, executionMode, hasComputerFileAccessBoundary = false) {
9213
+ function resolveCodexAppServerPermissionModeParams(value, executionMode, hasComputerFileAccessBoundary = false, hasExecutionContextBoundary = false) {
9214
+ if (hasExecutionContextBoundary) return {
9215
+ thread: {
9216
+ approvalPolicy: "never",
9217
+ permissions: CODEX_FILE_ACCESS_PERMISSION_PROFILE
9218
+ },
9219
+ turn: { approvalPolicy: "never" }
9220
+ };
8968
9221
  if (executionMode === "repair") return {
8969
9222
  thread: {
8970
9223
  approvalPolicy: "untrusted",
@@ -9033,6 +9286,7 @@ async function withCodexAppServerSession(input, callback) {
9033
9286
  }
9034
9287
  }
9035
9288
  var CodexAppServerSession = class {
9289
+ #processCleanup = null;
9036
9290
  #codexTimeoutMs;
9037
9291
  #codexWorkdir;
9038
9292
  #controlRequestTimeoutMs;
@@ -9098,9 +9352,15 @@ var CodexAppServerSession = class {
9098
9352
  ...this.#env ?? {}
9099
9353
  };
9100
9354
  const spaceActionMcpArgs = buildCodexSpaceActionMcpGlobalArgs(env);
9355
+ const scopedMcpArgs = this.#computerFileAccessBoundary?.executionContextAccess ? await buildCodexScopedMcpDisableArgs({
9356
+ env,
9357
+ launchContract: this.#launchContract,
9358
+ workingDirectory: this.#codexWorkdir
9359
+ }) : [];
9101
9360
  const launch = buildCodexAppServerLaunch({
9102
9361
  args: [
9103
9362
  ...computerFileAccessArgs,
9363
+ ...scopedMcpArgs,
9104
9364
  ...spaceActionMcpArgs,
9105
9365
  "app-server",
9106
9366
  "--listen",
@@ -9114,7 +9374,8 @@ var CodexAppServerSession = class {
9114
9374
  bin: launch.bin,
9115
9375
  cwd: tmpdir(),
9116
9376
  env: launch.env,
9117
- shell: launch.shell ?? false
9377
+ shell: launch.shell ?? false,
9378
+ ...this.#computerFileAccessBoundary?.executionContextAccess && this.#env?.OPENMELD_PROCESS_SUPERVISION_ID ? { supervisionId: this.#env.OPENMELD_PROCESS_SUPERVISION_ID } : {}
9118
9379
  });
9119
9380
  const { child, processId, signalTarget } = runtimeProcess;
9120
9381
  this.#child = child;
@@ -9171,19 +9432,30 @@ var CodexAppServerSession = class {
9171
9432
  }));
9172
9433
  });
9173
9434
  child.on("close", (exitCode, signal) => {
9174
- runtimeProcess.terminateRemainingDescendants();
9175
9435
  this.#clearTimers();
9176
9436
  this.#lifecycle.exitCode = exitCode;
9177
9437
  this.#lifecycle.exitObservedAtMs = Date.now();
9178
9438
  this.#lifecycle.exitSignal = signal;
9179
- this.#emitRuntimeEvent({
9180
- exitCode,
9181
- phase: "process_exit",
9182
- processId,
9183
- signal,
9184
- signalTarget,
9185
- tsMs: this.#lifecycle.exitObservedAtMs
9186
- });
9439
+ const exitObservedAtMs = this.#lifecycle.exitObservedAtMs;
9440
+ this.#processCleanup = (async () => {
9441
+ let ownedProcessesQuiescent = false;
9442
+ try {
9443
+ if ((await runtimeProcess.terminateRemainingDescendants()).ok && signalTarget === "process_group" && processId !== null && isProcessGroupAbsent(processId)) ownedProcessesQuiescent = (await listAgentControllerSupervisedProcessIds({
9444
+ fresh: true,
9445
+ processId,
9446
+ supervisionId: runtimeProcess.supervisionId
9447
+ })).length === 0 && isProcessGroupAbsent(processId);
9448
+ } catch {}
9449
+ this.#emitRuntimeEvent({
9450
+ exitCode,
9451
+ phase: "process_exit",
9452
+ processId,
9453
+ signal,
9454
+ signalTarget,
9455
+ tsMs: exitObservedAtMs,
9456
+ ...ownedProcessesQuiescent ? { ownedProcessesQuiescent: true } : {}
9457
+ });
9458
+ })();
9187
9459
  this.#onProcessControlEvent?.({
9188
9460
  phase: "process_exit",
9189
9461
  processId,
@@ -9234,6 +9506,15 @@ var CodexAppServerSession = class {
9234
9506
  }
9235
9507
  });
9236
9508
  this.notify("initialized", {});
9509
+ if (this.#computerFileAccessBoundary?.executionContextAccess) await verifyCodexWorkspaceAccess({
9510
+ boundary: this.#computerFileAccessBoundary,
9511
+ executionMode: this.#executionMode,
9512
+ workingDirectory: this.#codexWorkdir,
9513
+ execute: (params) => this.requestControl("command/exec", params, {
9514
+ code: "execution_context.workspace_probe_timeout",
9515
+ operation: "command/exec"
9516
+ })
9517
+ });
9237
9518
  return initialized;
9238
9519
  } finally {
9239
9520
  if (this.#startupTimeout !== null) {
@@ -9242,6 +9523,17 @@ var CodexAppServerSession = class {
9242
9523
  }
9243
9524
  }
9244
9525
  }
9526
+ async verifyScopedMcp(threadId) {
9527
+ if (!this.#computerFileAccessBoundary?.executionContextAccess) return;
9528
+ assertCodexScopedMcpInventory(await this.requestControl("mcpServerStatus/list", {
9529
+ threadId,
9530
+ detail: "full",
9531
+ limit: 100
9532
+ }, {
9533
+ code: "execution_context.mcp_inventory_timeout",
9534
+ operation: "mcpServerStatus/list"
9535
+ }), { expectDispatchServer: resolveDispatchSpaceActionMcpServer(this.#env) !== null });
9536
+ }
9245
9537
  async close() {
9246
9538
  this.#clearTimers();
9247
9539
  const child = this.#child;
@@ -9255,17 +9547,21 @@ var CodexAppServerSession = class {
9255
9547
  });
9256
9548
  }
9257
9549
  if (!(child.stdin.destroyed || child.stdin.writableEnded)) child.stdin.end();
9258
- if (this.#lifecycle.exitObservedAtMs !== null) return;
9550
+ if (this.#lifecycle.exitObservedAtMs !== null) {
9551
+ await this.#processCleanup;
9552
+ return;
9553
+ }
9259
9554
  this.#requestProcessTermination();
9260
9555
  await new Promise((resolve) => {
9261
9556
  const timeout = setTimeout(() => {
9262
9557
  resolve();
9263
- }, APP_SERVER_PROCESS_KILL_GRACE_MS);
9558
+ }, APP_SERVER_PROCESS_KILL_GRACE_MS * 2);
9264
9559
  child.once("close", () => {
9265
9560
  clearTimeout(timeout);
9266
9561
  resolve();
9267
9562
  });
9268
9563
  });
9564
+ await this.#processCleanup;
9269
9565
  }
9270
9566
  async request(method, params, timeout) {
9271
9567
  if (this.#settledFailure) throw this.#settledFailure;
@@ -9627,6 +9923,7 @@ function readThreadIdFromResponse(value) {
9627
9923
  function readThreadContextFromResponse(value) {
9628
9924
  const response = toRecord$8(value);
9629
9925
  return {
9926
+ permissionResponse: value,
9630
9927
  model: normalizeOptionalText$36(response?.model),
9631
9928
  threadId: readRequiredText(response?.thread?.id, "thread response thread.id"),
9632
9929
  threadSource: normalizeOptionalText$36(response?.thread?.threadSource)
@@ -10185,6 +10482,12 @@ function toJsonRpcTransportError$1(error) {
10185
10482
  }
10186
10483
  function toCodexAppServerTransportError(error, timeoutMs) {
10187
10484
  if (error instanceof CodexAppServerTransportError) return error;
10485
+ const contextError = error instanceof Error ? EXECUTION_CONTEXT_ERROR_PATTERN.exec(error.message)?.[1] : void 0;
10486
+ if (contextError) return new CodexAppServerTransportError({
10487
+ code: contextError,
10488
+ errorType: "config",
10489
+ message: `${contextError}: the local execution boundary could not be verified`
10490
+ });
10188
10491
  if (error && typeof error === "object" && "code" in error && typeof error.code === "string" && "errorType" in error && typeof error.errorType === "string" && error instanceof Error) return new CodexAppServerTransportError({
10189
10492
  code: error.code,
10190
10493
  errorType: error.errorType,
@@ -10221,6 +10524,14 @@ function normalizeOptionalText$36(value) {
10221
10524
  const normalized = normalizeText$7(value);
10222
10525
  return normalized.length > 0 ? normalized : null;
10223
10526
  }
10527
+ function isProcessGroupAbsent(processId) {
10528
+ try {
10529
+ process.kill(-processId, 0);
10530
+ return false;
10531
+ } catch (error) {
10532
+ return error.code === "ESRCH";
10533
+ }
10534
+ }
10224
10535
  function parseCodexAppServerVersion(response) {
10225
10536
  return normalizeOptionalText$36(toRecord$8(response)?.userAgent)?.match(CODEX_APP_SERVER_VERSION_PATTERN)?.[1] ?? null;
10226
10537
  }
@@ -10943,7 +11254,7 @@ var CodexRuntimeError = class extends Error {
10943
11254
  async function invokeCodexWithSingleContextHeal(input) {
10944
11255
  const result = await invokeWithSingleContextHeal({
10945
11256
  contextId: input.threadId,
10946
- contextLossPolicy: input.executionMode === "repair" ? "fail" : "rebuild",
11257
+ contextLossPolicy: input.computerFileAccessBoundary?.executionContextAccess || input.executionMode === "repair" ? "fail" : "rebuild",
10947
11258
  createRebuildFailedError: (error) => new CodexRuntimeError({
10948
11259
  code: "context.rebuild_failed",
10949
11260
  errorType: "adapter",
@@ -10982,7 +11293,7 @@ async function invokeCodexWithSingleContextHeal(input) {
10982
11293
  async function invokeCodexAppServer(input) {
10983
11294
  const result = await invokeWithSingleContextHeal({
10984
11295
  contextId: input.threadId,
10985
- contextLossPolicy: input.executionMode === "repair" ? "fail" : "rebuild",
11296
+ contextLossPolicy: input.computerFileAccessBoundary?.executionContextAccess || input.executionMode === "repair" ? "fail" : "rebuild",
10986
11297
  createRebuildFailedError: (error) => new CodexRuntimeError({
10987
11298
  code: "context.rebuild_failed",
10988
11299
  errorType: "adapter",
@@ -19704,6 +20015,7 @@ var registry_default$1 = {
19704
20015
  },
19705
20016
  "transportModes": ["local-cli"],
19706
20017
  "capabilityDeclaration": {
20018
+ "executionContextVersion": 2,
19707
20019
  "streamingCapability": "preview_capable",
19708
20020
  "imageInputCapability": "local_file_path",
19709
20021
  "runtimeWorkingDirectoryMode": "spawn_cwd",
@@ -19773,6 +20085,7 @@ var registry_default$1 = {
19773
20085
  },
19774
20086
  "transportModes": ["codex-app-server"],
19775
20087
  "capabilityDeclaration": {
20088
+ "executionContextVersion": 2,
19776
20089
  "streamingCapability": "preview_capable",
19777
20090
  "imageInputCapability": "local_file_path",
19778
20091
  "runtimeWorkingDirectoryMode": "spawn_cwd",
@@ -20686,6 +20999,10 @@ const FAILED_TASK_RESULT_DELIVERY_SEMANTIC = {
20686
20999
  };
20687
21000
  const isTaskResultStatusSuccessLike = (status) => status === "success" || status === "partial_success";
20688
21001
  const resolveTaskResultDeliverySemantic = (input) => isTaskResultStatusSuccessLike(input.payloadStatus) ? SUCCESS_LIKE_TASK_RESULT_DELIVERY_SEMANTIC : FAILED_TASK_RESULT_DELIVERY_SEMANTIC;
21002
+ Object.freeze({
21003
+ concurrencyLimit: 5,
21004
+ maxWaiting: 50
21005
+ });
20689
21006
  const WORKING_LANGUAGE_DEVELOPER_INSTRUCTIONS = `Working language:
20690
21007
 
20691
21008
  You decide the language for this response from full semantic context, not text classification.
@@ -20863,6 +21180,7 @@ const parseLocalAgentControllerRef = (input) => {
20863
21180
  const areAgentControllerRefsEquivalent = (input) => resolveCanonicalAgentControllerRef({ agentControllerRef: input.leftAgentControllerRef }) === resolveCanonicalAgentControllerRef({ agentControllerRef: input.rightAgentControllerRef });
20864
21181
  const listCompatibleAgentControllerRefs = (input) => [resolveCanonicalAgentControllerRef({ agentControllerRef: input.agentControllerRef })];
20865
21182
  const buildLookupKey = (input) => [
21183
+ ...input.executionContextId ? ["execution-context", input.executionContextId] : [],
20866
21184
  input.targetProfileId,
20867
21185
  input.agentControllerRef,
20868
21186
  input.transportMode,
@@ -20875,7 +21193,7 @@ const buildLegacySpaceScopedLookupKey = (input) => [
20875
21193
  input.transportMode,
20876
21194
  input.runtimeWorkspaceFingerprint
20877
21195
  ].map(encodeLookupKeyPart).join(AGENT_CONTEXT_LOOKUP_KEY_SEPARATOR$1);
20878
- const listCompatibleAgentContextLookupKeys = (input) => listCompatibleAgentControllerRefs(input).flatMap((agentControllerRef) => [buildLookupKey({
21196
+ const listCompatibleAgentContextLookupKeys = (input) => input.executionContextId ? [buildAgentContextLookupKey(input)] : listCompatibleAgentControllerRefs(input).flatMap((agentControllerRef) => [buildLookupKey({
20879
21197
  agentControllerRef,
20880
21198
  targetProfileId: input.targetProfileId,
20881
21199
  transportMode: input.transportMode,
@@ -20888,6 +21206,7 @@ const listCompatibleAgentContextLookupKeys = (input) => listCompatibleAgentContr
20888
21206
  runtimeWorkspaceFingerprint: input.runtimeWorkspaceFingerprint
20889
21207
  })]).filter((lookupKey, index, values) => values.indexOf(lookupKey) === index);
20890
21208
  const buildAgentContextLookupKey = (input) => buildLookupKey({
21209
+ executionContextId: input.executionContextId,
20891
21210
  agentControllerRef: resolveCanonicalAgentControllerRef(input),
20892
21211
  targetProfileId: input.targetProfileId,
20893
21212
  transportMode: input.transportMode,
@@ -20898,6 +21217,16 @@ const normalizeContextId = (value) => {
20898
21217
  const normalized = value.trim();
20899
21218
  return normalized.length > 0 ? normalized : null;
20900
21219
  };
21220
+ function assertLegacyAgentContextAssociation(input) {
21221
+ const expectedNativeId = normalizeContextId(input.legacyNativeConversationId);
21222
+ if (!expectedNativeId) return;
21223
+ const selectedContext = listCompatibleAgentContextLookupKeys({
21224
+ ...input.key,
21225
+ executionContextId: void 0
21226
+ }).map((lookupKey) => input.state.agentContextByLookupKey[lookupKey]).find((context) => context !== void 0);
21227
+ const localNativeId = normalizeContextId(selectedContext?.agentControllerConversationId);
21228
+ if (localNativeId && localNativeId !== expectedNativeId) throw new Error("execution_context.legacy_native_identity_mismatch");
21229
+ }
20901
21230
  const isAgentContextCompatibleWithLookupKeyInput = (input) => isAgentContextCompatibleWithScopeInput({
20902
21231
  agentContext: input.agentContext,
20903
21232
  scope: input.key
@@ -20906,14 +21235,14 @@ const isAgentContextStoredUnderCompatibleLookupKeyInput = (input) => listCompati
20906
21235
  ...input.key,
20907
21236
  spaceId: input.agentContext.spaceId
20908
21237
  }).includes(input.agentContext.agentContextLookupKey);
20909
- const isAgentContextCompatibleWithScopeInput = (input) => input.agentContext.targetProfileId === input.scope.targetProfileId && input.agentContext.transportMode === input.scope.transportMode && areAgentControllerRefsEquivalent({
21238
+ const isAgentContextCompatibleWithScopeInput = (input) => (input.scope.executionContextId ? input.agentContext.agentContextLookupKey.startsWith(`execution-context|${encodeURIComponent(input.scope.executionContextId)}|`) : !input.agentContext.agentContextLookupKey.startsWith("execution-context|")) && input.agentContext.targetProfileId === input.scope.targetProfileId && input.agentContext.transportMode === input.scope.transportMode && areAgentControllerRefsEquivalent({
20910
21239
  leftAgentControllerRef: input.agentContext.agentControllerRef,
20911
21240
  rightAgentControllerRef: input.scope.agentControllerRef
20912
21241
  });
20913
21242
  const resolveAgentContextConversationProfileConflict = (input) => {
20914
21243
  const agentControllerConversationId = normalizeContextId(input.agentControllerConversationId);
20915
21244
  if (!agentControllerConversationId) return null;
20916
- return Object.values(input.state.agentContextByLookupKey).filter((agentContext) => agentContext.agentControllerConversationId === agentControllerConversationId && agentContext.targetProfileId !== input.key.targetProfileId && agentContext.transportMode === input.key.transportMode && areAgentControllerRefsEquivalent({
21245
+ return Object.values(input.state.agentContextByLookupKey).filter((agentContext) => agentContext.agentControllerConversationId === agentControllerConversationId && (agentContext.targetProfileId !== input.key.targetProfileId || (input.key.executionContextId || agentContext.agentContextLookupKey.startsWith("execution-context|")) && agentContext.agentContextLookupKey !== buildAgentContextLookupKey(input.key)) && agentContext.transportMode === input.key.transportMode && areAgentControllerRefsEquivalent({
20917
21246
  leftAgentControllerRef: agentContext.agentControllerRef,
20918
21247
  rightAgentControllerRef: input.key.agentControllerRef
20919
21248
  })).sort((left, right) => {
@@ -20944,7 +21273,7 @@ const resolveExistingAgentContext = (input) => {
20944
21273
  };
20945
21274
  const resolveNextAgentContextLookupKey = (input) => resolveAgentControllerRefKind({ agentControllerRef: input.existing.agentControllerRef }) === "builtin" ? buildAgentContextLookupKey(input.key) : input.existing.agentContextLookupKey;
20946
21275
  const resolveIncompatibleAgentContext = (input) => {
20947
- const candidates = Object.values(input.state.agentContextByLookupKey).filter((agentContext) => agentContext.targetProfileId === input.key.targetProfileId && agentContext.runtimeWorkspaceFingerprint === input.key.runtimeWorkspaceFingerprint);
21276
+ const candidates = Object.values(input.state.agentContextByLookupKey).filter((agentContext) => (input.key.executionContextId ? agentContext.agentContextLookupKey.startsWith(`execution-context|${encodeURIComponent(input.key.executionContextId)}|`) : !agentContext.agentContextLookupKey.startsWith("execution-context|")) && agentContext.targetProfileId === input.key.targetProfileId && agentContext.runtimeWorkspaceFingerprint === input.key.runtimeWorkspaceFingerprint);
20948
21277
  candidates.sort((left, right) => {
20949
21278
  if (left.updatedAtMs !== right.updatedAtMs) return right.updatedAtMs - left.updatedAtMs;
20950
21279
  if (left.createdAtMs !== right.createdAtMs) return right.createdAtMs - left.createdAtMs;
@@ -20979,28 +21308,24 @@ const createAgentContextState = (input) => ({
20979
21308
  runtimeWorkspaceFingerprint: input.key.runtimeWorkspaceFingerprint,
20980
21309
  updatedAtMs: input.nowMs
20981
21310
  });
20982
- const resolveAgentContextForDispatch = (input) => {
20983
- const agentContextLookupKey = buildAgentContextLookupKey(input.key);
20984
- const existing = resolveExistingAgentContext({
20985
- key: input.key,
20986
- state: input.state
20987
- });
20988
- const providerContextId = normalizeContextId(input.providerContextId);
20989
- if (existing) {
20990
- const nextAgentContext = {
20991
- ...existing,
20992
- agentContextLookupKey: resolveNextAgentContextLookupKey({
20993
- existing,
20994
- key: input.key
20995
- }),
20996
- agentControllerRef: resolveCanonicalAgentControllerRef({ agentControllerRef: existing.agentControllerRef }),
20997
- lastTaskId: input.taskId,
20998
- runtimeWorkspaceFingerprint: input.key.runtimeWorkspaceFingerprint,
20999
- spaceId: input.key.spaceId,
21000
- updatedAtMs: input.nowMs
21001
- };
21002
- const replacedAgentContextLookupKey = existing.agentContextLookupKey === nextAgentContext.agentContextLookupKey ? null : existing.agentContextLookupKey;
21003
- if (providerContextId && providerContextId !== existing.agentControllerConversationId) return {
21311
+ function reuseExistingAgentContext(input) {
21312
+ const { existing, providerContextId } = input;
21313
+ const nextAgentContext = {
21314
+ ...existing,
21315
+ agentContextLookupKey: resolveNextAgentContextLookupKey({
21316
+ existing,
21317
+ key: input.key
21318
+ }),
21319
+ agentControllerRef: resolveCanonicalAgentControllerRef({ agentControllerRef: existing.agentControllerRef }),
21320
+ lastTaskId: input.taskId,
21321
+ runtimeWorkspaceFingerprint: input.key.runtimeWorkspaceFingerprint,
21322
+ spaceId: input.key.spaceId,
21323
+ updatedAtMs: input.nowMs
21324
+ };
21325
+ const replacedAgentContextLookupKey = existing.agentContextLookupKey === nextAgentContext.agentContextLookupKey ? null : existing.agentContextLookupKey;
21326
+ if (providerContextId && providerContextId !== existing.agentControllerConversationId) {
21327
+ if (input.key.executionContextId) throw new Error("execution_context.native_identity_mismatch");
21328
+ return {
21004
21329
  counterDelta: {
21005
21330
  guardBlocked: 1,
21006
21331
  reused: 1
@@ -21012,16 +21337,29 @@ const resolveAgentContextForDispatch = (input) => {
21012
21337
  ...replacedAgentContextLookupKey ? { replacedAgentContextLookupKey } : {},
21013
21338
  sourceFieldOverride: LEDGER_AGENT_CONTEXT_SOURCE_FIELD
21014
21339
  };
21015
- return {
21016
- counterDelta: { reused: 1 },
21017
- lifecycleReason: "reused_existing_context",
21018
- resolvedAgentControllerConversationId: existing.agentControllerConversationId,
21019
- agentContext: nextAgentContext,
21020
- agentContextLookupKey: nextAgentContext.agentContextLookupKey,
21021
- ...replacedAgentContextLookupKey ? { replacedAgentContextLookupKey } : {},
21022
- ...providerContextId ? {} : { sourceFieldOverride: LEDGER_AGENT_CONTEXT_SOURCE_FIELD }
21023
- };
21024
21340
  }
21341
+ return {
21342
+ counterDelta: { reused: 1 },
21343
+ lifecycleReason: "reused_existing_context",
21344
+ resolvedAgentControllerConversationId: existing.agentControllerConversationId,
21345
+ agentContext: nextAgentContext,
21346
+ agentContextLookupKey: nextAgentContext.agentContextLookupKey,
21347
+ ...replacedAgentContextLookupKey ? { replacedAgentContextLookupKey } : {},
21348
+ ...providerContextId ? {} : { sourceFieldOverride: LEDGER_AGENT_CONTEXT_SOURCE_FIELD }
21349
+ };
21350
+ }
21351
+ const resolveAgentContextForDispatch = (input) => {
21352
+ const agentContextLookupKey = buildAgentContextLookupKey(input.key);
21353
+ const existing = resolveExistingAgentContext({
21354
+ key: input.key,
21355
+ state: input.state
21356
+ });
21357
+ const providerContextId = normalizeContextId(input.providerContextId);
21358
+ if (existing) return reuseExistingAgentContext({
21359
+ ...input,
21360
+ existing,
21361
+ providerContextId
21362
+ });
21025
21363
  if (!providerContextId) return {
21026
21364
  counterDelta: {},
21027
21365
  lifecycleReason: "missing_context_unresolved",
@@ -21032,13 +21370,16 @@ const resolveAgentContextForDispatch = (input) => {
21032
21370
  agentControllerConversationId: providerContextId,
21033
21371
  key: input.key,
21034
21372
  state: input.state
21035
- })) return {
21036
- counterDelta: { guardBlocked: 1 },
21037
- lifecycleReason: "profile_conversation_conflict",
21038
- resolvedAgentControllerConversationId: null,
21039
- agentContextLookupKey,
21040
- sourceFieldOverride: LEDGER_AGENT_CONTEXT_SOURCE_FIELD
21041
- };
21373
+ })) {
21374
+ if (input.key.executionContextId) throw new Error("execution_context.native_identity_conflict");
21375
+ return {
21376
+ counterDelta: { guardBlocked: 1 },
21377
+ lifecycleReason: "profile_conversation_conflict",
21378
+ resolvedAgentControllerConversationId: null,
21379
+ agentContextLookupKey,
21380
+ sourceFieldOverride: LEDGER_AGENT_CONTEXT_SOURCE_FIELD
21381
+ };
21382
+ }
21042
21383
  const incompatibleContextResolution = resolveIncompatibleAgentContext({
21043
21384
  key: input.key,
21044
21385
  state: input.state
@@ -21355,6 +21696,7 @@ const HEARTBEAT_POLICY_DEFAULTS = {
21355
21696
  3e4
21356
21697
  ]
21357
21698
  };
21699
+ const EXECUTION_CONTEXT_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
21358
21700
  const LEDGER_STATE_INVALID_JSON_ERROR = "ledger.state.invalid_json";
21359
21701
  const LEDGER_STATE_SCHEMA_ERROR = "ledger.state.schema_invalid";
21360
21702
  const LEDGER_STATE_BACKUP_ERROR = "ledger.state.backup_failed";
@@ -21401,6 +21743,7 @@ const toErrorCode = (error) => {
21401
21743
  };
21402
21744
  const encodeAgentContextLookupKeyPart = (value) => encodeURIComponent(value);
21403
21745
  const buildStoredAgentContextLookupKey = (input) => [
21746
+ ...input.executionContextId ? ["execution-context", input.executionContextId] : [],
21404
21747
  input.targetProfileId,
21405
21748
  input.agentControllerRef,
21406
21749
  input.transportMode,
@@ -21432,7 +21775,13 @@ const parseAgentContextState = (agentContextLookupKey, value) => {
21432
21775
  const { agentControllerConversationId, agentControllerRef, createdAtMs, lastTaskId, spaceId, targetProfileId, transportMode, runtimeWorkspaceFingerprint, updatedAtMs } = value;
21433
21776
  const parsedAgentControllerRef = typeof agentControllerRef === "string" ? parseAgentControllerRef$1(agentControllerRef) : null;
21434
21777
  if (!isRuntimeTransportMode(transportMode) || typeof agentContextLookupKey !== "string" || agentContextLookupKey.length === 0 || typeof spaceId !== "string" || spaceId.length === 0 || typeof targetProfileId !== "string" || targetProfileId.length === 0 || !parsedAgentControllerRef || typeof runtimeWorkspaceFingerprint !== "string" || runtimeWorkspaceFingerprint.length === 0 || typeof agentControllerConversationId !== "string" || agentControllerConversationId.length === 0 || !isPositiveInteger(createdAtMs) || !isPositiveInteger(updatedAtMs) || typeof lastTaskId !== "string" || lastTaskId.length === 0) return null;
21778
+ let executionContextId;
21779
+ if (agentContextLookupKey.startsWith("execution-context|")) {
21780
+ executionContextId = agentContextLookupKey.split("|")[1];
21781
+ if (!(executionContextId && EXECUTION_CONTEXT_ID_PATTERN.test(executionContextId))) return null;
21782
+ }
21435
21783
  const canonicalLookupKey = buildStoredAgentContextLookupKey({
21784
+ executionContextId,
21436
21785
  agentControllerRef: parsedAgentControllerRef.ref,
21437
21786
  runtimeWorkspaceFingerprint,
21438
21787
  targetProfileId,
@@ -21551,10 +21900,10 @@ const parseBootstrapExecutionByLookupKey = (value) => {
21551
21900
  }
21552
21901
  return nextBootstrapExecutionByLookupKey;
21553
21902
  };
21554
- const parseLedgerStateV1 = (value) => {
21903
+ const decodeLedgerState = (value) => {
21555
21904
  if (!isRecord$2(value)) return null;
21556
21905
  const { agentContextRotations, dedupeFirstSeenByKey, inflightByTaskId, replayedTaskIds, agentContextByLookupKey, bootstrapExecutionByLookupKey, agentContextLifecycleCounters, updatedAtMs, v } = value;
21557
- if (v !== 1 || !isPositiveInteger(updatedAtMs)) return null;
21906
+ if (v !== 2 && v !== 1 || !isPositiveInteger(updatedAtMs)) return null;
21558
21907
  const nextDedupeFirstSeenByKey = parseDedupeFirstSeenByKey(dedupeFirstSeenByKey);
21559
21908
  const nextInflightByTaskId = parseInflightByTaskId(inflightByTaskId);
21560
21909
  const nextReplayedTaskIds = parseReplayedTaskIds(replayedTaskIds);
@@ -21572,7 +21921,7 @@ const parseLedgerStateV1 = (value) => {
21572
21921
  agentContextLifecycleCounters: nextAgentContextLifecycleCounters,
21573
21922
  agentContextRotations: nextAgentContextRotations,
21574
21923
  updatedAtMs,
21575
- v: 1
21924
+ v: 2
21576
21925
  };
21577
21926
  };
21578
21927
  const serializeLedgerState = (state) => `${JSON.stringify(state, null, 2)}\n`;
@@ -21588,7 +21937,7 @@ const cloneLedgerState$1 = (state) => ({
21588
21937
  agentContextLifecycleCounters: { ...state.agentContextLifecycleCounters },
21589
21938
  agentContextRotations: state.agentContextRotations.map((record) => ({ ...record })),
21590
21939
  updatedAtMs: state.updatedAtMs,
21591
- v: 1
21940
+ v: 2
21592
21941
  });
21593
21942
  const buildHistoryArchivePath = (historyFilePath, index) => {
21594
21943
  const suffix = ".ndjson";
@@ -21661,7 +22010,7 @@ const compactLedgerState = (input) => {
21661
22010
  agentContextLifecycleCounters: { ...input.state.agentContextLifecycleCounters },
21662
22011
  agentContextRotations: input.state.agentContextRotations.map((record) => ({ ...record })),
21663
22012
  updatedAtMs: persistedAtMs,
21664
- v: 1
22013
+ v: 2
21665
22014
  };
21666
22015
  };
21667
22016
  const resolveCompactionReferenceNowMs = (input) => {
@@ -21712,10 +22061,10 @@ const createEmptyLedgerState = (nowMs = Date.now()) => ({
21712
22061
  agentContextLifecycleCounters: createEmptyAgentContextLifecycleCounters(),
21713
22062
  agentContextRotations: [],
21714
22063
  updatedAtMs: nowMs,
21715
- v: 1
22064
+ v: 2
21716
22065
  });
21717
- const parseLedgerState = (value) => parseLedgerStateV1(value);
21718
- const loadLedgerState = async (input) => {
22066
+ const parseLedgerState = (value) => decodeLedgerState(value);
22067
+ const loadLedgerStateUnlocked = async (input) => {
21719
22068
  let rawState = "";
21720
22069
  try {
21721
22070
  rawState = await input.io.readFile(input.paths.stateFilePath, UTF8_ENCODING);
@@ -21745,8 +22094,43 @@ const loadLedgerState = async (input) => {
21745
22094
  paths: input.paths
21746
22095
  });
21747
22096
  }
22097
+ if (isRecord$2(parsedUnknown) && parsedUnknown.v === 1) await backupPriorVersionLedgerState({
22098
+ ...input,
22099
+ rawState
22100
+ });
21748
22101
  return parsedState;
21749
22102
  };
22103
+ const loadLedgerState = async (input) => enqueueLedgerStateWrite({
22104
+ operation: () => loadLedgerStateUnlocked(input),
22105
+ stateFilePath: input.paths.stateFilePath
22106
+ });
22107
+ const backupPriorVersionLedgerState = async (input) => {
22108
+ const backupPath = `${input.paths.stateFilePath}.v1.bak`;
22109
+ let tempPath;
22110
+ try {
22111
+ let existingBackup;
22112
+ try {
22113
+ existingBackup = await input.io.readFile(backupPath, UTF8_ENCODING);
22114
+ } catch (error) {
22115
+ if (toErrorCode(error) !== "ENOENT") throw error;
22116
+ }
22117
+ if (existingBackup === void 0) {
22118
+ tempPath = buildScopedStateTempFilePath({ stateTempFilePath: `${backupPath}.tmp` });
22119
+ await input.io.copyFile(input.paths.stateFilePath, tempPath);
22120
+ await input.io.syncPath(tempPath);
22121
+ if (await input.io.readFile(tempPath, UTF8_ENCODING) !== input.rawState) throw new Error(LEDGER_STATE_BACKUP_ERROR);
22122
+ await input.io.rename(tempPath, backupPath);
22123
+ tempPath = void 0;
22124
+ } else if (existingBackup !== input.rawState) throw new Error(LEDGER_STATE_BACKUP_ERROR);
22125
+ await input.io.syncPath(backupPath);
22126
+ await input.io.syncPath(input.paths.rootDirPath);
22127
+ if (await input.io.readFile(backupPath, UTF8_ENCODING) !== input.rawState) throw new Error(LEDGER_STATE_BACKUP_ERROR);
22128
+ } catch (error) {
22129
+ throw new Error(LEDGER_STATE_BACKUP_ERROR, { cause: error });
22130
+ } finally {
22131
+ if (tempPath) await input.io.rm(tempPath, { force: true }).catch(() => void 0);
22132
+ }
22133
+ };
21750
22134
  const handleInvalidLedgerState = async (input) => {
21751
22135
  if (input.invalidStateStrategy !== "backup_and_reset") throw new Error(input.errorCode);
21752
22136
  const resetAtMs = Date.now();
@@ -21770,7 +22154,9 @@ const persistLedgerStateAtomic = async (input) => {
21770
22154
  const scopedTempFilePath = buildScopedStateTempFilePath({ stateTempFilePath: input.paths.stateTempFilePath });
21771
22155
  try {
21772
22156
  await input.io.writeFile(scopedTempFilePath, serializeLedgerState(normalizedState), UTF8_ENCODING);
22157
+ await input.io.syncPath(scopedTempFilePath);
21773
22158
  await input.io.rename(scopedTempFilePath, input.paths.stateFilePath);
22159
+ await input.io.syncPath(input.paths.rootDirPath);
21774
22160
  } catch (error) {
21775
22161
  await input.io.rm(scopedTempFilePath, { force: true });
21776
22162
  throw error;
@@ -21778,7 +22164,7 @@ const persistLedgerStateAtomic = async (input) => {
21778
22164
  };
21779
22165
  const withLedgerStateTransaction = async (input) => enqueueLedgerStateWrite({
21780
22166
  operation: async () => {
21781
- const state = await loadLedgerState({
22167
+ const state = await loadLedgerStateUnlocked({
21782
22168
  invalidStateStrategy: input.invalidStateStrategy,
21783
22169
  io: input.io,
21784
22170
  paths: input.paths
@@ -22272,6 +22658,7 @@ const mapAdapterErrorType = (errorType) => {
22272
22658
  };
22273
22659
  const buildDispatchRequest = (input) => ({
22274
22660
  agentId: input.task.agentId,
22661
+ executionContext: input.task.executionContext,
22275
22662
  ...input.agentControllerPermissionMode ? { agentControllerPermissionMode: input.agentControllerPermissionMode } : {},
22276
22663
  ...input.conversationPolicy ? { conversationPolicy: input.conversationPolicy } : {},
22277
22664
  ...input.task.computerFileAccessBoundary ? { computerFileAccessBoundary: input.task.computerFileAccessBoundary } : {},
@@ -22444,6 +22831,7 @@ const resolvePostDispatchAgentContextInput = (input) => {
22444
22831
  const resolvePostDispatchAgentContextResolution = (input) => resolveAgentContextForDispatch({
22445
22832
  key: {
22446
22833
  agentControllerRef: input.postDispatchAgentContext.route.agentControllerRef,
22834
+ executionContextId: input.postDispatchAgentContext.task.executionContext?.id,
22447
22835
  runtimeWorkspaceFingerprint: input.postDispatchAgentContext.route.runtimeWorkspaceFingerprint ?? buildRuntimeWorkspaceFingerprint(input.postDispatchAgentContext.task.runtimeContext.providerRuntimeWorkingDirectory),
22448
22836
  spaceId: input.postDispatchAgentContext.task.spaceId,
22449
22837
  targetProfileId: input.postDispatchAgentContext.task.agentId,
@@ -22489,7 +22877,7 @@ const resolveRuntimeLifecycleMetadata = (committedAgentContextResolution) => {
22489
22877
  };
22490
22878
  };
22491
22879
  const prepareRuntimeTaskExecution = async (input) => withLedgerStateTransaction({
22492
- invalidStateStrategy: "backup_and_reset",
22880
+ invalidStateStrategy: input.task.executionContext ? "throw" : "backup_and_reset",
22493
22881
  io: input.io,
22494
22882
  mutate: (state) => {
22495
22883
  const repairExecution = isRepairExecutionMode(input.task.executionMode);
@@ -22525,6 +22913,7 @@ const prepareRuntimeTaskExecution = async (input) => withLedgerStateTransaction(
22525
22913
  const agentContextResolution = input.route ? resolveAgentContextForDispatch({
22526
22914
  key: {
22527
22915
  agentControllerRef: input.route.agentControllerRef,
22916
+ executionContextId: input.task.executionContext?.id,
22528
22917
  runtimeWorkspaceFingerprint: input.route.runtimeWorkspaceFingerprint ?? buildRuntimeWorkspaceFingerprint(input.task.runtimeContext.providerRuntimeWorkingDirectory),
22529
22918
  spaceId: input.task.spaceId,
22530
22919
  targetProfileId: input.task.agentId,
@@ -22635,7 +23024,7 @@ const emitRuntimeTaskOutcomeHealthFindings = (input) => {
22635
23024
  });
22636
23025
  };
22637
23026
  const settleRuntimeTaskState = async (input) => withLedgerStateTransaction({
22638
- invalidStateStrategy: "backup_and_reset",
23027
+ invalidStateStrategy: input.committedAgentContextResolution?.agentContextLookupKey.startsWith("execution-context|") || input.postDispatchAgentContext?.task.executionContext ? "throw" : "backup_and_reset",
22639
23028
  io: input.io,
22640
23029
  mutate: (state) => {
22641
23030
  let committedAgentContextResolution = input.committedAgentContextResolution;
@@ -22924,6 +23313,7 @@ function resolveDispatchQueueLogMeta(input) {
22924
23313
  adapterId: input.runtimeAdapterId,
22925
23314
  controllerKey,
22926
23315
  localExecutionLaneKey: buildDispatchLocalExecutionLaneKey({
23316
+ executionContextId: input.parsedTask.executionContext?.id,
22927
23317
  agentControllerConversationId: input.parsedTask.agentControllerConversationId,
22928
23318
  controllerKey,
22929
23319
  profileId: input.profileId
@@ -22939,6 +23329,7 @@ function buildDispatchControllerKey(input) {
22939
23329
  return `profile:${input.profileId}`;
22940
23330
  }
22941
23331
  function buildDispatchLocalExecutionLaneKey(input) {
23332
+ if (input.executionContextId) return `execution-context:${input.profileId}:${input.executionContextId}`;
22942
23333
  const agentControllerConversationId = normalizeOptionalText$10(input.agentControllerConversationId);
22943
23334
  if (agentControllerConversationId) return `agent-controller-conversation:${input.controllerKey}:${agentControllerConversationId}`;
22944
23335
  return `agent-profile:${input.profileId}`;
@@ -23074,10 +23465,19 @@ function createInflightTaskControlRegistry() {
23074
23465
  //#endregion
23075
23466
  //#region ../../runtime/local-service/src/local-execution-slots.ts
23076
23467
  const LOCAL_EXECUTION_LANE_CONCURRENCY_LIMIT = 1;
23468
+ function resourcesConflict(left, right) {
23469
+ if (left === void 0 && right === void 0) return false;
23470
+ if (left === void 0 || right === void 0) return true;
23471
+ if (left === "exclusive" || right === "exclusive") return true;
23472
+ if (left === "none" || right === "none") return false;
23473
+ return left === "read_only" && right === "isolated" || right === "read_only" && left === "isolated";
23474
+ }
23077
23475
  function createLocalExecutionSlots(input) {
23078
23476
  const pendingTasks = [];
23079
23477
  const activeCountByAdapterId = /* @__PURE__ */ new Map();
23080
23478
  const activeCountByLaneKey = /* @__PURE__ */ new Map();
23479
+ const activeCountByProfileId = /* @__PURE__ */ new Map();
23480
+ const activeResources = /* @__PURE__ */ new Map();
23081
23481
  const adapterOperationIds = /* @__PURE__ */ new Set();
23082
23482
  const ownedAttemptKeys = /* @__PURE__ */ new Set();
23083
23483
  const ownedTaskIds = /* @__PURE__ */ new Map();
@@ -23103,11 +23503,15 @@ function createLocalExecutionSlots(input) {
23103
23503
  const resolveWaitReason = (inputWait) => {
23104
23504
  if (inputWait.adapterId && adapterOperationIds.has(inputWait.adapterId)) return "agent_controller_maintenance";
23105
23505
  if (activeGlobal >= input.limits.globalConcurrency) return "global_concurrency";
23506
+ if (inputWait.resourceScope !== void 0 && (activeCountByProfileId.get(inputWait.profileId ?? "") ?? 0) >= (input.limits.contextConcurrency ?? 0)) return "agent_profile_concurrency";
23507
+ if ([...activeResources.values()].some((active) => resourcesConflict(active, inputWait.resourceScope))) return "workspace_conflict";
23106
23508
  if (resolveActiveForLane(inputWait.localExecutionLaneKey) >= LOCAL_EXECUTION_LANE_CONCURRENCY_LIMIT) return "local_execution_lane_concurrency";
23107
23509
  return "none";
23108
23510
  };
23109
23511
  const buildLocalQueueDiagnostics = (inputDiagnostics) => {
23110
23512
  const waitReason = inputDiagnostics.waitReason ?? resolveWaitReason({
23513
+ profileId: inputDiagnostics.profileId,
23514
+ resourceScope: inputDiagnostics.resourceScope,
23111
23515
  adapterId: inputDiagnostics.adapterId,
23112
23516
  localExecutionLaneKey: inputDiagnostics.localExecutionLaneKey
23113
23517
  });
@@ -23127,6 +23531,8 @@ function createLocalExecutionSlots(input) {
23127
23531
  dispatchId: task.dispatchId,
23128
23532
  localExecutionLaneKey: task.localExecutionLaneKey,
23129
23533
  localQueue: buildLocalQueueDiagnostics({
23534
+ profileId: task.profileId,
23535
+ resourceScope: task.resourceScope,
23130
23536
  adapterId: task.adapterId,
23131
23537
  localExecutionLaneKey: task.localExecutionLaneKey,
23132
23538
  queuePosition: inputEvent.queuePosition,
@@ -23165,15 +23571,15 @@ function createLocalExecutionSlots(input) {
23165
23571
  };
23166
23572
  const pump = () => {
23167
23573
  while (activeGlobal < input.limits.globalConcurrency) {
23168
- const nextTaskIndex = pendingTasks.findIndex((candidate) => {
23169
- return !(candidate.task.adapterId && adapterOperationIds.has(candidate.task.adapterId)) && resolveActiveForLane(candidate.task.localExecutionLaneKey) < LOCAL_EXECUTION_LANE_CONCURRENCY_LIMIT;
23170
- });
23574
+ const nextTaskIndex = pendingTasks.findIndex((candidate) => resolveWaitReason(candidate.task) === "none");
23171
23575
  if (nextTaskIndex < 0) break;
23172
23576
  const selectedPendingTask = pendingTasks.splice(nextTaskIndex, 1)[0];
23173
23577
  if (!selectedPendingTask) continue;
23174
23578
  clearQueuedLifecycle(selectedPendingTask);
23175
23579
  const selectedTask = selectedPendingTask.task;
23176
23580
  activeGlobal += 1;
23581
+ activeResources.set(selectedTask.taskId, selectedTask.resourceScope);
23582
+ activeCountByProfileId.set(selectedTask.profileId, (activeCountByProfileId.get(selectedTask.profileId) ?? 0) + 1);
23177
23583
  if (selectedTask.adapterId) activeCountByAdapterId.set(selectedTask.adapterId, (activeCountByAdapterId.get(selectedTask.adapterId) ?? 0) + 1);
23178
23584
  activeCountByLaneKey.set(selectedTask.localExecutionLaneKey, resolveActiveForLane(selectedTask.localExecutionLaneKey) + 1);
23179
23585
  const startedEvent = buildTaskLifecycleEvent(selectedTask, {
@@ -23211,6 +23617,8 @@ function createLocalExecutionSlots(input) {
23211
23617
  }).finally(() => {
23212
23618
  releaseTaskOwnership(selectedTask);
23213
23619
  activeGlobal = Math.max(0, activeGlobal - 1);
23620
+ activeResources.delete(selectedTask.taskId);
23621
+ activeCountByProfileId.set(selectedTask.profileId, Math.max(0, (activeCountByProfileId.get(selectedTask.profileId) ?? 0) - 1));
23214
23622
  if (selectedTask.adapterId) {
23215
23623
  const remainingActiveForAdapter = Math.max(0, (activeCountByAdapterId.get(selectedTask.adapterId) ?? 0) - 1);
23216
23624
  if (remainingActiveForAdapter === 0) activeCountByAdapterId.delete(selectedTask.adapterId);
@@ -24584,6 +24992,7 @@ var registry_default = {
24584
24992
  },
24585
24993
  "transportModes": ["local-cli"],
24586
24994
  "capabilityDeclaration": {
24995
+ "executionContextVersion": 2,
24587
24996
  "streamingCapability": "preview_capable",
24588
24997
  "imageInputCapability": "local_file_path",
24589
24998
  "runtimeWorkingDirectoryMode": "spawn_cwd",
@@ -24653,6 +25062,7 @@ var registry_default = {
24653
25062
  },
24654
25063
  "transportModes": ["codex-app-server"],
24655
25064
  "capabilityDeclaration": {
25065
+ "executionContextVersion": 2,
24656
25066
  "streamingCapability": "preview_capable",
24657
25067
  "imageInputCapability": "local_file_path",
24658
25068
  "runtimeWorkingDirectoryMode": "spawn_cwd",
@@ -26695,6 +27105,7 @@ function parseAgentsRegistryAdapterBinding(value, context) {
26695
27105
  }
26696
27106
  function parseAgentsRegistryRuntimeCapabilityDeclaration(value, context) {
26697
27107
  const objectValue = readObjectValue(value, context);
27108
+ if (objectValue.executionContextVersion !== void 0 && objectValue.executionContextVersion !== 1 && objectValue.executionContextVersion !== 2) throw new Error(`${context}.executionContextVersion is unsupported`);
26698
27109
  const streamingCapability = readEnumValue(objectValue.streamingCapability, `${context}.streamingCapability`, ["preview_capable", "final_only"]);
26699
27110
  const imageInputCapability = readOptionalEnumValue(objectValue.imageInputCapability, `${context}.imageInputCapability`, ["local_file_path", "unsupported"]);
26700
27111
  const runtimeWorkingDirectoryMode = readEnumValue(objectValue.runtimeWorkingDirectoryMode, `${context}.runtimeWorkingDirectoryMode`, [
@@ -26712,6 +27123,7 @@ function parseAgentsRegistryRuntimeCapabilityDeclaration(value, context) {
26712
27123
  ]);
26713
27124
  return {
26714
27125
  continuationCapability,
27126
+ ...objectValue.executionContextVersion === 1 || objectValue.executionContextVersion === 2 ? { executionContextVersion: objectValue.executionContextVersion } : {},
26715
27127
  ...imageInputCapability ? { imageInputCapability } : {},
26716
27128
  preparationRequirement,
26717
27129
  runtimeWorkingDirectoryMode,
@@ -29551,9 +29963,9 @@ function createModelCatalogReadSession(input) {
29551
29963
  async function readModelCatalogOnce(baseUrl) {
29552
29964
  try {
29553
29965
  const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
29554
- import("./dist-DTG_Vqc7.js"),
29966
+ import("./dist-DVciurWV.js"),
29555
29967
  import("./base-url-BE3pFiOZ.js"),
29556
- import("./api-client-foundation-D6_NXHPV.js")
29968
+ import("./api-client-foundation-LfQQZwak.js")
29557
29969
  ]);
29558
29970
  if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
29559
29971
  const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
@@ -37360,6 +37772,6 @@ function projectServiceJob(job) {
37360
37772
  };
37361
37773
  }
37362
37774
  //#endregion
37363
- export { formatDeviceReplyReadinessLabel as $, listOpenMeldProfiles as $a, buildDaemonServiceTargetSpec as $i, resolveRouteRegistrationReconcileDecision as $n, resolveAgentControllerPermissionModeForController as $r, resolveProjectBindingForPath as $t, resolveDaemonStatusSnapshot as A, DAEMON_STREAM_KEEPALIVE_INTERVAL_MS as Aa, readCurrentDaemonOwnerSnapshot as Ai, resolveSkillsAgentRegistry as An, seedLegacyAgentContext as Ar, createModelCatalogReadSession as At, formatDaemonServiceRefreshReliabilityMessage as B, RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS as Ba, PREPARE_SESSION_RECONNECT_GRACE_MS as Bi, repairBuiltinControllerInstall as Bn, buildWorkingLanguagePromptPlan as Br, setOpenMeldManagedProfileWorkspace as Bt, isSystemServiceStartupTimeoutError as C, CATALOG_SYNC_RETRY_INTERVAL_MS as Ca, buildCliLaunchInvocation as Ci, removeAgentCustomTarget as Cn, buildRuntimeWorkspaceFingerprint as Cr, summarizeSkippedDaemonProfiles as Ct, captureDaemonServiceEvidence as D, CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS as Da, buildDaemonOwnerSnapshotFromObservedState as Di, updateAgentRegistrations as Dn, loadLedgerState as Dr, resolveLocalController as Dt, startDaemonSystemServiceWithAutoRepair as E, CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS as Ea, inspectDaemonServiceInventory as Ei, updateAgentCustomTarget as En, commitResolvedAgentContext as Er, readLocalEnabledControllers as Et, buildDaemonServiceRefreshNextStep as F, PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS as Fa, toStartBackgroundHelperExecutionCompatibility as Fi, notifyDaemonRouteCatalogChanged as Fn, buildAgentContextLookupKey as Fr, readProfileWorkspaceConfig as Ft, buildDaemonServiceDependencyDetails as G, clearAllSelectedOpenMeldProfileIds as Ga, resolveRuntimeContext as Gi, isNpmGlobalCommandPath as Gn, getAgentControllerPermissionModeFieldLabel as Gr, bindProject as Gt, resolveDaemonServiceFreshnessWarning as H, requireOpenMeldProfile as Ha, buildOnboardingPlan as Hi, resolveBuiltinAgentControllerDefinition as Hn, createAgentExecutionStatusDisplayRows as Hr, describeProfileWorkspacePathValidationFailure as Ht, buildDaemonServiceRefreshPromptMessage as I, PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS as Ia, ensureDaemonRuntimeContractState as Ii, normalizeAgentId as In, DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS as Ir, readProfileWorkspaceConfigForAccount as It, buildDaemonServiceDependencySummary as J, setSelectedOpenMeldProfileId as Ja, setProfileDefaultView as Ji, normalizeDispatchThreadAction as Jn, parseAgentControllerRef as Jr, listProjectConnectionsWithStatus as Jt, buildDaemonServiceDependencyMeaning as K, clearSelectedOpenMeldProfileId as Ka, resolveViewProfileKey as Ki, isPnpmGlobalCommandPath as Kn, isAgentExecutionReadyOrConnecting as Kr, isProjectBound as Kt, buildDaemonServiceRepairGuidance as L, REGISTER_RESPONSE_TIMEOUT_MS as La, readDaemonRuntimeContractRepairReport as Li, normalizeAgentIds as Ln, areAgentControllerInterfaceAccountsSame as Lr, resolveConfiguredProfileWorkspacePath as Lt, resolveDaemonStatusAuthenticationAttention as M, DEFAULT_RECONNECT_DELAY_MS as Ma, resolveStoppedContractWriteBlockedReason as Mi, resolveRegistryOriginLaunchCommand as Mn, upsertConversationExecutionState as Mr, resolveProfileWorkspaceRuntime as Mt, resolveServiceReadiness as N, HEARTBEAT_RESPONSE_TIMEOUT_MS as Na, summarizeDaemonOwnerSnapshot as Ni, resolveRegistryRuntimeAdapterCapabilitySnapshot as Nn, withLedgerStateTransaction as Nr, ensureOpenMeldManagedProfileWorkspace as Nt, captureDaemonServiceEvidenceBestEffort as O, DAEMON_RUNTIME_CONTRACT_EPOCH as Oa, formatDaemonOwnerSummaryLabel as Oi, canManageRegistryAgentSkillTargets as On, removeConversationExecutionState as Or, resolveLocalRuntimeControllerSupport as Ot, resolveServiceReadinessFromServiceStatus as P, MAX_RECONNECT_DELAY_MS as Pa, resolveDaemonRuntimeContractCompatibility as Pi, resolveRegistryRuntimeAdapterContractByAgentControllerRef as Pn, buildAuthenticatedControlPlaneResponse as Pr, normalizeCustomProfileWorkspacePath as Pt, formatAgentReplyReadinessLabel as Q, getOpenMeldProfileCapabilities as Qa, ensureDaemonSystemServiceCommandFiles as Qi, isDaemonReconcileInProgressError as Qn, renderWorkingLanguagePrompt as Qr, removeProjectConnection as Qt, buildDaemonServiceStatusReadOnlyDetail as R, RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS as Ra, DaemonServiceRunError as Ri, parseAgentEnabledOption as Rn, buildAgentControllerRef as Rr, resolveConfiguredProfileWorkspacePathForAccount as Rt, isDaemonInventoryRunningAndStartReady as S, warnDaemonEvent as Sa, resolveDispatchSpaceActionMcpServer as Si, reconcileNewRunnableBuiltinAgentsForSetup as Sn, runRuntimeTask as Sr, loadDaemonRouteCatalog as St, waitForSystemServiceStartup as T, CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS as Ta, createProviderOriginalError as Ti, setAgentRegistrationEnabled as Tn, appendLedgerHistoryEntry as Tr, buildRuntimeRouteTargets as Tt, clearDaemonStartFailureState as U, resolveOpenMeldProfileOrNull as Ua, getSetupFlowCopy as Ui, isBunGlobalCommandPath as Un, createAuthorityOpenMeldServiceRuntimeId as Ur, ProjectBindingOperationError as Ut, formatDaemonServiceUpdateRequiredMessage as V, isSelectedOpenMeldProfileRequiredError as Va, buildDaemonRouteObservationPresentation as Vi, EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES as Vn, createAgentControllerInterfaceDisplayRows as Vr, validateCustomProfileWorkspacePath as Vt, writeDaemonStartFailureState as W, alignSelectedOpenMeldProfileStorage as Wa, parseCliViewMode as Wi, isHomebrewCommandPath as Wn, getAgentControllerPermissionModeDisplayMetadata as Wr, ProjectBindingStoreUpdateRequiredError as Wt, resolveDaemonServiceDependencyDiagnostics as X, createOpenMeldHumanProfile as Xa, writeDaemonServiceContract as Xi, SPACE_ACTION_CONTEXT_GUIDANCE_LINES as Xn, projectPeopleComputersToLegacyLocalRuntimes as Xr, removeAgentActivityBindingsWhileDeliveryLocked as Xt, buildDaemonServiceDependencyTitle as Y, createOpenMeldAgentProfile as Ya, resolveCurrentOpenMeldAccountContext as Yi, syncRuntimeEventToInflightTaskControlRegistry as Yn, peopleComputerContainsDevice as Yr, migrateProjectBindingStore as Yt, resolveCurrentReplyReadinessSnapshot as Z, deleteOpenMeldProfile as Za, buildDaemonSystemServiceCommandSpec as Zi, SPACE_ACTION_TARGET_GUIDANCE_LINES as Zn, renderInformationProtectionPrompt as Zr, removeMissingProjectConnections as Zt, DaemonServiceLifecycleDrainTimeoutError as _, normalizeNonNegativeInteger as _a, forkCodexAppServerThread as _i, listAgentRegistrations as _n, resolveDispatchQueueLogMeta as _r, readDaemonRouteCatalogCache as _t, resolveServiceUpdateUrgency as a, DAEMON_SERVICE_REPAIR_ANOMALIES as aa, resolveCatalogSyncSkippedProfilesLogState as ai, withAgentActivityDeliveryLock as an, buildAgentAuthenticationGuide as ao, createLocalTaskInterruptSender as ar, resolveReplyReadinessAvailabilityReasonCopy as at, prepareDaemonServiceUpdateWorkerCarrier as b, nowIsoString as ba, createUnavailableProviderUsageLimits as bi, readAgentRuntimeConfigHealth as bn, resolveCompatibleConversationExecutionState as br, createMutableRouteCatalogState as bt, buildLocalAgentCatalogFromReadiness as c, classifyDaemonServiceWakeability as ca, parseOpenCodeGoUsageResponse as ci, syncDeviceRuntimeStateProjection as cn, buildHumanAuthenticationCard as co, createInflightTaskControlRegistry as cr, classifyGatewayChainFailure as ct, isCliUpdateCheckApplicable as d, resolveDaemonDeviceId as da, GrokBuildAcpTransportError as di, emitReconcileStartedEvidence as dn, resolveAuthenticationGuidance as do, MIN_HEARTBEAT_INTERVAL_MS as dr, resolveGatewayChainRetryGuidance as dt, resolveDaemonServiceAlignmentDecision as ea, resolveAgentExecutionStatus as ei, runIfAgentActivityBindingGenerationIsCurrent as en, primeOpenMeldProfilesSessionCache as eo, createSerialAgentInteractionCallback as er, formatHumanReplyReadinessReason as et, readLastOpenMeldToolsUpdateAttempt as f, resolvePreferredDaemonDeviceId as fa, probeGrokBuildAcpInterface as fi, createPrimaryBindingReadSession as fn, resolveAuthenticationGuidanceFromError as fo, applyAcceptedLeases as fr, resolveOpenClawLocalDiagnosticsValue as ft, scheduleDaemonServiceUpdate as g, normalizeHeartbeatIntervalMs as ga, resolveInstalledCodexLaunchCandidates as gi, listAgentCustomTargets as gn, resolveBuiltinAgentControllerBrand as go, resolveCatalogSyncIntervalMs as gr, slugifyOpenClawNamePart as gt, runPendingDaemonServiceUpdate as h, emitRunLine as ha, resolveCodexTimeoutMs as hi, createRegistrationFromCatalogTarget as hn, compareAgentControllerRefsForDisplay as ho, resolveAdaptiveHeartbeatIntervalMs as hr, normalizeOpenClawSpaceIdPrefix as ht, writeOpenMeldToolsMaintenancePolicy as i, DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES as ia, resolveSelectableCandidates as ii, resolveLocalProjectConnectionForPath as in, readDaemonCatalogSyncSignal as io, mergeOpenClawGatewayVisibility as ir, formatSpaceMemberCommandRecoveryCopy as it, resolveDaemonStatusAttention as j, DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS as ja, resolveDaemonStopStrategy as ji, listBuiltinAgentsRegistryEntries as jn, settleInflightTask as jr, resolveCurrentEffectiveProfileWorkingFolderRuntime as jt, formatDaemonFailureContextText as k, DAEMON_STREAM_CONNECT_TIMEOUT_MS as ka, hasActiveDaemonOwners as ki, detectInstalledSkillsAgents as kn, resolveConversationExecutionStateByLookupKey as kr, syncProfileWorkspaceState as kt, readCurrentLocalDeviceId as l, buildLedgerPaths as la, forkOpenCodeServerSession as li, emitDriftDetectedEvidence as ln, createAuthenticationError as lo, ADAPTIVE_HEARTBEAT_JITTER_RATIO as lr, resolveGatewayChainReadiness as lt, readOpenMeldToolsUpdateContextFromEnv as m, dirnamePath as ma, projectCodexUsageLimits as mi, addAgentCustomTarget as mn, resolveAuthenticationReasonFromState as mo, pruneStaleLeases as mr, buildOpenClawSpaceSessionKey as mt, readOpenMeldToolsMaintenancePolicy as n, resolveVersionChangeDirection as na, resolveEvidenceSyncHealth as ni, unbindProject as nn, updateOpenMeldProfile as no, normalizeDispatchPostMessageAction as nr, mapAgentReplyReadinessToLegacyAutoReply as nt, assessServerRequiredVersion as o, DAEMON_SERVICE_WAKEABILITY_ADVISORY_ANOMALIES as oa, createLocalAdapterContainer as oi, withAgentActivityLocalStateLock as on, buildAuthenticationStatusLabel as oo, buildLocalServiceDiagnosticsPayload as or, resolveReplyReadinessGuidanceSummaryCopy as ot, readPendingOpenMeldToolsUpdateAttempt as p, asRecord as pa, resolveInstalledGrokBuildLaunchCandidates as pi, resolveAgentProfilePrimaryAgentControllerReport as pn, resolveAuthenticationGuidanceFromMessage as po, applyIntervalJitterMs as pr, prepareProviderRuntime as pt, buildDaemonServiceDependencyNextStep as q, getSelectedOpenMeldProfileId as qa, getProfileDefaultView as qi, resolveLocalRegistryAgentIdFromAgentControllerRef as qn, listAgentControllerPermissionModeOptions as qr, listProjectBindings as qt, resolveOpenMeldToolsMaintenanceProjection as r, DAEMON_SERVICE_AUTO_HEAL_ANOMALIES as ra, resolveNativeAgentControllerPermissionModeForController as ri, canonicalizeLocalProjectPath as rn, assertAdditionalHumanProfileCreationEnabled as ro, createPendingAgentInteractionRegistry as rr, REPLY_READINESS_COPY as rt, describeServerRequiredVersionUnavailableReason as s, classifyDaemonServiceRunStartability as sa, createLocalAdapterEntries as si, NO_LOCAL_AGENTS_NEED_OPENMELD_SERVICE_REASON as sn, buildCommandAuthenticationPromptMessage as so, createLocalExecutionSlots as sr, resolveOpenClawDiagnosticsGuidance as st, createOpenMeldToolsUpdateCoordinator as t, isVersionDowngrade as ta, resolveAgentProfileEditCapabilities as ti, setDefaultProjectConnection as tn, resolveOpenMeldProfile as to, buildDispatchReplyContextSummary as tr, formatReplyReadinessSummary as tt, assessCliUpdate as u, ensureDaemonRuntimePaths as ua, resolveInstalledOpenCodeLaunchCandidates as ui, emitReconcileCompletedEvidence as un, extractAuthenticationPromptAction as uo, MAX_HEARTBEAT_INTERVAL_MS as ur, resolveGatewayChainRepairGuidance as ut, runDaemonServiceLifecycle as v, normalizeOptionalText$52 as va, verifyCodexAppServerThread as vi, listAgentTargetStates as vn, resolveDispatchContinuityObservation as vr, writeDaemonRouteCatalogCache as vt, resolveSystemServiceStartupWaitMs as w, CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS as wa, materializeCliLaunchCommand as wi, resolveAgentTargetState as wn, buildTaskResultEnvelope as wr, syncDaemonRouteCatalogState as wt, uninstallDaemonServiceUpdateWorker as x, toErrorMessage$23 as xa, createUnsupportedProviderUsageLimits as xi, reconcileNewRunnableBuiltinAgentRegistrations as xn, resolveLatestScopedConversationExecutionState as xr, createRouteCatalogFromMutableState as xt, ensureDaemonServiceMaintenanceInstalled as y, normalizeText$11 as ya, resolveInstalledClaudeCodeLaunchCandidates as yi, manageAgentRegistrationInstallation as yn, resolveCompatibleAgentContextMatch as yr, resolveLocalServiceDemand as yt, buildDaemonServiceUpdateRequiredNextStep as z, RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS as za, resolveCurrentDaemonExpectedVersion as zi, sortAgentRegistrations as zn, buildInformationProtectionPromptPlan as zr, setCustomProfileWorkspace as zt };
37775
+ export { formatDeviceReplyReadinessLabel as $, deleteOpenMeldProfile as $a, buildDaemonSystemServiceCommandSpec as $i, resolveRouteRegistrationReconcileDecision as $n, renderWorkingLanguagePrompt as $r, resolveProjectBindingForPath as $t, resolveDaemonStatusSnapshot as A, DAEMON_RUNTIME_CONTRACT_EPOCH as Aa, formatDaemonOwnerSummaryLabel as Ai, resolveSkillsAgentRegistry as An, seedLegacyAgentContext as Ar, createModelCatalogReadSession as At, formatDaemonServiceRefreshReliabilityMessage as B, RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS as Ba, DaemonServiceRunError as Bi, repairBuiltinControllerInstall as Bn, buildInformationProtectionPromptPlan as Br, setOpenMeldManagedProfileWorkspace as Bt, isSystemServiceStartupTimeoutError as C, toErrorMessage$23 as Ca, resolveDispatchSpaceActionMcpServer as Ci, removeAgentCustomTarget as Cn, buildRuntimeWorkspaceFingerprint as Cr, summarizeSkippedDaemonProfiles as Ct, captureDaemonServiceEvidence as D, CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS as Da, createProviderOriginalError as Di, updateAgentRegistrations as Dn, loadLedgerState as Dr, resolveLocalController as Dt, startDaemonSystemServiceWithAutoRepair as E, CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS as Ea, listAgentControllerSupervisedProcessIds as Ei, updateAgentCustomTarget as En, commitResolvedAgentContext as Er, readLocalEnabledControllers as Et, buildDaemonServiceRefreshNextStep as F, HEARTBEAT_RESPONSE_TIMEOUT_MS as Fa, summarizeDaemonOwnerSnapshot as Fi, notifyDaemonRouteCatalogChanged as Fn, assertLegacyAgentContextAssociation as Fr, readProfileWorkspaceConfig as Ft, buildDaemonServiceDependencyDetails as G, resolveOpenMeldProfileOrNull as Ga, getSetupFlowCopy as Gi, isNpmGlobalCommandPath as Gn, getAgentControllerPermissionModeDisplayMetadata as Gr, bindProject as Gt, resolveDaemonServiceFreshnessWarning as H, RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS as Ha, PREPARE_SESSION_RECONNECT_GRACE_MS as Hi, resolveBuiltinAgentControllerDefinition as Hn, createAgentControllerInterfaceDisplayRows as Hr, describeProfileWorkspacePathValidationFailure as Ht, buildDaemonServiceRefreshPromptMessage as I, MAX_RECONNECT_DELAY_MS as Ia, resolveDaemonRuntimeContractCompatibility as Ii, normalizeAgentId as In, buildAgentContextLookupKey as Ir, readProfileWorkspaceConfigForAccount as It, buildDaemonServiceDependencySummary as J, clearSelectedOpenMeldProfileId as Ja, resolveViewProfileKey as Ji, normalizeDispatchThreadAction as Jn, listAgentControllerPermissionModeOptions as Jr, listProjectConnectionsWithStatus as Jt, buildDaemonServiceDependencyMeaning as K, alignSelectedOpenMeldProfileStorage as Ka, parseCliViewMode as Ki, isPnpmGlobalCommandPath as Kn, getAgentControllerPermissionModeFieldLabel as Kr, isProjectBound as Kt, buildDaemonServiceRepairGuidance as L, PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS as La, toStartBackgroundHelperExecutionCompatibility as Li, normalizeAgentIds as Ln, DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS as Lr, resolveConfiguredProfileWorkspacePath as Lt, resolveDaemonStatusAuthenticationAttention as M, DAEMON_STREAM_KEEPALIVE_INTERVAL_MS as Ma, readCurrentDaemonOwnerSnapshot as Mi, resolveRegistryOriginLaunchCommand as Mn, upsertConversationExecutionState as Mr, resolveProfileWorkspaceRuntime as Mt, resolveServiceReadiness as N, DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS as Na, resolveDaemonStopStrategy as Ni, resolveRegistryRuntimeAdapterCapabilitySnapshot as Nn, withLedgerStateTransaction as Nr, ensureOpenMeldManagedProfileWorkspace as Nt, captureDaemonServiceEvidenceBestEffort as O, CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS as Oa, inspectDaemonServiceInventory as Oi, canManageRegistryAgentSkillTargets as On, removeConversationExecutionState as Or, resolveLocalRuntimeControllerSupport as Ot, resolveServiceReadinessFromServiceStatus as P, DEFAULT_RECONNECT_DELAY_MS as Pa, resolveStoppedContractWriteBlockedReason as Pi, resolveRegistryRuntimeAdapterContractByAgentControllerRef as Pn, buildAuthenticatedControlPlaneResponse as Pr, normalizeCustomProfileWorkspacePath as Pt, formatAgentReplyReadinessLabel as Q, createOpenMeldHumanProfile as Qa, writeDaemonServiceContract as Qi, isDaemonReconcileInProgressError as Qn, renderInformationProtectionPrompt as Qr, removeProjectConnection as Qt, buildDaemonServiceStatusReadOnlyDetail as R, PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS as Ra, ensureDaemonRuntimeContractState as Ri, parseAgentEnabledOption as Rn, areAgentControllerInterfaceAccountsSame as Rr, resolveConfiguredProfileWorkspacePathForAccount as Rt, isDaemonInventoryRunningAndStartReady as S, nowIsoString as Sa, createUnsupportedProviderUsageLimits as Si, reconcileNewRunnableBuiltinAgentsForSetup as Sn, runRuntimeTask as Sr, loadDaemonRouteCatalog as St, waitForSystemServiceStartup as T, CATALOG_SYNC_RETRY_INTERVAL_MS as Ta, materializeCliLaunchCommand as Ti, setAgentRegistrationEnabled as Tn, appendLedgerHistoryEntry as Tr, buildRuntimeRouteTargets as Tt, clearDaemonStartFailureState as U, isSelectedOpenMeldProfileRequiredError as Ua, buildDaemonRouteObservationPresentation as Ui, isBunGlobalCommandPath as Un, createAgentExecutionStatusDisplayRows as Ur, ProjectBindingOperationError as Ut, formatDaemonServiceUpdateRequiredMessage as V, RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS as Va, resolveCurrentDaemonExpectedVersion as Vi, EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES as Vn, buildWorkingLanguagePromptPlan as Vr, validateCustomProfileWorkspacePath as Vt, writeDaemonStartFailureState as W, requireOpenMeldProfile as Wa, buildOnboardingPlan as Wi, isHomebrewCommandPath as Wn, createAuthorityOpenMeldServiceRuntimeId as Wr, ProjectBindingStoreUpdateRequiredError as Wt, resolveDaemonServiceDependencyDiagnostics as X, setSelectedOpenMeldProfileId as Xa, setProfileDefaultView as Xi, SPACE_ACTION_CONTEXT_GUIDANCE_LINES as Xn, peopleComputerContainsDevice as Xr, removeAgentActivityBindingsWhileDeliveryLocked as Xt, buildDaemonServiceDependencyTitle as Y, getSelectedOpenMeldProfileId as Ya, getProfileDefaultView as Yi, syncRuntimeEventToInflightTaskControlRegistry as Yn, parseAgentControllerRef as Yr, migrateProjectBindingStore as Yt, resolveCurrentReplyReadinessSnapshot as Z, createOpenMeldAgentProfile as Za, resolveCurrentOpenMeldAccountContext as Zi, SPACE_ACTION_TARGET_GUIDANCE_LINES as Zn, projectPeopleComputersToLegacyLocalRuntimes as Zr, removeMissingProjectConnections as Zt, DaemonServiceLifecycleDrainTimeoutError as _, emitRunLine as _a, resolveInstalledCodexLaunchCandidates as _i, listAgentRegistrations as _n, compareAgentControllerRefsForDisplay as _o, resolveDispatchQueueLogMeta as _r, readDaemonRouteCatalogCache as _t, resolveServiceUpdateUrgency as a, DAEMON_SERVICE_AUTO_HEAL_ANOMALIES as aa, resolveSelectableCandidates as ai, withAgentActivityDeliveryLock as an, assertAdditionalHumanProfileCreationEnabled as ao, createLocalTaskInterruptSender as ar, resolveReplyReadinessAvailabilityReasonCopy as at, prepareDaemonServiceUpdateWorkerCarrier as b, normalizeOptionalText$52 as ba, resolveInstalledClaudeCodeLaunchCandidates as bi, readAgentRuntimeConfigHealth as bn, resolveCompatibleConversationExecutionState as br, createMutableRouteCatalogState as bt, buildLocalAgentCatalogFromReadiness as c, DAEMON_SERVICE_WAKEABILITY_ADVISORY_ANOMALIES as ca, createLocalAdapterEntries as ci, syncDeviceRuntimeStateProjection as cn, buildAuthenticationStatusLabel as co, createInflightTaskControlRegistry as cr, classifyGatewayChainFailure as ct, isCliUpdateCheckApplicable as d, buildLedgerPaths as da, resolveInstalledOpenCodeLaunchCandidates as di, emitReconcileStartedEvidence as dn, createAuthenticationError as do, MIN_HEARTBEAT_INTERVAL_MS as dr, resolveGatewayChainRetryGuidance as dt, ensureDaemonSystemServiceCommandFiles as ea, resolveAgentControllerPermissionModeForController as ei, runIfAgentActivityBindingGenerationIsCurrent as en, getOpenMeldProfileCapabilities as eo, createSerialAgentInteractionCallback as er, formatHumanReplyReadinessReason as et, readLastOpenMeldToolsUpdateAttempt as f, ensureDaemonRuntimePaths as fa, GrokBuildAcpTransportError as fi, createPrimaryBindingReadSession as fn, extractAuthenticationPromptAction as fo, applyAcceptedLeases as fr, resolveOpenClawLocalDiagnosticsValue as ft, scheduleDaemonServiceUpdate as g, dirnamePath as ga, resolveCodexTimeoutMs as gi, listAgentCustomTargets as gn, resolveAuthenticationReasonFromState as go, resolveCatalogSyncIntervalMs as gr, slugifyOpenClawNamePart as gt, runPendingDaemonServiceUpdate as h, asRecord as ha, projectCodexUsageLimits as hi, createRegistrationFromCatalogTarget as hn, resolveAuthenticationGuidanceFromMessage as ho, resolveAdaptiveHeartbeatIntervalMs as hr, normalizeOpenClawSpaceIdPrefix as ht, writeOpenMeldToolsMaintenancePolicy as i, resolveVersionChangeDirection as ia, resolveNativeAgentControllerPermissionModeForController as ii, resolveLocalProjectConnectionForPath as in, updateOpenMeldProfile as io, mergeOpenClawGatewayVisibility as ir, formatSpaceMemberCommandRecoveryCopy as it, resolveDaemonStatusAttention as j, DAEMON_STREAM_CONNECT_TIMEOUT_MS as ja, hasActiveDaemonOwners as ji, listBuiltinAgentsRegistryEntries as jn, settleInflightTask as jr, resolveCurrentEffectiveProfileWorkingFolderRuntime as jt, formatDaemonFailureContextText as k, CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS as ka, buildDaemonOwnerSnapshotFromObservedState as ki, detectInstalledSkillsAgents as kn, resolveConversationExecutionStateByLookupKey as kr, syncProfileWorkspaceState as kt, readCurrentLocalDeviceId as l, classifyDaemonServiceRunStartability as la, parseOpenCodeGoUsageResponse as li, emitDriftDetectedEvidence as ln, buildCommandAuthenticationPromptMessage as lo, ADAPTIVE_HEARTBEAT_JITTER_RATIO as lr, resolveGatewayChainReadiness as lt, readOpenMeldToolsUpdateContextFromEnv as m, resolvePreferredDaemonDeviceId as ma, resolveInstalledGrokBuildLaunchCandidates as mi, addAgentCustomTarget as mn, resolveAuthenticationGuidanceFromError as mo, pruneStaleLeases as mr, buildOpenClawSpaceSessionKey as mt, readOpenMeldToolsMaintenancePolicy as n, resolveDaemonServiceAlignmentDecision as na, resolveAgentProfileEditCapabilities as ni, unbindProject as nn, primeOpenMeldProfilesSessionCache as no, normalizeDispatchPostMessageAction as nr, mapAgentReplyReadinessToLegacyAutoReply as nt, assessServerRequiredVersion as o, DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES as oa, resolveCatalogSyncSkippedProfilesLogState as oi, withAgentActivityLocalStateLock as on, readDaemonCatalogSyncSignal as oo, buildLocalServiceDiagnosticsPayload as or, resolveReplyReadinessGuidanceSummaryCopy as ot, readPendingOpenMeldToolsUpdateAttempt as p, resolveDaemonDeviceId as pa, probeGrokBuildAcpInterface as pi, resolveAgentProfilePrimaryAgentControllerReport as pn, resolveAuthenticationGuidance as po, applyIntervalJitterMs as pr, prepareProviderRuntime as pt, buildDaemonServiceDependencyNextStep as q, clearAllSelectedOpenMeldProfileIds as qa, resolveRuntimeContext as qi, resolveLocalRegistryAgentIdFromAgentControllerRef as qn, isAgentExecutionReadyOrConnecting as qr, listProjectBindings as qt, resolveOpenMeldToolsMaintenanceProjection as r, isVersionDowngrade as ra, resolveEvidenceSyncHealth as ri, canonicalizeLocalProjectPath as rn, resolveOpenMeldProfile as ro, createPendingAgentInteractionRegistry as rr, REPLY_READINESS_COPY as rt, describeServerRequiredVersionUnavailableReason as s, DAEMON_SERVICE_REPAIR_ANOMALIES as sa, createLocalAdapterContainer as si, NO_LOCAL_AGENTS_NEED_OPENMELD_SERVICE_REASON as sn, buildAgentAuthenticationGuide as so, createLocalExecutionSlots as sr, resolveOpenClawDiagnosticsGuidance as st, createOpenMeldToolsUpdateCoordinator as t, buildDaemonServiceTargetSpec as ta, resolveAgentExecutionStatus as ti, setDefaultProjectConnection as tn, listOpenMeldProfiles as to, buildDispatchReplyContextSummary as tr, formatReplyReadinessSummary as tt, assessCliUpdate as u, classifyDaemonServiceWakeability as ua, forkOpenCodeServerSession as ui, emitReconcileCompletedEvidence as un, buildHumanAuthenticationCard as uo, MAX_HEARTBEAT_INTERVAL_MS as ur, resolveGatewayChainRepairGuidance as ut, runDaemonServiceLifecycle as v, normalizeHeartbeatIntervalMs as va, forkCodexAppServerThread as vi, listAgentTargetStates as vn, resolveBuiltinAgentControllerBrand as vo, resolveDispatchContinuityObservation as vr, writeDaemonRouteCatalogCache as vt, resolveSystemServiceStartupWaitMs as w, warnDaemonEvent as wa, buildCliLaunchInvocation as wi, resolveAgentTargetState as wn, buildTaskResultEnvelope as wr, syncDaemonRouteCatalogState as wt, uninstallDaemonServiceUpdateWorker as x, normalizeText$11 as xa, createUnavailableProviderUsageLimits as xi, reconcileNewRunnableBuiltinAgentRegistrations as xn, resolveLatestScopedConversationExecutionState as xr, createRouteCatalogFromMutableState as xt, ensureDaemonServiceMaintenanceInstalled as y, normalizeNonNegativeInteger as ya, verifyCodexAppServerThread as yi, manageAgentRegistrationInstallation as yn, resolveCompatibleAgentContextMatch as yr, resolveLocalServiceDemand as yt, buildDaemonServiceUpdateRequiredNextStep as z, REGISTER_RESPONSE_TIMEOUT_MS as za, readDaemonRuntimeContractRepairReport as zi, sortAgentRegistrations as zn, buildAgentControllerRef as zr, setCustomProfileWorkspace as zt };
37364
37776
 
37365
- //# sourceMappingURL=openmeld-tools-update-coordinator-D9Skj8IE.js.map
37777
+ //# sourceMappingURL=openmeld-tools-update-coordinator-jJrVAHgC.js.map