openmeld 0.3.231 → 0.3.233

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 (144) hide show
  1. package/dist/{add-me-membership-0KyMk1wi.js → add-me-membership-_O3IzRLn.js} +2 -2
  2. package/dist/{add-me-membership-0KyMk1wi.js.map → add-me-membership-_O3IzRLn.js.map} +1 -1
  3. package/dist/{agents-Bkx6ldpV.js → agents-B5E7c7sQ.js} +11 -11
  4. package/dist/{agents-Bkx6ldpV.js.map → agents-B5E7c7sQ.js.map} +1 -1
  5. package/dist/{api-client-foundation-d4E5XWdJ.js → api-client-foundation-1p1VVFJ_.js} +1 -1
  6. package/dist/{api-client-foundation-DgTXf3Gb.js → api-client-foundation-C-RPnq_p.js} +3 -3
  7. package/dist/{api-client-foundation-DgTXf3Gb.js.map → api-client-foundation-C-RPnq_p.js.map} +1 -1
  8. package/dist/auth-session-CmjjkLiB.js +4 -0
  9. package/dist/{auth-session-pLaN5cnC.js → auth-session-iXCJO5oB.js} +6 -6
  10. package/dist/{auth-session-pLaN5cnC.js.map → auth-session-iXCJO5oB.js.map} +1 -1
  11. package/dist/auth-url-6Bb6YdNm.js +24 -0
  12. package/dist/auth-url-6Bb6YdNm.js.map +1 -0
  13. package/dist/{base-url-eck31vC8.js → base-url-0AoeTi3w.js} +3 -3
  14. package/dist/{base-url-eck31vC8.js.map → base-url-0AoeTi3w.js.map} +1 -1
  15. package/dist/{base-url-B8eWb2md.js → base-url-Bdjp-5vy.js} +1 -1
  16. package/dist/{channel-DppbHxHw.js → channel-BciBrA3Y.js} +25 -5
  17. package/dist/channel-BciBrA3Y.js.map +1 -0
  18. package/dist/{cli-binary-manifest-Bjf6T7Ef.js → cli-binary-manifest-ETxqCzfS.js} +8 -1
  19. package/dist/cli-binary-manifest-ETxqCzfS.js.map +1 -0
  20. package/dist/{command-CBWv24uj.js → command-D0pcAIoE.js} +19 -19
  21. package/dist/{command-CBWv24uj.js.map → command-D0pcAIoE.js.map} +1 -1
  22. package/dist/{computer-connection-DMkamVpB.js → computer-connection-CHP1-0rK.js} +2 -2
  23. package/dist/{computer-connection-DMkamVpB.js.map → computer-connection-CHP1-0rK.js.map} +1 -1
  24. package/dist/{computer-connection-review-BSPMGVhN.js → computer-connection-review-dHotFqmD.js} +6 -6
  25. package/dist/{computer-connection-review-BSPMGVhN.js.map → computer-connection-review-dHotFqmD.js.map} +1 -1
  26. package/dist/{computer-disconnect-BQ_MDeeA.js → computer-disconnect-B2DLDxWx.js} +9 -9
  27. package/dist/{computer-disconnect-BQ_MDeeA.js.map → computer-disconnect-B2DLDxWx.js.map} +1 -1
  28. package/dist/{computer-setup-continuation-Cd293Yzi.js → computer-setup-continuation-Cv_c1B-7.js} +3 -3
  29. package/dist/{computer-setup-continuation-Cd293Yzi.js.map → computer-setup-continuation-Cv_c1B-7.js.map} +1 -1
  30. package/dist/{context-qbQXVLF5.js → context-BnhlFS8m.js} +5 -5
  31. package/dist/{context-qbQXVLF5.js.map → context-BnhlFS8m.js.map} +1 -1
  32. package/dist/{control-plane-rTE2rHZ5.js → control-plane-QqGL-jtT.js} +2 -2
  33. package/dist/{control-plane-rTE2rHZ5.js.map → control-plane-QqGL-jtT.js.map} +1 -1
  34. package/dist/{daemon-device-id-B6iDyQEs.js → daemon-device-id-DbSIqHoZ.js} +8 -8
  35. package/dist/{daemon-device-id-B6iDyQEs.js.map → daemon-device-id-DbSIqHoZ.js.map} +1 -1
  36. package/dist/{daemon-lifecycle-journal-DrwEygzu.js → daemon-lifecycle-journal-DsVVvKJe.js} +10 -10
  37. package/dist/{daemon-lifecycle-journal-DrwEygzu.js.map → daemon-lifecycle-journal-DsVVvKJe.js.map} +1 -1
  38. package/dist/{daemon-runtime-lease-C1wkT4Bi.js → daemon-runtime-lease-Bv6vhqOe.js} +2 -2
  39. package/dist/{daemon-runtime-lease-C1wkT4Bi.js.map → daemon-runtime-lease-Bv6vhqOe.js.map} +1 -1
  40. package/dist/{daemon-runtime-lease-DAQyRUc5.js → daemon-runtime-lease-ZjP0urJt.js} +1 -1
  41. package/dist/{daemon-service-contract-DhEfbzHt.js → daemon-service-contract-COPKbCy_.js} +4 -4
  42. package/dist/{daemon-service-contract-DhEfbzHt.js.map → daemon-service-contract-COPKbCy_.js.map} +1 -1
  43. package/dist/{daemon-service-manager-CRnFxPKA.js → daemon-service-manager-BXAp21GH.js} +6 -6
  44. package/dist/{daemon-service-manager-CRnFxPKA.js.map → daemon-service-manager-BXAp21GH.js.map} +1 -1
  45. package/dist/{daemon-service-manager-l0unaDGa.js → daemon-service-manager-C_ny0JhB.js} +1 -1
  46. package/dist/{daemon-service-runtime-B4nWB2Qx.js → daemon-service-runtime-DZI6Ke3_.js} +16 -15
  47. package/dist/{daemon-service-runtime-B4nWB2Qx.js.map → daemon-service-runtime-DZI6Ke3_.js.map} +1 -1
  48. package/dist/{daemon-service-update-coordinator-C8cW7Vn_.js → daemon-service-update-coordinator-BgVBlJ4d.js} +29 -24
  49. package/dist/daemon-service-update-coordinator-BgVBlJ4d.js.map +1 -0
  50. package/dist/{daemon-state-B6G5xe7f.js → daemon-state-Dte9re5V.js} +4 -4
  51. package/dist/{daemon-state-B6G5xe7f.js.map → daemon-state-Dte9re5V.js.map} +1 -1
  52. package/dist/{daemon-frame-transport-xQnNyg6E.js → dispatch-owned-runtime-BeIQetEt.js} +550 -53
  53. package/dist/dispatch-owned-runtime-BeIQetEt.js.map +1 -0
  54. package/dist/{dist-CAypwFRu.js → dist-BgYBvEBB.js} +206 -190
  55. package/dist/dist-BgYBvEBB.js.map +1 -0
  56. package/dist/{dist-DFhd6JmQ.js → dist-DQS0XYkb.js} +3 -3
  57. package/dist/{dist-DFhd6JmQ.js.map → dist-DQS0XYkb.js.map} +1 -1
  58. package/dist/{dist-olOaAWkl.js → dist-z72xYz5Z.js} +1 -1
  59. package/dist/{elapsed-time-COv3bjEl.js → elapsed-time-C7S-6bWV.js} +6 -6
  60. package/dist/{elapsed-time-COv3bjEl.js.map → elapsed-time-C7S-6bWV.js.map} +1 -1
  61. package/dist/{entry-DIjUKIep.js → entry-CX24qHnm.js} +81 -17
  62. package/dist/entry-CX24qHnm.js.map +1 -0
  63. package/dist/{installation-inventory-DllgoKT1.js → installation-inventory-B3mwQFEA.js} +5 -5
  64. package/dist/{installation-inventory-DllgoKT1.js.map → installation-inventory-B3mwQFEA.js.map} +1 -1
  65. package/dist/{installer-Sc79LhuA.js → installer-DnIJ4y3l.js} +2 -2
  66. package/dist/{installer-Sc79LhuA.js.map → installer-DnIJ4y3l.js.map} +1 -1
  67. package/dist/{local-components-DleLEzSU.js → local-components-DJiMS67S.js} +36 -3
  68. package/dist/local-components-DJiMS67S.js.map +1 -0
  69. package/dist/{lock-CMH9eoS7.js → lock-BMI00i2F.js} +2 -2
  70. package/dist/{lock-CMH9eoS7.js.map → lock-BMI00i2F.js.map} +1 -1
  71. package/dist/meta-api-DgHkiIdr.js +371 -0
  72. package/dist/meta-api-DgHkiIdr.js.map +1 -0
  73. package/dist/openmeld-dev.js +17 -9
  74. package/dist/openmeld-dev.js.map +1 -1
  75. package/dist/{openmeld-environment-target-Cw3V0WnE.js → openmeld-environment-target-BgYR6ozy.js} +8 -25
  76. package/dist/openmeld-environment-target-BgYR6ozy.js.map +1 -0
  77. package/dist/{openmeld-BUYFXSyY.js → openmeld-kYp99hOl.js} +41 -39
  78. package/dist/{openmeld-BUYFXSyY.js.map → openmeld-kYp99hOl.js.map} +1 -1
  79. package/dist/{openmeld-maintenance-worker-Br6WIhhe.js → openmeld-maintenance-worker-BqU1Asrm.js} +14 -14
  80. package/dist/{openmeld-maintenance-worker-Br6WIhhe.js.map → openmeld-maintenance-worker-BqU1Asrm.js.map} +1 -1
  81. package/dist/{openmeld-tools-update-join-B1l6RER6.js → openmeld-tools-update-join-BKJnGR5h.js} +4 -4
  82. package/dist/{openmeld-tools-update-join-B1l6RER6.js.map → openmeld-tools-update-join-BKJnGR5h.js.map} +1 -1
  83. package/dist/{openmeld-tools-update-process-frame-DbEZ3fEh.js → openmeld-tools-update-process-frame-Csy2XKUf.js} +1 -1
  84. package/dist/{openmeld-tools-update-process-frame-BtFKp70p.js → openmeld-tools-update-process-frame-YLOS82E3.js} +2 -2
  85. package/dist/{openmeld-tools-update-process-frame-BtFKp70p.js.map → openmeld-tools-update-process-frame-YLOS82E3.js.map} +1 -1
  86. package/dist/openmeld.js +6 -6
  87. package/dist/{paths-DSkUuEu3.js → paths-De9xdA2h.js} +11 -6
  88. package/dist/paths-De9xdA2h.js.map +1 -0
  89. package/dist/{prepare-provider-runtime-DfsSj_N_.js → prepare-provider-runtime-CD6XRt7X.js} +385 -181
  90. package/dist/prepare-provider-runtime-CD6XRt7X.js.map +1 -0
  91. package/dist/{prepare-session-executor-CrYpWljb.js → prepare-session-executor-DY2s4FuY.js} +26 -26
  92. package/dist/{prepare-session-executor-CrYpWljb.js.map → prepare-session-executor-DY2s4FuY.js.map} +1 -1
  93. package/dist/{process-channel-DmTb_kO4.js → process-channel-CzgOWiuh.js} +2 -2
  94. package/dist/{process-channel-DmTb_kO4.js.map → process-channel-CzgOWiuh.js.map} +1 -1
  95. package/dist/{published-production-safety-CgXxtdMK.js → published-production-safety-zANGAGDI.js} +5 -6
  96. package/dist/published-production-safety-zANGAGDI.js.map +1 -0
  97. package/dist/{runtime-ZLBVtFFY.js → runtime-Br4Ga0rJ.js} +77 -23
  98. package/dist/runtime-Br4Ga0rJ.js.map +1 -0
  99. package/dist/{runtime-agent-controller-reporting-submission-CbaUsNTF.js → runtime-agent-controller-reporting-submission-CQjbBiHh.js} +146 -37
  100. package/dist/runtime-agent-controller-reporting-submission-CQjbBiHh.js.map +1 -0
  101. package/dist/{runtime-reporting-health-state-DOg9iwwO.js → runtime-reporting-health-state-a1FUE1S-.js} +120 -25
  102. package/dist/runtime-reporting-health-state-a1FUE1S-.js.map +1 -0
  103. package/dist/{runtime-transport-D4x8_AmR.js → runtime-transport-D4CVffnp.js} +88 -8
  104. package/dist/runtime-transport-D4CVffnp.js.map +1 -0
  105. package/dist/{service-B9y1SQlB.js → service-D9QVc4_y.js} +99 -30
  106. package/dist/service-D9QVc4_y.js.map +1 -0
  107. package/dist/{service-account-authorization-Di59Cjth.js → service-account-authorization-DLhUgGDb.js} +6 -6
  108. package/dist/{service-account-authorization-Di59Cjth.js.map → service-account-authorization-DLhUgGDb.js.map} +1 -1
  109. package/dist/{service-account-control-DALO1USM.js → service-account-control-DIdQILmo.js} +13 -13
  110. package/dist/{service-account-control-DALO1USM.js.map → service-account-control-DIdQILmo.js.map} +1 -1
  111. package/dist/{service-control-capabilities-B9ZxDPOJ.js → service-control-capabilities-BvHU_NcX.js} +1 -1
  112. package/dist/{service-control-capabilities-CKwU9Er5.js → service-control-capabilities-CGv5Cuxo.js} +5 -5
  113. package/dist/{service-control-capabilities-CKwU9Er5.js.map → service-control-capabilities-CGv5Cuxo.js.map} +1 -1
  114. package/dist/{state-CdSbKM0J.js → state-AWe5DSV8.js} +3 -3
  115. package/dist/{state-CdSbKM0J.js.map → state-AWe5DSV8.js.map} +1 -1
  116. package/dist/upgrade-CLnZ4WBF.js +4 -0
  117. package/dist/{upgrade-DLJJlkbf.js → upgrade-CcnlL7FH.js} +9 -9
  118. package/dist/{upgrade-DLJJlkbf.js.map → upgrade-CcnlL7FH.js.map} +1 -1
  119. package/dist/{windows-preview-channel-DPrYuLyY.js → windows-preview-channel-BPhfSwji.js} +2 -2
  120. package/dist/{windows-preview-channel-DPrYuLyY.js.map → windows-preview-channel-BPhfSwji.js.map} +1 -1
  121. package/dist/{windows-user-task-BR-WB7hr.js → windows-user-task-CTsMnmD4.js} +3 -3
  122. package/dist/{windows-user-task-BR-WB7hr.js.map → windows-user-task-CTsMnmD4.js.map} +1 -1
  123. package/dist/{windows-user-task-m9eMEUEq.js → windows-user-task-DnxKO3oB.js} +1 -1
  124. package/package.json +10 -10
  125. package/dist/auth-session-DExyUwLo.js +0 -4
  126. package/dist/channel-DppbHxHw.js.map +0 -1
  127. package/dist/cli-binary-manifest-Bjf6T7Ef.js.map +0 -1
  128. package/dist/daemon-frame-transport-xQnNyg6E.js.map +0 -1
  129. package/dist/daemon-service-update-coordinator-C8cW7Vn_.js.map +0 -1
  130. package/dist/dist-CAypwFRu.js.map +0 -1
  131. package/dist/entry-DIjUKIep.js.map +0 -1
  132. package/dist/local-components-DleLEzSU.js.map +0 -1
  133. package/dist/meta-api-CEw8eOeN.js +0 -845
  134. package/dist/meta-api-CEw8eOeN.js.map +0 -1
  135. package/dist/openmeld-environment-target-Cw3V0WnE.js.map +0 -1
  136. package/dist/paths-DSkUuEu3.js.map +0 -1
  137. package/dist/prepare-provider-runtime-DfsSj_N_.js.map +0 -1
  138. package/dist/published-production-safety-CgXxtdMK.js.map +0 -1
  139. package/dist/runtime-ZLBVtFFY.js.map +0 -1
  140. package/dist/runtime-agent-controller-reporting-submission-CbaUsNTF.js.map +0 -1
  141. package/dist/runtime-reporting-health-state-DOg9iwwO.js.map +0 -1
  142. package/dist/runtime-transport-D4x8_AmR.js.map +0 -1
  143. package/dist/service-B9y1SQlB.js.map +0 -1
  144. package/dist/upgrade-BFWUxFpJ.js +0 -4
@@ -1,26 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { F as resolveOpenMeldEnvPreset, I as resolveOpenMeldRootDir, b as normalizeOpenMeldProfileId, g as legacyAccountProfileSpacesDir, r as accountProfileSpaceCacheDir } from "./paths-DSkUuEu3.js";
4
- import { $r as spaceMemberDirectoryAllowedRelationsSchema, Bi as createProjectResponseSchema, Br as getOrganizationSkillResponseSchema, Ci as updateCenterAgentRoutineResponseSchema, Di as agentActivityEventSchema, Dr as submitFeedbackIssueResponseSchema, Ei as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, Er as submitFeedbackIssueRequestSchema, Gr as organizationSkillReleaseSummarySchema, Hi as projectSchema, Ii as localProjectControlConnectionSchema, Ji as computerFileAccessPolicyInputSchema, Kr as organizationSkillSummarySchema, Mi as centerAgentToolSpeakerSchema, Qr as spaceMemberAgentWakeAvailabilitySchema, Si as resumeCenterAgentRoutineResponseSchema, Tr as organizationDirectoryResponseSchema, Ui as updateProjectResponseSchema, Vi as listProjectsResponseSchema, Vr as listOrganizationSkillsResponseSchema, Wr as organizationSkillGitHubRepositoryPreviewSchema, Yi as computerFileAccessPolicySchema, Zi as toCompatibleSpaceAddressingRequestWireValue, _i as createCenterAgentRoutineResponseSchema, bi as listCenterAgentRoutinesResponseSchema, di as agentActivitySessionInventoryResponseSchema, hi as spaceCreatorSchema, ji as agentActivitySnapshotResponseSchema, ni as spaceMemberKindSchema, si as organizationComputersResponseSchema, sr as spaceEntryTargetSchema, ti as spaceMemberDirectorySchema, vi as deleteCenterAgentRoutineResponseSchema, wr as organizationSpaceDirectoryWithMemberCountsResponseSchema, xi as pauseCenterAgentRoutineResponseSchema, yi as listCenterAgentRoutineRunsResponseSchema, zi as archiveProjectResponseSchema } from "./dist-CAypwFRu.js";
5
- import { Ct as resolveLocalProjectConnectionForPath, Kt as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, Mn as buildTaskResultEnvelope, Tt as withAgentActivityLocalStateLock, Xt as buildDispatchReplyContextSummary, _r as renderWorkingLanguagePrompt, ar as buildWorkingLanguagePromptPlan, dt as isProjectBound, ft as listProjectBindings, gr as renderInformationProtectionPrompt, ir as buildInformationProtectionPromptPlan, jn as buildRuntimeWorkspaceFingerprint, kn as DaemonServiceRunError, nr as areAgentControllerInterfaceAccountsSame, pr as parseAgentControllerRef } from "./prepare-provider-runtime-DfsSj_N_.js";
6
- import { Ar as normalizeSpacePasswordText, C as runtimeTransportHeartbeatResponseSchema, Gn as collectCanonicalMentionTextFragments, H as runtimeTransportSubmitTaskResultRequestSchema, I as runtimeTransportRegisterSessionResponseSchema, Mr as resolveSingleSpaceMentionLabels, Nr as resolveSpaceMentionLabels, Tt as sanitizeSignalTextPreview, Wn as MESSAGE_MENTION_TYPE_VALUES, X as openMeldDaemonTaskResultPayloadSchema, Xn as resolveMessageEnvelopeTargetField, Yn as normalizeMessageEnvelope, _ as runtimeTransportDispatchReasoningRequestSchema, a as daemonStreamFrameSchema, d as runtimeTransportDispatchInteractionRequestSchema, g as runtimeTransportDispatchPreviewRequestSchema, h as runtimeTransportDispatchPreviewEndRequestSchema, m as runtimeTransportDispatchLifecycleRequestSchema, qn as getSpaceMessageAddressingRelationSupportForTargetKind, v as runtimeTransportDispatchRuntimeEvidenceRequestSchema, y as runtimeTransportDispatchToolActivityRequestSchema, yi as openMeldRequestContextSchema } from "./runtime-transport-D4x8_AmR.js";
7
- import { D as normalizeOptionalWorkingDirectory, O as openMeldRuntimeProfileIdSchema } from "./control-plane-rTE2rHZ5.js";
8
- import { F as iso, G as string, L as literal, N as enumFactory, W as strictObject, X as url, f as localServiceComponentUpdateProjectionSchema, j as discriminatedUnion, k as boolean, s as localCliComponentUpdateProjectionSchema } from "./local-components-DleLEzSU.js";
3
+ import { F as resolveOpenMeldRootDir, P as resolveOpenMeldEnvPreset, b as normalizeOpenMeldProfileId, g as legacyAccountProfileSpacesDir, r as accountProfileSpaceCacheDir, w as openMeldManagedBinaryPath } from "./paths-De9xdA2h.js";
4
+ import { $r as spaceMemberDirectoryAllowedRelationsSchema, Bi as createProjectResponseSchema, Br as getOrganizationSkillResponseSchema, Ci as updateCenterAgentRoutineResponseSchema, Di as agentActivityEventSchema, Dr as submitFeedbackIssueResponseSchema, Ei as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, Er as submitFeedbackIssueRequestSchema, Gr as organizationSkillReleaseSummarySchema, Hi as projectSchema, Ii as localProjectControlConnectionSchema, Ji as computerFileAccessPolicyInputSchema, Kr as organizationSkillSummarySchema, Mi as centerAgentToolSpeakerSchema, Qr as spaceMemberAgentWakeAvailabilitySchema, Si as resumeCenterAgentRoutineResponseSchema, Tr as organizationDirectoryResponseSchema, Ui as updateProjectResponseSchema, Vi as listProjectsResponseSchema, Vr as listOrganizationSkillsResponseSchema, Wr as organizationSkillGitHubRepositoryPreviewSchema, Yi as computerFileAccessPolicySchema, Zi as toCompatibleSpaceAddressingRequestWireValue, _i as createCenterAgentRoutineResponseSchema, bi as listCenterAgentRoutinesResponseSchema, di as agentActivitySessionInventoryResponseSchema, ei as spaceMemberDirectoryEntrySchema, hi as spaceCreatorSchema, ji as agentActivitySnapshotResponseSchema, ni as spaceMemberKindSchema, si as organizationComputersResponseSchema, sr as spaceEntryTargetSchema, ti as spaceMemberDirectorySchema, vi as deleteCenterAgentRoutineResponseSchema, wr as organizationSpaceDirectoryWithMemberCountsResponseSchema, xi as pauseCenterAgentRoutineResponseSchema, yi as listCenterAgentRoutineRunsResponseSchema, zi as archiveProjectResponseSchema } from "./dist-BgYBvEBB.js";
5
+ import { Cr as renderWorkingLanguagePrompt, Ct as resolveLocalProjectConnectionForPath, Fn as buildRuntimeWorkspaceFingerprint, In as buildTaskResultEnvelope, Kt as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, Nn as DaemonServiceRunError, Sr as renderInformationProtectionPrompt, Tt as withAgentActivityLocalStateLock, Xt as buildDispatchReplyContextSummary, cr as buildInformationProtectionPromptPlan, dt as isProjectBound, ft as listProjectBindings, hr as isAgentControllerUsageAccountUnavailable, lr as buildWorkingLanguagePromptPlan, or as areAgentControllerInterfaceAccountsSame, yr as parseAgentControllerRef } from "./prepare-provider-runtime-CD6XRt7X.js";
6
+ import { $ as openMeldSpaceEgressActionSchema, $n as resolveMessageEnvelopeTargetField, Dt as sanitizeSignalTextPreview, Fr as resolveSingleSpaceMentionLabels, Ir as resolveSpaceMentionLabels, Jn as collectCanonicalMentionTextFragments, L as runtimeTransportRegisterSessionResponseSchema, Nr as normalizeSpacePasswordText, Qn as normalizeMessageEnvelope, U as runtimeTransportSubmitTaskResultRequestSchema, Xn as getSpaceMessageAddressingRelationSupportForTargetKind, Z as openMeldDaemonTaskResultPayloadSchema, _ as runtimeTransportDispatchProgressRequestSchema, a as daemonStreamFrameSchema, b as runtimeTransportDispatchToolActivityRequestSchema, d as runtimeTransportDispatchInteractionRequestSchema, g as runtimeTransportDispatchPreviewRequestSchema, h as runtimeTransportDispatchPreviewEndRequestSchema, m as runtimeTransportDispatchLifecycleRequestSchema, or as executionContextAssignmentSchema, qn as MESSAGE_MENTION_TYPE_VALUES, v as runtimeTransportDispatchReasoningRequestSchema, w as runtimeTransportHeartbeatResponseSchema, wi as openMeldRequestContextSchema, y as runtimeTransportDispatchRuntimeEvidenceRequestSchema } from "./runtime-transport-D4CVffnp.js";
7
+ import { A as boolean, G as strictObject, I as iso, K as string, M as discriminatedUnion, P as enumFactory, R as literal, Z as url, p as localServiceComponentUpdateProjectionSchema, s as localCliComponentUpdateProjectionSchema } from "./local-components-DJiMS67S.js";
8
+ import { D as normalizeOptionalWorkingDirectory, O as openMeldRuntimeProfileIdSchema } from "./control-plane-QqGL-jtT.js";
9
9
  import { i as serviceControlCapabilitiesSchema } from "./service-account-admission-BfdJ-kKR.js";
10
- import { _ as toErrorMessage, a as asRecord, d as normalizeText, ht as resolveCurrentOpenMeldAccountContext, l as normalizeNonNegativeInteger$1, s as emitRunLine, u as normalizeOptionalText$8 } from "./daemon-device-id-B6iDyQEs.js";
11
- import { v as resolveCliContextId } from "./lock-CMH9eoS7.js";
12
- import { a as buildAgentFacingMentalModelLines, c as buildCompactDispatchActionGuidanceLines, d as buildSpaceWakeParticipantLines, g as renderSpaceEntryBrief, l as buildSpaceAgentIdentityLine, m as deriveContinuity, n as SPACE_COLLABORATION_CONTEXT_RULE, p as composeDispatchBrief, s as buildCenterAgentRoleTemplateText, u as buildSpaceEntryBriefNeedMoreLine, v as resolveSpacePublicationRequirement } from "./dist-DFhd6JmQ.js";
13
- import { d as createDefaultRuntimeAgentControllerSettings } from "./base-url-eck31vC8.js";
14
- import { d as daemonDispatchJournalPath } from "./daemon-state-B6G5xe7f.js";
10
+ import { _ as toErrorMessage, a as asRecord, d as normalizeText, ht as resolveCurrentOpenMeldAccountContext, l as normalizeNonNegativeInteger$1, s as emitRunLine, u as normalizeOptionalText$8 } from "./daemon-device-id-DbSIqHoZ.js";
11
+ import { v as resolveCliContextId } from "./lock-BMI00i2F.js";
12
+ import { a as buildAgentFacingMentalModelLines, c as buildCompactDispatchActionGuidanceLines, d as buildSpaceWakeParticipantLines, g as renderSpaceEntryBrief, h as isSelfWakeSpaceAction, l as buildSpaceAgentIdentityLine, m as deriveContinuity, n as SPACE_COLLABORATION_CONTEXT_RULE, p as composeDispatchBrief, s as buildCenterAgentRoleTemplateText, u as buildSpaceEntryBriefNeedMoreLine, v as resolveSpacePublicationRequirement } from "./dist-DQS0XYkb.js";
13
+ import { d as createDefaultRuntimeAgentControllerSettings } from "./base-url-0AoeTi3w.js";
14
+ import { n as resolveOpenMeldDistribution } from "./distribution-BDQT2ilb.js";
15
+ import { a as DAEMON_SERVICE_RUNTIME_MODE_ENV, d as daemonDispatchJournalPath, h as daemonRuntimeRootPath, i as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, n as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, r as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, s as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV } from "./daemon-state-Dte9re5V.js";
15
16
  import { a as formatOpenMeldCliTextBlock } from "./cli-entry-command-CR_9QU1i.js";
16
17
  import { createHash, randomUUID } from "node:crypto";
17
18
  import { homedir } from "node:os";
18
- import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
19
+ import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
19
20
  import { access, chmod, link, mkdir, open, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
20
21
  import * as z$1 from "zod/v4";
21
22
  import { z } from "zod/v4";
22
- import { appendFileSync, constants, existsSync, mkdirSync, readFileSync, renameSync, watch, writeFileSync } from "node:fs";
23
+ import { appendFileSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, renameSync, watch, writeFileSync } from "node:fs";
23
24
  import process$1 from "node:process";
25
+ import { isDeepStrictEqual } from "node:util";
24
26
  import { Worker } from "node:worker_threads";
25
27
  //#region ../../packages/schemas/dist/schemas/cli/daemon-status-server-requirement.js
26
28
  const cliVersionVerdictKindSchema = z$1.enum([
@@ -2079,7 +2081,7 @@ function addDispatchOnlyWakeTarget(input) {
2079
2081
  const target = {
2080
2082
  profileId: input.targetDispatch.targetProfileId,
2081
2083
  profileKind: null,
2082
- displayName: normalizeOptionalText$2(input.targetDispatch.targetDisplayName) ?? input.targetDispatch.targetProfileId,
2084
+ displayName: normalizeOptionalText$2$1(input.targetDispatch.targetDisplayName) ?? input.targetDispatch.targetProfileId,
2083
2085
  relation: "wake",
2084
2086
  dispatchState: null,
2085
2087
  dispatchId: null,
@@ -2140,7 +2142,7 @@ function buildSignalPublicationFact(signal) {
2140
2142
  return {
2141
2143
  ...publication,
2142
2144
  finalPreview: readSignalFinalPreview(signal),
2143
- publishedSignalId: normalizeOptionalText$2(signal.id),
2145
+ publishedSignalId: normalizeOptionalText$2$1(signal.id),
2144
2146
  publishedSignalType: resolveSignalPublishedSignalType$1(signal),
2145
2147
  rank: rankPublicOutcome(publication.publicOutcome),
2146
2148
  resultRef: readSignalResultRef(signal)
@@ -2158,15 +2160,15 @@ function buildSpaceRoundSignalPublication(signal) {
2158
2160
  }
2159
2161
  function buildDispatchResultPublicationFact(result) {
2160
2162
  return {
2161
- actorProfileId: normalizeOptionalText$2(result.actorProfileId),
2162
- dispatchId: normalizeOptionalText$2(result.dispatchId),
2163
+ actorProfileId: normalizeOptionalText$2$1(result.actorProfileId),
2164
+ dispatchId: normalizeOptionalText$2$1(result.dispatchId),
2163
2165
  finalPreview: sanitizeSignalTextPreview(result.previewText ?? result.finalText ?? result.statusType),
2164
2166
  publicOutcome: result.publicOutcome,
2165
- publishedSignalId: normalizeOptionalText$2(result.publishedSignalId),
2167
+ publishedSignalId: normalizeOptionalText$2$1(result.publishedSignalId),
2166
2168
  publishedSignalType: resolveDispatchResultPublishedSignalType$1(result),
2167
2169
  rank: rankPublicOutcome(result.publicOutcome) + 10,
2168
- replyToSignalId: normalizeOptionalText$2(result.replyToSignalId),
2169
- resultRef: normalizeOptionalText$2(result.resultRef)
2170
+ replyToSignalId: normalizeOptionalText$2$1(result.replyToSignalId),
2171
+ resultRef: normalizeOptionalText$2$1(result.resultRef)
2170
2172
  };
2171
2173
  }
2172
2174
  function resolveSignalPublicOutcome$1(signal) {
@@ -2197,9 +2199,9 @@ function resolveDispatchResultPublishedSignalType$1(result) {
2197
2199
  }
2198
2200
  function readSignalActorProfileId(signal) {
2199
2201
  switch (signal.type) {
2200
- case "signal.text": return normalizeOptionalText$2(signal.profile?.profileId);
2201
- case "signal.status": return normalizeOptionalText$2(signal.data.actorProfileId);
2202
- case "signal.system_notice": return normalizeOptionalText$2(signal.data.actorProfileId) ?? normalizeOptionalText$2(signal.profile?.profileId);
2202
+ case "signal.text": return normalizeOptionalText$2$1(signal.profile?.profileId);
2203
+ case "signal.status": return normalizeOptionalText$2$1(signal.data.actorProfileId);
2204
+ case "signal.system_notice": return normalizeOptionalText$2$1(signal.data.actorProfileId) ?? normalizeOptionalText$2$1(signal.profile?.profileId);
2203
2205
  default: return null;
2204
2206
  }
2205
2207
  }
@@ -2207,14 +2209,14 @@ function readSignalDispatchId$1(signal) {
2207
2209
  switch (signal.type) {
2208
2210
  case "signal.text": return readSignalTextMetaDispatchId(signal);
2209
2211
  case "signal.status":
2210
- case "signal.system_notice": return normalizeOptionalText$2(signal.data.dispatchId);
2212
+ case "signal.system_notice": return normalizeOptionalText$2$1(signal.data.dispatchId);
2211
2213
  default: return null;
2212
2214
  }
2213
2215
  }
2214
2216
  function readSignalTextMetaDispatchId(signal) {
2215
2217
  const meta = signal.data.meta;
2216
2218
  if (!meta || typeof meta !== "object" || Array.isArray(meta)) return null;
2217
- return normalizeOptionalText$2(meta.dispatchId);
2219
+ return normalizeOptionalText$2$1(meta.dispatchId);
2218
2220
  }
2219
2221
  function readSignalFinalPreview(signal) {
2220
2222
  switch (signal.type) {
@@ -2226,16 +2228,16 @@ function readSignalFinalPreview(signal) {
2226
2228
  }
2227
2229
  function readSignalReplyToSignalId(signal) {
2228
2230
  switch (signal.type) {
2229
- case "signal.text": return normalizeOptionalText$2(signal.data.messageEnvelope?.replyToSignalId ?? signal.data.replyTo?.signalId);
2231
+ case "signal.text": return normalizeOptionalText$2$1(signal.data.messageEnvelope?.replyToSignalId ?? signal.data.replyTo?.signalId);
2230
2232
  case "signal.status":
2231
- case "signal.system_notice": return normalizeOptionalText$2(signal.data.replyTo?.signalId);
2233
+ case "signal.system_notice": return normalizeOptionalText$2$1(signal.data.replyTo?.signalId);
2232
2234
  default: return null;
2233
2235
  }
2234
2236
  }
2235
2237
  function readSignalResultRef(signal) {
2236
2238
  switch (signal.type) {
2237
2239
  case "signal.status":
2238
- case "signal.system_notice": return normalizeOptionalText$2(signal.data.resultRef);
2240
+ case "signal.system_notice": return normalizeOptionalText$2$1(signal.data.resultRef);
2239
2241
  default: return null;
2240
2242
  }
2241
2243
  }
@@ -2255,7 +2257,7 @@ function normalizeRequiredText(value) {
2255
2257
  if (normalized.length === 0) throw new Error("sourceSignalId is required");
2256
2258
  return normalized;
2257
2259
  }
2258
- function normalizeOptionalText$2(value) {
2260
+ function normalizeOptionalText$2$1(value) {
2259
2261
  const normalized = String(value ?? "").trim();
2260
2262
  return normalized.length > 0 ? normalized : null;
2261
2263
  }
@@ -2266,12 +2268,12 @@ function buildDispatchResultReplyWorkflowProjection(input) {
2266
2268
  signalIndex: input.signalIndex ?? null
2267
2269
  });
2268
2270
  return {
2269
- sourceSignalId: normalizeOptionalText$1(input.dispatchExecution?.sourceSignalId) ?? normalizeOptionalText$1(messageReadProjection.replyToSignalId),
2271
+ sourceSignalId: normalizeOptionalText$1$1(input.dispatchExecution?.sourceSignalId) ?? normalizeOptionalText$1$1(messageReadProjection.replyToSignalId),
2270
2272
  replyToSignalId: messageReadProjection.replyToSignalId,
2271
2273
  publicOutcome: input.result.publicOutcome,
2272
- publishedSignalId: normalizeOptionalText$1(input.result.publishedSignalId),
2274
+ publishedSignalId: normalizeOptionalText$1$1(input.result.publishedSignalId),
2273
2275
  publishedSignalType: resolveDispatchResultPublishedSignalType(input.result),
2274
- hasPublicSignal: normalizeOptionalText$1(input.result.publishedSignalId) !== null,
2276
+ hasPublicSignal: normalizeOptionalText$1$1(input.result.publishedSignalId) !== null,
2275
2277
  hasPublicAgentReplyText: dispatchResultHasPublicAgentReplyText(input.result),
2276
2278
  dispatchExecution: input.dispatchExecution ?? null,
2277
2279
  replyToContext: messageReadProjection.replyToContext
@@ -2311,7 +2313,7 @@ function buildSignalReplyWorkflowProjection(input) {
2311
2313
  sourceSignalId: replyToSignalId,
2312
2314
  replyToSignalId,
2313
2315
  publicOutcome,
2314
- publishedSignalId: normalizeOptionalText$1(input.signal.id),
2316
+ publishedSignalId: normalizeOptionalText$1$1(input.signal.id),
2315
2317
  publishedSignalType,
2316
2318
  hasPublicSignal: true,
2317
2319
  hasPublicAgentReplyText: input.signal.type === "signal.text",
@@ -2335,20 +2337,20 @@ function selectBestPublishedReplyWorkflowCandidate(input) {
2335
2337
  if (!candidate) continue;
2336
2338
  const dispatchId = readSignalDispatchId(signal);
2337
2339
  const matchesDispatch = dispatchId !== null && dispatchIds.has(dispatchId);
2338
- const matchesAnchor = !hasDispatchEvidence && candidate.replyToSignalId === normalizeOptionalText$1(input.afterSignalId);
2340
+ const matchesAnchor = !hasDispatchEvidence && candidate.replyToSignalId === normalizeOptionalText$1$1(input.afterSignalId);
2339
2341
  if (!(matchesDispatch || matchesAnchor)) continue;
2340
2342
  const candidateRank = rankReplyWorkflowCandidate(candidate);
2341
2343
  if (candidateRank < bestRank) continue;
2342
2344
  bestCandidate = {
2343
2345
  ...candidate,
2344
- sourceSignalId: normalizeOptionalText$1(input.afterSignalId) ?? candidate.sourceSignalId
2346
+ sourceSignalId: normalizeOptionalText$1$1(input.afterSignalId) ?? candidate.sourceSignalId
2345
2347
  };
2346
2348
  bestRank = candidateRank;
2347
2349
  }
2348
2350
  return bestCandidate;
2349
2351
  }
2350
2352
  function buildPendingReplyWorkflowProjection(input) {
2351
- const sourceSignalId = normalizeOptionalText$1(input.afterSignalId);
2353
+ const sourceSignalId = normalizeOptionalText$1$1(input.afterSignalId);
2352
2354
  const replyToContext = sourceSignalId === null ? null : resolveReplyToContext({
2353
2355
  replyToSignalId: sourceSignalId,
2354
2356
  signalIndex: input.signalIndex,
@@ -2408,9 +2410,9 @@ function rankReplyWorkflowCandidate(projection) {
2408
2410
  }
2409
2411
  function readSignalDispatchId(signal) {
2410
2412
  switch (signal.type) {
2411
- case "signal.text": return normalizeOptionalText$1(readSignalTextMeta(signal)?.dispatchId);
2413
+ case "signal.text": return normalizeOptionalText$1$1(readSignalTextMeta(signal)?.dispatchId);
2412
2414
  case "signal.status":
2413
- case "signal.system_notice": return normalizeOptionalText$1(signal.data.dispatchId);
2415
+ case "signal.system_notice": return normalizeOptionalText$1$1(signal.data.dispatchId);
2414
2416
  default: return null;
2415
2417
  }
2416
2418
  }
@@ -2421,9 +2423,9 @@ function readSignalTextMeta(signal) {
2421
2423
  return meta;
2422
2424
  }
2423
2425
  function readSystemNoticeType(signal) {
2424
- return normalizeOptionalText$1(signal.data.noticeType);
2426
+ return normalizeOptionalText$1$1(signal.data.noticeType);
2425
2427
  }
2426
- function normalizeOptionalText$1(value) {
2428
+ function normalizeOptionalText$1$1(value) {
2427
2429
  const normalized = String(value ?? "").trim();
2428
2430
  return normalized.length > 0 ? normalized : null;
2429
2431
  }
@@ -2748,7 +2750,7 @@ async function readSpaceCacheFile(input) {
2748
2750
  try {
2749
2751
  raw = await readFile(input.path, "utf8");
2750
2752
  } catch (error) {
2751
- if (isNodeErrorCode(error, "ENOENT")) return {
2753
+ if (isNodeErrorCode$1(error, "ENOENT")) return {
2752
2754
  kind: "missing",
2753
2755
  fileKind: input.fileKind,
2754
2756
  path: input.path
@@ -2788,7 +2790,7 @@ async function readDirectoryEntries(path) {
2788
2790
  entries: await readdir(path, { withFileTypes: true })
2789
2791
  };
2790
2792
  } catch (error) {
2791
- if (isNodeErrorCode(error, "ENOENT")) return { kind: "missing" };
2793
+ if (isNodeErrorCode$1(error, "ENOENT")) return { kind: "missing" };
2792
2794
  return {
2793
2795
  kind: "read_error",
2794
2796
  detail: error instanceof Error ? error.message : null
@@ -3255,7 +3257,7 @@ function resolveSpaceCacheFileKind(path) {
3255
3257
  if (filename.endsWith(".json")) return "space_config";
3256
3258
  return null;
3257
3259
  }
3258
- function isNodeErrorCode(error, code) {
3260
+ function isNodeErrorCode$1(error, code) {
3259
3261
  return !!error && typeof error === "object" && "code" in error && error.code === code;
3260
3262
  }
3261
3263
  function compareIsoDateDesc(left, right) {
@@ -3737,10 +3739,14 @@ function buildWhatYouCanDoNowLine(input) {
3737
3739
  }
3738
3740
  function buildActionGuidanceLines(input) {
3739
3741
  const publicationRequirement = resolveSpacePublicationRequirement(input.spaceContractSnapshot);
3740
- return [...buildCompactDispatchActionGuidanceLines({
3741
- allowedActions: publicationRequirement.allowedActions,
3742
- allowsRawReplyWithoutAction: publicationRequirement.allowsRawReplyWithoutAction
3743
- }).slice(1).map((line) => `- ${line}`), ...SPACE_ACTION_CONTEXT_GUIDANCE_LINES];
3742
+ return [
3743
+ ...buildCompactDispatchActionGuidanceLines({
3744
+ allowedActions: publicationRequirement.allowedActions,
3745
+ allowsRawReplyWithoutAction: publicationRequirement.allowsRawReplyWithoutAction
3746
+ }).slice(1).map((line) => `- ${line}`),
3747
+ "- In shared Spaces, reply in the triggering message's thread by default. Choose placement=conversation only when the user requests the main conversation or your conclusion, decision, or blocker matters to the whole Space. Direct messages remain direct.",
3748
+ ...SPACE_ACTION_CONTEXT_GUIDANCE_LINES
3749
+ ];
3744
3750
  }
3745
3751
  function buildSpaceActionCommand(action) {
3746
3752
  return `${DISPATCH_SPACE_ACTION_CLI_FALLBACK_COMMAND} space action ${action}`;
@@ -4351,6 +4357,18 @@ function sendDispatchReasoningFrame(input) {
4351
4357
  payload: parsed.data
4352
4358
  });
4353
4359
  }
4360
+ function sendDispatchProgressFrame(input) {
4361
+ const { socket, ...payload } = input;
4362
+ const parsed = runtimeTransportDispatchProgressRequestSchema.safeParse({
4363
+ ...payload,
4364
+ v: 1
4365
+ });
4366
+ if (!parsed.success) return;
4367
+ sendDaemonFrame$1(socket, {
4368
+ code: "daemon.dispatch.progress",
4369
+ payload: parsed.data
4370
+ });
4371
+ }
4354
4372
  function sendDispatchToolActivityFrame(input) {
4355
4373
  const request = runtimeTransportDispatchToolActivityRequestSchema.safeParse({
4356
4374
  v: 1,
@@ -4888,7 +4906,7 @@ function recordAgentControllerInterfaceProbeSuccess(input) {
4888
4906
  keeperKey: input.keeperKey
4889
4907
  });
4890
4908
  const passiveUsageLimits = existingEntry?.passiveUsageLimits ?? [];
4891
- const canBindPassiveUsageLimits = areAgentControllerInterfaceAccountsSame(existingEntry?.passiveUsageLimitsAuth, input.snapshot.auth);
4909
+ const canBindPassiveUsageLimits = !isAgentControllerUsageAccountUnavailable(input.snapshot.usageLimits) && areAgentControllerInterfaceAccountsSame(existingEntry?.passiveUsageLimitsAuth, input.snapshot.auth);
4892
4910
  let authenticatedSnapshot = input.snapshot;
4893
4911
  if (input.snapshot.auth.status === "unauthenticated") authenticatedSnapshot = null;
4894
4912
  else if (canBindPassiveUsageLimits && passiveUsageLimits.length > 0) authenticatedSnapshot = {
@@ -5882,12 +5900,12 @@ async function readOpenCodeSessionRows(databasePath, nativeSessionId) {
5882
5900
  }
5883
5901
  }
5884
5902
  function resolveOpenCodeDatabasePath(input) {
5885
- return join(normalizeOptionalText(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "opencode.db");
5903
+ return join(normalizeOptionalText$2(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "opencode.db");
5886
5904
  }
5887
5905
  function resolveOpenCodeAuthPath(input) {
5888
- return join(normalizeOptionalText(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "auth.json");
5906
+ return join(normalizeOptionalText$2(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "auth.json");
5889
5907
  }
5890
- function normalizeOptionalText(value) {
5908
+ function normalizeOptionalText$2(value) {
5891
5909
  const normalized = value?.trim();
5892
5910
  return normalized ? normalized : null;
5893
5911
  }
@@ -6666,6 +6684,485 @@ function sendDaemonFrame(sink, input) {
6666
6684
  }));
6667
6685
  }
6668
6686
  //#endregion
6669
- export { emitDaemonDispatchJournalEvent as $, getSpaceAccessRequestContext as $t, readLastKnownAgentControllerAuthSnapshot as A, getOrganizationJoinLinkResponseSchema as An, SpaceComposerSubmissionError as At, enqueueDispatchResultOutboxRecord as B, buildSpaceProfileAddPlan as Bt, readAgentActivityOutboxHealth as C, cliJsonSkillsAddEnvelopeSchema as Cn, removeSpaceConfig as Ct, buildAgentControllerInterfaceKeeperKey as D, cliJsonSkillsScanEnvelopeSchema as Dn, upsertSpaceConfig as Dt, readRecentAgentActivityHookStatus as E, cliJsonSkillsLoadEnvelopeSchema as En, updateSpaceLastSeenTs as Et, recordAgentControllerInterfaceProbeSuccess as F, buildSignalMessageReadProjection as Ft, resolveDispatchResultPayload as G, collectResolvedSpaceMentions as Gt, listDispatchResultOutboxPendingAcknowledgementKeys as H, buildSpaceRoundSignalPublication as Ht, recordAgentControllerUsageLimitsObservation as I, buildSignalReplyWorkflowProjection as It, sendDispatchPreviewEndFrame as J, createSpaceTargetCatalog as Jt, sendDispatchInteractionRequestFrame as K, createDispatchContinuationSpaceAccessContext as Kt, resolveAgentControllerCommandFingerprint as L, buildSpaceMemberAgentPresencePresentation as Lt, readLastSuccessfulAgentControllerInterfaceCheckAt as M, organizationJoinLinkManagementQuerySchema as Mn, buildDispatchResultReplyWorkflowProjection as Mt, readReusableAgentControllerInterfaceSnapshot as N, revokeOrganizationJoinLinkResponseSchema as Nn, buildPublicSpaceEntryUrl as Nt, consumeArmedAgentControllerInterfaceReprobe as O, cliJsonSkillsShowEnvelopeSchema as On, writeSpaceCacheDeletionNoticeState as Ot, recordAgentControllerInterfaceProbeFailure as P, buildSignalIndex as Pt, sendDispatchToolActivityFrame as Q, getSpaceAccessPassword as Qt, resolveNextRuntimeAgentControllerReportSyncAtMs as R, buildSpaceMentionProfileIndex as Rt, deferAgentActivityOutbox as S, cliJsonSkillsAddAllEnvelopeSchema as Sn, readSpaceRecentMentionProfileIds as St, removeProjectOutbox as T, cliJsonSkillsListEnvelopeSchema as Tn, toSpaceConfigListIntegrityError as Tt, waitForDispatchResultOutboxAcknowledgement as U, buildUpdatesReplyWorkflowProjection as Ut, flushDispatchResultOutbox as V, buildSpaceRoundReadProjection as Vt, buildFailedTaskResultPayload as W, closeMentionPickerState as Wt, sendDispatchReasoningFrame as X, extractMentionAuthoringPrefix as Xt, sendDispatchPreviewFrame as Y, enterRelationPickerState as Yt, sendDispatchRuntimeEvidenceFrame as Z, formatRemovedCcRelationMessage as Zt, drainAgentActivityHookInbox as _, OPENMELD_DISPATCH_RUNTIME_TARGET_PROFILE_ID_ENV as _n, isLocalSpaceStateCorruptResult as _t, resolveRegisterResponseFrame as a, listSpaceMentionSuggestions as an, isSameOrDescendantPath as at, AgentActivitySubmissionResultsMismatchError as b, cliJsonErrorEnvelopeSchema as bn, readSpaceConfig as bt, scanLocalAgentActivity as c, prepareSpaceFileOnlySubmission as cn, buildDispatchPromptPlan as ct, resolveOpenCodeAuthPath as d, returnToTargetPickerState as dn, resolveBootstrapSpaceOwnerProfileId as dt, isRelationPickerState as en, readRecentDaemonDispatchJournalEvents as et, resolveOpenCodeDatabasePath as f, updateAuthoredMentionRanges as fn, resolveBootstrapTargetProfileContext as ft, readCodexSessionTitles as g, OPENMELD_DISPATCH_RUNTIME_MODE_ENV as gn, inspectSpaceCacheFile as gt, normalizeSharedSessionTitle as h, OPENMELD_DISPATCH_RUNTIME_DISPATCH_ID_ENV as hn, LocalSpaceStateIntegrityError as ht, resolveHeartbeatResponseFrame as i, listSpaceMentionRelationChoices as in, updateComputerFileAccessPolicy as it, readLastKnownAgentControllerUsageLimits as j, organizationJoinLinkErrorResponseSchema as jn, buildDispatchResultMessageReadProjection as jt, didAgentControllerCommandFingerprintRemainStable as k, acceptOrganizationJoinLinkBodySchema as kn, writeSpaceRecentMentionProfileIds as kt, startAgentActivityTranscriptWatchers as l, resolveNextRecentMentionProfileIdsForQueuedText as ln, buildDispatchSessionTitle as lt, resolveObservedAgentActivityBinding as m, DISPATCH_SPACE_ACTION_CLI_FALLBACK_COMMAND as mn, projectSpaceProfileCache as mt, handleDaemonTransportFrame as n, isWakeClosingSystemNoticeType as nn, readComputerFileAccessPolicy as nt, sendDaemonFrame as o, openTargetPickerState as on, buildDispatchBootstrapTemplateFacts as ot, buildAgentActivityEvent as p, DISPATCH_OWNED_RUNTIME_MODE as pn, resolveDispatchMentionSourceContext as pt, sendDispatchLifecycleFrame as q, createSpaceMemberIdentityIndex as qt, parseDaemonFrame as r, listSpaceMemberDirectorySendTargets as rn, resolveComputerFileAccessStorePath as rt, collectObservedSessionWorkingDirectories as s, prepareSpaceComposerSubmission as sn, buildDispatchCorrelation as st, emitDaemonErrorFrame as t, isTargetPickerState as tn, ComputerFileAccessStoreError as tt, readOpenCodeSessionRows as u, resolveSpaceMemberAgentOwnerWakeDiagnosticsView as un, parseDispatchTask as ut, enqueueAgentActivityHookEvent as v, OPENMELD_SPACE_ACTION_TOOL_COMMAND_PATH_ENV as vn, listSpaceConfigs as vt, readDueAgentActivityOutbox as w, cliJsonSkillsAddPreviewEnvelopeSchema as wn, toLocalSpaceStateIntegrityError as wt, applyAgentActivitySubmissionResults as x, cliJsonOutputEnvelopeSchema as xn, readSpaceLastSeenTs as xt, removeProjectInbox as y, OPENMELD_USER_FACING_CLI_COMMAND_ENV as yn, readSpaceCacheDeletionNoticeState as yt, acknowledgeDispatchResultOutboxRecord as z, buildSpaceMessageReadRelationSummary as zt };
6687
+ //#region src/runtime/dispatch-space-action-context.ts
6688
+ const OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV = "OPENMELD_SPACE_ACTION_CONTEXT_PATH";
6689
+ /** The local action context is known expired/closed/mismatched: a new ordinary action must be rejected, never recorded. */
6690
+ var DispatchSpaceActionClosedError = class extends Error {
6691
+ receipt = "rejected_closed";
6692
+ reasonCode;
6693
+ constructor(reasonCode, message) {
6694
+ super(message);
6695
+ this.name = "DispatchSpaceActionClosedError";
6696
+ this.reasonCode = reasonCode;
6697
+ }
6698
+ };
6699
+ /** Use only at a boundary that has positively rejected this call before recording. */
6700
+ var DispatchSpaceActionRejectedError = class extends Error {
6701
+ reasonCode;
6702
+ constructor(reasonCode, message) {
6703
+ super(message);
6704
+ this.name = "DispatchSpaceActionRejectedError";
6705
+ this.reasonCode = reasonCode;
6706
+ }
6707
+ };
6708
+ const DISPATCH_SPACE_ACTION_CONTEXT_VERSION = 1;
6709
+ const DISPATCH_SPACE_ACTION_RECORD_VERSION = 1;
6710
+ const DEFAULT_CONTEXT_TTL_MS = 720 * 60 * 1e3;
6711
+ function createDispatchSpaceActionContext(input) {
6712
+ const contextId = randomUUID();
6713
+ const nonce = randomUUID();
6714
+ const contextDir = join(daemonRuntimeRootPath(input.pathInput ?? { env: input.env }), "dispatch-space-actions", `${Date.now().toString(36)}-${contextId}`);
6715
+ mkdirSync(contextDir, {
6716
+ recursive: true,
6717
+ mode: 448
6718
+ });
6719
+ chmodSync(contextDir, 448);
6720
+ const contextPath = join(contextDir, "context.json");
6721
+ const actionRecordPath = join(contextDir, "action.json");
6722
+ const context = {
6723
+ ...input.projectShell ? { projectShell: input.projectShell } : {},
6724
+ ...input.workingCopyId ? { workingCopyId: input.workingCopyId } : {},
6725
+ version: DISPATCH_SPACE_ACTION_CONTEXT_VERSION,
6726
+ actionRecordPath,
6727
+ attemptId: input.attemptId,
6728
+ contextId,
6729
+ dispatchId: input.dispatchId,
6730
+ expiresAtMs: Date.now() + (input.ttlMs ?? DEFAULT_CONTEXT_TTL_MS),
6731
+ nonce,
6732
+ replyToSignalId: normalizeOptionalText$1(input.replyToSignalId),
6733
+ sendTargetReference: input.sendTargetReference,
6734
+ sourceEventId: input.sourceEventId,
6735
+ spaceContractSnapshot: input.spaceContractSnapshot ? {
6736
+ allowedActions: input.spaceContractSnapshot.allowedActions,
6737
+ publicationMode: input.spaceContractSnapshot.publicationMode
6738
+ } : null,
6739
+ spaceId: input.spaceId,
6740
+ targetProfileId: input.targetProfileId,
6741
+ taskId: input.taskId
6742
+ };
6743
+ writeJsonFileExclusive(contextPath, context);
6744
+ return {
6745
+ context,
6746
+ contextPath
6747
+ };
6748
+ }
6749
+ function readDispatchSpaceActionContextFromEnv(env = process.env) {
6750
+ const context = readDispatchSpaceActionContextForReceiptFromEnv(env);
6751
+ assertContextActive(context, Date.now());
6752
+ return context;
6753
+ }
6754
+ function readDispatchSpaceActionContextForReceiptFromEnv(env = process.env) {
6755
+ const contextPath = normalizeOptionalText$1(env[OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV]);
6756
+ if (!contextPath) throw new Error("No active OpenMeld Space Action dispatch context was found. Use this command inside an OpenMeld Space Wake dispatch.");
6757
+ const context = readDispatchSpaceActionContext(contextPath);
6758
+ assertDispatchRuntimeEnvMatchesContext({
6759
+ context,
6760
+ env
6761
+ });
6762
+ return context;
6763
+ }
6764
+ function readDispatchSpaceActionContext(contextPath) {
6765
+ return parseDispatchSpaceActionContext(readJsonFile(contextPath));
6766
+ }
6767
+ function writeDispatchSpaceActionRecord(input) {
6768
+ const parsedAction = openMeldSpaceEgressActionSchema.safeParse(input.action);
6769
+ if (!parsedAction.success) throw new DispatchSpaceActionRejectedError("space_action.invalid_input", parsedAction.error.message);
6770
+ if (isSelfWakeSpaceAction(parsedAction.data, input.context.targetProfileId)) throw new DispatchSpaceActionRejectedError("space_action.invalid_input", "An Agent cannot Wake itself. To reply to the current message, omit wakeTargets (CLI: --wake) and submit the reply again. No action was recorded.");
6771
+ const existing = readDispatchSpaceActionRecord({ context: input.context });
6772
+ if (existing.status === "invalid") throw new Error(existing.errorMessage);
6773
+ if (existing.status === "loaded" && isDeepStrictEqual(existing.record.action, parsedAction.data)) return existing.record;
6774
+ assertContextActive(input.context, input.nowMs ?? Date.now());
6775
+ const record = {
6776
+ version: DISPATCH_SPACE_ACTION_RECORD_VERSION,
6777
+ action: parsedAction.data,
6778
+ command: input.command,
6779
+ contextId: input.context.contextId,
6780
+ createdAtMs: input.nowMs ?? Date.now(),
6781
+ nonce: input.context.nonce
6782
+ };
6783
+ try {
6784
+ writeJsonFileExclusive(input.context.actionRecordPath, record);
6785
+ } catch (error) {
6786
+ if (isNodeErrorCode(error, "EEXIST")) {
6787
+ const existing = readDispatchSpaceActionRecord({ context: input.context });
6788
+ if (existing.status === "loaded" && isDeepStrictEqual(existing.record.action, parsedAction.data)) return existing.record;
6789
+ throw new DispatchSpaceActionRejectedError("space_action.already_recorded", "An OpenMeld Space Action has already been recorded for this dispatch. A Wake can only have one final Space action. Recover its receipt with the exact original arguments; do not replace it with a different action.");
6790
+ }
6791
+ throw error;
6792
+ }
6793
+ return record;
6794
+ }
6795
+ function readDispatchSpaceActionRecord(input) {
6796
+ if (!existsSync(input.context.actionRecordPath)) return { status: "missing" };
6797
+ try {
6798
+ const record = parseDispatchSpaceActionRecord(readJsonFile(input.context.actionRecordPath));
6799
+ if (record.contextId !== input.context.contextId || record.nonce !== input.context.nonce) return {
6800
+ status: "invalid",
6801
+ errorMessage: "OpenMeld Space Action record does not match the active dispatch context."
6802
+ };
6803
+ if (record.createdAtMs > input.context.expiresAtMs) return {
6804
+ status: "invalid",
6805
+ errorMessage: "OpenMeld Space Action record was created after the active dispatch context expired."
6806
+ };
6807
+ return {
6808
+ status: "loaded",
6809
+ record
6810
+ };
6811
+ } catch (error) {
6812
+ return {
6813
+ status: "invalid",
6814
+ errorMessage: error instanceof Error ? error.message : String(error)
6815
+ };
6816
+ }
6817
+ }
6818
+ function supersedeDispatchSpaceActionRecordForReconsideration(input) {
6819
+ const readResult = readDispatchSpaceActionRecord(input);
6820
+ if (readResult.status === "missing") return null;
6821
+ if (readResult.status === "invalid") throw new Error(readResult.errorMessage);
6822
+ const archivedPath = `${input.context.actionRecordPath}.superseded-${String(input.nowMs ?? Date.now())}-${randomUUID()}`;
6823
+ renameSync(input.context.actionRecordPath, archivedPath);
6824
+ return {
6825
+ archivedPath,
6826
+ record: readResult.record
6827
+ };
6828
+ }
6829
+ function parseDispatchSpaceActionContext(value) {
6830
+ const record = toRecord(value, "OpenMeld Space Action context");
6831
+ const version = record.version;
6832
+ if (version !== DISPATCH_SPACE_ACTION_CONTEXT_VERSION) throw new Error("Unsupported OpenMeld Space Action context version.");
6833
+ const sendTargetReference = parseSendTargetReference(record.sendTargetReference);
6834
+ return {
6835
+ ...record.projectShell ? { projectShell: parseProjectShell(record.projectShell) } : {},
6836
+ version,
6837
+ actionRecordPath: requiredString(record.actionRecordPath, "actionRecordPath"),
6838
+ attemptId: requiredString(record.attemptId, "attemptId"),
6839
+ contextId: requiredString(record.contextId, "contextId"),
6840
+ dispatchId: requiredString(record.dispatchId, "dispatchId"),
6841
+ expiresAtMs: requiredFiniteNumber(record.expiresAtMs, "expiresAtMs"),
6842
+ nonce: requiredString(record.nonce, "nonce"),
6843
+ replyToSignalId: optionalString(record.replyToSignalId),
6844
+ sendTargetReference,
6845
+ sourceEventId: requiredString(record.sourceEventId, "sourceEventId"),
6846
+ spaceContractSnapshot: parseSpaceContractSnapshot(record.spaceContractSnapshot),
6847
+ spaceId: requiredString(record.spaceId, "spaceId"),
6848
+ targetProfileId: requiredString(record.targetProfileId, "targetProfileId"),
6849
+ taskId: requiredString(record.taskId, "taskId"),
6850
+ ...record.workingCopyId ? { workingCopyId: requiredString(record.workingCopyId, "workingCopyId") } : {}
6851
+ };
6852
+ }
6853
+ function parseProjectShell(value) {
6854
+ const record = toRecord(value, "OpenMeld project shell context");
6855
+ const runtime = toRecord(record.runtime, "OpenMeld project shell runtime");
6856
+ const kind = runtime.kind;
6857
+ if (kind !== "docker" && kind !== "podman") throw new Error("OpenMeld project shell runtime is invalid.");
6858
+ const executionContextId = requiredString(record.executionContextId, "executionContextId");
6859
+ const workspacePath = requiredString(record.workspacePath, "workspacePath");
6860
+ const boundaryRoot = requiredString(record.boundaryRoot, "boundaryRoot");
6861
+ const ledgerRootPath = requiredString(record.ledgerRootPath, "ledgerRootPath");
6862
+ const binary = requiredString(runtime.binary, "binary");
6863
+ const validContextId = executionContextAssignmentSchema.shape.id.safeParse(executionContextId).success;
6864
+ const validPaths = [
6865
+ workspacePath,
6866
+ boundaryRoot,
6867
+ ledgerRootPath,
6868
+ binary
6869
+ ].every(isAbsolute);
6870
+ if (!(validContextId && validPaths)) throw new Error("OpenMeld project shell context is invalid.");
6871
+ return {
6872
+ boundaryRoot,
6873
+ executionContextId,
6874
+ ledgerRootPath,
6875
+ workspacePath,
6876
+ runtime: {
6877
+ binary,
6878
+ engineIdentity: requiredString(runtime.engineIdentity, "engineIdentity"),
6879
+ kind
6880
+ }
6881
+ };
6882
+ }
6883
+ function assertDispatchRuntimeEnvMatchesContext(input) {
6884
+ if (normalizeOptionalText$1(input.env["OPENMELD_DISPATCH_RUNTIME_MODE"]) !== "dispatch-owned-runtime") return;
6885
+ const envDispatchId = normalizeOptionalText$1(input.env[OPENMELD_DISPATCH_RUNTIME_DISPATCH_ID_ENV]);
6886
+ if (!envDispatchId) throw new Error("OpenMeld Space Action dispatch runtime is missing the active dispatch ID.");
6887
+ if (envDispatchId !== input.context.dispatchId) throw new DispatchSpaceActionClosedError("space_action.context_mismatch", "OpenMeld Space Action dispatch context does not match the active dispatch runtime.");
6888
+ const envTargetProfileId = normalizeOptionalText$1(input.env[OPENMELD_DISPATCH_RUNTIME_TARGET_PROFILE_ID_ENV]);
6889
+ if (!envTargetProfileId) throw new Error("OpenMeld Space Action dispatch runtime is missing the active target profile ID.");
6890
+ if (envTargetProfileId !== input.context.targetProfileId) throw new DispatchSpaceActionClosedError("space_action.context_mismatch", "OpenMeld Space Action target profile does not match the active dispatch runtime.");
6891
+ }
6892
+ function parseDispatchSpaceActionRecord(value) {
6893
+ const record = toRecord(value, "OpenMeld Space Action record");
6894
+ const version = record.version;
6895
+ if (version !== DISPATCH_SPACE_ACTION_RECORD_VERSION) throw new Error("Unsupported OpenMeld Space Action record version.");
6896
+ const parsedAction = openMeldSpaceEgressActionSchema.safeParse(record.action);
6897
+ if (!parsedAction.success) throw parsedAction.error;
6898
+ return {
6899
+ version,
6900
+ action: parsedAction.data,
6901
+ command: requiredString(record.command, "command"),
6902
+ contextId: requiredString(record.contextId, "contextId"),
6903
+ createdAtMs: requiredFiniteNumber(record.createdAtMs, "createdAtMs"),
6904
+ nonce: requiredString(record.nonce, "nonce")
6905
+ };
6906
+ }
6907
+ function parseSendTargetReference(value) {
6908
+ const record = toRecord(value, "sendTargetReference");
6909
+ if (record.status === "loaded") {
6910
+ if (!Array.isArray(record.projection)) throw new Error("OpenMeld Space Action send target projection must be an array.");
6911
+ return {
6912
+ status: "loaded",
6913
+ projection: record.projection.map(parseSendTargetProjectionEntry),
6914
+ referenceLines: parseStringArray(record.referenceLines)
6915
+ };
6916
+ }
6917
+ if (record.status === "failed") return {
6918
+ status: "failed",
6919
+ errorMessage: requiredString(record.errorMessage, "errorMessage"),
6920
+ projection: null,
6921
+ referenceLines: []
6922
+ };
6923
+ throw new Error("Invalid OpenMeld Space Action send target reference status.");
6924
+ }
6925
+ function parseSendTargetProjectionEntry(value, index) {
6926
+ const parsed = spaceMemberDirectoryEntrySchema.safeParse(value);
6927
+ if (!parsed.success) throw new Error(`OpenMeld Space Action target projection entry ${index} is not a valid Space member directory entry.`);
6928
+ return parsed.data;
6929
+ }
6930
+ function parseSpaceContractSnapshot(value) {
6931
+ if (value === null || value === void 0) return null;
6932
+ const record = toRecord(value, "spaceContractSnapshot");
6933
+ return {
6934
+ allowedActions: Array.isArray(record.allowedActions) ? record.allowedActions : [],
6935
+ publicationMode: record.publicationMode === "raw_context_sharing" ? "raw_context_sharing" : "collaboration"
6936
+ };
6937
+ }
6938
+ function assertContextActive(context, nowMs) {
6939
+ if (nowMs > context.expiresAtMs) throw new DispatchSpaceActionClosedError("space_action.context_expired", "The OpenMeld Space Action dispatch context has expired.");
6940
+ }
6941
+ function readJsonFile(path) {
6942
+ return JSON.parse(readFileSync(path, "utf8"));
6943
+ }
6944
+ function writeJsonFileExclusive(path, value) {
6945
+ writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`, {
6946
+ encoding: "utf8",
6947
+ flag: "wx",
6948
+ mode: 384
6949
+ });
6950
+ chmodSync(path, 384);
6951
+ }
6952
+ function toRecord(value, label) {
6953
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(`${label} must be a JSON object.`);
6954
+ return value;
6955
+ }
6956
+ function requiredString(value, fieldName) {
6957
+ const normalized = normalizeOptionalText$1(value);
6958
+ if (!normalized) throw new Error(`${fieldName} must be a non-empty string.`);
6959
+ return normalized;
6960
+ }
6961
+ function requiredFiniteNumber(value, fieldName) {
6962
+ if (typeof value !== "number" || !Number.isFinite(value)) throw new Error(`${fieldName} must be a finite number.`);
6963
+ return value;
6964
+ }
6965
+ function optionalString(value) {
6966
+ if (value === null || value === void 0) return null;
6967
+ return normalizeOptionalText$1(value);
6968
+ }
6969
+ function parseStringArray(value) {
6970
+ if (!Array.isArray(value)) return [];
6971
+ return value.map((item) => normalizeOptionalText$1(item)).filter((item) => Boolean(item));
6972
+ }
6973
+ function normalizeOptionalText$1(value) {
6974
+ const normalized = String(value ?? "").trim();
6975
+ return normalized.length > 0 ? normalized : null;
6976
+ }
6977
+ function isNodeErrorCode(error, code) {
6978
+ return typeof error === "object" && error !== null && "code" in error && error.code === code;
6979
+ }
6980
+ //#endregion
6981
+ //#region src/runtime/dispatch-owned-runtime.ts
6982
+ const DISPATCH_OWNED_RUNTIME_CLI_SHIM_DIRNAME = "dispatch-owned-cli";
6983
+ const DISPATCH_SPACE_ACTION_CLI_SHIM_DIRNAME = "bin";
6984
+ const OPENMELD_ENV_PRESET_ENV = "OPENMELD_ENV_PRESET";
6985
+ const DISPATCH_OWNED_RUNTIME_CLI_COMMAND_NAMES = [
6986
+ "openmeld",
6987
+ "openmeld-dev",
6988
+ "openmeld-canary"
6989
+ ];
6990
+ function buildDispatchOwnedRuntimeEnv(input) {
6991
+ const env = {
6992
+ OPENMELD_HOME: process.env.OPENMELD_HOME,
6993
+ OPENMELD_ENV_PRESET: process.env.OPENMELD_ENV_PRESET,
6994
+ ...input.env ?? {}
6995
+ };
6996
+ const currentPath = normalizeOptionalText(input.env?.PATH ?? process.env.PATH);
6997
+ const actionCommand = resolveDispatchOwnedRuntimeActionCliEntryCommand({ env });
6998
+ const actionCommandPath = (input.platform ?? process.platform) === "win32" && (input.distribution ?? resolveOpenMeldDistribution()) === "binary" ? resolveDispatchOwnedRuntimeBinaryCliEntryPath({
6999
+ cliEntryPath: input.cliEntryPath,
7000
+ env
7001
+ }) : join(ensureDispatchOwnedRuntimeCliShims({
7002
+ cliEntryPath: input.cliEntryPath,
7003
+ dispatchId: input.dispatchId,
7004
+ distribution: input.distribution,
7005
+ env,
7006
+ spaceActionContextPath: input.spaceActionContextPath,
7007
+ targetProfileId: input.targetProfileId
7008
+ }), actionCommand);
7009
+ return {
7010
+ ...env,
7011
+ [DAEMON_SERVICE_RUNTIME_MODE_ENV]: void 0,
7012
+ [DAEMON_SERVICE_RUNTIME_DETACHED_ENV]: void 0,
7013
+ [DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV]: void 0,
7014
+ [DAEMON_SERVICE_RUNTIME_AUTO_START_ENV]: void 0,
7015
+ [DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV]: void 0,
7016
+ PATH: prependPathEntry({
7017
+ currentPath,
7018
+ nextEntry: dirname(actionCommandPath)
7019
+ }),
7020
+ [OPENMELD_DISPATCH_RUNTIME_MODE_ENV]: DISPATCH_OWNED_RUNTIME_MODE,
7021
+ [OPENMELD_DISPATCH_RUNTIME_DISPATCH_ID_ENV]: input.dispatchId,
7022
+ [OPENMELD_DISPATCH_RUNTIME_TARGET_PROFILE_ID_ENV]: input.targetProfileId,
7023
+ [OPENMELD_USER_FACING_CLI_COMMAND_ENV]: actionCommand,
7024
+ [OPENMELD_SPACE_ACTION_TOOL_COMMAND_PATH_ENV]: actionCommandPath,
7025
+ [OPENMELD_ENV_PRESET_ENV]: resolveDispatchOwnedRuntimeEnvPreset({ env }),
7026
+ ...input.spaceActionContextPath ? { [OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV]: input.spaceActionContextPath } : {}
7027
+ };
7028
+ }
7029
+ function resolveDispatchOwnedRuntimeActionCliEntryCommand(input = {}) {
7030
+ const preset = resolveOpenMeldEnvPreset(input);
7031
+ if (preset === "dev-local") return "openmeld-dev";
7032
+ if (preset === "canary") return "openmeld-canary";
7033
+ return "openmeld";
7034
+ }
7035
+ function resolveDispatchOwnedRuntimeCliShimDir(input = {}) {
7036
+ const spaceActionContextPath = normalizeOptionalText(input.spaceActionContextPath);
7037
+ if (spaceActionContextPath) return join(dirname(spaceActionContextPath), DISPATCH_SPACE_ACTION_CLI_SHIM_DIRNAME);
7038
+ return join(daemonRuntimeRootPath(input), "bin", DISPATCH_OWNED_RUNTIME_CLI_SHIM_DIRNAME);
7039
+ }
7040
+ function ensureDispatchOwnedRuntimeCliShims(input) {
7041
+ const distribution = input?.distribution ?? resolveOpenMeldDistribution();
7042
+ const cliEntryPath = distribution === "binary" ? resolveDispatchOwnedRuntimeBinaryCliEntryPath({
7043
+ cliEntryPath: input?.cliEntryPath,
7044
+ env: input?.env
7045
+ }) : resolveDispatchOwnedRuntimeCliEntryPath(input?.cliEntryPath);
7046
+ const shimDir = resolveDispatchOwnedRuntimeCliShimDir({
7047
+ env: input?.env,
7048
+ spaceActionContextPath: input?.spaceActionContextPath
7049
+ });
7050
+ mkdirSync(shimDir, { recursive: true });
7051
+ for (const commandName of DISPATCH_OWNED_RUNTIME_CLI_COMMAND_NAMES) {
7052
+ const shimPath = join(shimDir, commandName);
7053
+ const shimSource = buildDispatchOwnedRuntimeCliShimSource({
7054
+ cliEntryPath,
7055
+ commandName,
7056
+ dispatchId: input?.dispatchId,
7057
+ distribution,
7058
+ nodePath: process.execPath,
7059
+ spaceActionContextPath: input?.spaceActionContextPath,
7060
+ targetProfileId: input?.targetProfileId
7061
+ });
7062
+ if (existsSync(shimPath)) {
7063
+ if (safeReadTextFile(shimPath) === shimSource) {
7064
+ chmodSync(shimPath, 493);
7065
+ continue;
7066
+ }
7067
+ }
7068
+ writeFileSync(shimPath, shimSource, {
7069
+ encoding: "utf8",
7070
+ mode: 493
7071
+ });
7072
+ chmodSync(shimPath, 493);
7073
+ }
7074
+ return shimDir;
7075
+ }
7076
+ function readDispatchOwnedRuntimeGuard(env = process.env) {
7077
+ if (normalizeOptionalText(env["OPENMELD_DISPATCH_RUNTIME_MODE"]) !== "dispatch-owned-runtime") return {
7078
+ active: false,
7079
+ dispatchId: null,
7080
+ targetProfileId: null
7081
+ };
7082
+ return {
7083
+ active: true,
7084
+ dispatchId: normalizeOptionalText(env[OPENMELD_DISPATCH_RUNTIME_DISPATCH_ID_ENV]),
7085
+ targetProfileId: normalizeOptionalText(env[OPENMELD_DISPATCH_RUNTIME_TARGET_PROFILE_ID_ENV])
7086
+ };
7087
+ }
7088
+ function assertDispatchOwnedRuntimePublicWriteAllowed(input) {
7089
+ const guard = readDispatchOwnedRuntimeGuard(input.env);
7090
+ if (!guard.active) return;
7091
+ const dispatchIdSuffix = guard.dispatchId ? ` (dispatch ${guard.dispatchId})` : "";
7092
+ throw new Error(`${input.commandLabel} is blocked inside a dispatch-owned runtime${dispatchIdSuffix}. Public space writes must be returned through OpenMeld Space structured actions: post_message, post_status, or stay_silent.`);
7093
+ }
7094
+ function assertDispatchOwnedRuntimeServiceMutationAllowed(input) {
7095
+ const env = input.env ?? process.env;
7096
+ const guard = readDispatchOwnedRuntimeGuard(env);
7097
+ if (!guard.active || resolveOpenMeldEnvPreset({ env }) !== "prod") return;
7098
+ const dispatchIdSuffix = guard.dispatchId ? ` (dispatch ${guard.dispatchId})` : "";
7099
+ throw new Error(`${input.commandLabel} is blocked inside a dispatch-owned runtime${dispatchIdSuffix} because it could stop or replace the production OpenMeld Service carrying this Agent. Use a confirmed dev lane for isolated service testing.`);
7100
+ }
7101
+ function normalizeOptionalText(value) {
7102
+ const normalized = String(value ?? "").trim();
7103
+ return normalized.length > 0 ? normalized : null;
7104
+ }
7105
+ function resolveDispatchOwnedRuntimeCliEntryPath(cliEntryPath) {
7106
+ const normalizedCliEntryPath = normalizeOptionalText(cliEntryPath) ?? normalizeOptionalText(process.argv[1]) ?? null;
7107
+ if (!normalizedCliEntryPath) throw new Error("dispatch-owned runtime CLI shim requires a current CLI entry path");
7108
+ return resolve(normalizedCliEntryPath);
7109
+ }
7110
+ function resolveDispatchOwnedRuntimeBinaryCliEntryPath(input) {
7111
+ const normalizedCliEntryPath = normalizeOptionalText(input.cliEntryPath) ?? normalizeOptionalText(openMeldManagedBinaryPath({ env: input.env })) ?? null;
7112
+ if (!normalizedCliEntryPath) throw new Error("dispatch-owned runtime CLI shim requires a current binary CLI path");
7113
+ return resolve(normalizedCliEntryPath);
7114
+ }
7115
+ function buildDispatchOwnedRuntimeCliShimSource(input) {
7116
+ const embeddedEnv = {
7117
+ [OPENMELD_DISPATCH_RUNTIME_MODE_ENV]: DISPATCH_OWNED_RUNTIME_MODE,
7118
+ [OPENMELD_ENV_PRESET_ENV]: resolveEnvPresetForCommandName(input.commandName),
7119
+ [OPENMELD_USER_FACING_CLI_COMMAND_ENV]: input.commandName,
7120
+ ...normalizeOptionalText(input.dispatchId) ? { [OPENMELD_DISPATCH_RUNTIME_DISPATCH_ID_ENV]: normalizeOptionalText(input.dispatchId) } : {},
7121
+ ...normalizeOptionalText(input.targetProfileId) ? { [OPENMELD_DISPATCH_RUNTIME_TARGET_PROFILE_ID_ENV]: normalizeOptionalText(input.targetProfileId) } : {},
7122
+ ...normalizeOptionalText(input.spaceActionContextPath) ? { [OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV]: normalizeOptionalText(input.spaceActionContextPath) } : {}
7123
+ };
7124
+ if (input.distribution === "binary") return `#!/bin/sh
7125
+ ${Object.entries(embeddedEnv).map(([key, value]) => `export ${key}=${quoteShellValue(value)}`).join("\n")}
7126
+ exec ${quoteShellValue(input.cliEntryPath)} "$@"
7127
+ `;
7128
+ return `#!/usr/bin/env node
7129
+ import { spawnSync } from "node:child_process";
7130
+
7131
+ const result = spawnSync(${JSON.stringify(input.nodePath)}, [${JSON.stringify(input.cliEntryPath)}, ...process.argv.slice(2)], {
7132
+ env: { ...process.env, ...${JSON.stringify(embeddedEnv)} },
7133
+ stdio: "inherit",
7134
+ });
7135
+
7136
+ if (result.error) {
7137
+ throw result.error;
7138
+ }
7139
+
7140
+ process.exit(result.status ?? 1);
7141
+ `;
7142
+ }
7143
+ function resolveDispatchOwnedRuntimeEnvPreset(input) {
7144
+ return resolveEnvPresetForCommandName(resolveDispatchOwnedRuntimeActionCliEntryCommand({ env: input.env }));
7145
+ }
7146
+ function resolveEnvPresetForCommandName(commandName) {
7147
+ if (commandName === "openmeld-dev") return "dev-local";
7148
+ if (commandName === "openmeld-canary") return "canary";
7149
+ return "prod";
7150
+ }
7151
+ function quoteShellValue(value) {
7152
+ return `'${value.replaceAll("'", "'\\''")}'`;
7153
+ }
7154
+ function safeReadTextFile(path) {
7155
+ try {
7156
+ return readFileSync(path, "utf8");
7157
+ } catch {
7158
+ return null;
7159
+ }
7160
+ }
7161
+ function prependPathEntry(input) {
7162
+ const dedupedEntries = (input.currentPath ?? "").split(delimiter).map((entry) => entry.trim()).filter((entry) => entry.length > 0).filter((entry) => entry !== input.nextEntry);
7163
+ return [input.nextEntry, ...dedupedEntries].join(delimiter);
7164
+ }
7165
+ //#endregion
7166
+ export { enqueueDispatchResultOutboxRecord as $, buildSpaceMessageReadRelationSummary as $t, drainAgentActivityHookInbox as A, cliJsonErrorEnvelopeSchema as An, inspectSpaceCacheFile as At, buildAgentControllerInterfaceKeeperKey as B, getOrganizationJoinLinkResponseSchema as Bn, updateSpaceLastSeenTs as Bt, readOpenCodeSessionRows as C, resolveNextRecentMentionProfileIdsForQueuedText as Cn, buildDispatchSessionTitle as Ct, resolveObservedAgentActivityBinding as D, DISPATCH_OWNED_RUNTIME_MODE as Dn, resolveDispatchMentionSourceContext as Dt, buildAgentActivityEvent as E, updateAuthoredMentionRanges as En, resolveBootstrapTargetProfileContext as Et, deferAgentActivityOutbox as F, cliJsonSkillsListEnvelopeSchema as Fn, readSpaceLastSeenTs as Ft, readLastSuccessfulAgentControllerInterfaceCheckAt as G, buildDispatchResultMessageReadProjection as Gt, didAgentControllerCommandFingerprintRemainStable as H, organizationJoinLinkManagementQuerySchema as Hn, writeSpaceCacheDeletionNoticeState as Ht, readAgentActivityOutboxHealth as I, cliJsonSkillsLoadEnvelopeSchema as In, readSpaceRecentMentionProfileIds as It, recordAgentControllerInterfaceProbeSuccess as J, buildSignalIndex as Jt, readReusableAgentControllerInterfaceSnapshot as K, buildDispatchResultReplyWorkflowProjection as Kt, readDueAgentActivityOutbox as L, cliJsonSkillsScanEnvelopeSchema as Ln, removeSpaceConfig as Lt, removeProjectInbox as M, cliJsonSkillsAddAllEnvelopeSchema as Mn, listSpaceConfigs as Mt, AgentActivitySubmissionResultsMismatchError as N, cliJsonSkillsAddEnvelopeSchema as Nn, readSpaceCacheDeletionNoticeState as Nt, normalizeSharedSessionTitle as O, DISPATCH_SPACE_ACTION_CLI_FALLBACK_COMMAND as On, projectSpaceProfileCache as Ot, applyAgentActivitySubmissionResults as P, cliJsonSkillsAddPreviewEnvelopeSchema as Pn, readSpaceConfig as Pt, acknowledgeDispatchResultOutboxRecord as Q, buildSpaceMentionProfileIndex as Qt, removeProjectOutbox as R, cliJsonSkillsShowEnvelopeSchema as Rn, toLocalSpaceStateIntegrityError as Rt, startAgentActivityTranscriptWatchers as S, prepareSpaceFileOnlySubmission as Sn, buildDispatchPromptPlan as St, resolveOpenCodeDatabasePath as T, returnToTargetPickerState as Tn, resolveBootstrapSpaceOwnerProfileId as Tt, readLastKnownAgentControllerAuthSnapshot as U, revokeOrganizationJoinLinkResponseSchema as Un, writeSpaceRecentMentionProfileIds as Ut, consumeArmedAgentControllerInterfaceReprobe as V, organizationJoinLinkErrorResponseSchema as Vn, upsertSpaceConfig as Vt, readLastKnownAgentControllerUsageLimits as W, SpaceComposerSubmissionError as Wt, resolveAgentControllerCommandFingerprint as X, buildSignalReplyWorkflowProjection as Xt, recordAgentControllerUsageLimitsObservation as Y, buildSignalMessageReadProjection as Yt, resolveNextRuntimeAgentControllerReportSyncAtMs as Z, buildSpaceMemberAgentPresencePresentation as Zt, resolveHeartbeatResponseFrame as _, listSpaceMemberDirectorySendTargets as _n, resolveComputerFileAccessStorePath as _t, DispatchSpaceActionClosedError as a, collectResolvedSpaceMentions as an, sendDispatchInteractionRequestFrame as at, collectObservedSessionWorkingDirectories as b, openTargetPickerState as bn, buildDispatchBootstrapTemplateFacts as bt, createDispatchSpaceActionContext as c, createSpaceTargetCatalog as cn, sendDispatchPreviewFrame as ct, readDispatchSpaceActionRecord as d, formatRemovedCcRelationMessage as dn, sendDispatchRuntimeEvidenceFrame as dt, buildSpaceProfileAddPlan as en, flushDispatchResultOutbox as et, supersedeDispatchSpaceActionRecordForReconsideration as f, getSpaceAccessPassword as fn, sendDispatchToolActivityFrame as ft, parseDaemonFrame as g, isWakeClosingSystemNoticeType as gn, readComputerFileAccessPolicy as gt, handleDaemonTransportFrame as h, isTargetPickerState as hn, ComputerFileAccessStoreError as ht, readDispatchOwnedRuntimeGuard as i, closeMentionPickerState as in, resolveDispatchResultPayload as it, enqueueAgentActivityHookEvent as j, cliJsonOutputEnvelopeSchema as jn, isLocalSpaceStateCorruptResult as jt, readCodexSessionTitles as k, OPENMELD_DISPATCH_RUNTIME_MODE_ENV as kn, LocalSpaceStateIntegrityError as kt, readDispatchSpaceActionContextForReceiptFromEnv as l, enterRelationPickerState as ln, sendDispatchProgressFrame as lt, emitDaemonErrorFrame as m, isRelationPickerState as mn, readRecentDaemonDispatchJournalEvents as mt, assertDispatchOwnedRuntimeServiceMutationAllowed as n, buildSpaceRoundSignalPublication as nn, waitForDispatchResultOutboxAcknowledgement as nt, DispatchSpaceActionRejectedError as o, createDispatchContinuationSpaceAccessContext as on, sendDispatchLifecycleFrame as ot, writeDispatchSpaceActionRecord as p, getSpaceAccessRequestContext as pn, emitDaemonDispatchJournalEvent as pt, recordAgentControllerInterfaceProbeFailure as q, buildPublicSpaceEntryUrl as qt, buildDispatchOwnedRuntimeEnv as r, buildUpdatesReplyWorkflowProjection as rn, buildFailedTaskResultPayload as rt, OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV as s, createSpaceMemberIdentityIndex as sn, sendDispatchPreviewEndFrame as st, assertDispatchOwnedRuntimePublicWriteAllowed as t, buildSpaceRoundReadProjection as tn, listDispatchResultOutboxPendingAcknowledgementKeys as tt, readDispatchSpaceActionContextFromEnv as u, extractMentionAuthoringPrefix as un, sendDispatchReasoningFrame as ut, resolveRegisterResponseFrame as v, listSpaceMentionRelationChoices as vn, updateComputerFileAccessPolicy as vt, resolveOpenCodeAuthPath as w, resolveSpaceMemberAgentOwnerWakeDiagnosticsView as wn, parseDispatchTask as wt, scanLocalAgentActivity as x, prepareSpaceComposerSubmission as xn, buildDispatchCorrelation as xt, sendDaemonFrame as y, listSpaceMentionSuggestions as yn, isSameOrDescendantPath as yt, readRecentAgentActivityHookStatus as z, acceptOrganizationJoinLinkBodySchema as zn, toSpaceConfigListIntegrityError as zt };
6670
7167
 
6671
- //# sourceMappingURL=daemon-frame-transport-xQnNyg6E.js.map
7168
+ //# sourceMappingURL=dispatch-owned-runtime-BeIQetEt.js.map