openmeld 0.3.221 → 0.3.223

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 (178) hide show
  1. package/dist/{add-me-membership-DpckwGof.js → add-me-membership-AWArQHSP.js} +2 -2
  2. package/dist/{add-me-membership-DpckwGof.js.map → add-me-membership-AWArQHSP.js.map} +1 -1
  3. package/dist/{agents-2TzCubpV.js → agents-PsEPfW3B.js} +12 -12
  4. package/dist/{agents-2TzCubpV.js.map → agents-PsEPfW3B.js.map} +1 -1
  5. package/dist/{api-client-foundation-CGImd4c8.js → api-client-foundation-CbbeqtJY.js} +1 -1
  6. package/dist/{api-client-foundation-D-Cb6EVg.js → api-client-foundation-D2lqqEZK.js} +3 -3
  7. package/dist/{api-client-foundation-D-Cb6EVg.js.map → api-client-foundation-D2lqqEZK.js.map} +1 -1
  8. package/dist/auth-session-8GEdTCmT.js +4 -0
  9. package/dist/{auth-session-CDhQANWx.js → auth-session-BDEv3tou.js} +8 -8
  10. package/dist/auth-session-BDEv3tou.js.map +1 -0
  11. package/dist/{base-url-CMBApK1J.js → base-url-DXrUiSMI.js} +1 -1
  12. package/dist/{base-url-D7uE_xTo.js → base-url-DvjOkKPs.js} +2 -2
  13. package/dist/{base-url-D7uE_xTo.js.map → base-url-DvjOkKPs.js.map} +1 -1
  14. package/dist/{channel-D5ABuavH.js → channel-CDXD7Bfv.js} +4 -4
  15. package/dist/{channel-D5ABuavH.js.map → channel-CDXD7Bfv.js.map} +1 -1
  16. package/dist/{cli-binary-manifest-DiUulkp0.js → cli-binary-manifest-CT5X05lk.js} +30 -4
  17. package/dist/cli-binary-manifest-CT5X05lk.js.map +1 -0
  18. package/dist/{command-MlrjQYq5.js → command-CUNcwWww.js} +22 -165
  19. package/dist/command-CUNcwWww.js.map +1 -0
  20. package/dist/{computer-connection-DYnof5Xw.js → computer-connection-NCM-EnCu.js} +2 -2
  21. package/dist/{computer-connection-DYnof5Xw.js.map → computer-connection-NCM-EnCu.js.map} +1 -1
  22. package/dist/{computer-connection-review-mO6vn3C3.js → computer-connection-review-DATbh3kD.js} +6 -6
  23. package/dist/{computer-connection-review-mO6vn3C3.js.map → computer-connection-review-DATbh3kD.js.map} +1 -1
  24. package/dist/{computer-disconnect-CLtQwKDS.js → computer-disconnect-Cd1YvKu7.js} +10 -10
  25. package/dist/{computer-disconnect-CLtQwKDS.js.map → computer-disconnect-Cd1YvKu7.js.map} +1 -1
  26. package/dist/{computer-setup-continuation-PVwPXc5i.js → computer-setup-continuation-TU09jiWA.js} +4 -4
  27. package/dist/{computer-setup-continuation-PVwPXc5i.js.map → computer-setup-continuation-TU09jiWA.js.map} +1 -1
  28. package/dist/context-BUmQsG9U.js +162 -0
  29. package/dist/context-BUmQsG9U.js.map +1 -0
  30. package/dist/{control-plane-BDS63N7Y.js → control-plane-rTE2rHZ5.js} +4 -2
  31. package/dist/control-plane-rTE2rHZ5.js.map +1 -0
  32. package/dist/{daemon-device-id-YnLMx1kN.js → daemon-device-id-BOqTgR9G.js} +344 -36
  33. package/dist/daemon-device-id-BOqTgR9G.js.map +1 -0
  34. package/dist/{daemon-frame-transport-D-4StENt.js → daemon-frame-transport-C3SOtG8a.js} +519 -12
  35. package/dist/daemon-frame-transport-C3SOtG8a.js.map +1 -0
  36. package/dist/{daemon-lifecycle-journal-DcrVY0xb.js → daemon-lifecycle-journal-D4uZ-Ykq.js} +10 -10
  37. package/dist/daemon-lifecycle-journal-D4uZ-Ykq.js.map +1 -0
  38. package/dist/{daemon-runtime-lease-BUr4qsLo.js → daemon-runtime-lease-1LMeZ6IS.js} +2 -2
  39. package/dist/{daemon-runtime-lease-BUr4qsLo.js.map → daemon-runtime-lease-1LMeZ6IS.js.map} +1 -1
  40. package/dist/{daemon-runtime-lease-C9X8xV_F.js → daemon-runtime-lease-Bz0ucJj3.js} +1 -1
  41. package/dist/{daemon-service-contract-BpOBMGX0.js → daemon-service-contract-GLmAxsq-.js} +4 -4
  42. package/dist/{daemon-service-contract-BpOBMGX0.js.map → daemon-service-contract-GLmAxsq-.js.map} +1 -1
  43. package/dist/{daemon-service-manager-HL4VKbIU.js → daemon-service-manager-C8RUCMDo.js} +9 -7
  44. package/dist/daemon-service-manager-C8RUCMDo.js.map +1 -0
  45. package/dist/{daemon-service-manager-B-QrDe5p.js → daemon-service-manager-CU-79a4z.js} +1 -1
  46. package/dist/{daemon-service-runtime-Kr6Bs2J2.js → daemon-service-runtime-BEfMD5jb.js} +397 -51
  47. package/dist/daemon-service-runtime-BEfMD5jb.js.map +1 -0
  48. package/dist/{daemon-service-update-coordinator-RJO997me.js → daemon-service-update-coordinator-uQW-Ib66.js} +48 -33
  49. package/dist/daemon-service-update-coordinator-uQW-Ib66.js.map +1 -0
  50. package/dist/{daemon-state-B44aq2nm.js → daemon-state-Ca0WK5x0.js} +3 -3
  51. package/dist/{daemon-state-B44aq2nm.js.map → daemon-state-Ca0WK5x0.js.map} +1 -1
  52. package/dist/{dist-BewA9srP.js → dist-B0OGOBKB.js} +81 -15
  53. package/dist/dist-B0OGOBKB.js.map +1 -0
  54. package/dist/dist-BMJ6nTd6.js +4 -0
  55. package/dist/{dist-ChS52b_E.js → dist-CkSuMZyq.js} +16 -12
  56. package/dist/dist-CkSuMZyq.js.map +1 -0
  57. package/dist/{elapsed-time-Cw6b9rYy.js → elapsed-time-DmXBSBLX.js} +6 -6
  58. package/dist/{elapsed-time-Cw6b9rYy.js.map → elapsed-time-DmXBSBLX.js.map} +1 -1
  59. package/dist/{entry-BE8uqbkD.js → entry-DbA--kpf.js} +12 -12
  60. package/dist/{entry-BE8uqbkD.js.map → entry-DbA--kpf.js.map} +1 -1
  61. package/dist/{installation-inventory-Dwn8FoKT.js → installation-inventory-B50K5Nme.js} +5 -5
  62. package/dist/{installation-inventory-Dwn8FoKT.js.map → installation-inventory-B50K5Nme.js.map} +1 -1
  63. package/dist/{installer-CsQ4vNjT.js → installer-BSByDtli.js} +2 -2
  64. package/dist/{installer-CsQ4vNjT.js.map → installer-BSByDtli.js.map} +1 -1
  65. package/dist/io-DT66typ4.js +16 -0
  66. package/dist/io-DT66typ4.js.map +1 -0
  67. package/dist/{local-components-B6SCXZf9.js → local-components-DleLEzSU.js} +2 -1
  68. package/dist/local-components-DleLEzSU.js.map +1 -0
  69. package/dist/{lock-Bsl_ElWy.js → lock-iue1J2xy.js} +8 -5
  70. package/dist/lock-iue1J2xy.js.map +1 -0
  71. package/dist/{cli-space-api-B2l1xMPn.js → meta-api-C4_z3Ins.js} +203 -19
  72. package/dist/meta-api-C4_z3Ins.js.map +1 -0
  73. package/dist/{openmeld-Tkp17vPg.js → openmeld-BloctT8R.js} +101 -1026
  74. package/dist/openmeld-BloctT8R.js.map +1 -0
  75. package/dist/openmeld-dev.js +1 -1
  76. package/dist/{openmeld-environment-target-B6HqY0_a.js → openmeld-environment-target-BBn5Ko6p.js} +3 -3
  77. package/dist/{openmeld-environment-target-B6HqY0_a.js.map → openmeld-environment-target-BBn5Ko6p.js.map} +1 -1
  78. package/dist/{openmeld-maintenance-worker-C1J_ISOh.js → openmeld-maintenance-worker-BgA89k58.js} +15 -14
  79. package/dist/openmeld-maintenance-worker-BgA89k58.js.map +1 -0
  80. package/dist/{openmeld-tools-update-join-ZLpRTHO3.js → openmeld-tools-update-join-B4sRZFfU.js} +4 -4
  81. package/dist/{openmeld-tools-update-join-ZLpRTHO3.js.map → openmeld-tools-update-join-B4sRZFfU.js.map} +1 -1
  82. package/dist/{openmeld-tools-update-process-frame-B-XB4dmO.js → openmeld-tools-update-process-frame-BtFKp70p.js} +2 -2
  83. package/dist/{openmeld-tools-update-process-frame-B-XB4dmO.js.map → openmeld-tools-update-process-frame-BtFKp70p.js.map} +1 -1
  84. package/dist/{openmeld-tools-update-process-frame-j-RXwFsK.js → openmeld-tools-update-process-frame-DbEZ3fEh.js} +1 -1
  85. package/dist/openmeld.js +9 -5
  86. package/dist/openmeld.js.map +1 -1
  87. package/dist/{prepare-provider-runtime-CD5ZI-ct.js → prepare-provider-runtime-L84g7H_Q.js} +3395 -1346
  88. package/dist/prepare-provider-runtime-L84g7H_Q.js.map +1 -0
  89. package/dist/{prepare-session-executor-C2nNM2yb.js → prepare-session-executor-uQHhdNg8.js} +29 -28
  90. package/dist/prepare-session-executor-uQHhdNg8.js.map +1 -0
  91. package/dist/{presenter-BcxiQyJg.js → presenter-MJ5YgsOT.js} +3 -13
  92. package/dist/presenter-MJ5YgsOT.js.map +1 -0
  93. package/dist/{process-channel-B2BU2X7x.js → process-channel-D71P1C32.js} +2 -2
  94. package/dist/{process-channel-B2BU2X7x.js.map → process-channel-D71P1C32.js.map} +1 -1
  95. package/dist/process-environment-BWSFeUu6.js +49 -0
  96. package/dist/process-environment-BWSFeUu6.js.map +1 -0
  97. package/dist/process-identity-BQLdaZdB.js +190 -0
  98. package/dist/process-identity-BQLdaZdB.js.map +1 -0
  99. package/dist/process-launch-B0pHlkV_.js +173 -0
  100. package/dist/process-launch-B0pHlkV_.js.map +1 -0
  101. package/dist/{published-production-safety-dp-fOmmB.js → published-production-safety-C40hKrBA.js} +2 -2
  102. package/dist/{published-production-safety-dp-fOmmB.js.map → published-production-safety-C40hKrBA.js.map} +1 -1
  103. package/dist/{runtime-DMYoB5_x.js → runtime-Pwc12DeY.js} +155 -702
  104. package/dist/runtime-Pwc12DeY.js.map +1 -0
  105. package/dist/{runtime-agent-controller-reporting-submission-DGm8O4q_.js → runtime-agent-controller-reporting-submission-AmSxt3Z1.js} +11 -10
  106. package/dist/{runtime-agent-controller-reporting-submission-DGm8O4q_.js.map → runtime-agent-controller-reporting-submission-AmSxt3Z1.js.map} +1 -1
  107. package/dist/{runtime-reporting-health-state-BWZgy4pF.js → runtime-reporting-health-state-DwlV1Fsv.js} +2210 -60
  108. package/dist/runtime-reporting-health-state-DwlV1Fsv.js.map +1 -0
  109. package/dist/{runtime-transport-0F5E6So6.js → runtime-transport-CivtwW1A.js} +104 -15
  110. package/dist/runtime-transport-CivtwW1A.js.map +1 -0
  111. package/dist/{service-C72KhNft.js → service-DYid1j4Y.js} +124 -548
  112. package/dist/service-DYid1j4Y.js.map +1 -0
  113. package/dist/{service-account-admission-Dy2W3n3_.js → service-account-admission-BfdJ-kKR.js} +18 -10
  114. package/dist/service-account-admission-BfdJ-kKR.js.map +1 -0
  115. package/dist/{service-account-authorization-DAPQy2yP.js → service-account-authorization-Cx6KEfvI.js} +6 -6
  116. package/dist/{service-account-authorization-DAPQy2yP.js.map → service-account-authorization-Cx6KEfvI.js.map} +1 -1
  117. package/dist/{service-account-control-DZjUR3I_.js → service-account-control-NTVNuQbb.js} +16 -16
  118. package/dist/service-account-control-NTVNuQbb.js.map +1 -0
  119. package/dist/{service-control-capabilities-Y4CGrchz.js → service-control-capabilities-CkKw-5l7.js} +1 -1
  120. package/dist/{service-control-capabilities-C2MF5FUD.js → service-control-capabilities-D0qUygFh.js} +19 -15
  121. package/dist/service-control-capabilities-D0qUygFh.js.map +1 -0
  122. package/dist/{service-control-carrier-capability-DDNyE5cB.js → service-control-carrier-capability-gMk5gMKU.js} +11 -4
  123. package/dist/service-control-carrier-capability-gMk5gMKU.js.map +1 -0
  124. package/dist/{state-CK1WXIsI.js → state-CZHAuQRD.js} +4 -4
  125. package/dist/{state-CK1WXIsI.js.map → state-CZHAuQRD.js.map} +1 -1
  126. package/dist/upgrade-DBdUgOXy.js +4 -0
  127. package/dist/{upgrade-BTIKVek7.js → upgrade-ym-rbiAR.js} +52 -32
  128. package/dist/upgrade-ym-rbiAR.js.map +1 -0
  129. package/dist/windows/openmeld-windows-process.exe +0 -0
  130. package/dist/windows-artifact-DJ9DKjfc.js +16 -0
  131. package/dist/windows-artifact-DJ9DKjfc.js.map +1 -0
  132. package/dist/windows-task-command-COu_6Ke3.js +74 -0
  133. package/dist/windows-task-command-COu_6Ke3.js.map +1 -0
  134. package/dist/windows-task-entry-CtRpUbiK.js +50 -0
  135. package/dist/windows-task-entry-CtRpUbiK.js.map +1 -0
  136. package/dist/{windows-user-task-Bx2yYnOM.js → windows-user-task-B8NcRg_u.js} +1 -1
  137. package/dist/{windows-user-task-CRGbKggi.js → windows-user-task-Io5QuEVR.js} +108 -51
  138. package/dist/windows-user-task-Io5QuEVR.js.map +1 -0
  139. package/package.json +11 -11
  140. package/skills/openmeld-cli/playbooks/space-ops.md +9 -3
  141. package/skills/openmeld-cli/references/commands.md +0 -1
  142. package/dist/auth-session-CDhQANWx.js.map +0 -1
  143. package/dist/auth-session-DsBkEFct.js +0 -4
  144. package/dist/cli-binary-manifest-DiUulkp0.js.map +0 -1
  145. package/dist/cli-space-api-B2l1xMPn.js.map +0 -1
  146. package/dist/command-MlrjQYq5.js.map +0 -1
  147. package/dist/context-D9Ebb5wl.js +0 -473
  148. package/dist/context-D9Ebb5wl.js.map +0 -1
  149. package/dist/control-plane-BDS63N7Y.js.map +0 -1
  150. package/dist/daemon-device-id-YnLMx1kN.js.map +0 -1
  151. package/dist/daemon-frame-transport-D-4StENt.js.map +0 -1
  152. package/dist/daemon-lifecycle-journal-DcrVY0xb.js.map +0 -1
  153. package/dist/daemon-service-manager-HL4VKbIU.js.map +0 -1
  154. package/dist/daemon-service-runtime-Kr6Bs2J2.js.map +0 -1
  155. package/dist/daemon-service-update-coordinator-RJO997me.js.map +0 -1
  156. package/dist/dist-B6VsppM7.js +0 -4
  157. package/dist/dist-BewA9srP.js.map +0 -1
  158. package/dist/dist-ChS52b_E.js.map +0 -1
  159. package/dist/local-components-B6SCXZf9.js.map +0 -1
  160. package/dist/lock-Bsl_ElWy.js.map +0 -1
  161. package/dist/openmeld-Tkp17vPg.js.map +0 -1
  162. package/dist/openmeld-maintenance-worker-C1J_ISOh.js.map +0 -1
  163. package/dist/prepare-provider-runtime-CD5ZI-ct.js.map +0 -1
  164. package/dist/prepare-session-executor-C2nNM2yb.js.map +0 -1
  165. package/dist/presenter-BcxiQyJg.js.map +0 -1
  166. package/dist/process-identity-CNus0e6E.js +0 -146
  167. package/dist/process-identity-CNus0e6E.js.map +0 -1
  168. package/dist/runtime-DMYoB5_x.js.map +0 -1
  169. package/dist/runtime-reporting-health-state-BWZgy4pF.js.map +0 -1
  170. package/dist/runtime-transport-0F5E6So6.js.map +0 -1
  171. package/dist/service-C72KhNft.js.map +0 -1
  172. package/dist/service-account-admission-Dy2W3n3_.js.map +0 -1
  173. package/dist/service-account-control-DZjUR3I_.js.map +0 -1
  174. package/dist/service-control-capabilities-C2MF5FUD.js.map +0 -1
  175. package/dist/service-control-carrier-capability-DDNyE5cB.js.map +0 -1
  176. package/dist/upgrade-BTIKVek7.js.map +0 -1
  177. package/dist/upgrade-DTB0ZmxI.js +0 -4
  178. package/dist/windows-user-task-CRGbKggi.js.map +0 -1
@@ -1,59 +1,57 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { c as toSpaceDispatchLookupUrl, h as toSpaceResultUrl, i as toSpaceContractUrl, l as toSpaceDispatchTraceUrl, r as toSpaceBoardUrl, t as normalizeBaseUrl } from "./urls-CY2uzH2-.js";
4
- import { D as isLocalMachineFailureError, F as accountsDir, M as accountProfileSpaceCacheDir, N as accountProfileViewPath, O as toRecognizedLocalMachineFailureError, Q as openMeldManagedVersionBinaryPath, S as LocalMachineFailureError, T as createOrphanedSetupConcurrencyIssue, Y as openMeldBackupsDir, Z as openMeldManagedBinaryPath, _ as resolveCliContext, a as isOpenMeldOrphanedLockError, b as formatLaneScopeSentence, c as releaseLockSync, ct as resolveOpenMeldEnvPreset, d as runWithHeldLock, et as openMeldRootDir, gt as systemDir, ht as spacesDir, i as isOpenMeldLockError, it as profileViewPath, k as formatLocalMachineIssueMessage, l as repairOrphanedLegacyLocks, lt as resolveOpenMeldRootDir, m as OPENMELD_CLI_CONTEXT_ENV_KEY, mt as skillsDir, p as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, q as normalizeAccountKey, r as buildOpenMeldOrphanedLockAction, rt as profileDir, st as resolveOpenMeldCliEntryNameFromArgv, t as acquireLock, u as resolveOpenMeldOrphanedLockIssue, w as createActiveSetupConcurrencyIssue, x as resolveOpenMeldLaneDescriptor } from "./lock-Bsl_ElWy.js";
5
- import { $r as agentActivityInventorySessionStatusSchema, $t as createPrepareReadinessApi, Ar as observabilityWakeTraceSelectorSchema, Cn as postSpaceWorkHandoff, Cr as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Dr as spaceDispatchTraceAttemptStatusSchema, Er as resolveSpaceDispatchTraceRootCause, Ft as createCenterAgentApi, Jr as ownerComputerDiagnosticsSchema, Jt as createOrganizationApi, Lt as createComputerFileAccessApi, Mt as createAgentProfileBindingApi, Nn as toStructuredApiClientFailure, Nt as createAgentProfileExecutionModeApi, Or as spaceDispatchTraceDispatchStatusSchema, Qr as agentActivityInventorySessionOriginSchema, Qt as createPluginsApi, Ti as signalTextEnvelopeSchema, Tr as resolveRuntimeCoordinatorHeadStatusRootCause, Vr as resolvedSpaceMemberProfileSchema, Vt as createFeedbackApi, Xn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Xr as summarizeComputerFileAccessPolicy, Xt as createOrganizationSkillsApi, Yr as projectOwnerComputerLocalRuntimes, _r as spaceTaskMutationReceiptSchema, bi as agentActivitySnapshotQuerySchema, br as submitFeedbackIssueRequestSchema, dr as createAgentProfileCreationRequestBodySchema, ei as agentActivitySessionInventoryQuerySchema, er as spaceEntryTargetSchema, gr as spaceTaskIdSchema, hr as mutateSpaceTaskBodySchema, in as createRoutinesApi, jr as projectObservabilityWakeCorrelation, jt as createAgentActivityApi, kr as spaceDispatchTraceResponseSchema, lr as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, mr as listSpaceTasksResponseSchema, ni as localAgentSessionProviderSchema, nn as createProjectsApi, pr as createSpaceTaskBodySchema, qn as OPENMELD_HEADER_PROFILE_ID, tr as pluginActionRequestSchema, ur as agentProfileCreationConfigurationSchema, vi as agentActivityProviderSchema, wr as projectSpaceDispatchTraceFinalVisibleOutcome, yi as agentActivitySessionStatusSchema, zt as createCurrentDeviceApi } from "./dist-BewA9srP.js";
4
+ import { D as isLocalMachineFailureError, F as accountsDir, M as accountProfileSpaceCacheDir, N as accountProfileViewPath, O as toRecognizedLocalMachineFailureError, S as LocalMachineFailureError, T as createOrphanedSetupConcurrencyIssue, X as openMeldBinDir, Y as openMeldBackupsDir, _ as resolveCliContext, _t as systemDir, a as isOpenMeldOrphanedLockError, at as profileViewPath, b as formatLaneScopeSentence, c as releaseLockSync, ct as resolveOpenMeldCliEntryNameFromArgv, d as runWithHeldLock, gt as spacesDir, ht as skillsDir, i as isOpenMeldLockError, it as profileDir, k as formatLocalMachineIssueMessage, l as repairOrphanedLegacyLocks, lt as resolveOpenMeldEnvPreset, m as OPENMELD_CLI_CONTEXT_ENV_KEY, p as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, q as normalizeAccountKey, r as buildOpenMeldOrphanedLockAction, t as acquireLock, tt as openMeldRootDir, u as resolveOpenMeldOrphanedLockIssue, ut as resolveOpenMeldRootDir, w as createActiveSetupConcurrencyIssue, x as resolveOpenMeldLaneDescriptor } from "./lock-iue1J2xy.js";
5
+ import { $r as agentActivityInventorySessionStatusSchema, $t as createPluginsApi, Ar as observabilityWakeTraceSelectorSchema, Bt as createCurrentDeviceApi, Cr as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Dr as spaceDispatchTraceAttemptStatusSchema, Er as resolveSpaceDispatchTraceRootCause, Ht as createFeedbackApi, It as createCenterAgentApi, Jn as OPENMELD_HEADER_PROFILE_ID, Jr as ownerComputerDiagnosticsSchema, Mt as createAgentActivityApi, Nt as createAgentProfileBindingApi, Or as spaceDispatchTraceDispatchStatusSchema, Pn as toStructuredApiClientFailure, Pt as createAgentProfileExecutionModeApi, Qr as agentActivityInventorySessionOriginSchema, Rt as createComputerFileAccessApi, Tr as resolveRuntimeCoordinatorHeadStatusRootCause, Vr as resolvedSpaceMemberProfileSchema, Xr as summarizeComputerFileAccessPolicy, Yr as projectOwnerComputerLocalRuntimes, Yt as createOrganizationApi, Zn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Zt as createOrganizationSkillsApi, an as createRoutinesApi, bi as agentActivitySnapshotQuerySchema, br as submitFeedbackIssueRequestSchema, dr as agentProfileCreationConfigurationSchema, ei as agentActivitySessionInventoryQuerySchema, en as createPrepareReadinessApi, fr as createAgentProfileCreationRequestBodySchema, jr as projectObservabilityWakeCorrelation, kr as spaceDispatchTraceResponseSchema, ni as localAgentSessionProviderSchema, nr as pluginActionRequestSchema, rn as createProjectsApi, tr as spaceEntryTargetSchema, ur as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, vi as agentActivityProviderSchema, wn as postSpaceWorkHandoff, wr as projectSpaceDispatchTraceFinalVisibleOutcome, yi as agentActivitySessionStatusSchema } from "./dist-B0OGOBKB.js";
6
6
  import { c as agentControllerConversationRefSchema } from "./controller-contract-DAOCaefz.js";
7
- import { Ar as compareAgentControllerRefsForDisplay, At as ensureOpenMeldManagedProfileWorkspace, C as createModelCatalogReadSession, E as resolveProfileWorkspaceRuntime, Et as listBuiltinAgentsRegistryEntries, I as listAgentTargetStates, It as setCustomProfileWorkspace, K as notifyDaemonRouteCatalogChanged, Lt as setOpenMeldManagedProfileWorkspace, Mt as readProfileWorkspaceConfig, O as syncDeviceRuntimeStateProjection, Pt as resolveConfiguredProfileWorkspacePath, Q as resolveLocalRegistryAgentIdFromAgentControllerRef, Rt as validateCustomProfileWorkspacePath, S as syncProfileWorkspaceState, St as canonicalizeLocalProjectPath, _r as resolveAgentProfileEditCapabilities, _t as removeProjectConnection, bt as setDefaultProjectConnection, dr as peopleComputerContainsDevice, fr as projectPeopleComputersToLegacyLocalRuntimes, ft as listProjectBindings, gr as resolveAgentExecutionStatus, hr as resolveAgentControllerPermissionModeForController, ir as createAgentExecutionStatusDisplayRows, j as resolveAgentProfilePrimaryAgentControllerReport, jt as normalizeCustomProfileWorkspacePath, k as createPrimaryBindingReadSession, lr as listAgentControllerPermissionModeOptions, mt as migrateProjectBindingStore, or as getAgentControllerPermissionModeDisplayMetadata, pt as listProjectConnectionsWithStatus, qn as resolveDispatchSpaceActionMcpServer, sr as getAgentControllerPermissionModeFieldLabel, ur as parseAgentControllerRef, ut as bindProject, vr as resolveEvidenceSyncHealth, xt as unbindProject, yr as resolveNativeAgentControllerPermissionModeForController, yt as runIfAgentActivityBindingGenerationIsCurrent, zt as describeProfileWorkspacePathValidationFailure } from "./prepare-provider-runtime-CD5ZI-ct.js";
8
- import { Gt as spaceWorkingCopyResultSchema, Hn as messageEnvelopeSchema, Ht as spaceWorkHandoffSchema, On as spaceContractFieldsSchema, Qt as isSpaceFileTextEditable, Rt as spaceStatusSchema, Wr as START_BOUNDED_ID_SCHEMA, Wt as spaceWorkSelectionSchema, ci as openMeldProfileIdSchema, cr as agentInteractionResponseSchema, dn as spaceFileEntryIdSchema, dr as clientMessageIdSchema, gn as spaceMessageFileReferenceSchema, hn as spaceFileRevisionNumberSchema, kn as spaceContractSchema, li as openMeldRequestContextSchema, nn as readSpaceFileTextResponseSchema, qr as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, rn as resolveSpaceFileMimeType, wn as spaceThreadContextSchema, zt as centerAgentInteractionSourceSchema } from "./runtime-transport-0F5E6So6.js";
9
- import { C as updateAuthSessionActiveOrganization, T as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, d as getAuthSessionState, f as getCurrentAuthOwnerUserId, g as normalizeStoredActiveOrganization, n as AuthSessionRecoveryInProgressError, o as buildStoredAuthSessionIdentity, s as clearAuthSession, t as AuthSessionChangedBeforeTransitionError, u as getAuthSessionMetadata } from "./auth-session-CDhQANWx.js";
10
- import { L as nonEmptyTrimmedStringFromUnknown, O as openMeldRuntimeProfileIdSchema, w as dispatchExecutionSchema, z as trimmedStringFromUnknown } from "./control-plane-BDS63N7Y.js";
11
- import { t as computerConnectionIntentSchema } from "./computer-connection-DYnof5Xw.js";
12
- import { d as readSelectedSkillDocument, r as ensureLocalSkills } from "./state-CK1WXIsI.js";
13
- import { $ as buildAuthStatusSnapshot, B as resolveDaemonServiceParticipationStatus, C as buildProfileWorkspaceRows, Ct as cliJsonSkillsShowEnvelopeSchema, Dt as organizationJoinLinkManagementQuerySchema, E as emitDaemonAgentOverview, Et as organizationJoinLinkErrorResponseSchema, F as emitCliJsonEnvelope, G as ensureCommandAuthenticationOrCancel, H as validateLocalProjectConnectionPath, I as runDaemonStartupPreflight, J as runAuthLogout, K as evaluateCommandAuthentication, M as buildHumanErrorCopy, N as renderHumanErrorCard, O as shouldEmitAgentOverview, Ot as revokeOrganizationJoinLinkResponseSchema, P as renderHumanTextErrorCard, Q as buildAuthStatusRows, R as resolveLocalComponentsStatus, S as buildProfileWorkspacePresentation, St as cliJsonSkillsLoadEnvelopeSchema, Tt as getOrganizationJoinLinkResponseSchema, V as LocalProjectConnectionError, W as buildCommandAuthenticationPromptMessage, X as runAuthStatus, Y as runAuthMenu, Z as exchangeOneTimeTokenAuthSession, a as runDaemonBackgroundStartForDecision, at as promptTextEntry, bt as cliJsonOutputEnvelopeSchema, c as runDaemonInterrupt, ct as finishCurrentCommandCheckScope, dt as resetCurrentCommandCheckState, et as formatActiveOrganizationLabel, f as runDaemonSnapshot, ft as startCurrentCommandCheckScope, g as runDaemonUninstall, h as runDaemonTeardownStrict, i as runDaemonAutostart, j as runDaemonStartDecisionPrompt, l as runDaemonReinstall, lt as getCurrentCommandCheckState, m as runDaemonStop, n as isManagedSystemServiceBootstrapRun, nt as renderInfoCard, o as runDaemonCancel, ot as isReturnKeypress, p as runDaemonStatusFlow, q as runAuthLogin, r as runDaemon, rt as renderTextInfoCard, s as runDaemonInstall, st as runInteractivePrompt, t as bestEffortStopCurrentLaneDaemonService, u as runDaemonRunAfterEntryChecks, ut as isCurrentCommandCheckScopeActive, w as reconcileCliVersionView, wt as acceptOrganizationJoinLinkBodySchema, x as resolveServiceParticipationReadiness, xt as cliJsonSkillsListEnvelopeSchema, y as formatServiceParticipationReadinessLabel, yt as cliJsonErrorEnvelopeSchema, z as writeInstalledLocalComponentsSnapshot } from "./service-C72KhNft.js";
14
- import { C as defaultManagedIntegrationPaths, D as uninstallAgentActivityIntegrations, E as resolveAgentActivityDispatcherCommand, T as readAgentActivityIntegrationStatus, _ as readControllerTaskLifecycleOutboxHealth, a as fetchSpaceUpdates, b as resolveAgentActivityRouteForPath, c as downloadWorkingCopyFile, d as syncLocalAgentActivity, g as enqueueControllerTaskLifecycleEventWhileLocked, h as removeAgentActivityContextCache, l as materializeOrganizationSkillRelease, m as readAgentActivityContextForPath, o as createSpaceWorkingCopies, t as readRuntimeReportingHealthState, v as isAgentActivityRouteRegistered, w as installAgentActivityIntegrations, x as unregisterAgentActivityRoute, y as registerAgentActivityRoute } from "./runtime-reporting-health-state-BWZgy4pF.js";
15
- import { B as createOpenMeldHumanProfile, G as resolveOpenMeldProfile, U as listOpenMeldProfiles, V as deleteOpenMeldProfile, W as primeOpenMeldProfilesSessionCache, Z as buildAgentAuthenticationGuide, at as resolveAuthenticationGuidanceFromMessage, et as buildHumanAuthenticationCard, it as resolveAuthenticationGuidanceFromError, q as updateOpenMeldProfile, rt as resolveAuthenticationGuidance, tt as createAuthenticationError, z as createOpenMeldAgentProfile } from "./daemon-device-id-YnLMx1kN.js";
16
- import { H as buildInstallSelfJsonPayload, U as performManagedInstall, r as readCurrentDaemonRuntimeContext } from "./daemon-service-runtime-Kr6Bs2J2.js";
17
- import { A as formatDeviceReplyReadinessLabel, B as resolveGatewayChainReadiness, Bt as assessCliUpdate, It as assessServerRequiredVersion, J as getSetupFlowCopy, K as buildDaemonRouteObservationPresentation$1, Mt as classifyDaemonServiceRunStartability, N as mapAgentReplyReadinessToLegacyAutoReply, Nt as classifyDaemonServiceWakeability, O as resolveCurrentReplyReadinessSnapshot, Pt as resolveCurrentDaemonExpectedVersion, T as resolveDaemonServiceFreshnessWarning, U as resolveOpenClawLocalDiagnosticsValue, Vt as isCliUpdateCheckApplicable, _ as resolveServiceReadinessFromServiceStatus, ft as inspectDaemonServiceInventory, j as formatHumanReplyReadinessReason$1, k as formatAgentReplyReadinessLabel, q as buildOnboardingPlan, t as runPendingDaemonServiceUpdate, zt as readCurrentLocalDeviceId } from "./daemon-service-update-coordinator-RJO997me.js";
18
- import { $ as resolveCreateProfileKind, A as parseEnvelope, B as resolveHumanControllerDisplayName, C as toSpaceMetaUpsertInput, D as formatHumanReadTargetList, E as buildHumanReplyContextSummary, F as resolveOpenMeldProfileForSpaceCommand, G as printOpenMeldBanner, H as resolveAgentProfileSetup, I as emitSpaceAgentOverview, J as renderOpenMeldLogo, K as renderOpenMeldBrandBlockLines, L as emitSpaceCliAgentOverview, M as assertFullSignalIdArgument, N as assertValidSpaceIdTarget, O as resolveLinkAccessLabel, P as prepareAuthenticatedSpaceCommandContext, Q as createProfileByKind, R as prepareLocalAgentReadiness, S as loadSpaceSignalIndexOrNull, T as buildFormalSignalReadPayload, U as colorizeAgentLabel, V as persistAgentTransportSelection, W as colorizeDisplayProfileLabel, X as resolveSpaceSendText, Y as renderOpenMeldTagline, Z as resolveSpaceTaskSelection, _ as runSpaceWriteWithPasswordRetry, a as runSpaceDelete, b as buildIdentityOnlyMembersSnapshotForReadProjection, c as runSpaceLeave, d as runSpaceRemoveMembers, et as resolveCreateProfileName, f as runSpaceSend, g as runSpaceReadWithPasswordRetry, h as uploadPreparedSpaceFiles, i as runSpaceCreate, j as isSpaceCommandOutputHandledError, k as resolveOrganizationVisibilityLabel, l as runSpaceList, m as prepareRequestedSpaceSendFiles, n as promptAndConfirmSpacePassword, nt as assessActionParticipationCandidate, o as runSpaceHistory, p as runSpaceWatch, q as renderOpenMeldHeader, r as runSpaceAddMembers, s as runSpaceJoin, t as buildCreateSpacePasswordPromptConfig, tt as ensureAgentProfileRuntimeBinding, u as runSpacePassword, v as buildHumanReadSignalsTranscriptItems, w as buildFormalDispatchResultReadPayload, x as loadSpaceIdentityDirectoryOrNull, y as emitHumanReadSignalsTextProjection, z as buildReplyReadinessGuidance } from "./command-MlrjQYq5.js";
19
- import { a as areAllowedActionsEquivalent, p as canonicalizeAllowedActions, r as SPACE_CONTRACT_ALLOWED_ACTION_ORDER, s as buildAgentFacingPublicationModeGuideLines, t as OPENMELD_AGENT_MENTAL_MODEL_LINES } from "./dist-ChS52b_E.js";
20
- import { C as readAgentActivityOutboxHealth, Dt as upsertSpaceConfig, Ft as buildSignalMessageReadProjection, Mt as buildDispatchResultReplyWorkflowProjection, Nt as buildPublicSpaceEntryUrl, Pt as buildSignalIndex, T as removeProjectOutbox, Ut as buildUpdatesReplyWorkflowProjection, Vt as buildSpaceRoundReadProjection, Zt as formatRemovedCcRelationMessage, et as readRecentDaemonDispatchJournalEvents, g as readCodexSessionTitles, gt as inspectSpaceCacheFile, h as normalizeSharedSessionTitle, jt as buildDispatchResultMessageReadProjection, m as resolveObservedAgentActivityBinding, p as buildAgentActivityEvent, qt as createSpaceMemberIdentityIndex, v as enqueueAgentActivityHookEvent, y as removeProjectInbox } from "./daemon-frame-transport-D-4StENt.js";
21
- import { E as updateConfiguredStartV1OnboardingState, S as setConfiguredSkillsConfig, a as resolveBaseUrl, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, g as getConfiguredSkillsConfig, m as getConfiguredOnboardingDisclaimerAcceptedAt, o as resolveBaseUrlOrNull, u as alignRuntimeConfigStorage, w as updateConfiguredOnboardingConfig } from "./base-url-D7uE_xTo.js";
7
+ import { At as ensureOpenMeldManagedProfileWorkspace, C as createModelCatalogReadSession, E as resolveProfileWorkspaceRuntime, Et as listBuiltinAgentsRegistryEntries, I as listAgentTargetStates, It as setCustomProfileWorkspace, K as notifyDaemonRouteCatalogChanged, Lt as setOpenMeldManagedProfileWorkspace, Mt as readProfileWorkspaceConfig, Nr as compareAgentControllerRefsForDisplay, O as syncDeviceRuntimeStateProjection, Pt as resolveConfiguredProfileWorkspacePath, Q as resolveLocalRegistryAgentIdFromAgentControllerRef, Rt as validateCustomProfileWorkspacePath, S as syncProfileWorkspaceState, Sr as resolveNativeAgentControllerPermissionModeForController, St as canonicalizeLocalProjectPath, _t as removeProjectConnection, br as resolveAgentProfileEditCapabilities, bt as setDefaultProjectConnection, fr as listAgentControllerPermissionModeOptions, ft as listProjectBindings, hr as projectPeopleComputersToLegacyLocalRuntimes, j as resolveAgentProfilePrimaryAgentControllerReport, jt as normalizeCustomProfileWorkspacePath, k as createPrimaryBindingReadSession, lr as getAgentControllerPermissionModeDisplayMetadata, mr as peopleComputerContainsDevice, mt as migrateProjectBindingStore, pr as parseAgentControllerRef, pt as listProjectConnectionsWithStatus, sr as createAgentExecutionStatusDisplayRows, ur as getAgentControllerPermissionModeFieldLabel, ut as bindProject, vr as resolveAgentControllerPermissionModeForController, xr as resolveEvidenceSyncHealth, xt as unbindProject, yr as resolveAgentExecutionStatus, yt as runIfAgentActivityBindingGenerationIsCurrent, zt as describeProfileWorkspacePathValidationFailure } from "./prepare-provider-runtime-L84g7H_Q.js";
8
+ import { $t as isSpaceFileTextEditable, An as spaceContractSchema, Bt as centerAgentInteractionSourceSchema, Gt as spaceWorkSelectionSchema, Kr as START_BOUNDED_ID_SCHEMA, Kt as spaceWorkingCopyResultSchema, Tn as spaceThreadContextSchema, Un as messageEnvelopeSchema, Ut as spaceWorkHandoffSchema, Yr as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, _r as runtimeTransportAdmissionEvidenceSchema, di as openMeldRequestContextSchema, fr as clientMessageIdSchema, in as resolveSpaceFileMimeType, kn as spaceContractFieldsSchema, lr as agentInteractionResponseSchema, ui as openMeldProfileIdSchema, zt as spaceStatusSchema } from "./runtime-transport-CivtwW1A.js";
9
+ import { C as updateAuthSessionActiveOrganization, T as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, d as getAuthSessionState, f as getCurrentAuthOwnerUserId, g as normalizeStoredActiveOrganization, n as AuthSessionRecoveryInProgressError, o as buildStoredAuthSessionIdentity, s as clearAuthSession, t as AuthSessionChangedBeforeTransitionError, u as getAuthSessionMetadata } from "./auth-session-BDEv3tou.js";
10
+ import { L as nonEmptyTrimmedStringFromUnknown, O as openMeldRuntimeProfileIdSchema, w as dispatchExecutionSchema, z as trimmedStringFromUnknown } from "./control-plane-rTE2rHZ5.js";
11
+ import { t as computerConnectionIntentSchema } from "./computer-connection-NCM-EnCu.js";
12
+ import { d as readSelectedSkillDocument, r as ensureLocalSkills } from "./state-CZHAuQRD.js";
13
+ import { $ as buildAuthStatusSnapshot, B as resolveDaemonServiceParticipationStatus, C as buildProfileWorkspaceRows, E as emitDaemonAgentOverview, F as emitCliJsonEnvelope, G as ensureCommandAuthenticationOrCancel, H as validateLocalProjectConnectionPath, I as runDaemonStartupPreflight, J as runAuthLogout, K as evaluateCommandAuthentication, M as buildHumanErrorCopy, N as renderHumanErrorCard, O as shouldEmitAgentOverview, P as renderHumanTextErrorCard, Q as buildAuthStatusRows, R as resolveLocalComponentsStatus, S as buildProfileWorkspacePresentation, V as LocalProjectConnectionError, W as buildCommandAuthenticationPromptMessage, X as runAuthStatus, Y as runAuthMenu, Z as exchangeOneTimeTokenAuthSession, a as runDaemonBackgroundStartForDecision, at as promptTextEntry, c as runDaemonInterrupt, ct as finishCurrentCommandCheckScope, dt as resetCurrentCommandCheckState, et as formatActiveOrganizationLabel, f as runDaemonSnapshot, ft as startCurrentCommandCheckScope, g as runDaemonUninstall, h as runDaemonTeardownStrict, i as runDaemonAutostart, j as runDaemonStartDecisionPrompt, l as runDaemonReinstall, lt as getCurrentCommandCheckState, m as runDaemonStop, n as isManagedSystemServiceBootstrapRun, nt as renderInfoCard, o as runDaemonCancel, ot as isReturnKeypress, p as runDaemonStatusFlow, q as runAuthLogin, r as runDaemon, rt as renderTextInfoCard, s as runDaemonInstall, st as runInteractivePrompt, t as bestEffortStopCurrentLaneDaemonService, u as runDaemonRunAfterEntryChecks, ut as isCurrentCommandCheckScopeActive, w as reconcileCliVersionView, x as resolveServiceParticipationReadiness, y as formatServiceParticipationReadinessLabel, z as writeInstalledLocalComponentsSnapshot } from "./service-DYid1j4Y.js";
14
+ import { C as readAgentActivityOutboxHealth, Cn as cliJsonSkillsLoadEnvelopeSchema, Dn as organizationJoinLinkErrorResponseSchema, Dt as upsertSpaceConfig, En as getOrganizationJoinLinkResponseSchema, Ft as buildSignalMessageReadProjection, Mt as buildDispatchResultReplyWorkflowProjection, Nt as buildPublicSpaceEntryUrl, On as organizationJoinLinkManagementQuerySchema, Pt as buildSignalIndex, Sn as cliJsonSkillsListEnvelopeSchema, T as removeProjectOutbox, Tn as acceptOrganizationJoinLinkBodySchema, Ut as buildUpdatesReplyWorkflowProjection, Vt as buildSpaceRoundReadProjection, Zt as formatRemovedCcRelationMessage, et as readRecentDaemonDispatchJournalEvents, g as readCodexSessionTitles, gt as inspectSpaceCacheFile, h as normalizeSharedSessionTitle, jt as buildDispatchResultMessageReadProjection, kn as revokeOrganizationJoinLinkResponseSchema, m as resolveObservedAgentActivityBinding, p as buildAgentActivityEvent, qt as createSpaceMemberIdentityIndex, v as enqueueAgentActivityHookEvent, wn as cliJsonSkillsShowEnvelopeSchema, xn as cliJsonOutputEnvelopeSchema, y as removeProjectInbox } from "./daemon-frame-transport-C3SOtG8a.js";
15
+ import { A as readControllerTaskLifecycleOutboxHealth, B as uninstallAgentActivityIntegrations, D as readAgentActivityContextForPath, I as defaultManagedIntegrationPaths, L as installAgentActivityIntegrations, M as registerAgentActivityRoute, N as resolveAgentActivityRouteForPath, O as removeAgentActivityContextCache, P as unregisterAgentActivityRoute, R as readAgentActivityIntegrationStatus, a as fetchSpaceUpdates, c as materializeOrganizationSkillRelease, d as runSpaceActionHelp, f as runSpaceActionReply, g as runSpaceActionWake, h as runSpaceActionTargets, j as isAgentActivityRouteRegistered, k as enqueueControllerTaskLifecycleEventWhileLocked, m as runSpaceActionStatus, o as createSpaceWorkingCopies, p as runSpaceActionSilent, s as downloadWorkingCopyFile, t as readRuntimeReportingHealthState, u as runSpaceActionMcpServer, w as syncLocalAgentActivity, z as resolveAgentActivityDispatcherCommand } from "./runtime-reporting-health-state-DwlV1Fsv.js";
16
+ import { G as readManagedCliInstallation, H as buildInstallSelfJsonPayload, U as performManagedInstall, r as readCurrentDaemonRuntimeContext } from "./daemon-service-runtime-BEfMD5jb.js";
17
+ import { B as requireOpenMeldProfile, H as createOpenMeldAgentProfile, J as resolveOpenMeldProfile, K as listOpenMeldProfiles, U as createOpenMeldHumanProfile, V as resolveOpenMeldProfileOrNull, W as deleteOpenMeldProfile, X as updateOpenMeldProfile, at as buildAgentAuthenticationGuide, ct as buildHumanAuthenticationCard, dt as resolveAuthenticationGuidance, et as alignSelectedOpenMeldProfileStorage, ft as resolveAuthenticationGuidanceFromError, it as setSelectedOpenMeldProfileId, lt as createAuthenticationError, nt as clearSelectedOpenMeldProfileId, pt as resolveAuthenticationGuidanceFromMessage, q as primeOpenMeldProfilesSessionCache, rt as getSelectedOpenMeldProfileId, z as isSelectedOpenMeldProfileRequiredError } from "./daemon-device-id-BOqTgR9G.js";
18
+ import { a as activateWindowsManagedCommand } from "./process-identity-BQLdaZdB.js";
19
+ import { A as formatDeviceReplyReadinessLabel, B as resolveGatewayChainReadiness, Bt as assessCliUpdate, It as assessServerRequiredVersion, J as getSetupFlowCopy, K as buildDaemonRouteObservationPresentation$1, Mt as classifyDaemonServiceRunStartability, N as mapAgentReplyReadinessToLegacyAutoReply, Nt as classifyDaemonServiceWakeability, O as resolveCurrentReplyReadinessSnapshot, Pt as resolveCurrentDaemonExpectedVersion, T as resolveDaemonServiceFreshnessWarning, U as resolveOpenClawLocalDiagnosticsValue, Vt as isCliUpdateCheckApplicable, _ as resolveServiceReadinessFromServiceStatus, ft as inspectDaemonServiceInventory, j as formatHumanReplyReadinessReason$1, k as formatAgentReplyReadinessLabel, q as buildOnboardingPlan, t as runPendingDaemonServiceUpdate, zt as readCurrentLocalDeviceId } from "./daemon-service-update-coordinator-uQW-Ib66.js";
20
+ import { $ as ensureAgentProfileRuntimeBinding, A as assertFullSignalIdArgument, B as resolveAgentProfileSetup, C as buildFormalSignalReadPayload, D as resolveOrganizationVisibilityLabel, E as resolveLinkAccessLabel, F as emitSpaceCliAgentOverview, G as renderOpenMeldHeader, H as colorizeDisplayProfileLabel, I as prepareLocalAgentReadiness, J as resolveSpaceSendText, K as renderOpenMeldLogo, L as buildReplyReadinessGuidance, M as prepareAuthenticatedSpaceCommandContext, N as resolveOpenMeldProfileForSpaceCommand, O as parseEnvelope, P as emitSpaceAgentOverview, Q as resolveCreateProfileName, R as resolveHumanControllerDisplayName, S as buildFormalDispatchResultReadPayload, T as formatHumanReadTargetList, U as printOpenMeldBanner, V as colorizeAgentLabel, W as renderOpenMeldBrandBlockLines, X as createProfileByKind, Y as resolveSpaceTaskSelection, Z as resolveCreateProfileKind, _ as emitHumanReadSignalsTextProjection, a as runSpaceDelete, b as loadSpaceSignalIndexOrNull, c as runSpaceLeave, d as runSpaceRemoveMembers, et as assessActionParticipationCandidate, f as runSpaceSend, g as buildHumanReadSignalsTranscriptItems, h as runSpaceWriteWithPasswordRetry, i as runSpaceCreate, j as assertValidSpaceIdTarget, k as isSpaceCommandOutputHandledError, l as runSpaceList, m as runSpaceReadWithPasswordRetry, n as promptAndConfirmSpacePassword, o as runSpaceHistory, p as runSpaceWatch, q as renderOpenMeldTagline, r as runSpaceAddMembers, s as runSpaceJoin, t as buildCreateSpacePasswordPromptConfig, u as runSpacePassword, v as buildIdentityOnlyMembersSnapshotForReadProjection, w as buildHumanReplyContextSummary, x as toSpaceMetaUpsertInput, y as loadSpaceIdentityDirectoryOrNull, z as persistAgentTransportSelection } from "./command-CUNcwWww.js";
21
+ import { f as canonicalizeAllowedActions, i as areAllowedActionsEquivalent, o as buildAgentFacingPublicationModeGuideLines, t as OPENMELD_AGENT_MENTAL_MODEL_LINES } from "./dist-CkSuMZyq.js";
22
+ import { E as updateConfiguredStartV1OnboardingState, S as setConfiguredSkillsConfig, a as resolveBaseUrl, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, g as getConfiguredSkillsConfig, m as getConfiguredOnboardingDisclaimerAcceptedAt, o as resolveBaseUrlOrNull, u as alignRuntimeConfigStorage, w as updateConfiguredOnboardingConfig } from "./base-url-DvjOkKPs.js";
22
23
  import { n as resolveOpenMeldDistribution, t as isBinaryDistribution } from "./distribution-BDQT2ilb.js";
23
- import { A as getDaemonStatus } from "./daemon-state-B44aq2nm.js";
24
- import { i as readDaemonServiceContract } from "./daemon-service-contract-BpOBMGX0.js";
24
+ import { A as getDaemonStatus } from "./daemon-state-Ca0WK5x0.js";
25
+ import { i as readDaemonServiceContract } from "./daemon-service-contract-GLmAxsq-.js";
25
26
  import { a as formatOpenMeldCliTextBlock, c as resolveSetupFollowUpCliEntryCommand, i as formatOpenMeldCliLine, l as resolveUserFacingCliEntryCommand, n as formatOpenMeldCliCommand, r as formatOpenMeldCliCommands, s as formatProfileAwareOpenMeldCliCommands, t as formatInlineOpenMeldCliCommands } from "./cli-entry-command-CR_9QU1i.js";
26
- import { r as resolveAuthBaseUrl, t as resolveOpenMeldEnvironmentTarget } from "./openmeld-environment-target-B6HqY0_a.js";
27
- import { r as runServiceAccountCarrier } from "./service-account-authorization-DAPQy2yP.js";
28
- import { b as requestLocalAgentActivitySync, d as compareSemver, f as ensureVersionStateReady, l as OPENMELD_VERSION, y as LocalDaemonControlPlaneClientError } from "./daemon-lifecycle-journal-DcrVY0xb.js";
29
- import { a as requireOpenMeldProfile, d as setSelectedOpenMeldProfileId, f as getProfileDefaultView, i as isSelectedOpenMeldProfileRequiredError, l as clearSelectedOpenMeldProfileId, n as resolveRuntimeContext, o as resolveOpenMeldProfileOrNull, p as setProfileDefaultView, r as resolveViewProfileKey, s as alignSelectedOpenMeldProfileStorage, t as parseCliViewMode, u as getSelectedOpenMeldProfileId } from "./context-D9Ebb5wl.js";
30
- import { a as outJsonLine, i as errLine, n as sanitizeTerminalDisplayText, o as outLine, r as formatMessage, t as createPresenter } from "./presenter-BcxiQyJg.js";
31
- import { Ct as formatDualViewGuideForDisplay, D as createSpaceContractSetGuideError, E as createSpaceAliasTargetGuideError, J as createStartAuthenticationGuideError, K as createSpaceUpdatesGuideError, L as createSpaceRemoveMembersGuideError, M as createSpaceMenuGuideError, P as createSpacePublicationSetGuideError, R as createSpaceResultGuideError, S as createResetConfirmationGuideError, St as DualViewGuideError, T as createSpaceAddMembersGuideError, Tt as formatAgentOverviewPayload, U as createSpaceSubcommandTargetGuideError, W as createSpaceTargetGuideError, Z as getCommandHintsFromContract, b as createProfileCreateGuideError, ct as registerSkillsTargetSelectionOptions, dt as getCliVersionInfo, et as registerSpaceMemberSelectionOptions, ft as registerDaemonControlTargetOptions, g as canUseInteractivePrompts, j as createSpaceLeaveGuideError, mt as registerAuthLoginRequestOptions, q as createStartAgentIdentityGuideError, rt as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, v as createDoctorFailedGuideError, wt as buildDualViewGuideMessage, x as createProfileMenuGuideError, y as createProfileActionGuideError, yt as registerBuiltinAgentSelectionOptions } from "./elapsed-time-Cw6b9rYy.js";
32
- import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, p as deriveAuthBaseUrlFromGatewayUrl, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-D-Cb6EVg.js";
33
- import { n as collectSkillsReadinessSnapshot } from "./installation-inventory-Dwn8FoKT.js";
34
- import { t as runServiceAccountControl } from "./service-account-control-DZjUR3I_.js";
35
- import { C as buildNoLocalAgentsNoticeLines, D as recoverInterruptedComputerAuthHandoff, E as formatComputerAuthCleanupFailureSuffix, O as exchangeComputerAuthorizationGrant, S as buildLocalAgentsGuideUrl, T as emitUnusedSetupSessionCleanupWarning, _ as runStartLocalAgentsEnable, a as assertSetupServiceUpdateComplete, b as submitSelectedAgentControllerReports, c as collectObservedDeviceMetadata, d as collectStartLocalReadiness, f as runSkillsCheck$1, g as runSkillsUpdate, h as runSkillsUninstall, i as runPrepareSessionExecutor, j as writePrepareSessionSetupBootstrapResult, k as revokePreparedAuthSession, l as createSetupProgressReporter, m as runSkillsInstall, n as reportPrepareHandoffStopped, o as shouldForceSetupServiceRefresh, p as runSkillsEnsure, r as resolvePrepareSessionForHandoff, s as syncLocalSetupCurrentDeviceTargetFromServiceContract, t as connectPrepareSessionStream, u as resolveControllingTerminalSession, v as isCliOutputHandledError, w as confirmContinueWithoutLocalAgents, x as appendLocalAgentsGuideUrl, y as assertSelectedAgentControllerReportSubmissionsAccepted } from "./prepare-session-executor-C2nNM2yb.js";
36
- import { C as resolveGatewayWebOrigin, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, a as runAgentsCustomRemove, c as runAgentsDisable, d as runAgentsManage, f as runAgentsRepair, h as promptSearchMultiselect, i as runAgentsCustomList, l as runAgentsEnable, m as formatTransportModeDisplay, n as runAgentsConfig, o as runAgentsCustomUpdate, p as runAgentsShow, r as runAgentsCustomAdd, s as runAgentsDetect, t as runAgents, u as runAgentsList, w as resolveSpaceWebGatewayOrigin } from "./agents-2TzCubpV.js";
37
- import { n as submitProfileRuntimeAgentControllerReport, r as submitRuntimeAgentControllerReport } from "./runtime-agent-controller-reporting-submission-DGm8O4q_.js";
38
- import { a as runUpgrade, c as OPENMELD_UPGRADE_FAILURE_HINTS, l as OPENMELD_UPGRADE_METADATA_RECOVERY_HINTS, n as isUpgradeOutputHandledError, o as emitTopLevelAgentOverview, s as emitTopLevelCliAgentOverview, t as UPGRADE_INTERNAL_ALIGN_SERVICE_FLAG$1 } from "./upgrade-BTIKVek7.js";
39
- import { _ as readDispatchSpaceActionContextForReceiptFromEnv, c as readGatewayTextResponse, d as assertDispatchOwnedRuntimePublicWriteAllowed, l as toStructuredGatewayFailure, m as DispatchSpaceActionClosedError, n as fetchSpaceMeta, p as readDispatchOwnedRuntimeGuard, r as updateSpaceMeta, s as readGatewayJsonResponse, t as createCliSpaceApi, u as parseJsonResponse, v as readDispatchSpaceActionContextFromEnv, x as writeDispatchSpaceActionRecord } from "./cli-space-api-B2l1xMPn.js";
27
+ import { r as resolveAuthBaseUrl, t as resolveOpenMeldEnvironmentTarget } from "./openmeld-environment-target-BBn5Ko6p.js";
28
+ import { r as runServiceAccountCarrier } from "./service-account-authorization-Cx6KEfvI.js";
29
+ import { b as requestLocalAgentActivitySync, d as compareSemver, f as ensureVersionStateReady, l as OPENMELD_VERSION, y as LocalDaemonControlPlaneClientError } from "./daemon-lifecycle-journal-D4uZ-Ykq.js";
30
+ import { a as setProfileDefaultView, i as getProfileDefaultView, n as resolveRuntimeContext, r as resolveViewProfileKey, t as parseCliViewMode } from "./context-BUmQsG9U.js";
31
+ import { n as outJsonLine, r as outLine, t as errLine } from "./io-DT66typ4.js";
32
+ import { n as sanitizeTerminalDisplayText, r as formatMessage, t as createPresenter } from "./presenter-MJ5YgsOT.js";
33
+ import { Ct as formatDualViewGuideForDisplay, D as createSpaceContractSetGuideError, E as createSpaceAliasTargetGuideError, J as createStartAuthenticationGuideError, K as createSpaceUpdatesGuideError, L as createSpaceRemoveMembersGuideError, M as createSpaceMenuGuideError, P as createSpacePublicationSetGuideError, R as createSpaceResultGuideError, S as createResetConfirmationGuideError, St as DualViewGuideError, T as createSpaceAddMembersGuideError, Tt as formatAgentOverviewPayload, U as createSpaceSubcommandTargetGuideError, W as createSpaceTargetGuideError, Z as getCommandHintsFromContract, b as createProfileCreateGuideError, ct as registerSkillsTargetSelectionOptions, dt as getCliVersionInfo, et as registerSpaceMemberSelectionOptions, ft as registerDaemonControlTargetOptions, g as canUseInteractivePrompts, j as createSpaceLeaveGuideError, mt as registerAuthLoginRequestOptions, q as createStartAgentIdentityGuideError, rt as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, v as createDoctorFailedGuideError, wt as buildDualViewGuideMessage, x as createProfileMenuGuideError, y as createProfileActionGuideError, yt as registerBuiltinAgentSelectionOptions } from "./elapsed-time-DmXBSBLX.js";
34
+ import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, p as deriveAuthBaseUrlFromGatewayUrl, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-D2lqqEZK.js";
35
+ import { n as collectSkillsReadinessSnapshot } from "./installation-inventory-B50K5Nme.js";
36
+ import { t as runServiceAccountControl } from "./service-account-control-NTVNuQbb.js";
37
+ import { C as buildNoLocalAgentsNoticeLines, D as recoverInterruptedComputerAuthHandoff, E as formatComputerAuthCleanupFailureSuffix, O as exchangeComputerAuthorizationGrant, S as buildLocalAgentsGuideUrl, T as emitUnusedSetupSessionCleanupWarning, _ as runStartLocalAgentsEnable, a as assertSetupServiceUpdateComplete, b as submitSelectedAgentControllerReports, c as collectObservedDeviceMetadata, d as collectStartLocalReadiness, f as runSkillsCheck$1, g as runSkillsUpdate, h as runSkillsUninstall, i as runPrepareSessionExecutor, j as writePrepareSessionSetupBootstrapResult, k as revokePreparedAuthSession, l as createSetupProgressReporter, m as runSkillsInstall, n as reportPrepareHandoffStopped, o as shouldForceSetupServiceRefresh, p as runSkillsEnsure, r as resolvePrepareSessionForHandoff, s as syncLocalSetupCurrentDeviceTargetFromServiceContract, t as connectPrepareSessionStream, u as resolveControllingTerminalSession, v as isCliOutputHandledError, w as confirmContinueWithoutLocalAgents, x as appendLocalAgentsGuideUrl, y as assertSelectedAgentControllerReportSubmissionsAccepted } from "./prepare-session-executor-uQHhdNg8.js";
38
+ import { C as resolveGatewayWebOrigin, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, a as runAgentsCustomRemove, c as runAgentsDisable, d as runAgentsManage, f as runAgentsRepair, h as promptSearchMultiselect, i as runAgentsCustomList, l as runAgentsEnable, m as formatTransportModeDisplay, n as runAgentsConfig, o as runAgentsCustomUpdate, p as runAgentsShow, r as runAgentsCustomAdd, s as runAgentsDetect, t as runAgents, u as runAgentsList, w as resolveSpaceWebGatewayOrigin } from "./agents-PsEPfW3B.js";
39
+ import { n as submitProfileRuntimeAgentControllerReport, r as submitRuntimeAgentControllerReport } from "./runtime-agent-controller-reporting-submission-AmSxt3Z1.js";
40
+ import { a as runUpgrade, c as OPENMELD_UPGRADE_FAILURE_HINTS, l as OPENMELD_UPGRADE_METADATA_RECOVERY_HINTS, n as isUpgradeOutputHandledError, o as emitTopLevelAgentOverview, s as emitTopLevelCliAgentOverview, t as UPGRADE_INTERNAL_ALIGN_SERVICE_FLAG$1 } from "./upgrade-ym-rbiAR.js";
41
+ import { c as toStructuredGatewayFailure, f as createCliSpaceApi, h as readDispatchOwnedRuntimeGuard, l as parseJsonResponse, n as updateSpaceMeta, o as readGatewayJsonResponse, p as assertDispatchOwnedRuntimePublicWriteAllowed, s as readGatewayTextResponse, t as fetchSpaceMeta, x as readDispatchSpaceActionContextFromEnv } from "./meta-api-C4_z3Ins.js";
40
42
  import { createHash, randomUUID } from "node:crypto";
41
43
  import { homedir, tmpdir } from "node:os";
42
44
  import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
43
- import { access, appendFile, mkdir, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
45
+ import { appendFile, mkdir, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
44
46
  import * as z$1 from "zod/v4";
45
- import { z } from "zod/v4";
46
- import { constants, openAsBlob, readFileSync, realpathSync } from "node:fs";
47
+ import { openAsBlob, realpathSync } from "node:fs";
47
48
  import process$1 from "node:process";
48
49
  import { execFile, spawn } from "node:child_process";
49
- import { setTimeout as setTimeout$1 } from "node:timers/promises";
50
50
  import { promisify } from "node:util";
51
+ import { setTimeout as setTimeout$1 } from "node:timers/promises";
51
52
  import pc from "picocolors";
52
53
  import { cancel, confirm, intro, isCancel, multiselect, note, outro, select, spinner, text } from "@clack/prompts";
53
- import { performance } from "node:perf_hooks";
54
54
  import { Command, Option } from "commander";
55
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
56
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
57
55
  //#region ../../packages/schemas/dist/organization-join-request.js
58
56
  const id$1 = z$1.string().trim().min(1).max(255);
59
57
  const organizationJoinRequestSchema = z$1.strictObject({
@@ -360,9 +358,7 @@ const spaceBoardResponseSchema = z$1.strictObject({
360
358
  workingNow: z$1.array(spaceBoardWorkingExecutionSchema),
361
359
  recentOutcomes: z$1.array(spaceBoardRecentOutcomeSchema).max(10)
362
360
  });
363
- //#endregion
364
- //#region ../../packages/schemas/dist/schemas/http/space-contract.js
365
- const patchSpaceContractBodySchema = spaceContractFieldsSchema.pick({
361
+ const patchSpaceContractBodySchema = spaceContractFieldsSchema.extend({ allowedActions: spaceContractFieldsSchema.shape.allowedActions.transform((actions) => actions.filter((action) => action !== "post_status")).refine((actions) => actions.length > 0, { message: "The status tool is retired. Choose reply (post_message), stay_silent, or both; no replacement permission is granted automatically." }) }).pick({
366
362
  dispatchPolicy: true,
367
363
  publicationMode: true,
368
364
  allowedActions: true,
@@ -503,50 +499,6 @@ z$1.strictObject({
503
499
  });
504
500
  const getSpaceDispatchResultResponseSchema = dispatchResultSchema;
505
501
  //#endregion
506
- //#region ../../packages/schemas/dist/schemas/space-mesh/dispatch-space-action-receipt.js
507
- const dispatchSpaceActionClosedReasonCodeSchema = z$1.enum(["space_action.context_expired", "space_action.context_mismatch"]);
508
- const dispatchSpaceActionReceiptSchema = z$1.discriminatedUnion("status", [
509
- z$1.strictObject({
510
- status: z$1.literal("proposal_saved_locally"),
511
- actionType: z$1.enum([
512
- "post_message",
513
- "post_status",
514
- "stay_silent"
515
- ]),
516
- attemptId: z$1.string().min(1),
517
- contextId: z$1.string().min(1),
518
- dispatchId: z$1.string().min(1),
519
- recordedAtMs: z$1.number().int().nonnegative(),
520
- contextState: z$1.enum(["active", "expired"]),
521
- coordinatorAcceptance: z$1.literal("unconfirmed"),
522
- publication: z$1.literal("unconfirmed")
523
- }),
524
- z$1.strictObject({
525
- status: z$1.literal("rejected_closed"),
526
- reasonCode: dispatchSpaceActionClosedReasonCodeSchema,
527
- coordinatorAcceptance: z$1.literal("unconfirmed"),
528
- publication: z$1.literal("unconfirmed")
529
- }),
530
- z$1.strictObject({
531
- status: z$1.literal("outcome_unknown"),
532
- reasonCode: z$1.literal("space_action.recording_outcome_unknown"),
533
- coordinatorAcceptance: z$1.literal("unconfirmed"),
534
- publication: z$1.literal("unconfirmed")
535
- })
536
- ]);
537
- const dispatchSpaceActionToolResultSchema = z$1.strictObject({ receipt: dispatchSpaceActionReceiptSchema });
538
- //#endregion
539
- //#region ../../packages/schemas/dist/schemas/space-mesh/dispatch-space-history.js
540
- const dispatchSpaceHistoryRequestSchema = z$1.strictObject({});
541
- const dispatchSpaceHistoryResultSchema = z$1.strictObject({
542
- spaceId: z$1.string().min(1),
543
- sourceSignalId: z$1.string().min(1),
544
- beforeCount: z$1.literal(20),
545
- afterCount: z$1.literal(0),
546
- signals: z$1.array(z$1.record(z$1.string(), z$1.unknown())).max(21),
547
- nextCursor: z$1.string().min(1).nullable()
548
- });
549
- //#endregion
550
502
  //#region ../../packages/schemas/dist/space-invitation.js
551
503
  const id = z$1.string().trim().min(1).max(200);
552
504
  const spaceInvitationRequestSchema = z$1.discriminatedUnion("action", [
@@ -8884,6 +8836,13 @@ function getManagedCliCommandActivationNotice(activation) {
8884
8836
  async function activateManagedCliCommand(input) {
8885
8837
  const env = input.env ?? process.env;
8886
8838
  if (resolveOpenMeldEnvPreset({ env }) !== "prod" || normalizeOptionalText$5(env["OPENMELD_HOME"])) return { status: "not_applicable" };
8839
+ if (process.platform === "win32") return await withManagedCliCommandActivationLock({
8840
+ env,
8841
+ run: async () => ({
8842
+ status: await activateWindowsManagedCommand(openMeldBinDir({ env })),
8843
+ registryPath: "HKEY_CURRENT_USER\\Environment\\Path"
8844
+ })
8845
+ });
8887
8846
  const home = normalizeOptionalText$5(env.HOME);
8888
8847
  if (!home) return {
8889
8848
  shell: normalizeOptionalText$5(env.SHELL),
@@ -9433,7 +9392,7 @@ async function updateAgentProfilePrimaryBindingAgentControllerPermissionMode(inp
9433
9392
  //#region src/system/agent-profile-binding-model-selection.ts
9434
9393
  async function updateAgentProfilePrimaryBindingModelSelection(input) {
9435
9394
  const api = createAgentProfileBindingApi(createCliApiClientFoundation(await resolveBaseUrl()));
9436
- const modelId = normalizeRequiredText$1(input.modelId, "--model is required.");
9395
+ const modelId = normalizeRequiredText(input.modelId, "--model is required.");
9437
9396
  const reasoningLevel = normalizeOptionalText$4(input.reasoningLevel);
9438
9397
  return await api.updatePrimaryBindingModelSelection({
9439
9398
  agentProfileId: input.profile.openMeldProfileId,
@@ -9442,7 +9401,7 @@ async function updateAgentProfilePrimaryBindingModelSelection(input) {
9442
9401
  ...reasoningLevel ? { reasoningLevel } : {}
9443
9402
  });
9444
9403
  }
9445
- function normalizeRequiredText$1(value, message) {
9404
+ function normalizeRequiredText(value, message) {
9446
9405
  const normalized = normalizeOptionalText$4(value);
9447
9406
  if (!normalized) throw new Error(message);
9448
9407
  return normalized;
@@ -12110,6 +12069,7 @@ async function runServiceTrace(input, deps = {}) {
12110
12069
  const evidenceSyncHealth = agentExecutionStatus ? buildServiceTraceEvidenceSyncHealth({ projection: agentExecutionStatus }) : null;
12111
12070
  const daemonDispatchJournal = resolveDaemonDispatchJournalEvidence(selection.dispatchId);
12112
12071
  const agentSummary = buildAgentTraceCompactSummary({ trace: traceResponse.trace });
12072
+ const admissionRejections = resolveAdmissionRejections(traceResponse.trace);
12113
12073
  const traceReadinessGuidance = shouldExposeCurrentReadinessGuidance(traceResponse.trace) ? targetContext.guidance : null;
12114
12074
  const payload = {
12115
12075
  ...traceResponse.serviceConnectionDiagnostics ? { serviceConnectionDiagnostics: traceResponse.serviceConnectionDiagnostics } : {},
@@ -12140,6 +12100,7 @@ async function runServiceTrace(input, deps = {}) {
12140
12100
  },
12141
12101
  currentProfileWorkspace: targetContext.currentProfileWorkspace,
12142
12102
  agentSummary,
12103
+ admissionRejections,
12143
12104
  guidance: traceReadinessGuidance
12144
12105
  };
12145
12106
  if (runtime.resolvedView === "agent") {
@@ -12157,6 +12118,7 @@ async function runServiceTrace(input, deps = {}) {
12157
12118
  targetProfile: payload.targetProfile,
12158
12119
  projectFailureContext: traceResponse.trace?.resultInbox?.projectFailureContext ?? null,
12159
12120
  agentSummary,
12121
+ admissionRejections,
12160
12122
  diagnosticSummary: buildAgentTraceSummary({
12161
12123
  dispatchId: traceResponse.query.dispatchId,
12162
12124
  trace: traceResponse.trace
@@ -13036,6 +12998,20 @@ function parseRuntimeCoordinatorEventPayload(event) {
13036
12998
  return null;
13037
12999
  }
13038
13000
  }
13001
+ function resolveAdmissionRejections(trace) {
13002
+ return (trace?.runtimeCoordinatorEvents ?? []).filter((event) => event.eventType === "delivery_rejected").slice(-10).map((event) => {
13003
+ const routeEvidence = parseRuntimeCoordinatorEventPayload(event)?.deliveryRouteEvidence;
13004
+ const route = routeEvidence && typeof routeEvidence === "object" && !Array.isArray(routeEvidence) ? routeEvidence : null;
13005
+ const parsed = runtimeTransportAdmissionEvidenceSchema.safeParse(route?.admissionEvidence);
13006
+ return {
13007
+ observedAtMs: event.observedAtMs,
13008
+ rejectionReasonCode: event.reasonCode,
13009
+ acceptingDispatches: route?.acceptingDispatches ?? "unknown",
13010
+ admissionEvidence: parsed.success ? parsed.data : null,
13011
+ evidenceStatus: parsed.success ? "reported" : "not_reported"
13012
+ };
13013
+ });
13014
+ }
13039
13015
  function readRuntimeCoordinatorPayloadString(payload, fieldName) {
13040
13016
  const value = payload?.[fieldName];
13041
13017
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
@@ -16263,7 +16239,7 @@ function isFlowResult(value) {
16263
16239
  }
16264
16240
  //#endregion
16265
16241
  //#region src/commands/uninstall.ts
16266
- const execFileAsync$1 = promisify(execFile);
16242
+ const execFileAsync = promisify(execFile);
16267
16243
  const UNINSTALL_INTERNAL_SAFE_VALIDATION_FLAG = "--internal-safe-validation";
16268
16244
  async function runUninstall(input) {
16269
16245
  const runtime = await resolveRuntimeContext({ view: input.view });
@@ -16590,7 +16566,7 @@ function resolvedKeepAction() {
16590
16566
  }
16591
16567
  async function resolveProductionCliInstallSource() {
16592
16568
  const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
16593
- const npmGlobalRootPath = await execFileAsync$1(npmCommand, ["root", "-g"], { encoding: "utf8" }).then((result) => String(result.stdout ?? "").trim()).catch(() => "");
16569
+ const npmGlobalRootPath = await execFileAsync(npmCommand, ["root", "-g"], { encoding: "utf8" }).then((result) => String(result.stdout ?? "").trim()).catch(() => "");
16594
16570
  return inferProductionCliInstallSourceFromPaths({
16595
16571
  cliScriptPath: process.argv[1],
16596
16572
  npmGlobalRootPath
@@ -17611,11 +17587,12 @@ async function resolveManagedCliDelegation(input) {
17611
17587
  env,
17612
17588
  argv: input.argv
17613
17589
  }) !== "prod" || normalizeOptionalText$2(env["OPENMELD_HOME"]) || env[MANAGED_CLI_DELEGATION_ENV] === "1" || isServiceCarrierCommand(firstCommand, secondCommand) || args.includes(UPGRADE_INTERNAL_ALIGN_SERVICE_FLAG)) return { status: "stay" };
17614
- const managed = await resolveUsableManagedCli({
17590
+ const managed = await readManagedCliInstallation({
17615
17591
  env,
17616
17592
  argv: input.argv
17617
17593
  });
17618
17594
  if (!managed) return { status: "stay" };
17595
+ const managedPath = await realpath(managed.binaryPath);
17619
17596
  let versionComparison;
17620
17597
  try {
17621
17598
  versionComparison = compareSemver(managed.version, input.currentVersion);
@@ -17624,13 +17601,13 @@ async function resolveManagedCliDelegation(input) {
17624
17601
  }
17625
17602
  if (versionComparison >= 0) return {
17626
17603
  args,
17627
- command: managed.path,
17604
+ command: managedPath,
17628
17605
  reason: "managed_cli_is_current",
17629
17606
  status: "delegate"
17630
17607
  };
17631
17608
  if (firstCommand === "upgrade") return {
17632
17609
  args,
17633
- command: managed.path,
17610
+ command: managedPath,
17634
17611
  reason: "managed_cli_upgrade_owns_channel",
17635
17612
  status: "delegate"
17636
17613
  };
@@ -17655,18 +17632,6 @@ async function runManagedCliDelegation(delegation, env = process.env) {
17655
17632
  });
17656
17633
  });
17657
17634
  }
17658
- async function resolveUsableManagedCli(input) {
17659
- const resolvedPath = await realpath(openMeldManagedBinaryPath(input)).catch(() => null);
17660
- if (!resolvedPath) return null;
17661
- if (!(await stat(resolvedPath).catch(() => null))?.isFile()) return null;
17662
- if (!await access(resolvedPath, constants.X_OK).then(() => true, () => false)) return null;
17663
- const version = basename(dirname(resolvedPath));
17664
- if (!version) return null;
17665
- return await realpath(openMeldManagedVersionBinaryPath(version, input)).catch(() => null) === resolvedPath ? {
17666
- path: resolvedPath,
17667
- version
17668
- } : null;
17669
- }
17670
17635
  function isServiceCarrierCommand(firstCommand, secondCommand) {
17671
17636
  return (firstCommand === "service" || firstCommand === "daemon") && secondCommand === "run";
17672
17637
  }
@@ -20906,6 +20871,7 @@ async function runProfileCreationRequestCreate(input) {
20906
20871
  async function resolveRequestConfiguration(options) {
20907
20872
  const { context, input, targetOwnerUserId } = options;
20908
20873
  const agentControllerRef = normalizeOptionalText$1(input.agentController);
20874
+ if (agentControllerRef === "hosted:remote-agent" && input.sessionStrategy !== void 0 && input.sessionStrategy !== "new") throw new Error("Remote Agents start new Sessions; Resume and Fork require a Local Agent.");
20909
20875
  const targetComputerId = await resolveRequestComputerId({
20910
20876
  agentControllerRef,
20911
20877
  context,
@@ -20938,6 +20904,10 @@ async function resolveRequestConfiguration(options) {
20938
20904
  }
20939
20905
  async function resolveRequestComputerId(options) {
20940
20906
  const { agentControllerRef, context, requestedComputerId, targetOwnerUserId } = options;
20907
+ if (agentControllerRef === "hosted:remote-agent") {
20908
+ if (requestedComputerId) throw new Error("Remote Agents do not use a Computer. Remove --computer.");
20909
+ return null;
20910
+ }
20941
20911
  if (!(agentControllerRef || requestedComputerId)) return null;
20942
20912
  if (!agentControllerRef) throw new ProfileCreationRequestCliError({
20943
20913
  code: "profile.creation_request.agent_controller_required",
@@ -20979,6 +20949,10 @@ async function resolveRequestComputerId(options) {
20979
20949
  async function resolveRequestDefaultProjectId(options) {
20980
20950
  const { agentControllerRef, context, input, targetOwnerUserId } = options;
20981
20951
  const explicitProjectId = normalizeOptionalText$1(input.defaultProjectId);
20952
+ if (agentControllerRef === "hosted:remote-agent") {
20953
+ if (explicitProjectId) throw new Error("Remote Agents do not use a Project folder. Remove --project.");
20954
+ return null;
20955
+ }
20982
20956
  if (explicitProjectId) return explicitProjectId;
20983
20957
  if (input.reuseSavedDefaultProject === false || !agentControllerRef || targetOwnerUserId !== context.callerUserId) return null;
20984
20958
  return (await context.api.getAgentProfileCreationDefaults({
@@ -23140,897 +23114,6 @@ async function runSpaceAccess(input) {
23140
23114
  });
23141
23115
  }
23142
23116
  //#endregion
23143
- //#region src/space/action-command.ts
23144
- const FINAL_SAFE_STATUSES = /* @__PURE__ */ new Set([
23145
- "blocked",
23146
- "done",
23147
- "handoff",
23148
- "needs_input"
23149
- ]);
23150
- const DISPATCH_ACTION_CLI_PLACEHOLDER = "<DISPATCH_ACTION_CLI>";
23151
- const SPACE_ACTION_REPLY_TIMING_EVENT = "openmeld.space_action.reply_timing";
23152
- function runSpaceActionReply(input) {
23153
- const text = resolveReplyMessageText(input);
23154
- const result = recordDispatchSpaceReply({
23155
- filePaths: input.filePaths,
23156
- messagePartCount: input.messageParts.length,
23157
- mentionTargets: input.mentionTargets,
23158
- referenceTargets: input.referenceTargets,
23159
- text,
23160
- wakeTargets: input.wakeTargets
23161
- });
23162
- if (result instanceof Promise) return result.then((record) => {
23163
- emitActionRecorded(record);
23164
- });
23165
- emitActionRecorded(result);
23166
- }
23167
- function recordDispatchSpaceReply(input) {
23168
- const timing = createSpaceActionReplyTiming();
23169
- timing.emit("command_start", void 0, {
23170
- messagePartCount: input.messagePartCount ?? 0,
23171
- mentionTargetCount: input.mentionTargets?.length ?? 0,
23172
- referenceTargetCount: input.referenceTargets?.length ?? 0,
23173
- wakeTargetCount: input.wakeTargets?.length ?? 0
23174
- });
23175
- const filePaths = input.filePaths ?? [];
23176
- if (filePaths.length && input.files?.length) throw new Error("Choose uploaded paths or saved file revisions for this reply.");
23177
- const context = filePaths.length > 0 ? readDispatchSpaceActionContextFromEnv() : readDispatchSpaceActionContextForReceiptFromEnv();
23178
- timing.emit("context_ready", context);
23179
- assertAllowedAction(context, "post_message");
23180
- const text = normalizeRequiredText(input.text, "Reply message is required.");
23181
- const targetIds = resolveMessageEnvelopeTargetIds({
23182
- context,
23183
- mentionTargets: input.mentionTargets ?? [],
23184
- wakeTargets: input.wakeTargets ?? [],
23185
- referenceTargets: input.referenceTargets ?? []
23186
- });
23187
- timing.emit("targets_resolved", context, {
23188
- activationTargetCount: targetIds.activationTargets.length,
23189
- messageLength: text.length,
23190
- mentionTargetCount: targetIds.mentionTargets.length,
23191
- referenceTargetCount: targetIds.referenceTargets.length
23192
- });
23193
- if (filePaths.length === 0) return writeSpaceActionReplyRecord({
23194
- context,
23195
- files: input.files ? [...input.files] : [],
23196
- targetIds,
23197
- text,
23198
- timing
23199
- });
23200
- return uploadAndRecordSpaceActionReply({
23201
- context,
23202
- filePaths,
23203
- targetIds,
23204
- text,
23205
- timing
23206
- });
23207
- }
23208
- function resolveReplyMessageText(input) {
23209
- const hasInlineMessage = input.messageParts.length > 0;
23210
- const messageFilePath = input.messageFilePath?.trim();
23211
- if (hasInlineMessage && messageFilePath) throw new Error("Choose either a reply message or --message-file, not both.");
23212
- if (!messageFilePath) return normalizeRequiredJoinedText(input.messageParts, "Reply message is required.");
23213
- return normalizeRequiredText(readFileSync(messageFilePath === "-" ? 0 : messageFilePath, { encoding: "utf8" }), "Reply message is required.");
23214
- }
23215
- async function uploadAndRecordSpaceActionReply(input) {
23216
- const files = await uploadSpaceActionReplyFiles({
23217
- context: input.context,
23218
- filePaths: input.filePaths
23219
- });
23220
- return writeSpaceActionReplyRecord({
23221
- ...input,
23222
- files
23223
- });
23224
- }
23225
- function writeSpaceActionReplyRecord(input) {
23226
- const record = recordAction({
23227
- action: {
23228
- type: "post_message",
23229
- ...input.files.length > 0 ? { files: [...input.files] } : {},
23230
- messageEnvelope: {
23231
- activationTargets: input.targetIds.activationTargets,
23232
- mentionTargets: input.targetIds.mentionTargets,
23233
- referenceTargets: input.targetIds.referenceTargets,
23234
- ...input.context.replyToSignalId ? { replyToSignalId: input.context.replyToSignalId } : {},
23235
- text: input.text
23236
- }
23237
- },
23238
- command: "reply",
23239
- context: input.context
23240
- });
23241
- input.timing.emit("record_written", input.context, { actionType: record.action.type });
23242
- input.timing.emit("done", input.context, { actionType: record.action.type });
23243
- return record;
23244
- }
23245
- async function uploadSpaceActionReplyFiles(input) {
23246
- const prepared = await prepareRequestedSpaceSendFiles({ filePaths: input.filePaths });
23247
- if (prepared.length === 0) return [];
23248
- return await uploadPreparedSpaceFiles({
23249
- files: prepared,
23250
- requestContext: buildOpenMeldRequestContextFromProfile({ openMeldProfile: await requireOpenMeldProfile({
23251
- openMeldProfileId: input.context.targetProfileId,
23252
- persistSelection: false,
23253
- authAction: "sharing files in a Space reply"
23254
- }) }),
23255
- spaceApi: createCliSpaceApi(await resolveBaseUrl()),
23256
- spaceId: input.context.spaceId
23257
- });
23258
- }
23259
- function runSpaceActionWake(input) {
23260
- const context = readDispatchSpaceActionContextForReceiptFromEnv();
23261
- assertAllowedAction(context, "post_message");
23262
- const text = normalizeRequiredJoinedText(input.messageParts, "Wake handoff message is required.");
23263
- recordAction({
23264
- action: {
23265
- type: "post_message",
23266
- messageEnvelope: {
23267
- activationTargets: resolveTargetProfileIds({
23268
- context,
23269
- relation: "wake",
23270
- targets: [input.target]
23271
- }),
23272
- mentionTargets: [],
23273
- referenceTargets: [],
23274
- ...context.replyToSignalId ? { replyToSignalId: context.replyToSignalId } : {},
23275
- text
23276
- }
23277
- },
23278
- command: "wake",
23279
- context
23280
- });
23281
- }
23282
- function runSpaceActionStatus(input) {
23283
- emitActionRecorded(recordDispatchSpaceStatus({
23284
- status: input.status,
23285
- text: normalizeRequiredJoinedText(input.textParts, "Status text is required.")
23286
- }));
23287
- }
23288
- function recordDispatchSpaceStatus(input) {
23289
- const context = readDispatchSpaceActionContextForReceiptFromEnv();
23290
- assertAllowedAction(context, "post_status");
23291
- return recordAction({
23292
- action: {
23293
- type: "post_status",
23294
- status: normalizeStatus(input.status),
23295
- text: normalizeRequiredText(input.text, "Status text is required.")
23296
- },
23297
- command: "status",
23298
- context
23299
- });
23300
- }
23301
- function runSpaceActionSilent(input) {
23302
- emitActionRecorded(recordDispatchSpaceSilent(input));
23303
- }
23304
- function recordDispatchSpaceSilent(input) {
23305
- const context = readDispatchSpaceActionContextForReceiptFromEnv();
23306
- assertAllowedAction(context, "stay_silent");
23307
- return recordAction({
23308
- action: {
23309
- type: "stay_silent",
23310
- reason: normalizeRequiredText(input.reason, "A silent action requires --reason.")
23311
- },
23312
- command: "silent",
23313
- context
23314
- });
23315
- }
23316
- function runSpaceActionTargets() {
23317
- const targetReference = requireLoadedTargets(readDispatchSpaceActionContextFromEnv().sendTargetReference);
23318
- const wakeTargets = targetReference.projection.filter((target) => target.allowedRelations.wake);
23319
- const referenceTargets = targetReference.projection.filter((target) => target.allowedRelations.reference);
23320
- const mentionTargets = targetReference.projection.filter((target) => target.allowedRelations.mention);
23321
- outLine("Wake targets:");
23322
- if (wakeTargets.length === 0) outLine("- none");
23323
- else for (const target of wakeTargets) outLine(`- ${formatTargetLine(target, "wake")}`);
23324
- outLine("");
23325
- outLine("Mention targets:");
23326
- if (mentionTargets.length === 0) outLine("- none");
23327
- else for (const target of mentionTargets) outLine(`- ${formatTargetLine(target, "mention")}`);
23328
- outLine("");
23329
- outLine("Reference targets:");
23330
- if (referenceTargets.length === 0) outLine("- none");
23331
- else for (const target of referenceTargets) outLine(`- ${formatTargetLine(target, "reference")}`);
23332
- }
23333
- function runSpaceActionHelp() {
23334
- let context = null;
23335
- try {
23336
- context = readDispatchSpaceActionContextFromEnv();
23337
- } catch {
23338
- context = null;
23339
- }
23340
- outLine("OpenMeld Space Action commands:");
23341
- outLine(formatSpaceActionHelpExample("Reply", "reply \"message\"", context));
23342
- outLine(formatSpaceActionHelpExample("Handoff and wake another agent", "wake <agent-profile-id> \"summary and request\"", context));
23343
- outLine(formatSpaceActionHelpExample("Reply and also wake another agent", "reply --wake <agent-profile-id> \"message\"", context));
23344
- outLine(formatSpaceActionHelpExample("Reply and reference another agent", "reply --reference <agent-profile-id> \"message\"", context));
23345
- outLine(formatSpaceActionHelpExample("Reply and mention a person", "reply --mention <human-profile-id> \"message\"", context));
23346
- outLine(formatSpaceActionHelpExample("Final status", "status done \"short completion update\"", context));
23347
- outLine(formatSpaceActionHelpExample("Stay silent", "silent --reason \"No public reply is needed.\"", context));
23348
- outLine(formatSpaceActionHelpExample("Current targets", "targets", context));
23349
- outLine(formatSpaceActionHelpExample("Help", "help", context));
23350
- outLine("");
23351
- outLine("Run exactly one final action for the current Wake. OpenMeld posts the accepted action to the Space.");
23352
- if (!context) {
23353
- outLine("");
23354
- outLine(`No active dispatch context was found. ${DISPATCH_ACTION_CLI_PLACEHOLDER} is a placeholder for the exact Space Action command prefix printed in an OpenMeld Space Wake dispatch prompt.`);
23355
- outLine("Write actions and targets require an active OpenMeld Space Wake dispatch. Do not guess the command prefix or rewrite it to npx.");
23356
- return;
23357
- }
23358
- outLine("");
23359
- outLine(`Active dispatch: ${context.dispatchId}`);
23360
- outLine(`Current target profile: ${context.targetProfileId}`);
23361
- }
23362
- function formatSpaceActionHelpExample(label, action, context) {
23363
- return `- ${label}: ${formatSpaceActionHelpCommand(action, context)}`;
23364
- }
23365
- function formatSpaceActionHelpCommand(action, context) {
23366
- if (!context) return `${DISPATCH_ACTION_CLI_PLACEHOLDER} space action ${action}`;
23367
- return formatOpenMeldCliCommand(`openmeld space action ${action}`);
23368
- }
23369
- function recordAction(input) {
23370
- return writeDispatchSpaceActionRecord(input);
23371
- }
23372
- function emitActionRecorded(record) {
23373
- outLine(`Action recorded: OpenMeld saved this unpublished Space action proposal (${record.action.type}) for the current Wake.`);
23374
- }
23375
- function createSpaceActionReplyTiming() {
23376
- const startedAt = performance.now();
23377
- let previousAt = startedAt;
23378
- const commandStartProcessUptimeMs = Math.round(startedAt);
23379
- return { emit: (phase, context, fields = {}) => {
23380
- const now = performance.now();
23381
- const elapsedMs = Math.max(0, Math.round(now - startedAt));
23382
- const durationMs = Math.max(0, Math.round(now - previousAt));
23383
- previousAt = now;
23384
- process.stderr.write(`[${SPACE_ACTION_REPLY_TIMING_EVENT}] ${JSON.stringify({
23385
- event: SPACE_ACTION_REPLY_TIMING_EVENT,
23386
- phase,
23387
- elapsedMs,
23388
- durationMs,
23389
- commandStartProcessUptimeMs,
23390
- attemptId: context?.attemptId ?? null,
23391
- dispatchId: context?.dispatchId ?? null,
23392
- spaceId: context?.spaceId ?? null,
23393
- targetProfileId: context?.targetProfileId ?? null,
23394
- taskId: context?.taskId ?? null,
23395
- ...fields
23396
- })}\n`);
23397
- } };
23398
- }
23399
- function resolveMessageEnvelopeTargetIds(input) {
23400
- const targets = {
23401
- activationTargets: resolveTargetProfileIds({
23402
- context: input.context,
23403
- relation: "wake",
23404
- targets: input.wakeTargets
23405
- }),
23406
- mentionTargets: resolveTargetProfileIds({
23407
- context: input.context,
23408
- relation: "mention",
23409
- targets: input.mentionTargets
23410
- }),
23411
- referenceTargets: resolveTargetProfileIds({
23412
- context: input.context,
23413
- relation: "reference",
23414
- targets: input.referenceTargets
23415
- })
23416
- };
23417
- assertDistinctMessageEnvelopeTargets(targets);
23418
- return targets;
23419
- }
23420
- function assertDistinctMessageEnvelopeTargets(input) {
23421
- const seen = /* @__PURE__ */ new Map();
23422
- const relationTargets = [
23423
- ["wake", input.activationTargets],
23424
- ["reference", input.referenceTargets],
23425
- ["mention", input.mentionTargets]
23426
- ];
23427
- for (const [relation, profileIds] of relationTargets) for (const profileId of profileIds) {
23428
- const existingRelation = seen.get(profileId);
23429
- if (!existingRelation) {
23430
- seen.set(profileId, relation);
23431
- continue;
23432
- }
23433
- if (existingRelation === relation) throw new Error(`The same target (${profileId}) was listed more than once as ${formatRelation(relation)}. Choose it once, or send separate messages.`);
23434
- throw new Error(`The same target (${profileId}) cannot be both ${formatRelation(existingRelation)} and ${formatRelation(relation)} in one Space Action. Choose one relationship, or send separate messages.`);
23435
- }
23436
- }
23437
- function assertAllowedAction(context, actionType) {
23438
- const allowedActions = context.spaceContractSnapshot?.allowedActions ?? null;
23439
- if (allowedActions && !allowedActions.includes(actionType)) throw new Error(`This Space does not allow ${actionType}.`);
23440
- }
23441
- function normalizeStatus(value) {
23442
- const normalized = value.trim().toLowerCase();
23443
- if (normalized === "working") throw new Error("`working` would close the current Wake. Non-final progress updates are not supported by OpenMeld Space Action yet.");
23444
- if (normalized === "blocked" || normalized === "done" || normalized === "handoff" || normalized === "needs_input") return normalized;
23445
- if (!FINAL_SAFE_STATUSES.has(normalized)) throw new Error("Status must be one of: done, blocked, needs_input, handoff.");
23446
- return normalized;
23447
- }
23448
- function resolveTargetProfileIds(input) {
23449
- return [...new Set(input.targets)].map((target) => resolveTargetProfileId({
23450
- context: input.context,
23451
- relation: input.relation,
23452
- target
23453
- }));
23454
- }
23455
- function resolveTargetProfileId(input) {
23456
- const targetReference = requireLoadedTargets(input.context.sendTargetReference);
23457
- const query = normalizeRequiredText(input.target, "Target is required.");
23458
- const selected = targetReference.projection.find((target) => target.profileId === query);
23459
- if (!selected) throw new Error(`No current Space target has Profile ID "${query}". Run openmeld space action targets and use the full Profile ID.`);
23460
- if (!selected.allowedRelations[input.relation]) throw new Error(`${formatRelation(input.relation)} is not allowed for ${selected.primaryMentionLabel}.`);
23461
- return selected.profileId;
23462
- }
23463
- function requireLoadedTargets(targetReference) {
23464
- if (targetReference.status === "loaded") return targetReference;
23465
- throw new Error(`Current Space targets are not available for this dispatch: ${targetReference.errorMessage}`);
23466
- }
23467
- function formatTargetLine(target, relation) {
23468
- const relationLabel = formatRelation(relation);
23469
- return `${target.primaryMentionLabel} · ${target.profileKind} · ${relationLabel} · ${target.profileId}`;
23470
- }
23471
- function formatRelation(relation) {
23472
- switch (relation) {
23473
- case "wake": return "Wake";
23474
- case "reference": return "Reference";
23475
- default: return relation;
23476
- }
23477
- }
23478
- function normalizeRequiredJoinedText(parts, errorMessage) {
23479
- return normalizeRequiredText(parts.join(" "), errorMessage);
23480
- }
23481
- function normalizeRequiredText(value, errorMessage) {
23482
- const normalized = String(value ?? "").trim();
23483
- if (normalized.length === 0) throw new Error(errorMessage);
23484
- return normalized;
23485
- }
23486
- //#endregion
23487
- //#region src/space/dispatch-file-read.ts
23488
- const execFileAsync = promisify(execFile);
23489
- /** Keep file access outside the controller sandbox, under the existing CLI auth contract. */
23490
- async function readDispatchSpaceFile(input) {
23491
- if (process.env["OPENMELD_DISPATCH_RUNTIME_MODE"] !== "dispatch-owned-runtime") throw new Error("Space file tools require an active OpenMeld dispatch runtime.");
23492
- const context = readDispatchSpaceActionContextFromEnv();
23493
- const command = resolveDispatchSpaceActionMcpServer(process.env);
23494
- if (!command) throw new Error("No active OpenMeld dispatch file reader was found.");
23495
- const fileId = spaceFileEntryIdSchema.parse(input.fileId);
23496
- const revision = spaceFileRevisionNumberSchema.optional().parse(input.revision);
23497
- const args = [
23498
- "space",
23499
- "files",
23500
- "read",
23501
- "--profile",
23502
- context.targetProfileId,
23503
- "--json",
23504
- "--view",
23505
- "agent",
23506
- ...revision === void 0 ? [] : ["--revision", String(revision)],
23507
- "--",
23508
- context.spaceId,
23509
- fileId
23510
- ];
23511
- const { stdout } = await execFileAsync(command.commandPath, args, {
23512
- encoding: "utf8",
23513
- maxBuffer: 8 * 1024 * 1024,
23514
- timeout: 3e4
23515
- }).catch((error) => {
23516
- if (error && typeof error === "object" && "stdout" in error && typeof error.stdout === "string") {
23517
- let value;
23518
- try {
23519
- value = JSON.parse(error.stdout);
23520
- } catch {}
23521
- const parsed = cliJsonErrorEnvelopeSchema.safeParse(value);
23522
- if (parsed.success) throw new Error(JSON.stringify(parsed.data), { cause: error });
23523
- }
23524
- throw error;
23525
- });
23526
- const result = readSpaceFileTextResponseSchema.parse(JSON.parse(stdout));
23527
- if (result.file.spaceId !== context.spaceId || result.file.id !== fileId || revision !== void 0 && result.revision !== revision) throw new Error("The Space file response does not match the requested file revision.");
23528
- return result;
23529
- }
23530
- //#endregion
23531
- //#region src/space/dispatch-history-read.ts
23532
- /** Read the current Wake's bounded Space history through the existing member API. */
23533
- async function readDispatchSpaceHistory() {
23534
- if (process.env["OPENMELD_DISPATCH_RUNTIME_MODE"] !== "dispatch-owned-runtime") throw new Error("Space history tools require an active OpenMeld dispatch runtime.");
23535
- const context = readDispatchSpaceActionContextFromEnv();
23536
- const profile = await requireOpenMeldProfile({
23537
- openMeldProfileId: context.targetProfileId,
23538
- persistSelection: false,
23539
- authAction: "reading the current Wake's Space history"
23540
- });
23541
- if (profile.openMeldProfileId !== context.targetProfileId || profile.profileKind !== "agent") throw new Error("The Space history reader does not match the current Agent.");
23542
- const result = await createCliSpaceApi(await resolveBaseUrl()).listSignals({
23543
- spaceId: context.spaceId,
23544
- requestContext: buildOpenMeldRequestContextFromProfile({ openMeldProfile: profile }),
23545
- query: {
23546
- aroundSignalId: context.sourceEventId,
23547
- beforeCount: 20,
23548
- afterCount: 0,
23549
- kinds: ["text"]
23550
- }
23551
- });
23552
- const current = readDispatchSpaceActionContextFromEnv();
23553
- if (current.contextId !== context.contextId || current.nonce !== context.nonce || current.spaceId !== context.spaceId || current.sourceEventId !== context.sourceEventId || current.targetProfileId !== context.targetProfileId) throw new Error("The dispatch context changed during the Space history read.");
23554
- const output = dispatchSpaceHistoryResultSchema.parse({
23555
- spaceId: context.spaceId,
23556
- sourceSignalId: context.sourceEventId,
23557
- beforeCount: 20,
23558
- afterCount: 0,
23559
- signals: result.signals,
23560
- nextCursor: result.nextCursor
23561
- });
23562
- const signals = output.signals.map((signal) => signalTextEnvelopeSchema.parse(signal));
23563
- if (signals.some((signal) => signal.spaceId !== context.spaceId)) throw new Error("The Space history response does not match the current Space.");
23564
- return {
23565
- ...output,
23566
- signals
23567
- };
23568
- }
23569
- //#endregion
23570
- //#region src/space/dispatch-task.ts
23571
- async function listDispatchSpaceTasks(phase) {
23572
- return await withDispatchTaskContext(async ({ actionContext, api, requestContext }) => await api.listTasks({
23573
- spaceId: actionContext.spaceId,
23574
- requestContext,
23575
- ...phase ? { phase } : {}
23576
- }));
23577
- }
23578
- async function createDispatchSpaceTask(body) {
23579
- return await withDispatchTaskContext(async ({ actionContext, api, requestContext }) => await api.createTask({
23580
- spaceId: actionContext.spaceId,
23581
- requestContext,
23582
- body: createSpaceTaskBodySchema.parse({
23583
- ...body,
23584
- operationId: crypto.randomUUID(),
23585
- sourceSignalId: actionContext.sourceEventId,
23586
- assigneeProfileId: body.assigneeProfileId === void 0 ? actionContext.targetProfileId : body.assigneeProfileId
23587
- })
23588
- }));
23589
- }
23590
- async function mutateDispatchSpaceTask(input) {
23591
- const taskId = spaceTaskIdSchema.parse(input.taskId);
23592
- const body = mutateSpaceTaskBodySchema.parse({
23593
- ...input.body,
23594
- operationId: crypto.randomUUID()
23595
- });
23596
- return await withDispatchTaskContext(async ({ actionContext, api, requestContext }) => await api.mutateTask({
23597
- spaceId: actionContext.spaceId,
23598
- requestContext,
23599
- taskId,
23600
- body
23601
- }));
23602
- }
23603
- async function withDispatchTaskContext(operation) {
23604
- if (process.env["OPENMELD_DISPATCH_RUNTIME_MODE"] !== "dispatch-owned-runtime") throw new Error("Space Task tools require an active OpenMeld dispatch runtime.");
23605
- const actionContext = readDispatchSpaceActionContextFromEnv();
23606
- const profile = await requireOpenMeldProfile({
23607
- openMeldProfileId: actionContext.targetProfileId,
23608
- persistSelection: false,
23609
- authAction: "working with Tasks in the current OpenMeld Space"
23610
- });
23611
- if (profile.openMeldProfileId !== actionContext.targetProfileId || profile.profileKind !== "agent") throw new Error("The Space Task actor does not match the current Agent.");
23612
- const result = await operation({
23613
- actionContext,
23614
- api: createCliSpaceApi(await resolveBaseUrl()),
23615
- requestContext: buildOpenMeldRequestContextFromProfile({ openMeldProfile: profile })
23616
- });
23617
- const current = readDispatchSpaceActionContextFromEnv();
23618
- if (current.contextId !== actionContext.contextId || current.nonce !== actionContext.nonce || current.spaceId !== actionContext.spaceId || current.sourceEventId !== actionContext.sourceEventId || current.targetProfileId !== actionContext.targetProfileId) throw new Error("The dispatch context changed during the Space Task action.");
23619
- return result;
23620
- }
23621
- //#endregion
23622
- //#region src/space/dispatch-working-copy.ts
23623
- const run = promisify(execFile);
23624
- async function runDispatchWorkingCopy(action, resolution) {
23625
- const context = readDispatchSpaceActionContextFromEnv();
23626
- const command = resolveDispatchSpaceActionMcpServer(process.env);
23627
- if (!(command && context.workingCopyId)) throw new Error("This Wake has no prepared working copy.");
23628
- const { stdout } = await run(command.commandPath, [
23629
- "space",
23630
- "files",
23631
- "working-copy",
23632
- action,
23633
- "--profile",
23634
- context.targetProfileId,
23635
- "--json",
23636
- "--view",
23637
- "agent",
23638
- ...action === "resolve" ? [
23639
- "--file-id",
23640
- resolution?.fileId ?? "",
23641
- "--revision",
23642
- String(resolution?.revision ?? 0)
23643
- ] : [],
23644
- "--",
23645
- context.spaceId,
23646
- context.workingCopyId
23647
- ], {
23648
- encoding: "utf8",
23649
- maxBuffer: 1024 * 1024,
23650
- timeout: 12e4
23651
- }).catch((error) => {
23652
- if (error && typeof error === "object" && "stdout" in error && typeof error.stdout === "string") {
23653
- let value;
23654
- try {
23655
- value = JSON.parse(error.stdout);
23656
- } catch {}
23657
- const parsed = cliJsonErrorEnvelopeSchema.safeParse(value);
23658
- if (parsed.success) throw new Error(JSON.stringify(parsed.data), { cause: error });
23659
- }
23660
- throw error;
23661
- });
23662
- return spaceWorkingCopyResultSchema.parse(JSON.parse(stdout));
23663
- }
23664
- //#endregion
23665
- //#region src/space/action-mcp-server.ts
23666
- const FINAL_STATUS_SCHEMA = z.enum([
23667
- "done",
23668
- "blocked",
23669
- "needs_input",
23670
- "handoff"
23671
- ]);
23672
- function createSpaceActionMcpServer() {
23673
- const server = new McpServer({
23674
- name: "openmeld-dispatch-space-action",
23675
- version: "1.0.0"
23676
- }, { instructions: "Use read_history for the bounded text history around the current Wake, and read_file for shared text files in the current Space. Use Space Task tools only when a clear deliverable needs durable ownership, progress, review, or later closure; questions and tiny same-turn actions stay in Messages. Task operations are non-final. Then choose exactly one final OpenMeld Space Action: reply for the exact public message, status for a final visible status, or stay_silent when no public message is needed. Private assistant output is not posted to the Space." });
23677
- server.registerTool("working_copy", {
23678
- title: "Save or inspect this handoff's files",
23679
- description: "Inspect or commit this handoff's files; reconcile retries an unknown save. On conflict, refresh downloads the shared version, then status shows its path and revision. Merge it into the original working file, then resolve with fileId and incoming revision before committing again. No automatic merge or overwrite. Does not deliver or close the Wake. No Space, profile or path overrides.",
23680
- inputSchema: {
23681
- action: z.enum([
23682
- "status",
23683
- "commit",
23684
- "reconcile",
23685
- "refresh",
23686
- "resolve"
23687
- ]),
23688
- fileId: z.string().optional(),
23689
- revision: z.number().int().positive().optional()
23690
- }
23691
- }, async ({ action, fileId, revision }) => {
23692
- try {
23693
- return { content: [{
23694
- type: "text",
23695
- text: JSON.stringify(await runDispatchWorkingCopy(action, {
23696
- fileId,
23697
- revision
23698
- }))
23699
- }] };
23700
- } catch (error) {
23701
- return {
23702
- isError: true,
23703
- content: [{
23704
- type: "text",
23705
- text: error instanceof Error ? error.message : String(error)
23706
- }]
23707
- };
23708
- }
23709
- });
23710
- server.registerTool("read_history", {
23711
- title: "Read the current Wake's Space history",
23712
- description: "Read up to 20 text messages before the current Wake, plus its source message. Space, Agent identity and source are fixed by the active dispatch. Use this instead of terminal CLI history. This read does not submit a reply or close the Wake.",
23713
- inputSchema: dispatchSpaceHistoryRequestSchema,
23714
- outputSchema: dispatchSpaceHistoryResultSchema,
23715
- annotations: {
23716
- readOnlyHint: true,
23717
- destructiveHint: false,
23718
- idempotentHint: true,
23719
- openWorldHint: false
23720
- }
23721
- }, async () => {
23722
- try {
23723
- const result = await readDispatchSpaceHistory();
23724
- return {
23725
- structuredContent: result,
23726
- content: [{
23727
- type: "text",
23728
- text: JSON.stringify(result)
23729
- }]
23730
- };
23731
- } catch (error) {
23732
- return {
23733
- isError: true,
23734
- content: [{
23735
- type: "text",
23736
- text: error instanceof Error ? error.message : String(error)
23737
- }]
23738
- };
23739
- }
23740
- });
23741
- server.registerTool("read_file", {
23742
- title: "Read a file in the current OpenMeld Space",
23743
- description: "Read a shared text file as the Agent in the current Wake. Use this for attached CSV, text, Markdown, or JSON files instead of running the CLI in a terminal. Pass the attachment's file ID and revision. This is a context read; it does not submit a reply or close the Wake.",
23744
- inputSchema: {
23745
- fileId: spaceFileEntryIdSchema,
23746
- revision: spaceFileRevisionNumberSchema.optional()
23747
- },
23748
- annotations: {
23749
- readOnlyHint: true,
23750
- destructiveHint: false,
23751
- idempotentHint: true,
23752
- openWorldHint: false
23753
- }
23754
- }, async (input) => {
23755
- try {
23756
- const result = await readDispatchSpaceFile(input);
23757
- return { content: [{
23758
- type: "text",
23759
- text: JSON.stringify(result)
23760
- }] };
23761
- } catch (error) {
23762
- return {
23763
- content: [{
23764
- type: "text",
23765
- text: error instanceof Error ? error.message : String(error)
23766
- }],
23767
- isError: true
23768
- };
23769
- }
23770
- });
23771
- server.registerTool("list_tasks", {
23772
- title: "List Tasks in the current OpenMeld Space",
23773
- description: "Read durable collaboration Tasks for this Space. Use the returned revision before changing a Task. Task phase is collaboration state, not Agent execution truth.",
23774
- inputSchema: { phase: z.enum([
23775
- "to_do",
23776
- "in_progress",
23777
- "in_review",
23778
- "done",
23779
- "canceled"
23780
- ]).optional() },
23781
- outputSchema: listSpaceTasksResponseSchema,
23782
- annotations: {
23783
- readOnlyHint: true,
23784
- destructiveHint: false,
23785
- idempotentHint: true,
23786
- openWorldHint: false
23787
- }
23788
- }, async ({ phase }) => executeTaskAction(() => listDispatchSpaceTasks(phase)));
23789
- server.registerTool("create_task", {
23790
- title: "Create a Task from the current Space message",
23791
- description: "Create a durable Task only for a clear deliverable that needs ownership, progress, review, or later closure. The source message and Space are fixed by this Wake. The Task is assigned to the current Agent by default and remains To do until start_task is called.",
23792
- inputSchema: {
23793
- title: z.string().trim().min(1).max(200),
23794
- description: z.string().trim().min(1).max(8e3).nullable().optional(),
23795
- completionConditions: z.array(z.string().trim().min(1).max(500)).max(12).optional(),
23796
- assigneeProfileId: openMeldRuntimeProfileIdSchema.nullable().optional(),
23797
- reviewerProfileId: openMeldRuntimeProfileIdSchema.nullable().optional()
23798
- },
23799
- outputSchema: spaceTaskMutationReceiptSchema,
23800
- annotations: {
23801
- readOnlyHint: false,
23802
- destructiveHint: false,
23803
- idempotentHint: false,
23804
- openWorldHint: false
23805
- }
23806
- }, async (body) => executeTaskAction(() => createDispatchSpaceTask(body)));
23807
- server.registerTool("start_task", {
23808
- title: "Mark a Space Task in progress",
23809
- description: "Record that the current assigned Agent has begun advancing this Task. This changes collaboration state and does not start a separate Agent execution.",
23810
- inputSchema: {
23811
- taskId: spaceTaskIdSchema,
23812
- expectedRevision: z.number().int().min(1)
23813
- },
23814
- outputSchema: spaceTaskMutationReceiptSchema,
23815
- annotations: {
23816
- readOnlyHint: false,
23817
- destructiveHint: false,
23818
- idempotentHint: false,
23819
- openWorldHint: false
23820
- }
23821
- }, async ({ expectedRevision, taskId }) => executeTaskAction(() => mutateDispatchSpaceTask({
23822
- taskId,
23823
- body: {
23824
- action: "mark_in_progress",
23825
- expectedRevision
23826
- }
23827
- })));
23828
- server.registerTool("submit_task_result", {
23829
- title: "Submit a result for a Space Task",
23830
- description: "Submit the concrete result and verification for an in-progress Task. A Task with a reviewer moves to In review; otherwise the stated completion boundary moves it to Done. The Space delivers the review handoff to the reviewer.",
23831
- inputSchema: {
23832
- taskId: spaceTaskIdSchema,
23833
- expectedRevision: z.number().int().min(1),
23834
- summary: z.string().trim().min(1).max(8e3)
23835
- },
23836
- outputSchema: spaceTaskMutationReceiptSchema,
23837
- annotations: {
23838
- readOnlyHint: false,
23839
- destructiveHint: false,
23840
- idempotentHint: false,
23841
- openWorldHint: false
23842
- }
23843
- }, async ({ expectedRevision, summary, taskId }) => executeTaskAction(() => mutateDispatchSpaceTask({
23844
- taskId,
23845
- body: {
23846
- action: "submit_result",
23847
- expectedRevision,
23848
- summary
23849
- }
23850
- })));
23851
- server.registerTool("review_task", {
23852
- title: "Review a Space Task result",
23853
- description: "Accept the exact result you read or request specific changes as this Task's reviewer. Pass that result's resultRevision as expectedResultRevision and the Task's revision as expectedRevision. A conflict requires reading the current Task and deciding again. Change requests require feedback. The Space delivers review and rework handoffs. Agent-to-Agent rework stops for a human decision after two automatic rounds.",
23854
- inputSchema: {
23855
- taskId: spaceTaskIdSchema,
23856
- expectedRevision: z.number().int().min(1),
23857
- expectedResultRevision: z.number().int().min(1),
23858
- decision: z.enum(["accepted", "changes_requested"]),
23859
- feedback: z.string().trim().min(1).max(8e3).nullable().optional()
23860
- },
23861
- outputSchema: spaceTaskMutationReceiptSchema,
23862
- annotations: {
23863
- readOnlyHint: false,
23864
- destructiveHint: false,
23865
- idempotentHint: false,
23866
- openWorldHint: false
23867
- }
23868
- }, async ({ decision, expectedRevision, expectedResultRevision, feedback, taskId }) => executeTaskAction(() => mutateDispatchSpaceTask({
23869
- taskId,
23870
- body: {
23871
- action: "review",
23872
- expectedRevision,
23873
- expectedResultRevision,
23874
- decision,
23875
- ...feedback === void 0 ? {} : { feedback }
23876
- }
23877
- })));
23878
- server.registerTool("cancel_task", {
23879
- title: "Cancel a Space Task",
23880
- description: "Cancel a Task when its accepted commitment should no longer be done. Cancellation fences later Task progress; it does not by itself prove that an Agent execution stopped.",
23881
- inputSchema: {
23882
- taskId: spaceTaskIdSchema,
23883
- expectedRevision: z.number().int().min(1),
23884
- reason: z.string().trim().min(1).max(1e3)
23885
- },
23886
- outputSchema: spaceTaskMutationReceiptSchema,
23887
- annotations: {
23888
- readOnlyHint: false,
23889
- destructiveHint: false,
23890
- idempotentHint: false,
23891
- openWorldHint: false
23892
- }
23893
- }, async ({ expectedRevision, reason, taskId }) => executeTaskAction(() => mutateDispatchSpaceTask({
23894
- taskId,
23895
- body: {
23896
- action: "cancel",
23897
- expectedRevision,
23898
- reason
23899
- }
23900
- })));
23901
- server.registerTool("reply", {
23902
- title: "Reply in the current OpenMeld Space",
23903
- description: "Record the exact final public reply for the active OpenMeld Wake. Use real newline characters for paragraph breaks. Optionally wake or reference an Agent, or mention a person, by mention label or profile ID.",
23904
- inputSchema: {
23905
- message: z.string().min(1),
23906
- files: z.array(spaceMessageFileReferenceSchema).max(10).optional(),
23907
- mentionTargets: z.array(z.string().min(1)).optional(),
23908
- referenceTargets: z.array(z.string().min(1)).optional(),
23909
- wakeTargets: z.array(z.string().min(1)).optional()
23910
- },
23911
- outputSchema: dispatchSpaceActionToolResultSchema,
23912
- annotations: {
23913
- destructiveHint: false,
23914
- idempotentHint: false,
23915
- openWorldHint: false,
23916
- readOnlyHint: false
23917
- }
23918
- }, async ({ files, mentionTargets, message, referenceTargets, wakeTargets }) => executeSpaceAction(() => recordDispatchSpaceReply({
23919
- files,
23920
- mentionTargets,
23921
- referenceTargets,
23922
- text: message,
23923
- wakeTargets
23924
- })));
23925
- server.registerTool("status", {
23926
- title: "Set the final OpenMeld Space status",
23927
- description: "Record one final visible status for the active OpenMeld Wake. This closes the Wake; do not use it for interim progress.",
23928
- inputSchema: {
23929
- status: FINAL_STATUS_SCHEMA,
23930
- text: z.string().min(1)
23931
- },
23932
- outputSchema: dispatchSpaceActionToolResultSchema,
23933
- annotations: {
23934
- destructiveHint: false,
23935
- idempotentHint: false,
23936
- openWorldHint: false,
23937
- readOnlyHint: false
23938
- }
23939
- }, async ({ status, text }) => executeSpaceAction(() => recordDispatchSpaceStatus({
23940
- status,
23941
- text
23942
- })));
23943
- server.registerTool("stay_silent", {
23944
- title: "Stay silent in the current OpenMeld Space",
23945
- description: "Record that the active OpenMeld Wake intentionally needs no public reply. Use this only after deciding that silence is the correct final outcome.",
23946
- inputSchema: { reason: z.string().min(1) },
23947
- outputSchema: dispatchSpaceActionToolResultSchema,
23948
- annotations: {
23949
- destructiveHint: false,
23950
- idempotentHint: false,
23951
- openWorldHint: false,
23952
- readOnlyHint: false
23953
- }
23954
- }, async ({ reason }) => executeSpaceAction(() => recordDispatchSpaceSilent({ reason })));
23955
- return server;
23956
- }
23957
- async function runSpaceActionMcpServer() {
23958
- readDispatchSpaceActionContextForReceiptFromEnv();
23959
- await createSpaceActionMcpServer().connect(new StdioServerTransport());
23960
- }
23961
- async function executeSpaceAction(action) {
23962
- try {
23963
- const context = readDispatchSpaceActionContextForReceiptFromEnv();
23964
- const record = await action();
23965
- if (record.contextId !== context.contextId || record.nonce !== context.nonce) throw new DispatchSpaceActionClosedError("space_action.context_mismatch", "The saved action does not match the current dispatch context.");
23966
- const contextState = Date.now() > context.expiresAtMs ? "expired" : "active";
23967
- return {
23968
- structuredContent: dispatchSpaceActionToolResultSchema.parse({ receipt: {
23969
- status: "proposal_saved_locally",
23970
- actionType: record.action.type,
23971
- attemptId: context.attemptId,
23972
- contextId: context.contextId,
23973
- dispatchId: context.dispatchId,
23974
- recordedAtMs: record.createdAtMs,
23975
- contextState,
23976
- coordinatorAcceptance: "unconfirmed",
23977
- publication: "unconfirmed"
23978
- } }),
23979
- content: [{
23980
- type: "text",
23981
- text: `Local proposal saved (receipt: proposal_saved_locally, action: ${record.action.type}). OpenMeld has recorded this unpublished Space action proposal on this computer. ${contextState === "expired" ? "The local context has expired. This receipt identifies the existing record and does not extend action authority. " : ""}Coordinator acceptance and Space publication are NOT yet confirmed; do not report it as posted.`
23982
- }]
23983
- };
23984
- } catch (error) {
23985
- if (error instanceof DispatchSpaceActionClosedError) return {
23986
- structuredContent: dispatchSpaceActionToolResultSchema.parse({ receipt: {
23987
- status: "rejected_closed",
23988
- reasonCode: error.reasonCode,
23989
- coordinatorAcceptance: "unconfirmed",
23990
- publication: "unconfirmed"
23991
- } }),
23992
- content: [{
23993
- type: "text",
23994
- text: `Action rejected (receipt: rejected_closed, reason: ${error.reasonCode}). ${error.message} New actions are not permitted in this context. Existing records are preserved; Coordinator acceptance and Space publication are unconfirmed.`
23995
- }],
23996
- isError: true
23997
- };
23998
- return {
23999
- structuredContent: dispatchSpaceActionToolResultSchema.parse({ receipt: {
24000
- status: "outcome_unknown",
24001
- reasonCode: "space_action.recording_outcome_unknown",
24002
- coordinatorAcceptance: "unconfirmed",
24003
- publication: "unconfirmed"
24004
- } }),
24005
- content: [{
24006
- type: "text",
24007
- text: `Action receipt unavailable (receipt: outcome_unknown). ${error instanceof Error ? error.message : String(error)} Existing records are preserved; Coordinator acceptance and Space publication are unconfirmed.`
24008
- }],
24009
- isError: true
24010
- };
24011
- }
24012
- }
24013
- async function executeTaskAction(action) {
24014
- try {
24015
- const result = await action();
24016
- return {
24017
- structuredContent: result,
24018
- content: [{
24019
- type: "text",
24020
- text: JSON.stringify(result)
24021
- }]
24022
- };
24023
- } catch (error) {
24024
- return {
24025
- isError: true,
24026
- content: [{
24027
- type: "text",
24028
- text: error instanceof Error ? error.message : String(error)
24029
- }]
24030
- };
24031
- }
24032
- }
24033
- //#endregion
24034
23117
  //#region src/space/space-target.ts
24035
23118
  const SPACE_ID_HEX_REGEX = /^[0-9a-f]{64}$/i;
24036
23119
  const INVALID_SPACE_TARGET_MESSAGE = "Space target must be a 64-character Space ID or an OpenMeld Space URL.";
@@ -24652,7 +23735,7 @@ function normalizeOptionalString(value) {
24652
23735
  return normalized.length > 0 ? normalized : null;
24653
23736
  }
24654
23737
  async function runDefaultSpaceAddMeMembership(input) {
24655
- const { runSpaceAddMeMembership } = await import("./add-me-membership-DpckwGof.js");
23738
+ const { runSpaceAddMeMembership } = await import("./add-me-membership-AWArQHSP.js");
24656
23739
  return await runSpaceAddMeMembership(input);
24657
23740
  }
24658
23741
  //#endregion
@@ -24785,7 +23868,7 @@ async function fetchSpaceContract(input) {
24785
23868
  //#region src/space/contract-set-options.ts
24786
23869
  const SPACE_CONTRACT_DISPATCH_POLICY_VALUES = ["mention_only", "listen_all"];
24787
23870
  const SPACE_CONTRACT_PUBLICATION_MODE_VALUES = ["collaboration", "raw_context_sharing"];
24788
- const SPACE_CONTRACT_ALLOWED_ACTION_VALUES = SPACE_CONTRACT_ALLOWED_ACTION_ORDER;
23871
+ const SPACE_CONTRACT_ALLOWED_ACTION_VALUES = ["post_message", "stay_silent"];
24789
23872
  const SPACE_CONTRACT_RESULT_ARCHIVE_MODE_VALUES = [
24790
23873
  "none",
24791
23874
  "space_reply_only",
@@ -25015,24 +24098,16 @@ async function runSpaceContractSetFlow(input) {
25015
24098
  const allowedActions = await multiselect({
25016
24099
  message: "Allowed actions",
25017
24100
  required: true,
25018
- initialValues: [...input.currentContract.allowedActions],
25019
- options: [
25020
- {
25021
- value: SPACE_CONTRACT_ALLOWED_ACTION_VALUES[0],
25022
- label: "post_message",
25023
- hint: "Publish a normal message"
25024
- },
25025
- {
25026
- value: SPACE_CONTRACT_ALLOWED_ACTION_VALUES[1],
25027
- label: "post_status",
25028
- hint: "Publish a status bubble"
25029
- },
25030
- {
25031
- value: SPACE_CONTRACT_ALLOWED_ACTION_VALUES[2],
25032
- label: "stay_silent",
25033
- hint: "Let system record a silent decision"
25034
- }
25035
- ]
24101
+ initialValues: input.currentContract.allowedActions.filter((action) => action !== "post_status"),
24102
+ options: [{
24103
+ value: SPACE_CONTRACT_ALLOWED_ACTION_VALUES[0],
24104
+ label: "post_message",
24105
+ hint: "Publish a normal message"
24106
+ }, {
24107
+ value: SPACE_CONTRACT_ALLOWED_ACTION_VALUES[1],
24108
+ label: "stay_silent",
24109
+ hint: "Let system record a silent decision"
24110
+ }]
25036
24111
  });
25037
24112
  if (isCancel(allowedActions)) {
25038
24113
  cancel("Cancelled.");
@@ -25203,10 +24278,10 @@ function buildExplicitSpaceContractPatch(input) {
25203
24278
  if (Object.keys(candidatePatch).length === 0) return null;
25204
24279
  const parsed = patchSpaceContractBodySchema.safeParse(candidatePatch);
25205
24280
  if (!parsed.success) throw new Error(parsed.error.issues[0]?.message ?? "space contract patch is invalid");
25206
- return {
24281
+ return patchSpaceContractBodySchema.parse({
25207
24282
  ...parsed.data,
25208
24283
  ...parsed.data.allowedActions ? { allowedActions: canonicalizeAllowedActions(parsed.data.allowedActions) } : {}
25209
- };
24284
+ });
25210
24285
  }
25211
24286
  function pruneUnchangedSpaceContractPatch(input) {
25212
24287
  const nextPatch = {};
@@ -29670,7 +28745,7 @@ computerCmd.command("disconnect").description("Disconnect this computer from its
29670
28745
  routeTokens: ["computer", "disconnect"],
29671
28746
  view,
29672
28747
  run: async () => {
29673
- const { runComputerDisconnect } = await import("./computer-disconnect-CLtQwKDS.js");
28748
+ const { runComputerDisconnect } = await import("./computer-disconnect-Cd1YvKu7.js");
29674
28749
  await runComputerDisconnect(computerConnectionIntentSchema.parse(JSON.parse(opts.connectionIntent)), view);
29675
28750
  }
29676
28751
  });
@@ -30441,7 +29516,7 @@ spaceActionCmd.command("wake").description("Record a final handoff message that
30441
29516
  messageParts: Array.isArray(messageParts) ? messageParts : []
30442
29517
  });
30443
29518
  });
30444
- spaceActionCmd.command("status").description("Record a final Space status for the current dispatch.").argument("<status>", "Final status: done|blocked|needs_input|handoff").argument("<text...>", "Short status text").action(async (status, textParts) => {
29519
+ spaceActionCmd.command("status", { hidden: true }).description("Record a legacy final Space status for an existing dispatch.").argument("<status>", "Final status: done|blocked|needs_input|handoff").argument("<text...>", "Short status text").action(async (status, textParts) => {
30445
29520
  await runSpaceActionStatus({
30446
29521
  status,
30447
29522
  textParts: Array.isArray(textParts) ? textParts : []
@@ -31595,7 +30670,7 @@ profileCmd.command("create").description("Create an Agent Profile, or an additio
31595
30670
  });
31596
30671
  });
31597
30672
  function shouldUseProfileCreationRequest(input) {
31598
- return typeof input.owner === "string" || typeof input.computer === "string" || typeof input.project === "string" || input.defaultProject === false || typeof input.space === "string" || typeof input.organization === "string" || typeof input.agentControllerCollaborationMode === "string" || typeof input.openCodePermission === "string" || typeof input.nativeSession === "string" || input.session !== "new";
30673
+ return input.agentController === "hosted:remote-agent" || typeof input.owner === "string" || typeof input.computer === "string" || typeof input.project === "string" || input.defaultProject === false || typeof input.space === "string" || typeof input.organization === "string" || typeof input.agentControllerCollaborationMode === "string" || typeof input.openCodePermission === "string" || typeof input.nativeSession === "string" || input.session !== "new";
31599
30674
  }
31600
30675
  function assertSupportedProfileCreationRequestSessionInput(input) {
31601
30676
  if (input.usesCreationRequest && typeof input.agentControllerConversationId === "string") throw createProfileCreateGuideError("--agent-controller-conversation-id cannot be combined with owner-request options because that legacy flag would lose the requested session. Use --session resume --native-session <id> instead.");
@@ -31885,18 +30960,18 @@ async function main() {
31885
30960
  if (await runMacOsNativeKeychainHelperIfRequested()) return;
31886
30961
  const argv = process.argv.map((arg) => arg === "--h" ? "--help" : arg);
31887
30962
  if (argv.length === 5 && argv[2] === "computer" && argv[3] === "connection-review" && argv[4] === "--json") {
31888
- const { readComputerConnectionReview } = await import("./computer-connection-review-mO6vn3C3.js");
30963
+ const { readComputerConnectionReview } = await import("./computer-connection-review-DATbh3kD.js");
31889
30964
  outLine(JSON.stringify(await readComputerConnectionReview()));
31890
30965
  return;
31891
30966
  }
31892
30967
  if (argv.length === 5 && argv[2] === "service" && argv[4] === "--json") {
31893
30968
  if (argv[3] === "control-carrier-capability") {
31894
- const { readServiceControlCarrierCapability } = await import("./service-control-carrier-capability-DDNyE5cB.js");
30969
+ const { readServiceControlCarrierCapability } = await import("./service-control-carrier-capability-gMk5gMKU.js");
31895
30970
  outLine(JSON.stringify(readServiceControlCarrierCapability()));
31896
30971
  return;
31897
30972
  }
31898
30973
  if (argv[3] === "control-capabilities") {
31899
- const { readServiceControlCapabilities } = await import("./service-control-capabilities-Y4CGrchz.js");
30974
+ const { readServiceControlCapabilities } = await import("./service-control-capabilities-CkKw-5l7.js");
31900
30975
  emitCliJsonEnvelope({
31901
30976
  schemaVersion: 1,
31902
30977
  type: "service.control_capabilities",
@@ -32079,4 +31154,4 @@ main().catch((error) => {
32079
31154
  //#endregion
32080
31155
  export {};
32081
31156
 
32082
- //# sourceMappingURL=openmeld-Tkp17vPg.js.map
31157
+ //# sourceMappingURL=openmeld-BloctT8R.js.map