openmeld 0.3.212 → 0.3.214

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 (109) hide show
  1. package/dist/{add-me-membership-BwPpVKtA.js → add-me-membership-BaqG9F5c.js} +2 -2
  2. package/dist/{add-me-membership-BwPpVKtA.js.map → add-me-membership-BaqG9F5c.js.map} +1 -1
  3. package/dist/{agents-Y-UJ74By.js → agents-y9C8FCyv.js} +8 -8
  4. package/dist/{agents-Y-UJ74By.js.map → agents-y9C8FCyv.js.map} +1 -1
  5. package/dist/{api-client-foundation-CrQN8_-N.js → api-client-foundation-BYnU1pbS.js} +1 -1
  6. package/dist/{api-client-foundation-DjbtuE52.js → api-client-foundation-CKRP7Ymg.js} +3 -3
  7. package/dist/{api-client-foundation-DjbtuE52.js.map → api-client-foundation-CKRP7Ymg.js.map} +1 -1
  8. package/dist/auth-session-BWKfXWxl.js +4 -0
  9. package/dist/{auth-session-Dqz9X4F0.js → auth-session-gaLjWIKR.js} +67 -8
  10. package/dist/auth-session-gaLjWIKR.js.map +1 -0
  11. package/dist/{base-url-C6sHRNGu.js → base-url-BczddvzH.js} +2 -2
  12. package/dist/{base-url-C6sHRNGu.js.map → base-url-BczddvzH.js.map} +1 -1
  13. package/dist/{base-url-BE3pFiOZ.js → base-url-CfyKRz89.js} +1 -1
  14. package/dist/{command-jgHbP21v.js → command-C72QNhjP.js} +13 -13
  15. package/dist/{command-jgHbP21v.js.map → command-C72QNhjP.js.map} +1 -1
  16. package/dist/computer-connection-Dv9kex7h.js +120 -0
  17. package/dist/computer-connection-Dv9kex7h.js.map +1 -0
  18. package/dist/{computer-connection-review-CzSpaHE0.js → computer-connection-review-_ZLPsdE_.js} +6 -6
  19. package/dist/{computer-connection-review-CzSpaHE0.js.map → computer-connection-review-_ZLPsdE_.js.map} +1 -1
  20. package/dist/{computer-disconnect-DNM7jvda.js → computer-disconnect-BJ-Tl-7q.js} +9 -9
  21. package/dist/{computer-disconnect-DNM7jvda.js.map → computer-disconnect-BJ-Tl-7q.js.map} +1 -1
  22. package/dist/{computer-setup-continuation-BqdhIAjT.js → computer-setup-continuation-CN383Vvy.js} +4 -4
  23. package/dist/{computer-setup-continuation-BqdhIAjT.js.map → computer-setup-continuation-CN383Vvy.js.map} +1 -1
  24. package/dist/{control-plane-PxntAyDq.js → control-plane-Bpu7g9Av.js} +2 -2
  25. package/dist/{control-plane-PxntAyDq.js.map → control-plane-Bpu7g9Av.js.map} +1 -1
  26. package/dist/{daemon-runtime-lease-Dd4hdHNo.js → daemon-runtime-lease-CIzOT1zx.js} +2 -2
  27. package/dist/{daemon-runtime-lease-Dd4hdHNo.js.map → daemon-runtime-lease-CIzOT1zx.js.map} +1 -1
  28. package/dist/{daemon-runtime-lease-y3n1K0-C.js → daemon-runtime-lease-_M6hW8Mg.js} +1 -1
  29. package/dist/{daemon-service-manager-GiMCiTmu.js → daemon-service-manager-DxS5eH_N.js} +4 -4
  30. package/dist/{daemon-service-manager-GiMCiTmu.js.map → daemon-service-manager-DxS5eH_N.js.map} +1 -1
  31. package/dist/{daemon-service-manager-Bh0LoLed.js → daemon-service-manager-fPpyIyrU.js} +1 -1
  32. package/dist/{daemon-service-runtime-CWTlAhZY.js → daemon-service-runtime-CGT3yVOs.js} +113 -26
  33. package/dist/daemon-service-runtime-CGT3yVOs.js.map +1 -0
  34. package/dist/{daemon-service-update-coordinator-DcjOzGu1.js → daemon-service-update-coordinator--xLHNqDT.js} +966 -210
  35. package/dist/daemon-service-update-coordinator--xLHNqDT.js.map +1 -0
  36. package/dist/{daemon-state-C37ZtIZK.js → daemon-state-CoAZLwpi.js} +3 -3
  37. package/dist/{daemon-state-C37ZtIZK.js.map → daemon-state-CoAZLwpi.js.map} +1 -1
  38. package/dist/dist-CABuqfdH.js +4 -0
  39. package/dist/{dist-jsWwS864.js → dist-Dj3TOx03.js} +548 -223
  40. package/dist/dist-Dj3TOx03.js.map +1 -0
  41. package/dist/distribution-BDQT2ilb.js +20 -0
  42. package/dist/distribution-BDQT2ilb.js.map +1 -0
  43. package/dist/{elapsed-time-iFOSSUJo.js → elapsed-time-CCFWbCC8.js} +9 -7
  44. package/dist/{elapsed-time-iFOSSUJo.js.map → elapsed-time-CCFWbCC8.js.map} +1 -1
  45. package/dist/{installation-inventory-B0cbVLun.js → installation-inventory-C4WKcVEj.js} +6 -6
  46. package/dist/{installation-inventory-B0cbVLun.js.map → installation-inventory-C4WKcVEj.js.map} +1 -1
  47. package/dist/{local-components-H3SkJMC1.js → local-components-B6SCXZf9.js} +10 -2
  48. package/dist/local-components-B6SCXZf9.js.map +1 -0
  49. package/dist/{lock-Dxp6o_t_.js → lock-CAt9uTnZ.js} +5 -48
  50. package/dist/lock-CAt9uTnZ.js.map +1 -0
  51. package/dist/{openmeld-B4gQCCex.js → openmeld-DpV9lAF-.js} +325 -190
  52. package/dist/openmeld-DpV9lAF-.js.map +1 -0
  53. package/dist/openmeld-dev.js +1 -1
  54. package/dist/{openmeld-environment-target-NtJYJe1D.js → openmeld-environment-target-BWI2adGw.js} +3 -3
  55. package/dist/{openmeld-environment-target-NtJYJe1D.js.map → openmeld-environment-target-BWI2adGw.js.map} +1 -1
  56. package/dist/{openmeld-maintenance-worker-DtY_H7Bv.js → openmeld-maintenance-worker-Blfu_oOo.js} +9 -9
  57. package/dist/{openmeld-maintenance-worker-DtY_H7Bv.js.map → openmeld-maintenance-worker-Blfu_oOo.js.map} +1 -1
  58. package/dist/{openmeld-tools-update-join-DS_EIL5q.js → openmeld-tools-update-join-BpLwmowQ.js} +6 -4
  59. package/dist/{openmeld-tools-update-join-DS_EIL5q.js.map → openmeld-tools-update-join-BpLwmowQ.js.map} +1 -1
  60. package/dist/{openmeld-tools-update-process-frame-CbZPpc7D.js → openmeld-tools-update-process-frame-0X-t0Kjv.js} +2 -2
  61. package/dist/{openmeld-tools-update-process-frame-CbZPpc7D.js.map → openmeld-tools-update-process-frame-0X-t0Kjv.js.map} +1 -1
  62. package/dist/{openmeld-tools-update-process-frame-CcPLrSsw.js → openmeld-tools-update-process-frame-DX1Dc8VI.js} +1 -1
  63. package/dist/openmeld.js +4 -4
  64. package/dist/{prepare-session-executor-CWKqfuse.js → prepare-session-executor-Cfm3EvXl.js} +176 -23
  65. package/dist/prepare-session-executor-Cfm3EvXl.js.map +1 -0
  66. package/dist/process-identity-Clby123a.js +145 -0
  67. package/dist/process-identity-Clby123a.js.map +1 -0
  68. package/dist/{runtime-transport-BQAmcHwF.js → runtime-transport-D8G8sANa.js} +113 -10
  69. package/dist/runtime-transport-D8G8sANa.js.map +1 -0
  70. package/dist/{service-CTG3_X0o.js → service-Cl_Ge6oJ.js} +949 -75
  71. package/dist/service-Cl_Ge6oJ.js.map +1 -0
  72. package/dist/{distribution-DY2fBeSW.js → service-account-admission-Dy2W3n3_.js} +9 -19
  73. package/dist/service-account-admission-Dy2W3n3_.js.map +1 -0
  74. package/dist/{service-account-authorization-Dq4LcAVa.js → service-account-authorization-4oZuo8sT.js} +6 -6
  75. package/dist/{service-account-authorization-Dq4LcAVa.js.map → service-account-authorization-4oZuo8sT.js.map} +1 -1
  76. package/dist/{service-account-control-BTR_X7QM.js → service-account-control-CTXv3924.js} +11 -12
  77. package/dist/service-account-control-CTXv3924.js.map +1 -0
  78. package/dist/{service-control-capabilities-ChRe8hkw.js → service-control-capabilities-B-vCQoBV.js} +1 -1
  79. package/dist/service-control-capabilities-ptf0u8n5.js +70 -0
  80. package/dist/service-control-capabilities-ptf0u8n5.js.map +1 -0
  81. package/dist/service-control-carrier-capability-hvpD7hGf.js +24 -0
  82. package/dist/service-control-carrier-capability-hvpD7hGf.js.map +1 -0
  83. package/dist/upgrade-EWdIdoHm.js +4 -0
  84. package/dist/{upgrade-DAVEeo8B.js → upgrade-vuPM1iX3.js} +12 -9
  85. package/dist/{upgrade-DAVEeo8B.js.map → upgrade-vuPM1iX3.js.map} +1 -1
  86. package/dist/{windows-user-task-DxPN7TzK.js → windows-user-task-FdycoSb4.js} +1 -1
  87. package/dist/{windows-user-task-DqJWtlAm.js → windows-user-task-i0oHCBc0.js} +49 -19
  88. package/dist/windows-user-task-i0oHCBc0.js.map +1 -0
  89. package/package.json +2 -2
  90. package/dist/auth-session-Dqz9X4F0.js.map +0 -1
  91. package/dist/auth-session-bRzDGlXy.js +0 -4
  92. package/dist/computer-connection-DvqsgYls.js +0 -81
  93. package/dist/computer-connection-DvqsgYls.js.map +0 -1
  94. package/dist/daemon-service-runtime-CWTlAhZY.js.map +0 -1
  95. package/dist/daemon-service-update-coordinator-DcjOzGu1.js.map +0 -1
  96. package/dist/dist--pb6JxqG.js +0 -4
  97. package/dist/dist-jsWwS864.js.map +0 -1
  98. package/dist/distribution-DY2fBeSW.js.map +0 -1
  99. package/dist/local-components-H3SkJMC1.js.map +0 -1
  100. package/dist/lock-Dxp6o_t_.js.map +0 -1
  101. package/dist/openmeld-B4gQCCex.js.map +0 -1
  102. package/dist/prepare-session-executor-CWKqfuse.js.map +0 -1
  103. package/dist/runtime-transport-BQAmcHwF.js.map +0 -1
  104. package/dist/service-CTG3_X0o.js.map +0 -1
  105. package/dist/service-account-control-BTR_X7QM.js.map +0 -1
  106. package/dist/service-control-capabilities-C5SxnBg2.js +0 -54
  107. package/dist/service-control-capabilities-C5SxnBg2.js.map +0 -1
  108. package/dist/upgrade-DKXu-1wO.js +0 -4
  109. package/dist/windows-user-task-DqJWtlAm.js.map +0 -1
@@ -1,28 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { f as toSpaceMetaUrl, g as toSpaceUpdatesUrl } from "./urls-CY2uzH2-.js";
4
- import { E as assessLocalMachineFailure, F as accountProfileSpaceCacheDir, J as legacyAccountProfileSpacesDir, M as formatLocalMachineIssueMessage, N as OPENMELD_HOME_ENV_KEY, R as accountsDir, X as normalizeAccountKey, Z as normalizeOpenMeldProfileId, d as runWithHeldLock, dt as resolveOpenMeldEnvPreset, et as openMeldManagedBinaryPath, ft as resolveOpenMeldRootDir, i as isOpenMeldLockError, k as createServiceSpawnPendingIssue, pt as resolveOpenMeldServiceOwnedPathInput, q as isPublishedOpenMeldHome, rt as openMeldRootDir, s as releaseLock, t as acquireLock, u as resolveOpenMeldOrphanedLockIssue, v as resolveCliContextId, x as resolveOpenMeldLaneDescriptor } from "./lock-Dxp6o_t_.js";
5
- import { $r as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, Ai as archiveProjectResponseSchema, Bi as toCompatibleSpaceAddressingRequestWireValue, Cr as betterAuthDeviceAuthorizationTokenRequestSchema, Di as localProjectControlConnectionSchema, Fi as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, Fr as getOrganizationSkillResponseSchema, Gr as createCenterAgentRoutineResponseSchema, Hr as organizationComputersResponseSchema, Ii as OPENMELD_RUNTIME_CAPABILITIES_HEADER, Ir as listOrganizationSkillsResponseSchema, Jn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Jr as listCenterAgentRoutinesResponseSchema, Kr as deleteCenterAgentRoutineResponseSchema, Li as computerFileAccessDaemonFrameSchema, Mi as listProjectsResponseSchema, Ni as projectSchema, Nr as spaceCreatorSchema, Oi as localProjectControlDaemonFrameSchema, Pi as updateProjectResponseSchema, Pr as spaceMetaSchema, Ri as computerFileAccessPolicyInputSchema, Rn as DAEMON_STREAM_KEEPALIVE_PING, Rr as organizationSkillReleaseSummarySchema, Sr as betterAuthDeviceAuthorizationErrorResponseSchema, Ti as serviceConnectionEvidenceJournalSchema, Tr as betterAuthSessionSnapshotResponseSchema, Tt as buildSpaceAttachmentDownloadPath, Ur as submitFeedbackIssueRequestSchema, Vr as organizationDirectoryResponseSchema, Wr as submitFeedbackIssueResponseSchema, Xr as resumeCenterAgentRoutineResponseSchema, Yr as pauseCenterAgentRoutineResponseSchema, Zn as getSpaceUpdatesResponseSchema, Zr as updateCenterAgentRoutineResponseSchema, _i as agentActivitySessionInventoryResponseSchema, an as createRuntimeReportingApi, ar as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, bi as centerAgentToolSpeakerSchema, br as betterAuthDeviceAuthorizationCodeRequestSchema, di as spaceMemberDirectoryEntrySchema, ei as agentActivityEventSchema, fi as spaceMemberDirectorySchema, hr as submitAgentControllerTaskLifecycleEventItemSchema, ii as agentActivitySnapshotResponseSchema, ji as createProjectResponseSchema, jn as toStructuredApiClientFailure, jr as organizationSpaceDirectoryWithMemberCountsResponseSchema, jt as createAgentActivityApi, ki as localProjectControlDiscoverProjectsResponseSchema, kr as gatewayErrorEnvelopeSchema, li as spaceMemberAgentWakeAvailabilitySchema, on as createServiceConnectionEvidenceApi, pi as spaceMemberKindSchema, qn as OPENMELD_HEADER_REQUEST_ID, qr as listCenterAgentRoutineRunsResponseSchema, rr as spaceEntryTargetSchema, sn as createSpaceApi, t as OpenMeldApiClientHttpError, ui as spaceMemberDirectoryAllowedRelationsSchema, wi as serviceConnectionEvidenceEventSchema, wr as betterAuthDeviceAuthorizationTokenResponseSchema, xr as betterAuthDeviceAuthorizationCodeResponseSchema, yi as observedLocalAgentSessionSchema, yr as BETTER_AUTH_DEVICE_AUTHORIZATION_GRANT_TYPE, zi as computerFileAccessPolicySchema, zr as organizationSkillSummarySchema } from "./dist-jsWwS864.js";
4
+ import { A as OPENMELD_HOME_ENV_KEY, C as assessLocalMachineFailure, E as createServiceSpawnPendingIssue, F as accountsDir, G as legacyAccountProfileSpacesDir, J as normalizeOpenMeldProfileId, M as accountProfileSpaceCacheDir, W as isPublishedOpenMeldHome, Z as openMeldManagedBinaryPath, ct as resolveOpenMeldEnvPreset, d as runWithHeldLock, et as openMeldRootDir, i as isOpenMeldLockError, k as formatLocalMachineIssueMessage, lt as resolveOpenMeldRootDir, nt as organizationSkillReleaseDir, q as normalizeAccountKey, s as releaseLock, t as acquireLock, u as resolveOpenMeldOrphanedLockIssue, ut as resolveOpenMeldServiceOwnedPathInput, v as resolveCliContextId, x as resolveOpenMeldLaneDescriptor } from "./lock-CAt9uTnZ.js";
5
+ import { $n as getSpaceUpdatesResponseSchema, $r as updateCenterAgentRoutineResponseSchema, Ai as localProjectControlDaemonFrameSchema, Bi as computerFileAccessPolicyInputSchema, Bn as DAEMON_STREAM_KEEPALIVE_PING, Br as organizationSkillReleaseSummarySchema, Cr as betterAuthDeviceAuthorizationCodeResponseSchema, Di as serviceConnectionEvidenceJournalSchema, Dr as betterAuthSessionSnapshotResponseSchema, Ei as serviceConnectionEvidenceEventSchema, Er as betterAuthDeviceAuthorizationTokenResponseSchema, Fi as projectSchema, Fr as spaceCreatorSchema, Gr as submitFeedbackIssueRequestSchema, Hi as toCompatibleSpaceAddressingRequestWireValue, Hr as stringifyOrganizationSkillBundleCanonicalJson, Ii as updateProjectResponseSchema, Ir as spaceMetaSchema, Jr as deleteCenterAgentRoutineResponseSchema, Kr as submitFeedbackIssueResponseSchema, Li as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, Lr as getOrganizationSkillResponseSchema, Mi as archiveProjectResponseSchema, Ni as createProjectResponseSchema, Nn as toStructuredApiClientFailure, Nr as organizationSpaceDirectoryWithMemberCountsResponseSchema, Pi as listProjectsResponseSchema, Qr as resumeCenterAgentRoutineResponseSchema, Ri as OPENMELD_RUNTIME_CAPABILITIES_HEADER, Rr as listOrganizationSkillsResponseSchema, Si as centerAgentToolSpeakerSchema, Sr as betterAuthDeviceAuthorizationCodeRequestSchema, Tr as betterAuthDeviceAuthorizationTokenRequestSchema, Tt as buildSpaceAttachmentDownloadPath, Ur as organizationDirectoryResponseSchema, Vi as computerFileAccessPolicySchema, Vr as organizationSkillSummarySchema, Wr as organizationComputersResponseSchema, Xn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Xr as listCenterAgentRoutinesResponseSchema, Xt as createOrganizationSkillsApi, Yn as OPENMELD_HEADER_REQUEST_ID, Yr as listCenterAgentRoutineRunsResponseSchema, Zr as pauseCenterAgentRoutineResponseSchema, _r as submitAgentControllerTaskLifecycleEventItemSchema, an as createRuntimeReportingApi, ar as spaceEntryTargetSchema, di as spaceMemberAgentWakeAvailabilitySchema, fi as spaceMemberDirectoryAllowedRelationsSchema, hi as spaceMemberKindSchema, ji as localProjectControlDiscoverProjectsResponseSchema, jr as gatewayErrorEnvelopeSchema, jt as createAgentActivityApi, ki as localProjectControlConnectionSchema, mi as spaceMemberDirectorySchema, ni as agentActivityEventSchema, oi as agentActivitySnapshotResponseSchema, on as createServiceConnectionEvidenceApi, pi as spaceMemberDirectoryEntrySchema, qr as createCenterAgentRoutineResponseSchema, sn as createSpaceApi, sr as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, t as OpenMeldApiClientHttpError, ti as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, wr as betterAuthDeviceAuthorizationErrorResponseSchema, xi as observedLocalAgentSessionSchema, xr as BETTER_AUTH_DEVICE_AUTHORIZATION_GRANT_TYPE, yi as agentActivitySessionInventoryResponseSchema, zi as computerFileAccessDaemonFrameSchema, zr as organizationSkillBundleSchema } from "./dist-Dj3TOx03.js";
6
6
  import { b as normalizeKnownBuiltinAgentControllerId, d as resolveBuiltinAgentControllerConversationKind, l as buildAgentControllerConversationRef } from "./controller-contract-pe3_Re-c.js";
7
- import { $ as buildDaemonServiceDependencyTitle, $n as ProjectBindingStoreUpdateRequiredError, $r as settleInflightTask, $t as resolveCurrentDaemonExpectedVersion, Aa as MAX_RECONNECT_DELAY_MS, Ai as createLocalAdapterEntries, An as setAgentRegistrationEnabled, Ar as createInflightTaskControlRegistry, At as uninstallDaemonServiceUpdateWorker, Bi as forkCodexAppServerThread, Bn as resolveSkillsAgentRegistry, Br as resolveDispatchContinuityObservation, C as formatDaemonServiceRefreshReliabilityMessage, Ca as CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS, Cn as listAgentTargetStates, Cr as buildDispatchReplyContextSummary, D as writeDaemonStartFailureState, Da as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS, Dr as createLocalTaskInterruptSender, Dt as writeOpenMeldToolsMaintenancePolicy, E as clearDaemonStartFailureState, Ea as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS, En as reconcileNewRunnableBuiltinAgentRegistrations, Er as mergeOpenClawGatewayVisibility, Et as resolveOpenMeldToolsMaintenanceProjection, Fa as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS, Fi as probeGrokBuildAcpInterface, Fr as applyIntervalJitterMs$1, Ft as readCurrentDaemonOwnerSnapshot, Gn as EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES, Gr as buildRuntimeWorkspaceFingerprint, Gt as isVersionDowngrade, Ha as resolveOpenMeldProfileOrNull, Hi as resolveInstalledClaudeCodeLaunchCandidates, Hr as resolveCompatibleConversationExecutionState, Ht as readDaemonRuntimeContractRepairReport, Ia as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS, Ii as resolveInstalledGrokBuildLaunchCandidates, Ir as pruneStaleLeases, It as resolveDaemonStopStrategy, Ji as listAgentControllerSupervisedProcessIds, Jn as isHomebrewCommandPath, Jr as commitResolvedAgentContext, Jt as DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES, Ki as buildCliLaunchInvocation, Kn as resolveBuiltinAgentControllerDefinition, Kr as buildTaskResultEnvelope, Li as projectCodexUsageLimits, Lr as resolveAdaptiveHeartbeatIntervalMs, Lt as resolveStoppedContractWriteBlockedReason, Ma as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS, Mi as forkOpenCodeServerSession, Mr as MAX_HEARTBEAT_INTERVAL_MS, Mt as buildDaemonOwnerSnapshotFromObservedState, Na as REGISTER_RESPONSE_TIMEOUT_MS, Ni as resolveInstalledOpenCodeLaunchCandidates, Nr as MIN_HEARTBEAT_INTERVAL_MS, Nt as formatDaemonOwnerSummaryLabel, Oa as DEFAULT_RECONNECT_DELAY_MS, Oi as resolveCatalogSyncSkippedProfilesLogState, Or as buildLocalServiceDiagnosticsPayload, Ot as ensureDaemonServiceMaintenanceInstalled, Pa as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS, Pi as GrokBuildAcpTransportError, Pr as applyAcceptedLeases, Pt as hasActiveDaemonOwners, Q as buildDaemonServiceDependencySummary, Qa as readDaemonCatalogSyncSignal, Qi as describeServerRequiredVersionUnavailableReason, Qn as ProjectBindingOperationError, Qr as seedLegacyAgentContext, Qt as classifyDaemonServiceWakeability, Ra as resolveRuntimeContext, Ri as resolveCodexTimeoutMs, Rn as canManageRegistryAgentSkillTargets, Rr as resolveCatalogSyncIntervalMs, Rt as summarizeDaemonOwnerSnapshot, S as buildDaemonServiceUpdateRequiredNextStep, Sa as CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS, Sr as createSerialAgentInteractionCallback, Ta as DAEMON_STREAM_CONNECT_TIMEOUT_MS, Tr as createPendingAgentInteractionRegistry, Tt as readOpenMeldToolsMaintenancePolicy, Ui as createUnavailableProviderUsageLimits, Un as resolveRegistryRuntimeAdapterCapabilitySnapshot, Ur as resolveLatestScopedConversationExecutionState, Ut as buildDaemonServiceTargetSpec, Va as requireOpenMeldProfile, Vi as verifyCodexAppServerThread, Vr as resolveCompatibleAgentContextMatch, Vt as ensureDaemonRuntimeContractState, W as resolveLocalServiceDemand, Wi as createUnsupportedProviderUsageLimits, Wn as resolveRegistryRuntimeAdapterContractByAgentControllerRef, Wr as runRuntimeTask, Wt as resolveDaemonServiceAlignmentDecision, X as buildDaemonServiceDependencyMeaning, Xi as resolveServiceUpdateUrgency, Xn as isPnpmGlobalCommandPath, Xr as removeConversationExecutionState, Y as buildDaemonServiceDependencyDetails, Yi as createProviderOriginalError, Yn as isNpmGlobalCommandPath, Yr as loadLedgerState, Yt as DAEMON_SERVICE_REPAIR_ANOMALIES, Z as buildDaemonServiceDependencyNextStep, Zi as assessServerRequiredVersion, Zr as resolveConversationExecutionStateByLookupKey, Zt as classifyDaemonServiceRunStartability, _a as buildDaemonSystemServiceCommandSpec, _i as parseAgentControllerRef, _r as syncRuntimeEventToInflightTaskControlRegistry, _t as syncDeviceRuntimeStateProjection, a as isDaemonInventoryRunningAndStartReady$1, aa as asRecord, ai as DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS, an as readLocalEnabledControllers, ao as buildAuthenticationStatusLabel, ar as removeAgentActivityBindingsWhileDeliveryLocked, at as slugifyOpenClawNamePart, ba as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS, bi as renderInformationProtectionPrompt, br as isDaemonReconcileInProgressError, c as waitForSystemServiceStartup$1, ca as normalizeHeartbeatIntervalMs, ci as buildInformationProtectionPromptPlan, cn as resolveProfileWorkspaceRuntime, co as createAuthenticationError, cr as resolveProjectBindingForPath, ct as createMutableRouteCatalogState, d as captureDaemonServiceEvidenceBestEffort, da as normalizeText$2, dt as summarizeSkippedDaemonProfiles, ei as upsertConversationExecutionState, en as emitDriftDetectedEvidence, eo as clearAllSelectedOpenMeldProfileIds, er as bindProject, et as resolveDaemonServiceDependencyDiagnostics, f as formatDaemonFailureContextText, fa as nowIsoString, fn as readProfileWorkspaceConfigForAccount, ft as syncDaemonRouteCatalogState, g as resolveServiceReadiness, go as resolveCurrentOpenMeldAccountContext, gr as normalizeDispatchThreadAction, h as resolveDaemonStatusAuthenticationAttention, ha as assessCliUpdate, hn as setCustomProfileWorkspace, hr as withAgentActivityLocalStateLock, ht as resolveCurrentEffectiveProfileWorkingFolderRuntime, i as runDaemonServiceLifecycle, ia as resolvePreferredDaemonDeviceId, ii as buildAgentContextLookupKey, in as buildRuntimeRouteTargets, it as normalizeOpenClawSpaceIdPrefix, ja as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS, ji as parseOpenCodeGoUsageResponse, jr as ADAPTIVE_HEARTBEAT_JITTER_RATIO, jt as inspectDaemonServiceInventory, ka as HEARTBEAT_RESPONSE_TIMEOUT_MS, ki as createLocalAdapterContainer, kr as createLocalExecutionSlots, l as startDaemonSystemServiceWithAutoRepair, la as normalizeNonNegativeInteger$1, li as buildWorkingLanguagePromptPlan, ln as ensureOpenMeldManagedProfileWorkspace, lo as extractAuthenticationPromptAction, lt as createRouteCatalogFromMutableState, m as resolveDaemonStatusAttention, ma as warnDaemonEvent, mn as resolveConfiguredProfileWorkspacePathForAccount, mr as withAgentActivityDeliveryLock, n as scheduleDaemonServiceUpdate, na as ensureDaemonRuntimePaths, ni as buildAuthenticatedControlPlaneResponse, nn as emitReconcileStartedEvidence, nr as listProjectBindings, nt as prepareProviderRuntime, o as isSystemServiceStartupTimeoutError, oa as dirnamePath, oi as areAgentControllerInterfaceAccountsSame, on as resolveLocalController, oo as buildCommandAuthenticationPromptMessage$1, or as removeMissingProjectConnections, ot as readDaemonRouteCatalogCache, p as resolveDaemonStatusSnapshot, pa as toErrorMessage$10, po as resolveAuthenticationReasonFromState, pr as resolveLocalProjectConnectionForPath, qi as materializeCliLaunchCommand, qn as isBunGlobalCommandPath, qr as appendLedgerHistoryEntry, qt as DAEMON_SERVICE_AUTO_HEAL_ANOMALIES, r as DaemonServiceLifecycleDrainTimeoutError, ra as resolveDaemonDeviceId, ri as assertLegacyAgentContextAssociation, rn as DaemonServiceRunError, rr as listProjectConnectionsWithStatus, rt as buildOpenClawSpaceSessionKey, s as resolveSystemServiceStartupWaitMs, sa as emitRunLine, si as buildAgentControllerRef, sn as resolveLocalRuntimeControllerSupport, so as buildHumanAuthenticationCard, sr as removeProjectConnection, st as writeDaemonRouteCatalogCache, ta as buildLedgerPaths, ti as withLedgerStateTransaction, tn as emitReconcileCompletedEvidence, tr as isProjectBound, tt as writeDaemonServiceContract, u as captureDaemonServiceEvidence, ua as normalizeOptionalText$11, uo as resolveAuthenticationGuidance, ur as setDefaultProjectConnection, ut as loadDaemonRouteCatalog, v as buildDaemonServiceRefreshNextStep, va as ensureDaemonSystemServiceCommandFiles, vr as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, w as formatDaemonServiceUpdateRequiredMessage, wa as DAEMON_RUNTIME_CONTRACT_EPOCH, wn as manageAgentRegistrationInstallation, wr as normalizeDispatchPostMessageAction, x as buildDaemonServiceStatusReadOnlyDetail, xa as CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS, xi as renderWorkingLanguagePrompt, xr as resolveRouteRegistrationReconcileDecision, xt as createOpenMeldToolsUpdateCoordinator, y as buildDaemonServiceRefreshPromptMessage, ya as CATALOG_SYNC_RETRY_INTERVAL_MS, yr as SPACE_ACTION_TARGET_GUIDANCE_LINES, yt as resolveAgentProfilePrimaryAgentControllerReport, zi as resolveInstalledCodexLaunchCandidates, zr as resolveDispatchQueueLogMeta } from "./daemon-service-update-coordinator-DcjOzGu1.js";
8
- import { A as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, An as normalizeMessageEnvelope, C as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, Cr as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, D as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Dr as localFolderPickerHelperResultSchema, E as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, En as collectCanonicalMentionTextFragments, Er as localFolderPickerHelperProtocolResultSchema, F as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Fn as executionContextAssignmentSchema, Gn as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, I as runtimeTransportRouteCatalogChangedFramePayloadSchema, J as openMeldSpaceEgressActionSchema, K as openMeldDaemonTaskResultPayloadSchema, Ln as executionContextTaskSchema, M as runtimeTransportRegisterSessionResponseSchema, On as getSpaceMessageAddressingRelationSupportForTargetKind, P as runtimeTransportResumeControllerConversationFramePayloadSchema, Q as sanitizeDispatchErrorSummary, R as runtimeTransportSubmitTaskResultRequestSchema, S as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, T as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Tn as MESSAGE_MENTION_TYPE_VALUES, Tr as localFolderPickerDaemonFrameSchema, X as resolvePublicAgentAvailabilityCopy, Xr as openMeldRequestContextSchema, _r as OPENMELD_REASONING_STREAM_HEADER, a as localWakeRouteWorkingFolderObservationSchema, b as runtimeTransportHeartbeatResponseSchema, c as runtimeTransportDispatchInteractionDeliveredRequestSchema, d as runtimeTransportDispatchLifecycleRequestSchema, f as runtimeTransportDispatchPreviewEndRequestSchema, g as runtimeTransportDispatchToolActivityRequestSchema, gr as LOCAL_AGENT_REASONING_MAX_CHARS, h as runtimeTransportDispatchRuntimeEvidenceRequestSchema, ir as runtimeTransportDeliveryExecutionIdentitySchema, j as runtimeTransportRegisterSessionRequestSchema, jn as resolveMessageEnvelopeTargetField, k as runtimeTransportOpenMeldToolsControlFramePayloadSchema, l as runtimeTransportDispatchInteractionRequestSchema, lr as resolveSingleSpaceMentionLabels, m as runtimeTransportDispatchReasoningRequestSchema, p as runtimeTransportDispatchPreviewRequestSchema, qn as agentInteractionRequestSchema, r as daemonStreamFrameSchema, rr as runtimeCoordinatorExecutionTokenEnvelopeSchema, s as runtimeTransportDeliverDispatchRequestSchema, sr as normalizeSpacePasswordText, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, u as runtimeTransportDispatchInteractionResponseFramePayloadSchema, ur as resolveSpaceMentionLabels, v as runtimeTransportForkAgentSessionResultSchema, vr as localAgentReasoningPreferencesSchema, w as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, wr as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, x as runtimeTransportLocalAgentControlCancelFramePayloadSchema, xt as sanitizeSignalTextPreview, y as runtimeTransportHeartbeatRequestSchema } from "./runtime-transport-BQAmcHwF.js";
9
- import { C as normalizeOptionalWorkingDirectory, a as openMeldDaemonControlPlaneResponseSchema, w as openMeldRuntimeProfileIdSchema } from "./control-plane-PxntAyDq.js";
10
- import { A as discriminatedUnion, I as literal, M as enumFactory, O as boolean, P as iso, U as strictObject, W as string, Y as url, a as formatLocalSetupActionLabel, f as localServiceComponentUpdateProjectionSchema, i as formatLocalSetupActionDescription, n as formatLocalComponentsSummaryDescription, o as installedLocalComponentsSnapshotSchema, r as formatLocalComponentsSummaryLabel, s as localCliComponentUpdateProjectionSchema } from "./local-components-H3SkJMC1.js";
7
+ import { $ as buildDaemonServiceDependencyTitle, $a as readDaemonCatalogSyncSignal, $i as describeServerRequiredVersionUnavailableReason, $n as ProjectBindingStoreUpdateRequiredError, $r as settleInflightTask, $t as resolveCurrentDaemonExpectedVersion, Aa as HEARTBEAT_RESPONSE_TIMEOUT_MS, Ai as createLocalAdapterEntries, An as setAgentRegistrationEnabled, Ar as createInflightTaskControlRegistry, At as uninstallDaemonServiceUpdateWorker, Bi as forkCodexAppServerThread, Bn as resolveSkillsAgentRegistry, Br as resolveDispatchContinuityObservation, C as formatDaemonServiceRefreshReliabilityMessage, Ca as CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS, Cn as listAgentTargetStates, Cr as buildDispatchReplyContextSummary, D as writeDaemonStartFailureState, Da as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS, Dr as createLocalTaskInterruptSender, Dt as writeOpenMeldToolsMaintenancePolicy, E as clearDaemonStartFailureState, Ea as DAEMON_STREAM_CONNECT_TIMEOUT_MS, En as reconcileNewRunnableBuiltinAgentRegistrations, Er as mergeOpenClawGatewayVisibility, Et as resolveOpenMeldToolsMaintenanceProjection, Fa as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS, Fi as probeGrokBuildAcpInterface, Fr as applyIntervalJitterMs$1, Ft as readCurrentDaemonOwnerSnapshot, Gi as createUnsupportedProviderUsageLimits, Gn as EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES, Gr as buildRuntimeWorkspaceFingerprint, Gt as isVersionDowngrade, Ha as requireOpenMeldProfile, Hi as verifyCodexAppServerThread, Hr as resolveCompatibleConversationExecutionState, Ht as readDaemonRuntimeContractRepairReport, Ia as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS, Ii as resolveInstalledGrokBuildLaunchCandidates, Ir as pruneStaleLeases, It as resolveDaemonStopStrategy, Ji as materializeCliLaunchCommand, Jn as isHomebrewCommandPath, Jr as commitResolvedAgentContext, Jt as DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES, Kn as resolveBuiltinAgentControllerDefinition, Kr as buildTaskResultEnvelope, La as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS, Li as projectCodexUsageLimits, Lr as resolveAdaptiveHeartbeatIntervalMs, Lt as resolveStoppedContractWriteBlockedReason, Ma as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS, Mi as forkOpenCodeServerSession, Mr as MAX_HEARTBEAT_INTERVAL_MS, Mt as buildDaemonOwnerSnapshotFromObservedState, Na as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS, Ni as resolveInstalledOpenCodeLaunchCandidates, Nr as MIN_HEARTBEAT_INTERVAL_MS, Nt as formatDaemonOwnerSummaryLabel, Oa as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS, Oi as resolveCatalogSyncSkippedProfilesLogState, Or as buildLocalServiceDiagnosticsPayload, Ot as ensureDaemonServiceMaintenanceInstalled, Pa as REGISTER_RESPONSE_TIMEOUT_MS, Pi as GrokBuildAcpTransportError, Pr as applyAcceptedLeases, Pt as hasActiveDaemonOwners, Q as buildDaemonServiceDependencySummary, Qi as assessServerRequiredVersion, Qn as ProjectBindingOperationError, Qr as seedLegacyAgentContext, Qt as classifyDaemonServiceWakeability, Ri as resolveCodexTimeoutMs, Rn as canManageRegistryAgentSkillTargets, Rr as resolveCatalogSyncIntervalMs, Rt as summarizeDaemonOwnerSnapshot, S as buildDaemonServiceUpdateRequiredNextStep, Sa as CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS, Sr as createSerialAgentInteractionCallback, Ta as DAEMON_RUNTIME_CONTRACT_EPOCH, Tr as createPendingAgentInteractionRegistry, Tt as readOpenMeldToolsMaintenancePolicy, Ua as resolveOpenMeldProfileOrNull, Ui as resolveInstalledClaudeCodeLaunchCandidates, Un as resolveRegistryRuntimeAdapterCapabilitySnapshot, Ur as resolveLatestScopedConversationExecutionState, Ut as buildDaemonServiceTargetSpec, Vi as resolveCodexAppServerCompletedTurn, Vr as resolveCompatibleAgentContextMatch, Vt as ensureDaemonRuntimeContractState, W as resolveLocalServiceDemand, Wi as createUnavailableProviderUsageLimits, Wn as resolveRegistryRuntimeAdapterContractByAgentControllerRef, Wr as runRuntimeTask, Wt as resolveDaemonServiceAlignmentDecision, X as buildDaemonServiceDependencyMeaning, Xi as createProviderOriginalError, Xn as isPnpmGlobalCommandPath, Xr as removeConversationExecutionState, Y as buildDaemonServiceDependencyDetails, Yi as listAgentControllerSupervisedProcessIds, Yn as isNpmGlobalCommandPath, Yr as loadLedgerState, Yt as DAEMON_SERVICE_REPAIR_ANOMALIES, Z as buildDaemonServiceDependencyNextStep, Zi as resolveServiceUpdateUrgency, Zr as resolveConversationExecutionStateByLookupKey, Zt as classifyDaemonServiceRunStartability, _i as parseAgentControllerRef, _o as resolveCurrentOpenMeldAccountContext, _r as syncRuntimeEventToInflightTaskControlRegistry, _t as syncDeviceRuntimeStateProjection, a as isDaemonInventoryRunningAndStartReady$1, aa as resolvePreferredDaemonDeviceId, ai as DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS, an as readLocalEnabledControllers, ar as removeAgentActivityBindingsWhileDeliveryLocked, at as slugifyOpenClawNamePart, ba as CATALOG_SYNC_RETRY_INTERVAL_MS, bi as renderInformationProtectionPrompt, br as isDaemonReconcileInProgressError, c as waitForSystemServiceStartup$1, ca as emitRunLine, ci as buildInformationProtectionPromptPlan, cn as resolveProfileWorkspaceRuntime, co as buildHumanAuthenticationCard, cr as resolveProjectBindingForPath, ct as createMutableRouteCatalogState, d as captureDaemonServiceEvidenceBestEffort, da as normalizeOptionalText$11, do as resolveAuthenticationGuidance, dt as summarizeSkippedDaemonProfiles, ei as upsertConversationExecutionState, en as emitDriftDetectedEvidence, er as bindProject, et as resolveDaemonServiceDependencyDiagnostics, f as formatDaemonFailureContextText, fa as normalizeText$2, fn as readProfileWorkspaceConfigForAccount, ft as syncDaemonRouteCatalogState, g as resolveServiceReadiness, ga as assessCliUpdate, gr as normalizeDispatchThreadAction, h as resolveDaemonStatusAuthenticationAttention, ha as warnDaemonEvent, hn as setCustomProfileWorkspace, hr as withAgentActivityLocalStateLock, ht as resolveCurrentEffectiveProfileWorkingFolderRuntime, i as runDaemonServiceLifecycle, ia as resolveDaemonDeviceId, ii as buildAgentContextLookupKey, in as buildRuntimeRouteTargets, it as normalizeOpenClawSpaceIdPrefix, ja as MAX_RECONNECT_DELAY_MS, ji as parseOpenCodeGoUsageResponse, jr as ADAPTIVE_HEARTBEAT_JITTER_RATIO, jt as inspectDaemonServiceInventory, ka as DEFAULT_RECONNECT_DELAY_MS, ki as createLocalAdapterContainer, kr as createLocalExecutionSlots, l as startDaemonSystemServiceWithAutoRepair, la as normalizeHeartbeatIntervalMs, li as buildWorkingLanguagePromptPlan, ln as ensureOpenMeldManagedProfileWorkspace, lo as createAuthenticationError, lt as createRouteCatalogFromMutableState, m as resolveDaemonStatusAttention, ma as toErrorMessage$10, mn as resolveConfiguredProfileWorkspacePathForAccount, mo as resolveAuthenticationReasonFromState, mr as withAgentActivityDeliveryLock, n as scheduleDaemonServiceUpdate, na as buildLedgerPaths, ni as buildAuthenticatedControlPlaneResponse, nn as emitReconcileStartedEvidence, nr as listProjectBindings, nt as prepareProviderRuntime, o as isSystemServiceStartupTimeoutError, oa as asRecord, oi as areAgentControllerInterfaceAccountsSame, on as resolveLocalController, oo as buildAuthenticationStatusLabel, or as removeMissingProjectConnections, ot as readDaemonRouteCatalogCache, p as resolveDaemonStatusSnapshot, pa as nowIsoString, pr as resolveLocalProjectConnectionForPath, qi as buildCliLaunchInvocation, qn as isBunGlobalCommandPath, qr as appendLedgerHistoryEntry, qt as DAEMON_SERVICE_AUTO_HEAL_ANOMALIES, r as DaemonServiceLifecycleDrainTimeoutError, ra as ensureDaemonRuntimePaths, ri as assertLegacyAgentContextAssociation, rn as DaemonServiceRunError, rr as listProjectConnectionsWithStatus, rt as buildOpenClawSpaceSessionKey, s as resolveSystemServiceStartupWaitMs, sa as dirnamePath, si as buildAgentControllerRef, sn as resolveLocalRuntimeControllerSupport, so as buildCommandAuthenticationPromptMessage$1, sr as removeProjectConnection, st as writeDaemonRouteCatalogCache, ti as withLedgerStateTransaction, tn as emitReconcileCompletedEvidence, to as clearAllSelectedOpenMeldProfileIds, tr as isProjectBound, tt as writeDaemonServiceContract, u as captureDaemonServiceEvidence, ua as normalizeNonNegativeInteger$1, uo as extractAuthenticationPromptAction, ur as setDefaultProjectConnection, ut as loadDaemonRouteCatalog, v as buildDaemonServiceRefreshNextStep, va as buildDaemonSystemServiceCommandSpec, vr as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, w as formatDaemonServiceUpdateRequiredMessage, wa as CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS, wn as manageAgentRegistrationInstallation, wr as normalizeDispatchPostMessageAction, x as buildDaemonServiceStatusReadOnlyDetail, xa as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS, xi as renderWorkingLanguagePrompt, xr as resolveRouteRegistrationReconcileDecision, xt as createOpenMeldToolsUpdateCoordinator, y as buildDaemonServiceRefreshPromptMessage, ya as ensureDaemonSystemServiceCommandFiles, yr as SPACE_ACTION_TARGET_GUIDANCE_LINES, yt as resolveAgentProfilePrimaryAgentControllerReport, za as resolveRuntimeContext, zi as resolveInstalledCodexLaunchCandidates, zr as resolveDispatchQueueLogMeta } from "./daemon-service-update-coordinator--xLHNqDT.js";
8
+ import { A as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, Ar as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, Bt as spaceWorkRelativePathSchema, C as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, Cr as LOCAL_AGENT_REASONING_MAX_CHARS, D as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, E as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, F as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Fn as getSpaceMessageAddressingRelationSupportForTargetKind, Hn as executionContextAssignmentSchema, I as runtimeTransportRouteCatalogChangedFramePayloadSchema, J as openMeldSpaceEgressActionSchema, K as openMeldDaemonTaskResultPayloadSchema, Ln as normalizeMessageEnvelope, Lt as SPACE_WORK_HANDOFF_CAPABILITY_HEADER, M as runtimeTransportRegisterSessionResponseSchema, Mn as MESSAGE_MENTION_TYPE_VALUES, Mr as localFolderPickerDaemonFrameSchema, Nn as collectCanonicalMentionTextFragments, Nr as localFolderPickerHelperProtocolResultSchema, P as runtimeTransportResumeControllerConversationFramePayloadSchema, Pr as localFolderPickerHelperResultSchema, Q as sanitizeDispatchErrorSummary, Qn as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, R as runtimeTransportSubmitTaskResultRequestSchema, Rn as resolveMessageEnvelopeTargetField, Rt as SPACE_WORK_MAX_BYTES, S as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, T as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Tr as localAgentReasoningPreferencesSchema, Vt as spaceWorkSelectionSchema, Wn as executionContextTaskSchema, X as resolvePublicAgentAvailabilityCopy, _r as resolveSpaceMentionLabels, a as localWakeRouteWorkingFolderObservationSchema, b as runtimeTransportHeartbeatResponseSchema, c as runtimeTransportDispatchInteractionDeliveredRequestSchema, d as runtimeTransportDispatchLifecycleRequestSchema, dr as runtimeTransportDeliveryExecutionIdentitySchema, er as agentInteractionRequestSchema, f as runtimeTransportDispatchPreviewEndRequestSchema, g as runtimeTransportDispatchToolActivityRequestSchema, gr as resolveSingleSpaceMentionLabels, h as runtimeTransportDispatchRuntimeEvidenceRequestSchema, j as runtimeTransportRegisterSessionRequestSchema, jr as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, k as runtimeTransportOpenMeldToolsControlFramePayloadSchema, l as runtimeTransportDispatchInteractionRequestSchema, m as runtimeTransportDispatchReasoningRequestSchema, mr as normalizeSpacePasswordText, p as runtimeTransportDispatchPreviewRequestSchema, r as daemonStreamFrameSchema, ri as openMeldRequestContextSchema, s as runtimeTransportDeliverDispatchRequestSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, u as runtimeTransportDispatchInteractionResponseFramePayloadSchema, ur as runtimeCoordinatorExecutionTokenEnvelopeSchema, v as runtimeTransportForkAgentSessionResultSchema, w as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, wr as OPENMELD_REASONING_STREAM_HEADER, x as runtimeTransportLocalAgentControlCancelFramePayloadSchema, xt as sanitizeSignalTextPreview, y as runtimeTransportHeartbeatRequestSchema } from "./runtime-transport-D8G8sANa.js";
9
+ import { E as ServiceAccountAdmissionError, S as setAuthSession, _ as onAuthSessionCredentialAvailable, a as beginAuthSessionTransition, d as getAuthSessionState, i as assertAuthSessionMutationAvailable, s as clearAuthSession, v as onAuthSessionCredentialObservation, w as withAdmittedServiceSession } from "./auth-session-gaLjWIKR.js";
10
+ import { C as normalizeOptionalWorkingDirectory, a as openMeldDaemonControlPlaneResponseSchema, w as openMeldRuntimeProfileIdSchema } from "./control-plane-Bpu7g9Av.js";
11
+ import { F as iso, G as string, L as literal, N as enumFactory, W as strictObject, X as url, a as formatLocalSetupActionLabel, f as localServiceComponentUpdateProjectionSchema, i as formatLocalSetupActionDescription, j as discriminatedUnion, k as boolean, n as formatLocalComponentsSummaryDescription, o as installedLocalComponentsSnapshotSchema, r as formatLocalComponentsSummaryLabel, s as localCliComponentUpdateProjectionSchema } from "./local-components-B6SCXZf9.js";
11
12
  import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
12
- import { E as ServiceAccountAdmissionError, S as setAuthSession, _ as onAuthSessionCredentialAvailable, a as beginAuthSessionTransition, d as getAuthSessionState, i as assertAuthSessionMutationAvailable, s as clearAuthSession, v as onAuthSessionCredentialObservation, w as withAdmittedServiceSession } from "./auth-session-Dqz9X4F0.js";
13
- import { b as withSkillsInstallLock, f as ensureLocalSkills, g as loadSelectedSkillAssets, l as installSkillsToTargets, n as collectSkillsReadinessSnapshot, u as resolveSkillInstallStateForTarget, v as hashBundledSkillAssets, x as OFFICIAL_CLI_SKILL_URL, y as computeDirectoryContentHash } from "./installation-inventory-B0cbVLun.js";
14
- import { n as resolveOpenMeldDistribution, o as serviceControlCapabilitiesSchema, t as isBinaryDistribution } from "./distribution-DY2fBeSW.js";
15
- import { i as writeDaemonRuntimeLease } from "./daemon-runtime-lease-Dd4hdHNo.js";
16
- import { $ as readManagedCliInstallation, A as prepareDaemonServiceBundle, Ft as requestLocalDaemonShutdown, H as formatDaemonLifecycleOriginSummary, Ht as upsertDaemonServiceContract, J as runWithDaemonLifecycleCommandJournal, K as resolveRecentDaemonSignalStopCause, Lt as sendLocalDaemonControlPlaneRequest, M as resolveAlignedDaemonActiveBundleEntryPath, Mt as LocalDaemonControlPlaneClientError, N as resolveDaemonBundleEntryPathFromState, Rt as clearDaemonServiceContract, U as readLatestDaemonLifecycleConnectionStateEvent, V as emitDaemonLifecycleEvent, Vt as readDaemonServiceContract, W as readLatestDaemonLifecycleOriginEvent, a as resolveDaemonRuntimeState, b as cleanupInactiveDaemonServiceBundles, f as listDaemonOwnedProcesses, h as resolveDaemonBundleIdFromEntryPath, i as readCurrentObservedDaemonRuntimeStatus, j as readDaemonActiveBundleState, lt as compareSemver, n as getEffectiveDaemonRuntimeStatus, nt as OPENMELD_VERSION, o as resolveDaemonServiceManagerForRuntimeState, p as extractDaemonCommandEntryPath, q as runDaemonServiceManagerAction, r as readCurrentDaemonRuntimeContext, s as waitForDaemonSystemServiceToStop, t as clearDaemonRuntimeStateIfDefinitelyStopped, u as cleanupLegacySharedDaemonServiceState, v as isOpenMeldManagedBinaryPath, zt as isDaemonServiceContractIdentityReusable } from "./daemon-service-runtime-CWTlAhZY.js";
17
- import { $ as SPACE_PERSONAL_CONTRIBUTION_RULE, Bt as buildAgentOverviewFromContract, Gt as createPresenter, Kt as sanitizeTerminalDisplayText, Mt as validateDaemonControlTargetInput, Xt as outLine, Yt as outJsonLine, Z as SPACE_COLLABORATION_CONTEXT_RULE, _ as createAuthLoginGuideError, a as formatDaemonServiceDowngradeBlockedRecommendation, at as buildSpaceAgentIdentityLine, d as formatDaemonServiceMissingStatus, dt as isSelfWakeSpaceAction, f as getDaemonDowngradeBlockedTitle, ft as renderSpaceEntryBrief, g as canUseInteractivePrompts, h as resolveOpenMeldToolsUpdateOperationProjection, ht as getCommandEntryContract, it as buildCompactDispatchActionGuidanceLines, l as formatDaemonServiceMissingRunStepOne, lt as composeDispatchBrief, mt as resolveSpacePublicationRequirement, n as resolveElapsedTimeMs, o as formatDaemonServiceMissingAction, ot as buildSpaceEntryBriefNeedMoreLine, pt as resolvePublicAgentFailureReason, r as formatDaemonDowngradeBlockedNextStep, rt as buildCenterAgentRoleTemplateText, s as formatDaemonServiceMissingMeaning, st as buildSpaceWakeParticipantLines, t as formatElapsedTime, tt as buildAgentFacingMentalModelLines, u as formatDaemonServiceMissingRunStepTwo, ut as deriveContinuity } from "./elapsed-time-iFOSSUJo.js";
18
- import { a as resolveBaseUrl, c as resolveExplicitGatewayUrlOrThrow, d as createDefaultRuntimeAgentControllerSettings, f as getConfiguredDaemonDispatchLimits, g as getConfiguredSkillsConfig, i as normalizeGatewayBaseUrlOrNull, o as resolveBaseUrlOrNull, r as normalizeGatewayBaseUrl } from "./base-url-C6sHRNGu.js";
13
+ import { b as withSkillsInstallLock, f as ensureLocalSkills, g as loadSelectedSkillAssets, l as installSkillsToTargets, n as collectSkillsReadinessSnapshot, u as resolveSkillInstallStateForTarget, v as hashBundledSkillAssets, x as OFFICIAL_CLI_SKILL_URL, y as computeDirectoryContentHash } from "./installation-inventory-C4WKcVEj.js";
14
+ import { i as serviceControlCapabilitiesSchema } from "./service-account-admission-Dy2W3n3_.js";
15
+ import { i as writeDaemonRuntimeLease } from "./daemon-runtime-lease-CIzOT1zx.js";
16
+ import { $ as readManagedCliInstallation, A as prepareDaemonServiceBundle, Ft as requestLocalDaemonShutdown, H as formatDaemonLifecycleOriginSummary, Ht as upsertDaemonServiceContract, J as runWithDaemonLifecycleCommandJournal, K as resolveRecentDaemonSignalStopCause, Lt as sendLocalDaemonControlPlaneRequest, M as resolveAlignedDaemonActiveBundleEntryPath, Mt as LocalDaemonControlPlaneClientError, N as resolveDaemonBundleEntryPathFromState, Rt as clearDaemonServiceContract, U as readLatestDaemonLifecycleConnectionStateEvent, V as emitDaemonLifecycleEvent, Vt as readDaemonServiceContract, W as readLatestDaemonLifecycleOriginEvent, a as resolveDaemonRuntimeState, b as cleanupInactiveDaemonServiceBundles, f as listDaemonOwnedProcesses, h as resolveDaemonBundleIdFromEntryPath, i as readCurrentObservedDaemonRuntimeStatus, j as readDaemonActiveBundleState, lt as compareSemver, n as getEffectiveDaemonRuntimeStatus, nt as OPENMELD_VERSION, o as resolveDaemonServiceManagerForRuntimeState, p as extractDaemonCommandEntryPath, q as runDaemonServiceManagerAction, r as readCurrentDaemonRuntimeContext, s as waitForDaemonSystemServiceToStop, t as clearDaemonRuntimeStateIfDefinitelyStopped, u as cleanupLegacySharedDaemonServiceState, v as isOpenMeldManagedBinaryPath, zt as isDaemonServiceContractIdentityReusable } from "./daemon-service-runtime-CGT3yVOs.js";
17
+ import { $ as SPACE_PERSONAL_CONTRIBUTION_RULE, Bt as buildAgentOverviewFromContract, Gt as createPresenter, Kt as sanitizeTerminalDisplayText, Mt as validateDaemonControlTargetInput, Xt as outLine, Yt as outJsonLine, Z as SPACE_COLLABORATION_CONTEXT_RULE, _ as createAuthLoginGuideError, a as formatDaemonServiceDowngradeBlockedRecommendation, at as buildSpaceAgentIdentityLine, d as formatDaemonServiceMissingStatus, dt as isSelfWakeSpaceAction, f as getDaemonDowngradeBlockedTitle, ft as renderSpaceEntryBrief, g as canUseInteractivePrompts, h as resolveOpenMeldToolsUpdateOperationProjection, ht as getCommandEntryContract, it as buildCompactDispatchActionGuidanceLines, l as formatDaemonServiceMissingRunStepOne, lt as composeDispatchBrief, mt as resolveSpacePublicationRequirement, n as resolveElapsedTimeMs, o as formatDaemonServiceMissingAction, ot as buildSpaceEntryBriefNeedMoreLine, pt as resolvePublicAgentFailureReason, r as formatDaemonDowngradeBlockedNextStep, rt as buildCenterAgentRoleTemplateText, s as formatDaemonServiceMissingMeaning, st as buildSpaceWakeParticipantLines, t as formatElapsedTime, tt as buildAgentFacingMentalModelLines, u as formatDaemonServiceMissingRunStepTwo, ut as deriveContinuity } from "./elapsed-time-CCFWbCC8.js";
18
+ import { a as resolveBaseUrl, c as resolveExplicitGatewayUrlOrThrow, d as createDefaultRuntimeAgentControllerSettings, f as getConfiguredDaemonDispatchLimits, g as getConfiguredSkillsConfig, i as normalizeGatewayBaseUrlOrNull, o as resolveBaseUrlOrNull, r as normalizeGatewayBaseUrl } from "./base-url-BczddvzH.js";
19
+ import { n as isPreciseProcessStartIdentity, t as CURRENT_PROCESS_START_IDENTITY } from "./process-identity-Clby123a.js";
19
20
  import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
20
- import { A as getDaemonStatus, G as withDaemonServiceRegistrationMutationLock, H as setDaemonServiceRuntimeState, I as readDaemonServiceRuntimeSnapshot, K as withDaemonServiceRunLock, L as releaseDaemonServiceLifecycleLock, M as isDaemonServiceRuntimeHeartbeatStale, O as ensureDaemonControlPlaneToken, R as resolveDaemonControlPlaneEndpoint, S as daemonServiceRepairJournalPath, U as uninstallDaemon, W as withDaemonServiceReconcileLock, _ as daemonRuntimeStateRootPath, a as DAEMON_SERVICE_RUNTIME_MODE_ENV, c as acquireDaemonServiceLifecycleLock, d as daemonDispatchJournalPath, f as daemonLifecycleJournalPath, h as daemonRuntimeRootPath, i as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, j as installDaemon, l as clearDaemonServiceRuntimeState, o as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, q as withDaemonServiceStopLock, z as resolveDaemonServiceRuntimeMetadata } from "./daemon-state-C37ZtIZK.js";
21
- import { S as resolveDaemonServiceManager, _ as readDaemonServiceJobCrashExitCode, a as disableDaemonServiceAutostartIfConfigured, c as getDaemonSystemServiceLogPath, f as isDaemonServiceJobSpawnPending, o as formatDaemonServiceJobDiagnosticsEvidence, s as getDaemonServiceLaunchdLabel } from "./daemon-service-manager-GiMCiTmu.js";
22
- import { a as formatOpenMeldCliCommand, c as formatOpenMeldCliTextBlock, f as resolveUserFacingCliEntryCommand, i as formatInlineOpenMeldCliCommands, o as formatOpenMeldCliCommands, r as resolveAuthBaseUrl, t as resolveOpenMeldEnvironmentTarget } from "./openmeld-environment-target-NtJYJe1D.js";
23
- import { t as admitServiceAccountStop } from "./service-account-authorization-Dq4LcAVa.js";
21
+ import { n as resolveOpenMeldDistribution, t as isBinaryDistribution } from "./distribution-BDQT2ilb.js";
22
+ import { A as getDaemonStatus, G as withDaemonServiceRegistrationMutationLock, H as setDaemonServiceRuntimeState, I as readDaemonServiceRuntimeSnapshot, K as withDaemonServiceRunLock, L as releaseDaemonServiceLifecycleLock, M as isDaemonServiceRuntimeHeartbeatStale, O as ensureDaemonControlPlaneToken, R as resolveDaemonControlPlaneEndpoint, S as daemonServiceRepairJournalPath, U as uninstallDaemon, W as withDaemonServiceReconcileLock, _ as daemonRuntimeStateRootPath, a as DAEMON_SERVICE_RUNTIME_MODE_ENV, c as acquireDaemonServiceLifecycleLock, d as daemonDispatchJournalPath, f as daemonLifecycleJournalPath, h as daemonRuntimeRootPath, i as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, j as installDaemon, l as clearDaemonServiceRuntimeState, o as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, q as withDaemonServiceStopLock, z as resolveDaemonServiceRuntimeMetadata } from "./daemon-state-CoAZLwpi.js";
23
+ import { S as resolveDaemonServiceManager, _ as readDaemonServiceJobCrashExitCode, a as disableDaemonServiceAutostartIfConfigured, c as getDaemonSystemServiceLogPath, f as isDaemonServiceJobSpawnPending, o as formatDaemonServiceJobDiagnosticsEvidence, s as getDaemonServiceLaunchdLabel } from "./daemon-service-manager-DxS5eH_N.js";
24
+ import { a as formatOpenMeldCliCommand, c as formatOpenMeldCliTextBlock, f as resolveUserFacingCliEntryCommand, i as formatInlineOpenMeldCliCommands, o as formatOpenMeldCliCommands, r as resolveAuthBaseUrl, t as resolveOpenMeldEnvironmentTarget } from "./openmeld-environment-target-BWI2adGw.js";
25
+ import { t as admitServiceAccountStop } from "./service-account-authorization-4oZuo8sT.js";
24
26
  import { n as toErrorMessage$11, t as sleep } from "./dist-o3UL1EGQ.js";
25
- import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, f as buildOpenMeldRequestContextFromProfileIdentity, i as AuthRequestCredentialError, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation, u as fingerprintRequestAuthorization } from "./api-client-foundation-DjbtuE52.js";
27
+ import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, c as buildRequestAuthHeaders, f as buildOpenMeldRequestContextFromProfileIdentity, i as AuthRequestCredentialError, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation, u as fingerprintRequestAuthorization } from "./api-client-foundation-CKRP7Ymg.js";
26
28
  import { createHash, randomUUID } from "node:crypto";
27
29
  import { homedir, loadavg, tmpdir } from "node:os";
28
30
  import { basename, delimiter, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -7634,6 +7636,7 @@ function resolveProviderConversationProofTimeoutMs(runtimeTimeoutMs) {
7634
7636
  //#endregion
7635
7637
  //#region src/local-service/control-plane/server.ts
7636
7638
  const MAX_CONTROL_PLANE_REQUEST_SIZE_BYTES = 64 * 1024;
7639
+ const CONTROL_PLANE_RESPONSE_PROGRESS_INTERVAL_MS = 1e3;
7637
7640
  async function startLocalDaemonControlPlaneServer(input) {
7638
7641
  const endpoint = input.endpoint ?? resolveDaemonControlPlaneEndpoint();
7639
7642
  const resolveExpectedToken = buildExpectedTokenResolver(input);
@@ -7643,13 +7646,54 @@ async function startLocalDaemonControlPlaneServer(input) {
7643
7646
  let handled = false;
7644
7647
  const respond = (request) => {
7645
7648
  const requestId = readOptionalRequestId(request);
7649
+ const command = readOptionalCommand(request);
7650
+ input.onRequestPhase?.({
7651
+ ...command ? { command } : {},
7652
+ phase: "received",
7653
+ ...requestId ? { requestId } : {}
7654
+ });
7655
+ let progressInterval = null;
7656
+ const stopResponseProgress = () => {
7657
+ if (progressInterval) {
7658
+ clearInterval(progressInterval);
7659
+ progressInterval = null;
7660
+ }
7661
+ };
7662
+ const startResponseProgress = () => {
7663
+ if (progressInterval || socket.destroyed) return;
7664
+ progressInterval = setInterval(() => {
7665
+ if (!socket.destroyed && socket.writable) socket.write(" ");
7666
+ }, CONTROL_PLANE_RESPONSE_PROGRESS_INTERVAL_MS);
7667
+ progressInterval.unref?.();
7668
+ };
7669
+ socket.once("close", stopResponseProgress);
7670
+ socket.once("error", stopResponseProgress);
7646
7671
  buildResponse({
7647
7672
  getContext: input.getContext,
7673
+ onAuthenticated: () => {
7674
+ input.onRequestPhase?.({
7675
+ ...command ? { command } : {},
7676
+ phase: "authenticated",
7677
+ ...requestId ? { requestId } : {}
7678
+ });
7679
+ },
7680
+ onShutdownAdmitted: () => {
7681
+ input.onRequestPhase?.({
7682
+ ...command ? { command } : {},
7683
+ phase: "shutdown_admitted",
7684
+ ...requestId ? { requestId } : {}
7685
+ });
7686
+ startResponseProgress();
7687
+ },
7648
7688
  request,
7649
7689
  requestId,
7650
7690
  resolveExpectedToken
7651
7691
  }).then((response) => {
7652
7692
  socket.end(`${JSON.stringify(response)}\n`);
7693
+ }).finally(() => {
7694
+ stopResponseProgress();
7695
+ socket.off("close", stopResponseProgress);
7696
+ socket.off("error", stopResponseProgress);
7653
7697
  });
7654
7698
  };
7655
7699
  socket.setEncoding("utf8");
@@ -7722,6 +7766,10 @@ async function buildResponse(input) {
7722
7766
  return await buildAuthenticatedControlPlaneResponse({
7723
7767
  context: await input.getContext(),
7724
7768
  expectedToken,
7769
+ lifecycle: {
7770
+ onAuthenticated: input.onAuthenticated,
7771
+ onShutdownAdmitted: input.onShutdownAdmitted
7772
+ },
7725
7773
  request: input.request
7726
7774
  });
7727
7775
  } catch (error) {
@@ -7759,6 +7807,11 @@ function readOptionalRequestId(request) {
7759
7807
  const normalized = requestId.trim();
7760
7808
  return normalized.length > 0 ? normalized : void 0;
7761
7809
  }
7810
+ function readOptionalCommand(request) {
7811
+ if (!request || typeof request !== "object") return;
7812
+ const command = request.command;
7813
+ return typeof command === "string" && command.length > 0 ? command : void 0;
7814
+ }
7762
7815
  function buildControlPlaneErrorResponse(input) {
7763
7816
  const parsed = openMeldDaemonControlPlaneResponseSchema.safeParse({
7764
7817
  v: 1,
@@ -11268,6 +11321,7 @@ function parseDispatchTask(input) {
11268
11321
  return {
11269
11322
  ...requiredFields,
11270
11323
  executionContext: payload.executionContext,
11324
+ workHandoff: payload.sourceSignalSnapshot?.workHandoff,
11271
11325
  agentControllerConversationId,
11272
11326
  ...resolveDispatchSourceFiles(payload),
11273
11327
  ...controllerSelection,
@@ -11781,6 +11835,19 @@ function buildDispatchCorrelation(input) {
11781
11835
  };
11782
11836
  }
11783
11837
  //#endregion
11838
+ //#region src/lib/path-containment.ts
11839
+ const nativePath = {
11840
+ isAbsolute,
11841
+ relative,
11842
+ sep
11843
+ };
11844
+ /** Lexical containment of already canonical absolute paths, not symlink resolution. */
11845
+ function isSameOrDescendantPath(candidate, parent, paths = nativePath) {
11846
+ if (!(paths.isAbsolute(candidate) && paths.isAbsolute(parent))) return false;
11847
+ const relation = paths.relative(parent, candidate);
11848
+ return relation === "" || relation !== ".." && !relation.startsWith(`..${paths.sep}`) && !paths.isAbsolute(relation);
11849
+ }
11850
+ //#endregion
11784
11851
  //#region src/local-service/file-access/computer-file-access-store.ts
11785
11852
  const LEGACY_COMPUTER_FILE_ACCESS_STORE_SCHEMA = "openmeld-computer-file-access-v1";
11786
11853
  const COMPUTER_FILE_ACCESS_STORE_SCHEMA = "openmeld-computer-file-access-v2";
@@ -11938,8 +12005,7 @@ function removeRedundantFolders(folders) {
11938
12005
  return unique.filter((candidate, index) => !unique.some((parent, parentIndex) => parentIndex !== index && isPathInside(candidate, parent)));
11939
12006
  }
11940
12007
  function isPathInside(candidate, parent) {
11941
- const relation = relative(parent, candidate);
11942
- return relation.length > 0 && !relation.startsWith("..") && !isAbsolute(relation);
12008
+ return relative(parent, candidate) !== "" && isSameOrDescendantPath(candidate, parent);
11943
12009
  }
11944
12010
  function hasSamePolicyValue(current, next) {
11945
12011
  if (current.mode !== next.mode) return false;
@@ -16798,17 +16864,13 @@ async function resolveComputerFileAccessAdmission(input) {
16798
16864
  }
16799
16865
  async function assertComputerFileAccessWorkingDirectoryAllowed(input) {
16800
16866
  const workingDirectory = await realpath(input.providerRuntimeWorkingDirectory);
16801
- const matchesConfiguredFolder = input.boundary.folders.some((folder) => isSameOrDescendant(workingDirectory, folder));
16867
+ const matchesConfiguredFolder = input.boundary.folders.some((folder) => isSameOrDescendantPath(workingDirectory, folder));
16802
16868
  if (input.boundary.mode === "only_selected_folders" ? matchesConfiguredFolder : !matchesConfiguredFolder) return;
16803
16869
  throw new DaemonServiceRunError({
16804
16870
  code: "computer.file_access.working_directory_denied",
16805
16871
  message: "computer.file_access.working_directory_denied: this Wake’s working folder is outside the Computer file access boundary"
16806
16872
  });
16807
16873
  }
16808
- function isSameOrDescendant(candidate, parent) {
16809
- const relativePath = relative(parent, candidate);
16810
- return relativePath === "" || !(relativePath.startsWith("..") || isAbsolute(relativePath));
16811
- }
16812
16874
  //#endregion
16813
16875
  //#region src/local-service/file-access/computer-file-access-prompt.ts
16814
16876
  const COMPUTER_FILE_ACCESS_AWARENESS = "Stay within the file access available to this OpenMeld run. Treat denied paths as intentional and continue with the safest useful alternative. Only the Computer owner can change this boundary.";
@@ -18492,6 +18554,7 @@ async function forkAgentSession(input) {
18492
18554
  childNativeSessionId = (await forkCodexAppServerThread({
18493
18555
  codexTimeoutMs: PROVIDER_FORK_TIMEOUT_MS,
18494
18556
  codexWorkdir: source.workingDirectory,
18557
+ forkFullHistory: true,
18495
18558
  launchContract: launch.candidates[0].launchContract,
18496
18559
  sourceThreadId: input.request.sourceNativeSessionId,
18497
18560
  title: buildForkedSessionTitle(input.request.profileName)
@@ -18591,19 +18654,47 @@ async function runAgentSessionForkOperation(input) {
18591
18654
  if (storeTails.get(input.ledgerRootPath) === tail) storeTails.delete(input.ledgerRootPath);
18592
18655
  }
18593
18656
  }
18657
+ function handleExistingOperation(existing, request) {
18658
+ let effectiveRequest;
18659
+ if ("kind" in request && request.kind === "execution_context") {
18660
+ const frozenCompletedHistoryId = existing.completedHistoryId ?? (existing.result && "completedHistoryId" in existing.result ? existing.result.completedHistoryId : void 0);
18661
+ const requestedCompletedHistoryId = request.completedHistoryId;
18662
+ if (requestedCompletedHistoryId && frozenCompletedHistoryId && requestedCompletedHistoryId !== frozenCompletedHistoryId) return rejected({
18663
+ ...request,
18664
+ completedHistoryId: requestedCompletedHistoryId
18665
+ }, "agent_session_fork.operation_identity_conflict", "This Fork operation id was already used for a different Session.");
18666
+ effectiveRequest = {
18667
+ ...request,
18668
+ completedHistoryId: requestedCompletedHistoryId ?? frozenCompletedHistoryId ?? ""
18669
+ };
18670
+ } else effectiveRequest = request;
18671
+ const fingerprint = stableJson(effectiveRequest);
18672
+ if (existing.requestFingerprint !== fingerprint) return rejected(effectiveRequest, "agent_session_fork.operation_identity_conflict", "This Fork operation id was already used for a different Session.");
18673
+ return existing.result ?? outcomeUnknown(effectiveRequest, "The provider Fork started, but no authoritative child Session id was recorded.");
18674
+ }
18675
+ async function resolveEffectiveCreationRequest(request, resolveCompletedHistoryId) {
18676
+ if (!("kind" in request && request.kind === "execution_context")) return request;
18677
+ let completedHistoryId = request.completedHistoryId;
18678
+ if (!completedHistoryId && resolveCompletedHistoryId) completedHistoryId = await resolveCompletedHistoryId();
18679
+ if (!completedHistoryId) throw new Error("execution_context.fork_checkpoint_unavailable");
18680
+ return {
18681
+ ...request,
18682
+ completedHistoryId
18683
+ };
18684
+ }
18594
18685
  async function runSerialized(input) {
18595
18686
  const stored = await readRecords(input.ledgerRootPath);
18596
18687
  if (!stored.ok) return rejected(input.request, stored.reasonCode, stored.reasonCode);
18597
18688
  const records = stored.records;
18598
- const fingerprint = stableJson(input.request);
18599
18689
  const existing = records.find((record) => record.operationId === input.request.operationId);
18600
- if (existing) {
18601
- if (existing.requestFingerprint !== fingerprint) return rejected(input.request, "agent_session_fork.operation_identity_conflict", "This Fork operation id was already used for a different Session.");
18602
- return existing.result ?? outcomeUnknown(input.request, "The provider Fork started, but no authoritative child Session id was recorded.");
18603
- }
18604
- if (records.filter((record) => record.result === null || record.result.status === "outcome_unknown").length >= MAX_RETAINED_RECORDS) return rejected(input.request, "agent_session_fork.unresolved_operation_limit", "Resolve uncertain fork operations before starting another fork.");
18690
+ if (existing) return handleExistingOperation(existing, input.request);
18691
+ const effectiveRequest = await resolveEffectiveCreationRequest(input.request, input.resolveCompletedHistoryId);
18692
+ const fingerprint = stableJson(effectiveRequest);
18693
+ if (records.filter((record) => record.result === null || record.result.status === "outcome_unknown").length >= MAX_RETAINED_RECORDS) return rejected(effectiveRequest, "agent_session_fork.unresolved_operation_limit", "Resolve uncertain fork operations before starting another fork.");
18605
18694
  const started = {
18606
- operationId: input.request.operationId,
18695
+ ..."completedHistoryId" in effectiveRequest ? { completedHistoryId: effectiveRequest.completedHistoryId } : {},
18696
+ ..."sourceNativeSessionId" in effectiveRequest ? { sourceNativeSessionId: effectiveRequest.sourceNativeSessionId } : {},
18697
+ operationId: effectiveRequest.operationId,
18607
18698
  requestFingerprint: fingerprint,
18608
18699
  result: null,
18609
18700
  schema: RECORD_SCHEMA,
@@ -18612,19 +18703,19 @@ async function runSerialized(input) {
18612
18703
  try {
18613
18704
  await writeRecords(input.ledgerRootPath, [...records, started]);
18614
18705
  } catch (error) {
18615
- return rejected(input.request, "agent_session_fork.operation_store_unavailable", toErrorMessage$2(error));
18706
+ return rejected(effectiveRequest, "agent_session_fork.operation_store_unavailable", toErrorMessage$2(error));
18616
18707
  }
18617
18708
  let result;
18618
18709
  try {
18619
- const forked = await input.execute();
18710
+ const forked = await input.execute("completedHistoryId" in effectiveRequest ? { completedHistoryId: effectiveRequest.completedHistoryId } : void 0);
18620
18711
  result = parseForkOperationResult({
18621
- ...input.request,
18712
+ ...effectiveRequest,
18622
18713
  childNativeSessionId: forked.childNativeSessionId,
18623
18714
  status: "completed"
18624
18715
  });
18625
18716
  } catch (error) {
18626
18717
  const reasonCode = readErrorCode(error);
18627
- result = reasonCode ? rejected(input.request, reasonCode, toErrorMessage$2(error)) : outcomeUnknown(input.request, toErrorMessage$2(error));
18718
+ result = reasonCode ? rejected(effectiveRequest, reasonCode, toErrorMessage$2(error)) : outcomeUnknown(effectiveRequest, toErrorMessage$2(error));
18628
18719
  }
18629
18720
  try {
18630
18721
  await writeRecords(input.ledgerRootPath, [...records, {
@@ -18633,7 +18724,7 @@ async function runSerialized(input) {
18633
18724
  updatedAtMs: Date.now()
18634
18725
  }]);
18635
18726
  } catch (error) {
18636
- return outcomeUnknown(input.request, `The provider Fork finished, but OpenMeld could not record its result: ${toErrorMessage$2(error)}`);
18727
+ return outcomeUnknown(effectiveRequest, `The provider Fork finished, but OpenMeld could not record its result: ${toErrorMessage$2(error)}`);
18637
18728
  }
18638
18729
  return result;
18639
18730
  }
@@ -18768,7 +18859,6 @@ function createDaemonStreamKeepalive(input) {
18768
18859
  clearPongDeadline();
18769
18860
  };
18770
18861
  const armPongDeadline = () => {
18771
- clearPongDeadline();
18772
18862
  pongDeadlineTimer = setTimeout(() => {
18773
18863
  pongDeadlineTimer = null;
18774
18864
  stop();
@@ -18782,6 +18872,7 @@ function createDaemonStreamKeepalive(input) {
18782
18872
  start() {
18783
18873
  stop();
18784
18874
  pingTimer = setInterval(() => {
18875
+ if (pongDeadlineTimer) return;
18785
18876
  let sent = false;
18786
18877
  try {
18787
18878
  sent = input.sendPing();
@@ -18891,6 +18982,7 @@ function createDispatchSpaceActionContext(input) {
18891
18982
  const contextPath = join(contextDir, "context.json");
18892
18983
  const actionRecordPath = join(contextDir, "action.json");
18893
18984
  const context = {
18985
+ ...input.workingCopyId ? { workingCopyId: input.workingCopyId } : {},
18894
18986
  version: DISPATCH_SPACE_ACTION_CONTEXT_VERSION,
18895
18987
  actionRecordPath,
18896
18988
  attemptId: input.attemptId,
@@ -19014,7 +19106,8 @@ function parseDispatchSpaceActionContext(value) {
19014
19106
  spaceContractSnapshot: parseSpaceContractSnapshot(record.spaceContractSnapshot),
19015
19107
  spaceId: requiredString(record.spaceId, "spaceId"),
19016
19108
  targetProfileId: requiredString(record.targetProfileId, "targetProfileId"),
19017
- taskId: requiredString(record.taskId, "taskId")
19109
+ taskId: requiredString(record.taskId, "taskId"),
19110
+ ...record.workingCopyId ? { workingCopyId: requiredString(record.workingCopyId, "workingCopyId") } : {}
19018
19111
  };
19019
19112
  }
19020
19113
  function assertDispatchRuntimeEnvMatchesContext(input) {
@@ -19634,6 +19727,673 @@ function normalizeOptionalText(value) {
19634
19727
  return normalized.length > 0 ? normalized : null;
19635
19728
  }
19636
19729
  //#endregion
19730
+ //#region src/organization-skills/cache.ts
19731
+ const CACHE_MARKER_FILENAME = ".openmeld-organization-skill.json";
19732
+ const DIRECTORY_READ_ONLY_MODE = 365;
19733
+ const FILE_READ_ONLY_MODE = 292;
19734
+ const PRIVATE_DIRECTORY_MODE = 448;
19735
+ const PRIVATE_FILE_MODE = 384;
19736
+ async function materializeOrganizationSkillRelease(input) {
19737
+ const bundle = organizationSkillBundleSchema.parse(input.bundle);
19738
+ if (sha256(stringifyOrganizationSkillBundleCanonicalJson(bundle)) !== input.digest) throw new Error("The Organization Skill release digest does not match its downloaded bundle.");
19739
+ const releaseDir = input.releaseDirectory ?? organizationSkillReleaseDir(input.organizationId, input.skillId, input.releaseId);
19740
+ const skillMarkdown = serializePortableSkillMarkdown(bundle);
19741
+ const expectedFiles = buildExpectedCacheFiles({
19742
+ bundle,
19743
+ marker: {
19744
+ digest: input.digest,
19745
+ organizationId: input.organizationId,
19746
+ releaseId: input.releaseId,
19747
+ schemaVersion: 1,
19748
+ skillId: input.skillId
19749
+ },
19750
+ skillMarkdown
19751
+ });
19752
+ if (await cacheMatches(releaseDir, expectedFiles)) return buildResult({
19753
+ bundle,
19754
+ releaseDir,
19755
+ reused: true
19756
+ });
19757
+ const skillDir = dirname(releaseDir);
19758
+ await mkdir(skillDir, {
19759
+ mode: PRIVATE_DIRECTORY_MODE,
19760
+ recursive: true
19761
+ });
19762
+ await chmod(skillDir, PRIVATE_DIRECTORY_MODE);
19763
+ const temporaryDir = await mkdtemp(join(skillDir, `.load-${randomUUID()}-`));
19764
+ try {
19765
+ await writeCacheFiles(temporaryDir, expectedFiles);
19766
+ await makeCacheReadOnly(temporaryDir, bundle);
19767
+ if (await pathExists$1(releaseDir)) throw new Error(`The existing Organization Skill cache is not valid. Remove "${releaseDir}" and run the load command again.`);
19768
+ await rename(temporaryDir, releaseDir);
19769
+ } catch (error) {
19770
+ await rm(temporaryDir, {
19771
+ force: true,
19772
+ recursive: true
19773
+ }).catch(() => {});
19774
+ throw error;
19775
+ }
19776
+ return buildResult({
19777
+ bundle,
19778
+ releaseDir,
19779
+ reused: false
19780
+ });
19781
+ }
19782
+ function serializePortableSkillMarkdown(bundle) {
19783
+ const portable = bundle.portable;
19784
+ return `${[
19785
+ "---",
19786
+ `name: ${toYamlString(portable.name)}`,
19787
+ `description: ${toYamlString(portable.description)}`,
19788
+ ...portable.license === null ? [] : [`license: ${toYamlString(portable.license)}`],
19789
+ ...portable.compatibility === null ? [] : [`compatibility: ${toYamlString(portable.compatibility)}`],
19790
+ ...portable.allowedTools === null ? [] : [`allowed-tools: ${toYamlString(portable.allowedTools)}`],
19791
+ ...serializeMetadata(portable.metadata),
19792
+ "---",
19793
+ ""
19794
+ ].join("\n")}${bundle.instructions}${bundle.instructions.endsWith("\n") ? "" : "\n"}`;
19795
+ }
19796
+ function buildExpectedCacheFiles(input) {
19797
+ const files = /* @__PURE__ */ new Map();
19798
+ files.set("SKILL.md", Buffer.from(input.skillMarkdown, "utf8"));
19799
+ for (const file of input.bundle.files) files.set(file.path, decodeSkillFile(file));
19800
+ files.set(CACHE_MARKER_FILENAME, Buffer.from(`${JSON.stringify(input.marker, null, 2)}\n`, "utf8"));
19801
+ return files;
19802
+ }
19803
+ async function writeCacheFiles(rootDir, files) {
19804
+ for (const [relativePath, bytes] of files) {
19805
+ const absolutePath = join(rootDir, relativePath);
19806
+ await mkdir(dirname(absolutePath), {
19807
+ mode: PRIVATE_DIRECTORY_MODE,
19808
+ recursive: true
19809
+ });
19810
+ await writeFile(absolutePath, bytes, { mode: PRIVATE_FILE_MODE });
19811
+ }
19812
+ }
19813
+ async function cacheMatches(rootDir, expectedFiles) {
19814
+ if (!await pathExists$1(rootDir)) return false;
19815
+ try {
19816
+ for (const [relativePath, expected] of expectedFiles) {
19817
+ let current = join(rootDir, relativePath);
19818
+ while (current !== dirname(rootDir)) {
19819
+ const info = await lstat(current);
19820
+ if (info.isSymbolicLink() || info.isFile() && info.nlink !== 1) return false;
19821
+ current = dirname(current);
19822
+ }
19823
+ if (!(await readFile(join(rootDir, relativePath))).equals(expected)) return false;
19824
+ }
19825
+ return true;
19826
+ } catch {
19827
+ return false;
19828
+ }
19829
+ }
19830
+ async function makeCacheReadOnly(rootDir, bundle) {
19831
+ const directories = /* @__PURE__ */ new Set([rootDir]);
19832
+ for (const relativePath of [
19833
+ "SKILL.md",
19834
+ CACHE_MARKER_FILENAME,
19835
+ ...bundle.files.map((file) => file.path)
19836
+ ]) {
19837
+ const absolutePath = join(rootDir, relativePath);
19838
+ await chmod(absolutePath, FILE_READ_ONLY_MODE);
19839
+ let current = dirname(absolutePath);
19840
+ while (current !== rootDir && current.startsWith(`${rootDir}/`)) {
19841
+ directories.add(current);
19842
+ current = dirname(current);
19843
+ }
19844
+ }
19845
+ const deepestFirst = [...directories].sort((left, right) => right.length - left.length);
19846
+ for (const directory of deepestFirst) await chmod(directory, DIRECTORY_READ_ONLY_MODE);
19847
+ }
19848
+ function buildResult(input) {
19849
+ return {
19850
+ cachePath: input.releaseDir,
19851
+ resourcePaths: input.bundle.files.map((file) => join(input.releaseDir, file.path)),
19852
+ reused: input.reused,
19853
+ skillMarkdownPath: join(input.releaseDir, "SKILL.md")
19854
+ };
19855
+ }
19856
+ function decodeSkillFile(file) {
19857
+ return Buffer.from(file.content, file.encoding === "base64" ? "base64" : "utf8");
19858
+ }
19859
+ function serializeMetadata(metadata) {
19860
+ const entries = Object.entries(metadata).sort(([left], [right]) => {
19861
+ if (left < right) return -1;
19862
+ if (left > right) return 1;
19863
+ return 0;
19864
+ });
19865
+ if (entries.length === 0) return [];
19866
+ return ["metadata:", ...entries.map(([key, value]) => ` ${toYamlString(key)}: ${toYamlString(value)}`)];
19867
+ }
19868
+ function toYamlString(value) {
19869
+ return JSON.stringify(value);
19870
+ }
19871
+ function sha256(value) {
19872
+ return createHash("sha256").update(value).digest("hex");
19873
+ }
19874
+ async function pathExists$1(path) {
19875
+ try {
19876
+ await stat(path);
19877
+ return true;
19878
+ } catch {
19879
+ return false;
19880
+ }
19881
+ }
19882
+ //#endregion
19883
+ //#region src/space/working-copy-download.ts
19884
+ /** Bound bytes while reading, rather than allocating an oversized response first. */
19885
+ async function downloadWorkingCopyFile(api, input) {
19886
+ const content = await api.streamFileContent({
19887
+ ...input,
19888
+ signal: AbortSignal.timeout(3e4)
19889
+ });
19890
+ const reader = content.bytes.getReader();
19891
+ const chunks = [];
19892
+ let size = 0;
19893
+ try {
19894
+ while (true) {
19895
+ const { value, done } = await reader.read();
19896
+ if (done) break;
19897
+ size += value.byteLength;
19898
+ if (size > 10485760) throw new Error("Handoff files must be 10 MiB or smaller.");
19899
+ chunks.push(value);
19900
+ }
19901
+ } finally {
19902
+ await reader.cancel();
19903
+ reader.releaseLock();
19904
+ }
19905
+ return {
19906
+ revision: content.revision,
19907
+ mimeType: content.mimeType,
19908
+ bytes: Buffer.concat(chunks)
19909
+ };
19910
+ }
19911
+ //#endregion
19912
+ //#region src/local-service/file-access/space-working-copy.ts
19913
+ const hash = (bytes) => createHash("sha256").update(bytes).digest("hex");
19914
+ const O_NOFOLLOW_ANY = 536870912;
19915
+ const CREATE_FLAGS = constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | O_NOFOLLOW_ANY;
19916
+ const READ_FLAGS = constants.O_RDONLY | O_NOFOLLOW_ANY | constants.O_NONBLOCK;
19917
+ const fileStateSchema = z.object({
19918
+ fileId: z.string(),
19919
+ relativePath: spaceWorkRelativePathSchema,
19920
+ revision: z.number().int().positive(),
19921
+ mimeType: z.string().optional(),
19922
+ sizeBytes: z.number().int().nonnegative().optional(),
19923
+ baseHash: z.string().optional(),
19924
+ conflict: z.object({
19925
+ digest: z.string(),
19926
+ mutationId: z.string().uuid(),
19927
+ incoming: z.object({
19928
+ revision: z.number().int().positive(),
19929
+ relativePath: spaceWorkRelativePathSchema,
19930
+ digest: z.string(),
19931
+ mimeType: z.string(),
19932
+ sizeBytes: z.number().int().nonnegative()
19933
+ }).optional()
19934
+ }).optional(),
19935
+ pending: z.object({
19936
+ mutationId: z.string().uuid(),
19937
+ digest: z.string(),
19938
+ baseRevision: z.number().int().positive()
19939
+ }).optional()
19940
+ });
19941
+ const stateSchema = z.object({
19942
+ schemaVersion: z.literal(1),
19943
+ copyId: z.string().uuid(),
19944
+ scope: z.string(),
19945
+ root: z.string(),
19946
+ rootDevice: z.number(),
19947
+ rootInode: z.number(),
19948
+ files: z.array(fileStateSchema).min(1).max(10)
19949
+ });
19950
+ /** Local receipts only. Every network operation still uses ordinary Space authorization. */
19951
+ function createSpaceWorkingCopies(input) {
19952
+ if (process.platform !== "darwin") throw new Error("Managed working copies are not supported on this platform yet. Use explicit file download and write commands.");
19953
+ const scope = hash(JSON.stringify({
19954
+ accountId: input.scope.accountId,
19955
+ organizationId: input.scope.organizationId,
19956
+ spaceId: input.scope.spaceId,
19957
+ profileId: input.scope.profileId,
19958
+ baseUrl: input.scope.baseUrl
19959
+ }));
19960
+ const directory = join(input.laneRoot, "space-working-copies", scope);
19961
+ const metadataPath = (id) => join(directory, `${z.string().uuid().parse(id)}.json`);
19962
+ async function save(state) {
19963
+ const path = metadataPath(state.copyId);
19964
+ const temporary = `${path}.${randomUUID()}.tmp`;
19965
+ await writeDurablePrivateFile(temporary, JSON.stringify(state));
19966
+ await rename(temporary, path);
19967
+ await createLedgerIo().syncPath(directory);
19968
+ }
19969
+ async function owned(id, run) {
19970
+ const lock = await acquireLock({
19971
+ openMeldProfileId: input.scope.profileId,
19972
+ key: `space-copy:${scope}:${id}`,
19973
+ pathResolution: { env: {
19974
+ ...process.env,
19975
+ OPENMELD_HOME: input.laneRoot
19976
+ } }
19977
+ });
19978
+ try {
19979
+ await input.assertCurrentIdentity();
19980
+ const state = stateSchema.parse(JSON.parse(await readFile(metadataPath(id), "utf8")));
19981
+ if (state.scope !== scope || state.copyId !== id) throw new Error("This working copy belongs to another account or Space.");
19982
+ await verifyRoot(state);
19983
+ return await run(state);
19984
+ } finally {
19985
+ await releaseLock(lock);
19986
+ }
19987
+ }
19988
+ async function prepareFiles(state) {
19989
+ let total = 0;
19990
+ for (const file of state.files) {
19991
+ if (file.baseHash) continue;
19992
+ await input.assertCurrentIdentity();
19993
+ const remote = await input.transport.read(file.fileId, file.revision);
19994
+ total += remote.bytes.byteLength;
19995
+ if (remote.revision !== file.revision || remote.bytes.byteLength > 10485760 || total > SPACE_WORK_MAX_BYTES) throw new Error("The selected files exceed transfer limits or do not match their revisions.");
19996
+ const path = await safePath(state, file.relativePath, true);
19997
+ const current = await localBytes(state, file.relativePath);
19998
+ if (current && hash(current) !== hash(remote.bytes)) throw new Error("Preparation found local changes. Keep this copy and prepare a new directory.");
19999
+ if (!current) {
20000
+ const handle = await open(path, CREATE_FLAGS, 384);
20001
+ try {
20002
+ await handle.writeFile(remote.bytes);
20003
+ await handle.sync();
20004
+ } finally {
20005
+ await handle.close();
20006
+ }
20007
+ }
20008
+ file.baseHash = hash(remote.bytes);
20009
+ file.mimeType = remote.mimeType;
20010
+ file.sizeBytes = remote.bytes.byteLength;
20011
+ await save(state);
20012
+ }
20013
+ return {
20014
+ copyId: state.copyId,
20015
+ root: state.root,
20016
+ ready: true
20017
+ };
20018
+ }
20019
+ async function submitPending(state, file) {
20020
+ if (file.conflict) throw new Error("Resolve the file conflict before saving. Use refresh to retrieve the shared version, merge your edits, then resolve with its file ID and revision.");
20021
+ if (!(file.pending && file.mimeType)) return;
20022
+ const pending = file.pending;
20023
+ const bytes = await readFile(join(directory, `${pending.mutationId}.bin`));
20024
+ if (hash(bytes) !== pending.digest) throw new Error("The pending upload snapshot is damaged. Local edits have been preserved.");
20025
+ await input.assertCurrentIdentity();
20026
+ const receipt = await input.transport.write({
20027
+ fileId: file.fileId,
20028
+ baseRevision: pending.baseRevision,
20029
+ bytes,
20030
+ mimeType: file.mimeType,
20031
+ clientMutationId: pending.mutationId
20032
+ }).catch(async (error) => {
20033
+ if (error instanceof OpenMeldApiClientHttpError && error.status === 409 && (error.code === "space_file.conflict" || error.upstreamCode === "space_file.conflict")) {
20034
+ file.conflict = {
20035
+ digest: pending.digest,
20036
+ mutationId: pending.mutationId
20037
+ };
20038
+ file.pending = void 0;
20039
+ await save(state);
20040
+ }
20041
+ throw error;
20042
+ });
20043
+ if (receipt.id !== file.fileId || receipt.latestRevision.sizeBytes !== bytes.byteLength) throw new Error("The file receipt does not match the pending write.");
20044
+ file.revision = receipt.latestRevision.revision;
20045
+ file.baseHash = pending.digest;
20046
+ file.sizeBytes = bytes.byteLength;
20047
+ file.pending = void 0;
20048
+ await save(state);
20049
+ await unlink(join(directory, `${pending.mutationId}.bin`));
20050
+ }
20051
+ return {
20052
+ async prepare(selection, root, copyId = randomUUID()) {
20053
+ const validated = spaceWorkSelectionSchema.parse(selection);
20054
+ await input.assertCurrentIdentity();
20055
+ await mkdir(directory, {
20056
+ recursive: true,
20057
+ mode: 448
20058
+ });
20059
+ const canonicalRoot = join(await realpath(dirname(resolve(root))), basename(resolve(root)));
20060
+ await mkdir(canonicalRoot, { mode: 448 });
20061
+ const identity = await lstat(canonicalRoot);
20062
+ const state = {
20063
+ schemaVersion: 1,
20064
+ copyId: z.uuid().parse(copyId),
20065
+ scope,
20066
+ root: canonicalRoot,
20067
+ rootDevice: identity.dev,
20068
+ rootInode: identity.ino,
20069
+ files: validated.files
20070
+ };
20071
+ await save(state);
20072
+ try {
20073
+ return await owned(state.copyId, prepareFiles);
20074
+ } catch (error) {
20075
+ throw new Error(`Working copy ${state.copyId} is incomplete. Resume preparation with this copy ID; its files are preserved.`, { cause: error });
20076
+ }
20077
+ },
20078
+ resume: (copyId) => owned(copyId, prepareFiles),
20079
+ status: (copyId) => owned(copyId, async (state) => ({
20080
+ copyId,
20081
+ root: state.root,
20082
+ files: await Promise.all(state.files.map(async (file) => {
20083
+ const bytes = file.baseHash ? await localBytes(state, file.relativePath) : null;
20084
+ return {
20085
+ fileId: file.fileId,
20086
+ relativePath: file.relativePath,
20087
+ revision: file.revision,
20088
+ status: localStatus(file, bytes),
20089
+ ...file.conflict?.incoming ? {
20090
+ incomingRevision: file.conflict.incoming.revision,
20091
+ incomingPath: file.conflict.incoming.relativePath
20092
+ } : {}
20093
+ };
20094
+ }))
20095
+ })),
20096
+ commit: (copyId) => owned(copyId, async (state) => {
20097
+ if (state.files.some((file) => !(file.baseHash && file.mimeType))) throw new Error("Finish preparing all selected files before committing.");
20098
+ for (const file of state.files) await submitPending(state, file);
20099
+ for (const file of state.files) {
20100
+ const bytes = await localBytes(state, file.relativePath);
20101
+ if (!bytes) throw new Error("A selected local file is missing. Missing files do not delete shared files.");
20102
+ if (hash(bytes) === file.baseHash) continue;
20103
+ const mutationId = randomUUID();
20104
+ await writeDurablePrivateFile(join(directory, `${mutationId}.bin`), bytes);
20105
+ file.pending = {
20106
+ mutationId,
20107
+ digest: hash(bytes),
20108
+ baseRevision: file.revision
20109
+ };
20110
+ await save(state);
20111
+ await submitPending(state, file);
20112
+ }
20113
+ return {
20114
+ copyId,
20115
+ references: await Promise.all(state.files.map(async (file) => {
20116
+ await input.assertCurrentIdentity();
20117
+ const current = await input.transport.get(file.fileId);
20118
+ return {
20119
+ fileId: file.fileId,
20120
+ revision: file.revision,
20121
+ name: current.name,
20122
+ mimeType: z.string().parse(file.mimeType),
20123
+ sizeBytes: z.number().int().nonnegative().parse(file.sizeBytes)
20124
+ };
20125
+ })),
20126
+ files: state.files.map(({ fileId, relativePath, revision }) => ({
20127
+ fileId,
20128
+ relativePath,
20129
+ revision
20130
+ }))
20131
+ };
20132
+ }),
20133
+ reconcile: (copyId) => owned(copyId, async (state) => {
20134
+ for (const file of state.files) await submitPending(state, file);
20135
+ return {
20136
+ copyId,
20137
+ reconciled: true
20138
+ };
20139
+ }),
20140
+ refresh: (copyId) => owned(copyId, async (state) => {
20141
+ for (const file of state.files) {
20142
+ if (!file.conflict || file.conflict.incoming) continue;
20143
+ await input.assertCurrentIdentity();
20144
+ const revision = (await input.transport.get(file.fileId)).latestRevision.revision;
20145
+ const remote = await input.transport.read(file.fileId, revision);
20146
+ if (remote.revision !== revision || remote.bytes.byteLength > 10485760) throw new Error("The incoming file does not match its revision or exceeds transfer limits.");
20147
+ const relativePath = `.openmeld-incoming-${randomUUID()}`;
20148
+ const handle = await open(await safePath(state, relativePath), CREATE_FLAGS, 384);
20149
+ try {
20150
+ await handle.writeFile(remote.bytes);
20151
+ await handle.sync();
20152
+ } finally {
20153
+ await handle.close();
20154
+ }
20155
+ file.conflict.incoming = {
20156
+ revision,
20157
+ relativePath,
20158
+ digest: hash(remote.bytes),
20159
+ mimeType: remote.mimeType,
20160
+ sizeBytes: remote.bytes.byteLength
20161
+ };
20162
+ await save(state);
20163
+ }
20164
+ return {
20165
+ copyId,
20166
+ refreshed: true
20167
+ };
20168
+ }),
20169
+ resolve: (copyId, fileId, revision) => owned(copyId, async (state) => {
20170
+ const file = state.files.find((entry) => entry.fileId === fileId);
20171
+ const conflict = file?.conflict;
20172
+ const incoming = conflict?.incoming;
20173
+ if (!(file && incoming) || incoming.revision !== revision) throw new Error("Refresh this conflicted file and explicitly select the downloaded incoming revision.");
20174
+ const bytes = await localBytes(state, file.relativePath);
20175
+ const digest = bytes ? hash(bytes) : null;
20176
+ if (!digest || digest === conflict.digest && digest !== incoming.digest) throw new Error("Merge the incoming version into the working file before resolving. The rejected edit cannot be resubmitted against a newer base unchanged.");
20177
+ file.revision = revision;
20178
+ file.baseHash = incoming.digest;
20179
+ file.mimeType = incoming.mimeType;
20180
+ file.sizeBytes = incoming.sizeBytes;
20181
+ file.conflict = void 0;
20182
+ await save(state);
20183
+ return {
20184
+ copyId,
20185
+ resolved: true
20186
+ };
20187
+ }),
20188
+ incoming: (copyId, root) => owned(copyId, async (state) => {
20189
+ const files = [];
20190
+ for (const file of state.files) {
20191
+ await input.assertCurrentIdentity();
20192
+ const current = await input.transport.get(file.fileId);
20193
+ files.push({
20194
+ fileId: file.fileId,
20195
+ relativePath: file.relativePath,
20196
+ revision: current.latestRevision.revision
20197
+ });
20198
+ }
20199
+ return await createSpaceWorkingCopies(input).prepare({
20200
+ schemaVersion: 1,
20201
+ files
20202
+ }, root);
20203
+ })
20204
+ };
20205
+ }
20206
+ async function writeDurablePrivateFile(path, data) {
20207
+ const file = await open(path, "wx", 384);
20208
+ try {
20209
+ await file.writeFile(data);
20210
+ await file.sync();
20211
+ } finally {
20212
+ await file.close();
20213
+ }
20214
+ }
20215
+ async function verifyRoot(state) {
20216
+ const root = await lstat(state.root);
20217
+ if (!root.isDirectory() || root.isSymbolicLink() || root.dev !== state.rootDevice || root.ino !== state.rootInode || await realpath(state.root) !== state.root) throw new Error("The working directory changed. No files were submitted.");
20218
+ }
20219
+ async function safePath(state, relativePath, createParents = false) {
20220
+ await verifyRoot(state);
20221
+ const segments = spaceWorkRelativePathSchema.parse(relativePath).split("/");
20222
+ let parent = state.root;
20223
+ for (const segment of segments.slice(0, -1)) {
20224
+ parent = join(parent, segment);
20225
+ if (createParents) try {
20226
+ await mkdir(parent, { mode: 448 });
20227
+ } catch (error) {
20228
+ if (error.code !== "EEXIST") throw error;
20229
+ }
20230
+ const stat = await lstat(parent);
20231
+ if (!stat.isDirectory() || stat.isSymbolicLink() || await realpath(parent) !== parent) throw new Error("A working file path crosses a symbolic link or changed directory.");
20232
+ }
20233
+ return join(parent, segments.at(-1) ?? "");
20234
+ }
20235
+ async function localBytes(state, relativePath) {
20236
+ const path = await safePath(state, relativePath);
20237
+ let handle;
20238
+ try {
20239
+ handle = await open(path, READ_FLAGS);
20240
+ } catch (error) {
20241
+ if (error.code === "ENOENT") return null;
20242
+ throw error;
20243
+ }
20244
+ try {
20245
+ const stat = await handle.stat();
20246
+ if (!stat.isFile() || stat.nlink !== 1 || stat.size > 10485760) throw new Error("Select a regular file up to 10 MiB without hard links.");
20247
+ const bytes = Buffer.alloc(stat.size);
20248
+ let offset = 0;
20249
+ while (offset < bytes.length) {
20250
+ const result = await handle.read(bytes, offset, bytes.length - offset, offset);
20251
+ if (result.bytesRead === 0) throw new Error("The local file changed while it was being read. Retry the save.");
20252
+ offset += result.bytesRead;
20253
+ }
20254
+ const after = await handle.stat();
20255
+ if (after.size !== stat.size || after.mtimeMs !== stat.mtimeMs || after.ctimeMs !== stat.ctimeMs) throw new Error("The local file changed while it was being read. Retry the save.");
20256
+ await verifyRoot(state);
20257
+ return bytes;
20258
+ } finally {
20259
+ await handle.close();
20260
+ }
20261
+ }
20262
+ function localStatus(file, bytes) {
20263
+ if (file.conflict) return "conflict";
20264
+ if (file.pending) return "pending";
20265
+ if (!file.baseHash) return "preparing";
20266
+ if (!bytes) return "missing";
20267
+ return hash(bytes) === file.baseHash ? "clean" : "changed";
20268
+ }
20269
+ //#endregion
20270
+ //#region src/local-service/file-access/dispatch-work-handoff.ts
20271
+ /** The admitted Service prepares inputs; no login state is copied into the workspace. */
20272
+ async function prepareDispatchWorkHandoff(input) {
20273
+ const { task } = input;
20274
+ if (!task.workHandoff) return input.workingDirectory;
20275
+ if (!task.executionContext || task.executionContext.access !== "space_context" || task.agentControllerRef !== "builtin:codex" || task.transportMode !== "codex-app-server") throw new Error("Selected-file handoffs require a new Space-only context on Codex App Server. This controller cannot enforce that boundary.");
20276
+ const organizationId = task.executionContext.scope.organizationId;
20277
+ const baseUrl = await resolveBaseUrl();
20278
+ const laneRoot = resolveOpenMeldRootDir();
20279
+ const assertCurrentIdentity = async () => {
20280
+ const auth = await getAuthSessionState({ validateRemote: false });
20281
+ if (auth.session?.user?.id !== input.ownerUserId || auth.session?.activeOrganization?.id !== organizationId) throw new Error("The account or Organization changed before handoff preparation.");
20282
+ };
20283
+ await assertCurrentIdentity();
20284
+ const requestContext = buildOpenMeldRequestContextFromProfileIdentity({ profileIdentity: {
20285
+ openMeldProfileId: task.targetProfileId,
20286
+ profileKind: "agent",
20287
+ ownerUserId: input.ownerUserId,
20288
+ profileName: task.targetProfileName ?? task.targetProfileId
20289
+ } });
20290
+ const foundation = createCliApiClientFoundation(baseUrl, {
20291
+ expectedOwnerUserId: input.ownerUserId,
20292
+ organizationId
20293
+ });
20294
+ const api = createSpaceApi(foundation);
20295
+ const common = {
20296
+ spaceId: task.spaceId,
20297
+ requestContext,
20298
+ ...task.spacePassword ? { spacePassword: task.spacePassword } : {}
20299
+ };
20300
+ const copies = createSpaceWorkingCopies({
20301
+ laneRoot,
20302
+ scope: {
20303
+ accountId: input.ownerUserId,
20304
+ organizationId,
20305
+ spaceId: task.spaceId,
20306
+ profileId: task.targetProfileId,
20307
+ baseUrl
20308
+ },
20309
+ assertCurrentIdentity,
20310
+ transport: {
20311
+ read: (fileId, revision) => downloadWorkingCopyFile(api, {
20312
+ ...common,
20313
+ fileId,
20314
+ revision
20315
+ }),
20316
+ get: async (fileId) => (await api.getFile({
20317
+ ...common,
20318
+ fileId
20319
+ })).file,
20320
+ write: async (write) => await api.updateFileContent({
20321
+ ...common,
20322
+ ...write
20323
+ })
20324
+ }
20325
+ });
20326
+ const key = createHash("sha256").update(JSON.stringify([
20327
+ baseUrl,
20328
+ input.ownerUserId,
20329
+ organizationId,
20330
+ task.spaceId,
20331
+ task.targetProfileId,
20332
+ task.taskId
20333
+ ])).digest("hex");
20334
+ const records = join(laneRoot, "space-work-dispatches");
20335
+ await mkdir(records, {
20336
+ recursive: true,
20337
+ mode: 448
20338
+ });
20339
+ const recordPath = join(records, `${key}.json`);
20340
+ let copyId;
20341
+ let root;
20342
+ const stored = await readFile(recordPath, "utf8").catch((error) => {
20343
+ if (error.code === "ENOENT") return null;
20344
+ throw error;
20345
+ });
20346
+ if (stored) {
20347
+ const record = JSON.parse(stored);
20348
+ copyId = record.copyId;
20349
+ root = (await copies.resume(copyId)).root;
20350
+ if (root !== record.root || root !== join(input.workingDirectory, `handoff-${copyId}`)) throw new Error("The handoff workspace identity changed.");
20351
+ } else {
20352
+ copyId = randomUUID();
20353
+ root = join(input.workingDirectory, `handoff-${copyId}`);
20354
+ await copies.prepare(spaceWorkSelectionSchema.parse({
20355
+ schemaVersion: 1,
20356
+ files: task.workHandoff.files
20357
+ }), root, copyId);
20358
+ await writeFile(recordPath, JSON.stringify({
20359
+ copyId,
20360
+ root
20361
+ }), {
20362
+ flag: "wx",
20363
+ mode: 384
20364
+ });
20365
+ }
20366
+ const skillsRoot = join(root, ".openmeld-skills");
20367
+ if (task.workHandoff.skills.length) {
20368
+ await mkdir(skillsRoot, {
20369
+ recursive: true,
20370
+ mode: 448
20371
+ });
20372
+ if ((await lstat(skillsRoot)).isSymbolicLink()) throw new Error("The Skill directory was replaced by a symbolic link.");
20373
+ }
20374
+ const skills = createOrganizationSkillsApi(foundation);
20375
+ for (const [index, selected] of task.workHandoff.skills.entries()) {
20376
+ await assertCurrentIdentity();
20377
+ const result = await skills.get({
20378
+ ...selected,
20379
+ requestContext
20380
+ });
20381
+ const release = result.selectedRelease;
20382
+ if (!release || result.skill.organizationId !== organizationId || !result.skill.enabled || release.releaseId !== selected.releaseId || release.digest !== selected.digest || release.bundle.portable.name !== selected.name) throw new Error("The selected Skill release is unavailable or changed. No latest-version fallback is allowed.");
20383
+ await materializeOrganizationSkillRelease({
20384
+ ...selected,
20385
+ organizationId,
20386
+ bundle: release.bundle,
20387
+ releaseDirectory: join(skillsRoot, String(index))
20388
+ });
20389
+ }
20390
+ await assertCurrentIdentity();
20391
+ await copies.status(copyId);
20392
+ task.workingCopyId = copyId;
20393
+ task.prompt += "\n\nThe selected inputs are prepared in your working directory. Selected Skills (including resources) are in .openmeld-skills/<selection index>/SKILL.md. Use the working_copy tool to check, commit or reconcile your edits; it does not complete this Wake. Attach the exact saved file references with the reply tool when delivering results.";
20394
+ return root;
20395
+ }
20396
+ //#endregion
19637
20397
  //#region src/space/cli-space-api.ts
19638
20398
  function createCliSpaceApi(baseUrl, options = {}) {
19639
20399
  return createSpaceApi(createCliApiClientFoundation(baseUrl, options));
@@ -21309,10 +22069,7 @@ function executionContextResourceScope(context) {
21309
22069
  return context.access === "workspace" ? "exclusive" : "read_only";
21310
22070
  }
21311
22071
  function executionContextFileAccessBoundary(input) {
21312
- const within = (child, parent) => {
21313
- const path = relative(parent, child);
21314
- return path === "" || path !== ".." && !path.startsWith("../") && !isAbsolute(path);
21315
- };
22072
+ const within = isSameOrDescendantPath;
21316
22073
  const policy = input.policy;
21317
22074
  if (input.context.access !== "space_context") {
21318
22075
  const policySource = input.taskWorkspace?.sourceWorkingDirectory ?? input.workingDirectory;
@@ -21321,10 +22078,11 @@ function executionContextFileAccessBoundary(input) {
21321
22078
  }
21322
22079
  return {
21323
22080
  mode: "only_selected_folders",
21324
- folders: [input.taskWorkspace?.boundaryRoot ?? input.workingDirectory],
22081
+ folders: [input.context.access === "space_context" && input.workingCopyId ? input.workingDirectory : input.taskWorkspace?.boundaryRoot ?? input.workingDirectory],
21325
22082
  revision: policy.revision,
21326
22083
  updatedAtMs: policy.updatedAtMs,
21327
- executionContextAccess: input.context.access
22084
+ executionContextAccess: input.context.access,
22085
+ ...input.context.access === "space_context" && input.workingCopyId ? { workingCopyId: input.workingCopyId } : {}
21328
22086
  };
21329
22087
  }
21330
22088
  async function executionContextWorkingDirectory(input) {
@@ -21368,13 +22126,24 @@ async function prepareExecutionContextConversation(input) {
21368
22126
  kind: "execution_context",
21369
22127
  operationId: input.context.id,
21370
22128
  sourceNativeSessionId: source.nativeConversationId,
21371
- completedHistoryId: source.completedHistoryId,
22129
+ ...source.completedHistoryId ? { completedHistoryId: source.completedHistoryId } : {},
21372
22130
  workingDirectory: input.workingDirectory
21373
22131
  },
21374
- execute: async () => {
22132
+ resolveCompletedHistoryId: async () => {
22133
+ if (input.agentControllerRef === "builtin:codex" && input.launchContract) return (await resolveCodexAppServerCompletedTurn({
22134
+ codexTimeoutMs: 3e4,
22135
+ codexWorkdir: sourceDirectory,
22136
+ launchContract: input.launchContract,
22137
+ threadId: source.nativeConversationId
22138
+ })).completedTurnId;
22139
+ throw new Error("execution_context.fork_checkpoint_unavailable");
22140
+ },
22141
+ execute: async (forkInput) => {
22142
+ const completedHistoryId = forkInput?.completedHistoryId;
22143
+ if (!completedHistoryId) throw new Error("execution_context.fork_checkpoint_unavailable");
21375
22144
  if (input.agentControllerRef === "builtin:claude-code") {
21376
- if (!(await readBoundedClaudeHistory(source.nativeConversationId)).find((message) => message.uuid === source.completedHistoryId && isCompletedAssistantMessage(message))) throw new Error("execution_context.fork_checkpoint_unavailable");
21377
- return { childNativeSessionId: (await forkSession(source.nativeConversationId, { upToMessageId: source.completedHistoryId })).sessionId };
22145
+ if (!(await readBoundedClaudeHistory(source.nativeConversationId)).find((message) => message.uuid === completedHistoryId && isCompletedAssistantMessage(message))) throw new Error("execution_context.fork_checkpoint_unavailable");
22146
+ return { childNativeSessionId: (await forkSession(source.nativeConversationId, { upToMessageId: completedHistoryId })).sessionId };
21378
22147
  }
21379
22148
  if (input.agentControllerRef === "builtin:codex" && input.launchContract) return { childNativeSessionId: (await forkCodexAppServerThread({
21380
22149
  computerFileAccessBoundary: input.computerFileAccessBoundary ?? void 0,
@@ -21382,7 +22151,7 @@ async function prepareExecutionContextConversation(input) {
21382
22151
  codexWorkdir: sourceDirectory,
21383
22152
  launchContract: input.launchContract,
21384
22153
  sourceThreadId: source.nativeConversationId,
21385
- sourceCompletedTurnId: source.completedHistoryId,
22154
+ sourceCompletedTurnId: completedHistoryId,
21386
22155
  targetWorkingDirectory: input.workingDirectory,
21387
22156
  onRuntimeEvent: input.onRuntimeEvent,
21388
22157
  env: { OPENMELD_PROCESS_SUPERVISION_ID: input.processSupervisionId }
@@ -22284,7 +23053,11 @@ async function handleDispatchDeliverFrame(input) {
22284
23053
  currentWorkingDirectory: originalWorkingDirectory,
22285
23054
  computerFileAccessStorePath: input.computerFileAccessStorePath
22286
23055
  });
22287
- effectiveRuntimeContext = { providerRuntimeWorkingDirectory: taskWorkspace.workingDirectory };
23056
+ effectiveRuntimeContext = { providerRuntimeWorkingDirectory: await prepareDispatchWorkHandoff({
23057
+ task: parsedTask,
23058
+ ownerUserId: input.profileOwnerUserId,
23059
+ workingDirectory: taskWorkspace.workingDirectory
23060
+ }) };
22288
23061
  runtimePreparation.effectiveRuntimeContext = effectiveRuntimeContext;
22289
23062
  computerFileAccessBoundary = await resolveDispatchComputerFileAccess({
22290
23063
  computerFileAccessStorePath: input.computerFileAccessStorePath,
@@ -23602,7 +24375,8 @@ async function resolveDispatchComputerFileAccess(input) {
23602
24375
  context,
23603
24376
  workingDirectory,
23604
24377
  policy,
23605
- taskWorkspace: input.taskWorkspace
24378
+ taskWorkspace: input.taskWorkspace,
24379
+ workingCopyId: input.parsedTask.workingCopyId
23606
24380
  });
23607
24381
  if (!(await verifier({
23608
24382
  boundary,
@@ -23649,6 +24423,7 @@ async function resolveDispatchComputerFileAccess(input) {
23649
24423
  }
23650
24424
  function createDispatchSpaceActionRuntimeContext(input) {
23651
24425
  const contextResult = createDispatchSpaceActionContext({
24426
+ workingCopyId: input.parsedTask.workingCopyId,
23652
24427
  attemptId: input.parsedTask.attemptId,
23653
24428
  dispatchId: input.parsedTask.dispatchId,
23654
24429
  env: process.env,
@@ -27613,25 +28388,55 @@ async function runDaemonSocketSession(input) {
27613
28388
  reason: "register_conflict",
27614
28389
  scheduleReason: "register_conflict"
27615
28390
  });
27616
- else {
27617
- const bootstrapPlan = resolveBootstrapCatalogSyncPlan({
27618
- isRouteCatalogResolved: input.isRouteCatalogResolved?.() ?? true,
27619
- syncIntervalMs: resolveCatalogSyncIntervalMs({ heartbeatIntervalMs: currentHeartbeatIntervalMs })
27620
- });
27621
- if (bootstrapPlan.persistCache) await persistAcceptedRouteCatalogCache();
27622
- scheduleCatalogSyncNext(bootstrapPlan.nextSyncDelayMs);
28391
+ const bootstrap = await completeRegisteredSessionBootstrap({
28392
+ heartbeatIntervalMs: currentHeartbeatIntervalMs,
28393
+ isRouteCatalogResolved: input.isRouteCatalogResolved?.() ?? true,
28394
+ persistAcceptedRouteCatalogCache,
28395
+ registerRejected: registerResponse.rejectedProfiles.length > 0,
28396
+ scheduleCatalogSyncNext,
28397
+ shutdownRequested: input.shutdownRequested
28398
+ });
28399
+ const bootstrapShutdownStopCause = bootstrap.shutdownStopCause;
28400
+ if (!bootstrapShutdownStopCause) {
28401
+ latestCatalogSyncSignalMarker = resolveCatalogSyncSignalMarker(bootstrap.initialCatalogSyncSignal);
28402
+ scheduleCatalogSyncSignalPoll();
28403
+ await sendHeartbeat();
28404
+ keepalive.start();
27623
28405
  }
27624
- latestCatalogSyncSignalMarker = resolveCatalogSyncSignalMarker(await readDaemonCatalogSyncSignal().catch(() => null));
27625
- scheduleCatalogSyncSignalPoll();
27626
- await sendHeartbeat();
27627
- keepalive.start();
27628
28406
  async function finishControlledShutdown(stopCause) {
27629
28407
  localExecutionSlots.beginDrain();
27630
28408
  acceptingDispatches = false;
27631
28409
  shutdownStopCause = stopCause;
27632
28410
  clearHeartbeatTimer();
28411
+ emitRunLine({
28412
+ presenter: input.presenter,
28413
+ code: "daemon.run.controlled_shutdown_started",
28414
+ text: "controlled shutdown was admitted; waiting for the active heartbeat to settle",
28415
+ payload: {
28416
+ daemonSessionId: input.daemonSessionId,
28417
+ stopCause: shutdownStopCause
28418
+ }
28419
+ });
27633
28420
  await waitForHeartbeatIdle();
28421
+ emitRunLine({
28422
+ presenter: input.presenter,
28423
+ code: "daemon.run.controlled_shutdown_inflight_heartbeat_completed",
28424
+ text: "controlled shutdown finished waiting for the active heartbeat",
28425
+ payload: {
28426
+ daemonSessionId: input.daemonSessionId,
28427
+ stopCause: shutdownStopCause
28428
+ }
28429
+ });
27634
28430
  await sendHeartbeat();
28431
+ emitRunLine({
28432
+ presenter: input.presenter,
28433
+ code: "daemon.run.controlled_shutdown_final_heartbeat_completed",
28434
+ text: "controlled shutdown completed its final heartbeat",
28435
+ payload: {
28436
+ daemonSessionId: input.daemonSessionId,
28437
+ stopCause: shutdownStopCause
28438
+ }
28439
+ });
27635
28440
  const drainState = localExecutionSlots.getDrainState();
27636
28441
  emitRunLine({
27637
28442
  presenter: input.presenter,
@@ -27702,7 +28507,10 @@ async function runDaemonSocketSession(input) {
27702
28507
  }
27703
28508
  return true;
27704
28509
  }
27705
- const sessionExit = await Promise.race([waitForClose.then(() => ({ kind: "socket_closed" })), input.shutdownRequested?.then((stopCause) => ({
28510
+ const sessionExit = bootstrapShutdownStopCause ? {
28511
+ kind: "shutdown_requested",
28512
+ stopCause: bootstrapShutdownStopCause
28513
+ } : await Promise.race([waitForClose.then(() => ({ kind: "socket_closed" })), input.shutdownRequested?.then((stopCause) => ({
27706
28514
  kind: "shutdown_requested",
27707
28515
  stopCause
27708
28516
  })) ?? new Promise(() => void 0)]);
@@ -27759,6 +28567,50 @@ async function withDaemonRunTimeout(input) {
27759
28567
  if (timeout) clearTimeout(timeout);
27760
28568
  }
27761
28569
  }
28570
+ async function completeRegisteredSessionBootstrap(input) {
28571
+ if (!input.registerRejected) {
28572
+ const bootstrapPlan = resolveBootstrapCatalogSyncPlan({
28573
+ isRouteCatalogResolved: input.isRouteCatalogResolved,
28574
+ syncIntervalMs: resolveCatalogSyncIntervalMs({ heartbeatIntervalMs: input.heartbeatIntervalMs })
28575
+ });
28576
+ if (bootstrapPlan.persistCache) {
28577
+ const persistence = await awaitOperationOrShutdown({
28578
+ operation: input.persistAcceptedRouteCatalogCache(),
28579
+ shutdownRequested: input.shutdownRequested
28580
+ });
28581
+ if (persistence.kind === "shutdown_requested") return {
28582
+ initialCatalogSyncSignal: null,
28583
+ shutdownStopCause: persistence.stopCause
28584
+ };
28585
+ }
28586
+ input.scheduleCatalogSyncNext(bootstrapPlan.nextSyncDelayMs);
28587
+ }
28588
+ const catalogSignal = await awaitOperationOrShutdown({
28589
+ operation: readDaemonCatalogSyncSignal().catch(() => null),
28590
+ shutdownRequested: input.shutdownRequested
28591
+ });
28592
+ if (catalogSignal.kind === "shutdown_requested") return {
28593
+ initialCatalogSyncSignal: null,
28594
+ shutdownStopCause: catalogSignal.stopCause
28595
+ };
28596
+ return {
28597
+ initialCatalogSyncSignal: catalogSignal.value,
28598
+ shutdownStopCause: null
28599
+ };
28600
+ }
28601
+ async function awaitOperationOrShutdown(input) {
28602
+ if (!input.shutdownRequested) return {
28603
+ kind: "completed",
28604
+ value: await input.operation
28605
+ };
28606
+ return await Promise.race([input.operation.then((value) => ({
28607
+ kind: "completed",
28608
+ value
28609
+ })), input.shutdownRequested.then((stopCause) => ({
28610
+ kind: "shutdown_requested",
28611
+ stopCause
28612
+ }))]);
28613
+ }
27762
28614
  async function waitForPromiseDeadline(input) {
27763
28615
  let timeout = null;
27764
28616
  try {
@@ -28301,6 +29153,7 @@ function createStopAwareDelay() {
28301
29153
  //#region src/local-service/carrier/service-runner.ts
28302
29154
  function buildLocalServiceCapabilityHeaders(input) {
28303
29155
  return {
29156
+ ...process.platform === "darwin" ? { [SPACE_WORK_HANDOFF_CAPABILITY_HEADER]: "1" } : {},
28304
29157
  [OPENMELD_REASONING_STREAM_HEADER]: "1",
28305
29158
  ...input.localFolderPickerAvailable ? { [OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER]: LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY } : {},
28306
29159
  [OPENMELD_RUNTIME_CAPABILITIES_HEADER]: COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY
@@ -28708,8 +29561,19 @@ const runAccountBoundDaemonServiceLoop = async (input) => {
28708
29561
  let requestAgentActivitySync = null;
28709
29562
  const controlPlaneServer = await startLocalDaemonControlPlaneServer({
28710
29563
  resolveExpectedToken: async () => await ensureDaemonControlPlaneToken(),
29564
+ onRequestPhase: (event) => {
29565
+ emitRunLine({
29566
+ presenter: input.presenter,
29567
+ code: `daemon.control.request_${event.phase}`,
29568
+ text: `local Service control request ${event.phase.replaceAll("_", " ")}`,
29569
+ payload: {
29570
+ ...event.command ? { command: event.command } : {},
29571
+ ...event.requestId ? { requestId: event.requestId } : {}
29572
+ }
29573
+ });
29574
+ },
28711
29575
  getContext: async () => ({
28712
- accountCheckedServiceControl: process.platform !== "win32",
29576
+ accountCheckedServiceControl: isPreciseProcessStartIdentity(CURRENT_PROCESS_START_IDENTITY),
28713
29577
  healthPayload: {
28714
29578
  checkedAt: nowIsoString(),
28715
29579
  ...toHealthProjection(stopRequested ? {
@@ -28764,17 +29628,27 @@ const runAccountBoundDaemonServiceLoop = async (input) => {
28764
29628
  requestActiveRouteCatalogSync
28765
29629
  });
28766
29630
  },
28767
- shutdownHandler: async (payload) => {
29631
+ shutdownHandler: async (payload, lifecycle) => {
28768
29632
  const admissionId = payload.accountAdmissionId;
28769
29633
  return await controlledShutdown.request({
28770
29634
  ...payload,
28771
- ...admissionId ? { onAdmission: async (commit) => await admitServiceAccountStop({
28772
- id: admissionId,
28773
- ownerUserId,
28774
- deviceId,
28775
- contractGeneration: daemonServiceContract?.generation ?? 0,
28776
- commit
28777
- }) } : {}
29635
+ onAdmission: async (commit) => {
29636
+ const commitAndReportAdmission = () => {
29637
+ commit();
29638
+ lifecycle?.onAdmitted();
29639
+ };
29640
+ if (admissionId) {
29641
+ await admitServiceAccountStop({
29642
+ id: admissionId,
29643
+ ownerUserId,
29644
+ deviceId,
29645
+ contractGeneration: daemonServiceContract?.generation ?? 0,
29646
+ commit: commitAndReportAdmission
29647
+ });
29648
+ return;
29649
+ }
29650
+ commitAndReportAdmission();
29651
+ }
28778
29652
  });
28779
29653
  },
28780
29654
  serviceUpdateReadinessHandler: () => {
@@ -36867,6 +37741,6 @@ function parseDaemonRunMode(rawMode) {
36867
37741
  return DEFAULT_DAEMON_RUN_MODE;
36868
37742
  }
36869
37743
  //#endregion
36870
- export { readDispatchOwnedRuntimeGuard as $, runInteractivePrompt as $n, isTargetPickerState as $t, buildDaemonStartNeedsAttentionCard as A, AGENT_ACTIVITY_INTEGRATION_OWNER as An, writeSpaceCacheDeletionNoticeState as At, resolveDaemonServiceParticipationStatus as B, runAuthLogout as Bn, buildSpaceMentionProfileIndex as Bt, buildProfileWorkspaceRows as C, removeProjectOutbox as Cn, readSpaceLastSeenTs as Ct, createDelayedSpinner as D, registerAgentActivityRoute as Dn, toSpaceConfigListIntegrityError as Dt, emitDaemonAgentOverview as E, isAgentActivityRouteRegistered as En, toLocalSpaceStateIntegrityError as Et, emitCliJsonEnvelope as F, uninstallAgentActivityIntegrations as Fn, buildPublicSpaceEntryUrl as Ft, parseSpaceMetaPayload as G, buildAuthStatusSnapshot as Gn, closeMentionPickerState as Gt, createCliSpaceApi as H, runAuthStatus as Hn, buildSpaceProfileAddPlan as Ht, runDaemonStartupPreflight as I, buildCommandAuthenticationPromptMessage as In, buildSignalIndex as It, readGatewayJsonResponse as J, renderInfoCard as Jn, createSpaceTargetCatalog as Jt, parseSpaceMetaResponse as K, formatActiveOrganizationLabel as Kn, collectResolvedSpaceMentions as Kt, readDaemonIncidentLogTail as L, ensureCommandAuthenticationOrCancel as Ln, buildSignalMessageReadProjection as Lt, buildHumanErrorCopy as M, installAgentActivityIntegrations as Mn, SpaceComposerSubmissionError as Mt, renderHumanErrorCard as N, readAgentActivityIntegrationStatus as Nn, buildDispatchResultMessageReadProjection as Nt, shouldEmitAgentOverview as O, resolveAgentActivityRouteForPath as On, updateSpaceLastSeenTs as Ot, renderHumanTextErrorCard as P, resolveAgentActivityDispatcherCommand as Pn, buildDispatchResultReplyWorkflowProjection as Pt, assertDispatchOwnedRuntimePublicWriteAllowed as Q, isReturnKeypress as Qn, isRelationPickerState as Qt, resolveLocalComponentsStatus as R, evaluateCommandAuthentication as Rn, buildSignalReplyWorkflowProjection as Rt, buildProfileWorkspacePresentation as S, readAgentActivityOutboxHealth as Sn, readSpaceConfig as St, createQuietPresenter as T, readControllerTaskLifecycleOutboxHealth as Tn, removeSpaceConfig as Tt, fetchSpaceMeta as U, exchangeOneTimeTokenAuthSession as Un, buildSpaceRoundReadProjection as Ut, fetchSpaceUpdates as V, runAuthMenu as Vn, buildSpaceMessageReadRelationSummary as Vt, updateSpaceMeta as W, buildAuthStatusRows as Wn, buildUpdatesReplyWorkflowProjection as Wt, toStructuredGatewayFailure as X, buildUnifiedCardFrame as Xn, extractMentionAuthoringPrefix as Xt, readGatewayTextResponse as Y, renderTextInfoCard as Yn, enterRelationPickerState as Yt, parseJsonResponse as Z, promptTextEntry as Zn, formatRemovedCcRelationMessage as Zt, buildDaemonBackgroundStartFailure as _, readCodexSessionTitles as _n, getOrganizationJoinLinkResponseSchema as _r, LocalSpaceStateIntegrityError as _t, runDaemonBackgroundStartForDecision as a, resolveNextRecentMentionProfileIdsForQueuedText as an, extractAuthApiErrorMessage as ar, LocalProjectConnectionError as at, formatServiceRuntimeHeadline as b, enqueueAgentActivityHookEvent as bn, revokeOrganizationJoinLinkResponseSchema as br, listSpaceConfigs as bt, runDaemonInterrupt as c, updateAuthoredMentionRanges as cn, resolveDeviceAuthClientId as cr, submitProfileRuntimeAgentControllerReport as ct, runDaemonServiceDetached as d, readRecentDaemonDispatchJournalEvents as dn, cliJsonErrorEnvelopeSchema as dr, collectLocalAgentControllerInventory as dt, listSpaceMentionRelationChoices as en, finishCurrentCommandCheckScope as er, DispatchSpaceActionClosedError as et, runDaemonSnapshot as f, connectWebSocket as fn, cliJsonOutputEnvelopeSchema as fr, resolveLocalAgentControllerBlockerReasonCodes as ft, runDaemonUninstall as g, normalizeSharedSessionTitle as gn, acceptOrganizationJoinLinkBodySchema as gr, projectSpaceProfileCache as gt, runDaemonTeardownStrict as h, resolveObservedAgentActivityBinding as hn, cliJsonSkillsShowEnvelopeSchema as hr, resolveAgentControllerInterfaceSnapshot as ht, runDaemonAutostart as i, prepareSpaceFileOnlySubmission as in, startCurrentCommandCheckScope as ir, writeDispatchSpaceActionRecord as it, runDaemonStartDecisionPrompt as j, defaultManagedIntegrationPaths as jn, writeSpaceRecentMentionProfileIds as jt, buildDaemonStartDeferredCard as k, unregisterAgentActivityRoute as kn, upsertSpaceConfig as kt, runDaemonReinstall as l, DISPATCH_OWNED_RUNTIME_MODE as ln, resolveDeviceTokenExpiresAt as lr, submitRuntimeAgentControllerReport as lt, runDaemonStop as m, buildAgentActivityEvent as mn, cliJsonSkillsLoadEnvelopeSchema as mr, resolveLocalAgentControllerReportDecision as mt, isManagedSystemServiceBootstrapRun as n, openTargetPickerState as nn, isCurrentCommandCheckScopeActive as nr, readDispatchSpaceActionContextForReceiptFromEnv as nt, runDaemonCancel as o, resolveSpaceMemberAgentOwnerWakeDiagnosticsView as on, fetchAuthUserSnapshot as or, validateLocalProjectConnectionPath as ot, runDaemonStatusFlow as p, syncLocalAgentActivity as pn, cliJsonSkillsListEnvelopeSchema as pr, resolveLocalAgentControllerLaunchability as pt, GatewayHttpError as q, buildTextInfoCardLines as qn, createSpaceMemberIdentityIndex as qt, runDaemon as r, prepareSpaceComposerSubmission as rn, resetCurrentCommandCheckState as rr, readDispatchSpaceActionContextFromEnv as rt, runDaemonInstall as s, returnToTargetPickerState as sn, requestDeviceToken as sr, readRuntimeReportingHealthState as st, bestEffortStopCurrentLaneDaemonService as t, listSpaceMentionSuggestions as tn, getCurrentCommandCheckState as tr, OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV as tt, runDaemonRunAfterEntryChecks as u, OPENMELD_DISPATCH_RUNTIME_MODE_ENV as un, revokeAuthAccessToken as ur, submitRuntimeAgentControllerReports as ut, buildSystemServiceStartupFailureReportFromVerdict as v, readAgentActivityContextForPath as vn, organizationJoinLinkErrorResponseSchema as vr, inspectSpaceCacheFile as vt, reconcileCliVersionView as w, enqueueControllerTaskLifecycleEventWhileLocked as wn, readSpaceRecentMentionProfileIds as wt, resolveServiceParticipationReadiness as x, removeProjectInbox as xn, readSpaceCacheDeletionNoticeState as xt, formatServiceParticipationReadinessLabel as y, removeAgentActivityContextCache as yn, organizationJoinLinkManagementQuerySchema as yr, isLocalSpaceStateCorruptResult as yt, writeInstalledLocalComponentsSnapshot as z, runAuthLogin as zn, buildSpaceMemberAgentPresencePresentation as zt };
37744
+ export { toStructuredGatewayFailure as $, buildUnifiedCardFrame as $n, extractMentionAuthoringPrefix as $t, buildDaemonStartNeedsAttentionCard as A, registerAgentActivityRoute as An, toSpaceConfigListIntegrityError as At, resolveDaemonServiceParticipationStatus as B, ensureCommandAuthenticationOrCancel as Bn, buildSignalMessageReadProjection as Bt, buildProfileWorkspaceRows as C, enqueueAgentActivityHookEvent as Cn, revokeOrganizationJoinLinkResponseSchema as Cr, listSpaceConfigs as Ct, createDelayedSpinner as D, enqueueControllerTaskLifecycleEventWhileLocked as Dn, readSpaceRecentMentionProfileIds as Dt, emitDaemonAgentOverview as E, removeProjectOutbox as En, readSpaceLastSeenTs as Et, emitCliJsonEnvelope as F, installAgentActivityIntegrations as Fn, SpaceComposerSubmissionError as Ft, materializeOrganizationSkillRelease as G, runAuthStatus as Gn, buildSpaceProfileAddPlan as Gt, createCliSpaceApi as H, runAuthLogin as Hn, buildSpaceMemberAgentPresencePresentation as Ht, runDaemonStartupPreflight as I, readAgentActivityIntegrationStatus as In, buildDispatchResultMessageReadProjection as It, parseSpaceMetaPayload as J, buildAuthStatusSnapshot as Jn, closeMentionPickerState as Jt, fetchSpaceMeta as K, exchangeOneTimeTokenAuthSession as Kn, buildSpaceRoundReadProjection as Kt, readDaemonIncidentLogTail as L, resolveAgentActivityDispatcherCommand as Ln, buildDispatchResultReplyWorkflowProjection as Lt, buildHumanErrorCopy as M, unregisterAgentActivityRoute as Mn, upsertSpaceConfig as Mt, renderHumanErrorCard as N, AGENT_ACTIVITY_INTEGRATION_OWNER as Nn, writeSpaceCacheDeletionNoticeState as Nt, shouldEmitAgentOverview as O, readControllerTaskLifecycleOutboxHealth as On, removeSpaceConfig as Ot, renderHumanTextErrorCard as P, defaultManagedIntegrationPaths as Pn, writeSpaceRecentMentionProfileIds as Pt, readGatewayTextResponse as Q, renderTextInfoCard as Qn, enterRelationPickerState as Qt, resolveLocalComponentsStatus as R, uninstallAgentActivityIntegrations as Rn, buildPublicSpaceEntryUrl as Rt, buildProfileWorkspacePresentation as S, removeAgentActivityContextCache as Sn, organizationJoinLinkManagementQuerySchema as Sr, isLocalSpaceStateCorruptResult as St, createQuietPresenter as T, readAgentActivityOutboxHealth as Tn, readSpaceConfig as Tt, createSpaceWorkingCopies as U, runAuthLogout as Un, buildSpaceMentionProfileIndex as Ut, fetchSpaceUpdates as V, evaluateCommandAuthentication as Vn, buildSignalReplyWorkflowProjection as Vt, downloadWorkingCopyFile as W, runAuthMenu as Wn, buildSpaceMessageReadRelationSummary as Wt, GatewayHttpError as X, buildTextInfoCardLines as Xn, createSpaceMemberIdentityIndex as Xt, parseSpaceMetaResponse as Y, formatActiveOrganizationLabel as Yn, collectResolvedSpaceMentions as Yt, readGatewayJsonResponse as Z, renderInfoCard as Zn, createSpaceTargetCatalog as Zt, buildDaemonBackgroundStartFailure as _, buildAgentActivityEvent as _n, cliJsonSkillsLoadEnvelopeSchema as _r, resolveLocalAgentControllerReportDecision as _t, runDaemonBackgroundStartForDecision as a, openTargetPickerState as an, isCurrentCommandCheckScopeActive as ar, readDispatchSpaceActionContextForReceiptFromEnv as at, formatServiceRuntimeHeadline as b, readCodexSessionTitles as bn, getOrganizationJoinLinkResponseSchema as br, LocalSpaceStateIntegrityError as bt, runDaemonInterrupt as c, resolveNextRecentMentionProfileIdsForQueuedText as cn, extractAuthApiErrorMessage as cr, LocalProjectConnectionError as ct, runDaemonServiceDetached as d, updateAuthoredMentionRanges as dn, resolveDeviceAuthClientId as dr, submitProfileRuntimeAgentControllerReport as dt, formatRemovedCcRelationMessage as en, promptTextEntry as er, parseJsonResponse as et, runDaemonSnapshot as f, DISPATCH_OWNED_RUNTIME_MODE as fn, resolveDeviceTokenExpiresAt as fr, submitRuntimeAgentControllerReport as ft, runDaemonUninstall as g, syncLocalAgentActivity as gn, cliJsonSkillsListEnvelopeSchema as gr, resolveLocalAgentControllerLaunchability as gt, runDaemonTeardownStrict as h, connectWebSocket as hn, cliJsonOutputEnvelopeSchema as hr, resolveLocalAgentControllerBlockerReasonCodes as ht, runDaemonAutostart as i, listSpaceMentionSuggestions as in, getCurrentCommandCheckState as ir, OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV as it, runDaemonStartDecisionPrompt as j, resolveAgentActivityRouteForPath as jn, updateSpaceLastSeenTs as jt, buildDaemonStartDeferredCard as k, isAgentActivityRouteRegistered as kn, toLocalSpaceStateIntegrityError as kt, runDaemonReinstall as l, resolveSpaceMemberAgentOwnerWakeDiagnosticsView as ln, fetchAuthUserSnapshot as lr, validateLocalProjectConnectionPath as lt, runDaemonStop as m, readRecentDaemonDispatchJournalEvents as mn, cliJsonErrorEnvelopeSchema as mr, collectLocalAgentControllerInventory as mt, isManagedSystemServiceBootstrapRun as n, isTargetPickerState as nn, runInteractivePrompt as nr, readDispatchOwnedRuntimeGuard as nt, runDaemonCancel as o, prepareSpaceComposerSubmission as on, resetCurrentCommandCheckState as or, readDispatchSpaceActionContextFromEnv as ot, runDaemonStatusFlow as p, OPENMELD_DISPATCH_RUNTIME_MODE_ENV as pn, revokeAuthAccessToken as pr, submitRuntimeAgentControllerReports as pt, updateSpaceMeta as q, buildAuthStatusRows as qn, buildUpdatesReplyWorkflowProjection as qt, runDaemon as r, listSpaceMentionRelationChoices as rn, finishCurrentCommandCheckScope as rr, DispatchSpaceActionClosedError as rt, runDaemonInstall as s, prepareSpaceFileOnlySubmission as sn, startCurrentCommandCheckScope as sr, writeDispatchSpaceActionRecord as st, bestEffortStopCurrentLaneDaemonService as t, isRelationPickerState as tn, isReturnKeypress as tr, assertDispatchOwnedRuntimePublicWriteAllowed as tt, runDaemonRunAfterEntryChecks as u, returnToTargetPickerState as un, requestDeviceToken as ur, readRuntimeReportingHealthState as ut, buildSystemServiceStartupFailureReportFromVerdict as v, resolveObservedAgentActivityBinding as vn, cliJsonSkillsShowEnvelopeSchema as vr, resolveAgentControllerInterfaceSnapshot as vt, reconcileCliVersionView as w, removeProjectInbox as wn, readSpaceCacheDeletionNoticeState as wt, resolveServiceParticipationReadiness as x, readAgentActivityContextForPath as xn, organizationJoinLinkErrorResponseSchema as xr, inspectSpaceCacheFile as xt, formatServiceParticipationReadinessLabel as y, normalizeSharedSessionTitle as yn, acceptOrganizationJoinLinkBodySchema as yr, projectSpaceProfileCache as yt, writeInstalledLocalComponentsSnapshot as z, buildCommandAuthenticationPromptMessage as zn, buildSignalIndex as zt };
36871
37745
 
36872
- //# sourceMappingURL=service-CTG3_X0o.js.map
37746
+ //# sourceMappingURL=service-Cl_Ge6oJ.js.map