openmeld 0.3.258 → 0.3.261

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 (139) hide show
  1. package/dist/{add-me-membership-B8rT9msn.js → add-me-membership-erEkzelq.js} +2 -2
  2. package/dist/{add-me-membership-B8rT9msn.js.map → add-me-membership-erEkzelq.js.map} +1 -1
  3. package/dist/{agents-rbrzsUPC.js → agents-BGpftZJo.js} +13 -13
  4. package/dist/{agents-rbrzsUPC.js.map → agents-BGpftZJo.js.map} +1 -1
  5. package/dist/{api-client-foundation-BDbeHD1i.js → api-client-foundation-DBl_OaMj.js} +4 -4
  6. package/dist/{api-client-foundation-BDbeHD1i.js.map → api-client-foundation-DBl_OaMj.js.map} +1 -1
  7. package/dist/{api-client-foundation-Dye8bbn0.js → api-client-foundation-DgQRzwbJ.js} +1 -1
  8. package/dist/auth-session-CNPe3mUj.js +4 -0
  9. package/dist/{auth-session-mNZMZihh.js → auth-session-RQOVI0Gb.js} +5 -5
  10. package/dist/{auth-session-mNZMZihh.js.map → auth-session-RQOVI0Gb.js.map} +1 -1
  11. package/dist/{auth-url-D5LMD4E8.js → auth-url-BH-9HTpn.js} +2 -2
  12. package/dist/{auth-url-D5LMD4E8.js.map → auth-url-BH-9HTpn.js.map} +1 -1
  13. package/dist/{base-url-BMrQwJW4.js → base-url-B9NwMjEF.js} +3 -3
  14. package/dist/{base-url-BMrQwJW4.js.map → base-url-B9NwMjEF.js.map} +1 -1
  15. package/dist/{base-url-uwbKIZtP.js → base-url-DO0hjUUk.js} +1 -1
  16. package/dist/{channel-48XSbUsz.js → channel-fUczwp7l.js} +2 -2
  17. package/dist/{channel-48XSbUsz.js.map → channel-fUczwp7l.js.map} +1 -1
  18. package/dist/{cloud-computer-Cymmmv7K.js → cloud-computer-CCxIrSZU.js} +6 -6
  19. package/dist/{cloud-computer-Cymmmv7K.js.map → cloud-computer-CCxIrSZU.js.map} +1 -1
  20. package/dist/{command-C7knNgv9.js → command-BgBsh9xU.js} +17 -17
  21. package/dist/{command-C7knNgv9.js.map → command-BgBsh9xU.js.map} +1 -1
  22. package/dist/{computer-connection-review-BUZdZxR8.js → computer-connection-review-D4iW1JS7.js} +6 -6
  23. package/dist/{computer-connection-review-BUZdZxR8.js.map → computer-connection-review-D4iW1JS7.js.map} +1 -1
  24. package/dist/{computer-disconnect-C3uKOOlJ.js → computer-disconnect-CZalrKK7.js} +9 -9
  25. package/dist/{computer-disconnect-C3uKOOlJ.js.map → computer-disconnect-CZalrKK7.js.map} +1 -1
  26. package/dist/{computer-setup-continuation-CehzYR-3.js → computer-setup-continuation-B4JriFmR.js} +3 -3
  27. package/dist/{computer-setup-continuation-CehzYR-3.js.map → computer-setup-continuation-B4JriFmR.js.map} +1 -1
  28. package/dist/{context-BT5P1qqr.js → context-DqkwGCKj.js} +7 -7
  29. package/dist/{context-BT5P1qqr.js.map → context-DqkwGCKj.js.map} +1 -1
  30. package/dist/{daemon-device-id-DrGRbKdb.js → daemon-device-id-BmL_1aHE.js} +4 -4
  31. package/dist/{daemon-device-id-DrGRbKdb.js.map → daemon-device-id-BmL_1aHE.js.map} +1 -1
  32. package/dist/{daemon-lifecycle-journal-B2cNyBV2.js → daemon-lifecycle-journal-D4Xupqhp.js} +7 -6
  33. package/dist/{daemon-lifecycle-journal-B2cNyBV2.js.map → daemon-lifecycle-journal-D4Xupqhp.js.map} +1 -1
  34. package/dist/{daemon-runtime-lease-CB0ZCPMd.js → daemon-runtime-lease-B--QbOlQ.js} +3 -3
  35. package/dist/{daemon-runtime-lease-CB0ZCPMd.js.map → daemon-runtime-lease-B--QbOlQ.js.map} +1 -1
  36. package/dist/{daemon-runtime-lease-wo_QM5jn.js → daemon-runtime-lease-Cvssoa6x.js} +1 -1
  37. package/dist/{daemon-service-contract-Dkgengx4.js → daemon-service-contract-DGPRa_PH.js} +3 -3
  38. package/dist/{daemon-service-contract-Dkgengx4.js.map → daemon-service-contract-DGPRa_PH.js.map} +1 -1
  39. package/dist/{daemon-service-manager-BjBYyE6i.js → daemon-service-manager-CDBNfjOu.js} +5 -5
  40. package/dist/{daemon-service-manager-BjBYyE6i.js.map → daemon-service-manager-CDBNfjOu.js.map} +1 -1
  41. package/dist/{daemon-service-manager-CblkceR7.js → daemon-service-manager-DW6ySNEe.js} +1 -1
  42. package/dist/{daemon-service-runtime-CQjz4H06.js → daemon-service-runtime-BMUXKr64.js} +14 -14
  43. package/dist/{daemon-service-runtime-CQjz4H06.js.map → daemon-service-runtime-BMUXKr64.js.map} +1 -1
  44. package/dist/{daemon-service-update-coordinator-IgXvzOsW.js → daemon-service-update-coordinator-ef1RLL_R.js} +22 -20
  45. package/dist/daemon-service-update-coordinator-ef1RLL_R.js.map +1 -0
  46. package/dist/{daemon-state-B8L0_xPT.js → daemon-state-e0klzRsC.js} +3 -3
  47. package/dist/{daemon-state-B8L0_xPT.js.map → daemon-state-e0klzRsC.js.map} +1 -1
  48. package/dist/{dispatch-owned-runtime-BxpC_aaI.js → dispatch-owned-runtime-D5J7omXK.js} +10 -10
  49. package/dist/dispatch-owned-runtime-D5J7omXK.js.map +1 -0
  50. package/dist/{dist-Dx5paVZY.js → dist-CMBBVJVE.js} +205 -56
  51. package/dist/dist-CMBBVJVE.js.map +1 -0
  52. package/dist/{dist-BFz8AKxR.js → dist-DGZXxIvJ.js} +1 -1
  53. package/dist/{dist-BJy9X73H.js → dist-Dip3sgFz.js} +20 -2
  54. package/dist/dist-Dip3sgFz.js.map +1 -0
  55. package/dist/dist-qVdtMWpW.js +4 -0
  56. package/dist/{dual-view-guide-catalog-Cm8_zKnl.js → dual-view-guide-catalog-DkoOcvAt.js} +3 -3
  57. package/dist/{dual-view-guide-catalog-Cm8_zKnl.js.map → dual-view-guide-catalog-DkoOcvAt.js.map} +1 -1
  58. package/dist/{elapsed-time-Cu4YZoqK.js → elapsed-time-COLGQWPQ.js} +4 -4
  59. package/dist/{elapsed-time-Cu4YZoqK.js.map → elapsed-time-COLGQWPQ.js.map} +1 -1
  60. package/dist/{entry-DNXN3jPw.js → entry-agrfgBQh.js} +12 -12
  61. package/dist/{entry-DNXN3jPw.js.map → entry-agrfgBQh.js.map} +1 -1
  62. package/dist/{installation-inventory-DqxnhTKK.js → installation-inventory-Bxelkj89.js} +4 -4
  63. package/dist/{installation-inventory-DqxnhTKK.js.map → installation-inventory-Bxelkj89.js.map} +1 -1
  64. package/dist/{installer-BLijIl6G.js → installer-BZfDlcZI.js} +2 -2
  65. package/dist/{installer-BLijIl6G.js.map → installer-BZfDlcZI.js.map} +1 -1
  66. package/dist/{lock-CDdQw0gQ.js → lock-CqozgAXC.js} +3 -3
  67. package/dist/{lock-CDdQw0gQ.js.map → lock-CqozgAXC.js.map} +1 -1
  68. package/dist/{meta-api-C0lRMWF1.js → meta-api-BPhaiMmU.js} +7 -7
  69. package/dist/{meta-api-C0lRMWF1.js.map → meta-api-BPhaiMmU.js.map} +1 -1
  70. package/dist/{openmeld-CqNDufaW.js → openmeld-CiLo42M9.js} +50 -43
  71. package/dist/openmeld-CiLo42M9.js.map +1 -0
  72. package/dist/{openmeld-dev-environment-C82HhyXf.js → openmeld-dev-environment-Dt_yVZn2.js} +3 -3
  73. package/dist/{openmeld-dev-environment-C82HhyXf.js.map → openmeld-dev-environment-Dt_yVZn2.js.map} +1 -1
  74. package/dist/openmeld-dev.js +1 -1
  75. package/dist/{openmeld-environment-target-BftVniKn.js → openmeld-environment-target-BjcRwYW3.js} +3 -3
  76. package/dist/{openmeld-environment-target-BftVniKn.js.map → openmeld-environment-target-BjcRwYW3.js.map} +1 -1
  77. package/dist/{openmeld-maintenance-worker-DytPVNCO.js → openmeld-maintenance-worker-pgUSH8PK.js} +14 -14
  78. package/dist/{openmeld-maintenance-worker-DytPVNCO.js.map → openmeld-maintenance-worker-pgUSH8PK.js.map} +1 -1
  79. package/dist/{openmeld-tools-update-join-BJjSaiMY.js → openmeld-tools-update-join-BuJ6DCqG.js} +4 -4
  80. package/dist/{openmeld-tools-update-join-BJjSaiMY.js.map → openmeld-tools-update-join-BuJ6DCqG.js.map} +1 -1
  81. package/dist/{openmeld-tools-update-process-frame-Ct-7vlfE.js → openmeld-tools-update-process-frame-CMSbyGR2.js} +1 -1
  82. package/dist/{openmeld-tools-update-process-frame-Cl_LpsK-.js → openmeld-tools-update-process-frame-CwO6rIba.js} +2 -2
  83. package/dist/{openmeld-tools-update-process-frame-Cl_LpsK-.js.map → openmeld-tools-update-process-frame-CwO6rIba.js.map} +1 -1
  84. package/dist/openmeld.js +7 -7
  85. package/dist/{prepare-provider-runtime-N0uP2aUG.js → prepare-provider-runtime-CkW7c9bF.js} +411 -22
  86. package/dist/prepare-provider-runtime-CkW7c9bF.js.map +1 -0
  87. package/dist/{prepare-session-executor-BE3fbwgb.js → prepare-session-executor-BExa01B_.js} +27 -27
  88. package/dist/{prepare-session-executor-BE3fbwgb.js.map → prepare-session-executor-BExa01B_.js.map} +1 -1
  89. package/dist/{process-channel-BYaPF16N.js → process-channel-BCIgC7jM.js} +2 -2
  90. package/dist/{process-channel-BYaPF16N.js.map → process-channel-BCIgC7jM.js.map} +1 -1
  91. package/dist/{process-identity-DtRa8niy.js → process-identity-e30Hp6t3.js} +2 -2
  92. package/dist/{process-identity-DtRa8niy.js.map → process-identity-e30Hp6t3.js.map} +1 -1
  93. package/dist/{runtime-CUN9BLfZ.js → runtime-DoIazDNu.js} +185 -19
  94. package/dist/runtime-DoIazDNu.js.map +1 -0
  95. package/dist/{runtime-agent-controller-reporting-submission-YtLJgQc7.js → runtime-agent-controller-reporting-submission-ZLj8H7TM.js} +37 -10
  96. package/dist/runtime-agent-controller-reporting-submission-ZLj8H7TM.js.map +1 -0
  97. package/dist/{service-DRRVlSkR.js → service-8ReqDsOx.js} +129 -75
  98. package/dist/service-8ReqDsOx.js.map +1 -0
  99. package/dist/{service-account-authorization-CYcUJnZy.js → service-account-authorization-CznmJjXZ.js} +5 -5
  100. package/dist/{service-account-authorization-CYcUJnZy.js.map → service-account-authorization-CznmJjXZ.js.map} +1 -1
  101. package/dist/{service-account-control-BgG4jYZx.js → service-account-control-DhU1ulXB.js} +15 -15
  102. package/dist/{service-account-control-BgG4jYZx.js.map → service-account-control-DhU1ulXB.js.map} +1 -1
  103. package/dist/{service-control-capabilities-CMRn_qRT.js → service-control-capabilities-BVarsj7B.js} +1 -1
  104. package/dist/{service-control-capabilities-DGqKBhqm.js → service-control-capabilities-DWOxjL2z.js} +6 -6
  105. package/dist/{service-control-capabilities-DGqKBhqm.js.map → service-control-capabilities-DWOxjL2z.js.map} +1 -1
  106. package/dist/{service-control-carrier-capability-nAOgdIbf.js → service-control-carrier-capability-DsHkOLJ6.js} +3 -3
  107. package/dist/{service-control-carrier-capability-nAOgdIbf.js.map → service-control-carrier-capability-DsHkOLJ6.js.map} +1 -1
  108. package/dist/{state-CBWBsV1X.js → state-6y71kBCo.js} +3 -3
  109. package/dist/{state-CBWBsV1X.js.map → state-6y71kBCo.js.map} +1 -1
  110. package/dist/{updates-api-ByctphEr.js → updates-api-DluYmth3.js} +14 -14
  111. package/dist/{updates-api-ByctphEr.js.map → updates-api-DluYmth3.js.map} +1 -1
  112. package/dist/{upgrade-CwXxojfd.js → upgrade-BARBtyld.js} +9 -9
  113. package/dist/{upgrade-CwXxojfd.js.map → upgrade-BARBtyld.js.map} +1 -1
  114. package/dist/upgrade-CshMPPlp.js +4 -0
  115. package/dist/windows/openmeld-windows-process.exe +0 -0
  116. package/dist/{windows-managed-install-BDtTogaf.js → windows-managed-install-q2TxKIIe.js} +2 -2
  117. package/dist/{windows-managed-install-BDtTogaf.js.map → windows-managed-install-q2TxKIIe.js.map} +1 -1
  118. package/dist/{windows-preview-channel-TEVn7puE.js → windows-preview-channel-CqHp94Vp.js} +3 -3
  119. package/dist/{windows-preview-channel-TEVn7puE.js.map → windows-preview-channel-CqHp94Vp.js.map} +1 -1
  120. package/dist/{windows-task-command-uUPXFssY.js → windows-task-command-67Zb0gGt.js} +2 -2
  121. package/dist/{windows-task-command-uUPXFssY.js.map → windows-task-command-67Zb0gGt.js.map} +1 -1
  122. package/dist/{windows-task-entry-1fvdlQ-1.js → windows-task-entry-ufpxSuX_.js} +3 -3
  123. package/dist/{windows-task-entry-1fvdlQ-1.js.map → windows-task-entry-ufpxSuX_.js.map} +1 -1
  124. package/dist/{windows-user-task-Dfg4k6bI.js → windows-user-task-QsSEzkhv.js} +6 -6
  125. package/dist/{windows-user-task-Dfg4k6bI.js.map → windows-user-task-QsSEzkhv.js.map} +1 -1
  126. package/dist/{windows-user-task-CpyMMEiK.js → windows-user-task-jz44qH1q.js} +1 -1
  127. package/package.json +13 -12
  128. package/dist/auth-session-COkQp4Fr.js +0 -4
  129. package/dist/daemon-service-update-coordinator-IgXvzOsW.js.map +0 -1
  130. package/dist/dispatch-owned-runtime-BxpC_aaI.js.map +0 -1
  131. package/dist/dist-BJy9X73H.js.map +0 -1
  132. package/dist/dist-Cbw4UtHs.js +0 -4
  133. package/dist/dist-Dx5paVZY.js.map +0 -1
  134. package/dist/openmeld-CqNDufaW.js.map +0 -1
  135. package/dist/prepare-provider-runtime-N0uP2aUG.js.map +0 -1
  136. package/dist/runtime-CUN9BLfZ.js.map +0 -1
  137. package/dist/runtime-agent-controller-reporting-submission-YtLJgQc7.js.map +0 -1
  138. package/dist/service-DRRVlSkR.js.map +0 -1
  139. package/dist/upgrade-CmJmtVMq.js +0 -4
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { t as ExecutionHostError } from "./channel-48XSbUsz.js";
3
+ import { t as ExecutionHostError } from "./channel-fUczwp7l.js";
4
4
  //#region src/local-service/execution-host/process-channel.ts
5
5
  function childExecutionHostChannel(child) {
6
6
  return {
@@ -61,4 +61,4 @@ function parentExecutionHostChannel() {
61
61
  //#endregion
62
62
  export { parentExecutionHostChannel as n, childExecutionHostChannel as t };
63
63
 
64
- //# sourceMappingURL=process-channel-BYaPF16N.js.map
64
+ //# sourceMappingURL=process-channel-BCIgC7jM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-channel-BYaPF16N.js","names":[],"sources":["../src/local-service/execution-host/process-channel.ts"],"sourcesContent":["import type { ChildProcess } from \"node:child_process\";\nimport type { ExecutionHostChannel } from \"./channel\";\nimport { ExecutionHostError } from \"./channel\";\n\n// Use inherited Node-compatible IPC with JSON serialization. Provider stdout is\n// not a protocol channel; ordinary logs cannot become control messages.\nexport function childExecutionHostChannel(\n child: ChildProcess\n): ExecutionHostChannel {\n return {\n connected: () => child.connected,\n send: (message, completed) => {\n child.send(message, (error) => completed(error ?? null));\n },\n onMessage: (listener) => {\n child.on(\"message\", listener);\n return () => {\n child.off(\"message\", listener);\n };\n },\n onDisconnect: (listener) => {\n let observed = false;\n const finish = (error?: Error) => {\n if (!observed) {\n observed = true;\n listener(error);\n }\n };\n const exited = (code: number | null, signal: NodeJS.Signals | null) => {\n finish(\n new Error(`Host process exited (${signal ?? code ?? \"unknown\"})`)\n );\n };\n child.on(\"disconnect\", finish);\n child.on(\"exit\", exited);\n // Spawn/send failures must not become unhandled EventEmitter errors.\n child.on(\"error\", finish);\n return () => {\n child.off(\"disconnect\", finish);\n child.off(\"exit\", exited);\n child.off(\"error\", finish);\n };\n },\n };\n}\n\nexport function parentExecutionHostChannel(): ExecutionHostChannel {\n const send = process.send?.bind(process);\n if (!(send && process.connected)) {\n throw new ExecutionHostError(\n \"host.inherited_channel_required\",\n \"The execution host requires its supervisor's inherited IPC channel.\"\n );\n }\n return {\n connected: () => process.connected === true,\n send: (message, completed) => {\n send(message, undefined, undefined, (error) => completed(error ?? null));\n },\n onMessage: (listener) => {\n process.on(\"message\", listener);\n return () => {\n process.off(\"message\", listener);\n };\n },\n onDisconnect: (listener) => {\n process.on(\"disconnect\", listener);\n return () => {\n process.off(\"disconnect\", listener);\n };\n },\n };\n}\n"],"mappings":";;;;AAMA,SAAgB,0BACd,OACsB;CACtB,OAAO;EACL,iBAAiB,MAAM;EACvB,OAAO,SAAS,cAAc;GAC5B,MAAM,KAAK,UAAU,UAAU,UAAU,SAAS,IAAI,CAAC;EACzD;EACA,YAAY,aAAa;GACvB,MAAM,GAAG,WAAW,QAAQ;GAC5B,aAAa;IACX,MAAM,IAAI,WAAW,QAAQ;GAC/B;EACF;EACA,eAAe,aAAa;GAC1B,IAAI,WAAW;GACf,MAAM,UAAU,UAAkB;IAChC,IAAI,CAAC,UAAU;KACb,WAAW;KACX,SAAS,KAAK;IAChB;GACF;GACA,MAAM,UAAU,MAAqB,WAAkC;IACrE,uBACE,IAAI,MAAM,wBAAwB,UAAU,QAAQ,UAAU,EAAE,CAClE;GACF;GACA,MAAM,GAAG,cAAc,MAAM;GAC7B,MAAM,GAAG,QAAQ,MAAM;GAEvB,MAAM,GAAG,SAAS,MAAM;GACxB,aAAa;IACX,MAAM,IAAI,cAAc,MAAM;IAC9B,MAAM,IAAI,QAAQ,MAAM;IACxB,MAAM,IAAI,SAAS,MAAM;GAC3B;EACF;CACF;AACF;AAEA,SAAgB,6BAAmD;CACjE,MAAM,OAAO,QAAQ,MAAM,KAAK,OAAO;CACvC,IAAI,EAAE,QAAQ,QAAQ,YACpB,MAAM,IAAI,mBACR,mCACA,qEACF;CAEF,OAAO;EACL,iBAAiB,QAAQ,cAAc;EACvC,OAAO,SAAS,cAAc;GAC5B,KAAK,SAAS,KAAA,GAAW,KAAA,IAAY,UAAU,UAAU,SAAS,IAAI,CAAC;EACzE;EACA,YAAY,aAAa;GACvB,QAAQ,GAAG,WAAW,QAAQ;GAC9B,aAAa;IACX,QAAQ,IAAI,WAAW,QAAQ;GACjC;EACF;EACA,eAAe,aAAa;GAC1B,QAAQ,GAAG,cAAc,QAAQ;GACjC,aAAa;IACX,QAAQ,IAAI,cAAc,QAAQ;GACpC;EACF;CACF;AACF"}
1
+ {"version":3,"file":"process-channel-BCIgC7jM.js","names":[],"sources":["../src/local-service/execution-host/process-channel.ts"],"sourcesContent":["import type { ChildProcess } from \"node:child_process\";\nimport type { ExecutionHostChannel } from \"./channel\";\nimport { ExecutionHostError } from \"./channel\";\n\n// Use inherited Node-compatible IPC with JSON serialization. Provider stdout is\n// not a protocol channel; ordinary logs cannot become control messages.\nexport function childExecutionHostChannel(\n child: ChildProcess\n): ExecutionHostChannel {\n return {\n connected: () => child.connected,\n send: (message, completed) => {\n child.send(message, (error) => completed(error ?? null));\n },\n onMessage: (listener) => {\n child.on(\"message\", listener);\n return () => {\n child.off(\"message\", listener);\n };\n },\n onDisconnect: (listener) => {\n let observed = false;\n const finish = (error?: Error) => {\n if (!observed) {\n observed = true;\n listener(error);\n }\n };\n const exited = (code: number | null, signal: NodeJS.Signals | null) => {\n finish(\n new Error(`Host process exited (${signal ?? code ?? \"unknown\"})`)\n );\n };\n child.on(\"disconnect\", finish);\n child.on(\"exit\", exited);\n // Spawn/send failures must not become unhandled EventEmitter errors.\n child.on(\"error\", finish);\n return () => {\n child.off(\"disconnect\", finish);\n child.off(\"exit\", exited);\n child.off(\"error\", finish);\n };\n },\n };\n}\n\nexport function parentExecutionHostChannel(): ExecutionHostChannel {\n const send = process.send?.bind(process);\n if (!(send && process.connected)) {\n throw new ExecutionHostError(\n \"host.inherited_channel_required\",\n \"The execution host requires its supervisor's inherited IPC channel.\"\n );\n }\n return {\n connected: () => process.connected === true,\n send: (message, completed) => {\n send(message, undefined, undefined, (error) => completed(error ?? null));\n },\n onMessage: (listener) => {\n process.on(\"message\", listener);\n return () => {\n process.off(\"message\", listener);\n };\n },\n onDisconnect: (listener) => {\n process.on(\"disconnect\", listener);\n return () => {\n process.off(\"disconnect\", listener);\n };\n },\n };\n}\n"],"mappings":";;;;AAMA,SAAgB,0BACd,OACsB;CACtB,OAAO;EACL,iBAAiB,MAAM;EACvB,OAAO,SAAS,cAAc;GAC5B,MAAM,KAAK,UAAU,UAAU,UAAU,SAAS,IAAI,CAAC;EACzD;EACA,YAAY,aAAa;GACvB,MAAM,GAAG,WAAW,QAAQ;GAC5B,aAAa;IACX,MAAM,IAAI,WAAW,QAAQ;GAC/B;EACF;EACA,eAAe,aAAa;GAC1B,IAAI,WAAW;GACf,MAAM,UAAU,UAAkB;IAChC,IAAI,CAAC,UAAU;KACb,WAAW;KACX,SAAS,KAAK;IAChB;GACF;GACA,MAAM,UAAU,MAAqB,WAAkC;IACrE,uBACE,IAAI,MAAM,wBAAwB,UAAU,QAAQ,UAAU,EAAE,CAClE;GACF;GACA,MAAM,GAAG,cAAc,MAAM;GAC7B,MAAM,GAAG,QAAQ,MAAM;GAEvB,MAAM,GAAG,SAAS,MAAM;GACxB,aAAa;IACX,MAAM,IAAI,cAAc,MAAM;IAC9B,MAAM,IAAI,QAAQ,MAAM;IACxB,MAAM,IAAI,SAAS,MAAM;GAC3B;EACF;CACF;AACF;AAEA,SAAgB,6BAAmD;CACjE,MAAM,OAAO,QAAQ,MAAM,KAAK,OAAO;CACvC,IAAI,EAAE,QAAQ,QAAQ,YACpB,MAAM,IAAI,mBACR,mCACA,qEACF;CAEF,OAAO;EACL,iBAAiB,QAAQ,cAAc;EACvC,OAAO,SAAS,cAAc;GAC5B,KAAK,SAAS,KAAA,GAAW,KAAA,IAAY,UAAU,UAAU,SAAS,IAAI,CAAC;EACzE;EACA,YAAY,aAAa;GACvB,QAAQ,GAAG,WAAW,QAAQ;GAC9B,aAAa;IACX,QAAQ,IAAI,WAAW,QAAQ;GACjC;EACF;EACA,eAAe,aAAa;GAC1B,QAAQ,GAAG,cAAc,QAAQ;GACjC,aAAa;IACX,QAAQ,IAAI,cAAc,QAAQ;GACpC;EACF;CACF;AACF"}
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Pa as windowsNativeProcessRequestSchema, pF as WINDOWS_PROCESS_HELPER_FILENAME } from "./dist-Dx5paVZY.js";
3
+ import { Pa as windowsNativeProcessRequestSchema, xF as WINDOWS_PROCESS_HELPER_FILENAME } from "./dist-CMBBVJVE.js";
4
4
  import { n as normalizeCommandEnvironment } from "./process-environment-BWSFeUu6.js";
5
5
  import { win32 } from "node:path";
6
6
  import { execFile, execFileSync, spawn } from "node:child_process";
@@ -169,4 +169,4 @@ function isNodeError(error, code) {
169
169
  //#endregion
170
170
  export { activateWindowsManagedCommand as a, readWindowsProcessStartFileTime as c, WINDOWS_NATIVE_PROCESS_REQUEST_ENV as d, resolveWindowsNativeProcessHelper as f, readProcessStartIdentity as i, resolveWindowsPowerShellPath as l, isPreciseProcessStartIdentity as n, powerShellEncodedArguments as o, isProcessIdentityAlive as r, pruneWindowsBinaryBundle as s, CURRENT_PROCESS_START_IDENTITY as t, startWindowsIdleSleepBlocker as u };
171
171
 
172
- //# sourceMappingURL=process-identity-DtRa8niy.js.map
172
+ //# sourceMappingURL=process-identity-e30Hp6t3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-identity-DtRa8niy.js","names":[],"sources":["../../../runtime/adapters/core/dist/windows-native-process.js","../../../runtime/adapters/core/dist/windows-system.js","../src/system/process-identity.ts"],"sourcesContent":["import { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { WINDOWS_PROCESS_HELPER_FILENAME } from \"@openmeld/schemas\";\nexport const WINDOWS_NATIVE_PROCESS_REQUEST_ENV = \"OPENMELD_NATIVE_JOB_REQUEST\";\nexport function resolveWindowsNativeProcessHelper() {\n const binary = typeof __OPENMELD_DISTRIBUTION__ !== \"undefined\" &&\n __OPENMELD_DISTRIBUTION__ === \"binary\";\n return binary\n ? join(dirname(process.execPath), WINDOWS_PROCESS_HELPER_FILENAME)\n : fileURLToPath(\n // Both src/ (workspace tests) and dist/ (installed code) share this\n // package-owned build output. Never search another installation.\n new URL(`../dist/windows/${WINDOWS_PROCESS_HELPER_FILENAME}`, import.meta.url));\n}\n","import { execFile, execFileSync, spawn } from \"node:child_process\";\nimport { win32 } from \"node:path\";\nimport { promisify } from \"node:util\";\nimport { windowsNativeProcessRequestSchema } from \"@openmeld/schemas\";\nimport { normalizeCommandEnvironment } from \"./process-environment.js\";\nimport { resolveWindowsNativeProcessHelper, WINDOWS_NATIVE_PROCESS_REQUEST_ENV, } from \"./windows-native-process.js\";\nexport function resolveWindowsPowerShellPath(env = process.env) {\n const source = normalizeCommandEnvironment(env, \"win32\");\n const root = source.SystemRoot ?? source.WINDIR;\n if (!(root && win32.isAbsolute(root))) {\n throw new Error(\"Windows system directory is unavailable.\");\n }\n return win32.join(root, \"System32\", \"WindowsPowerShell\", \"v1.0\", \"powershell.exe\");\n}\nexport function powerShellEncodedArguments(script) {\n return [\n \"-NoLogo\",\n \"-NoProfile\",\n \"-NonInteractive\",\n \"-EncodedCommand\",\n Buffer.from(script, \"utf16le\").toString(\"base64\"),\n ];\n}\nconst FILE_TIME_PATTERN = /^\\d{10,20}$/u;\n// Keep native identity reads bounded; an unavailable identity fails admission.\nconst PROCESS_IDENTITY_TIMEOUT_MS = 15_000;\nlet currentProcessFileTime;\nexport async function activateWindowsManagedCommand(binDirectory) {\n const request = windowsNativeProcessRequestSchema.parse({\n operation: \"activate-managed-command\",\n binDirectory,\n });\n const { stdout } = await promisify(execFile)(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(request), \"utf8\").toString(\"base64\"),\n },\n encoding: \"utf8\",\n windowsHide: true,\n timeout: 15_000,\n maxBuffer: 4096,\n });\n const result = stdout.trim();\n if (result !== \"activated\" && result !== \"already_active\") {\n throw new Error(\"Windows returned an invalid command activation receipt.\");\n }\n return result;\n}\n/** Kernel sharing rules keep a live CLI and its helper together during pruning. */\nexport async function pruneWindowsBinaryBundle(directory) {\n const request = windowsNativeProcessRequestSchema.parse({\n operation: \"prune-binary-bundle\",\n directory,\n });\n const { stdout } = await promisify(execFile)(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(request), \"utf8\").toString(\"base64\"),\n },\n encoding: \"utf8\",\n windowsHide: true,\n timeout: 15_000,\n maxBuffer: 4096,\n });\n const result = stdout.trim();\n if (result !== \"removed\" &&\n result !== \"absent\" &&\n result !== \"in_use\" &&\n result !== \"unrecognized\") {\n throw new Error(\"Windows returned an invalid managed-version cleanup receipt.\");\n }\n return result;\n}\n/** An opened process handle binds the observation to the actual instance, not a reused PID. */\nexport function readWindowsProcessStartFileTime(pid) {\n if (!(Number.isSafeInteger(pid) && pid > 0)) {\n return null;\n }\n if (pid === process.pid && currentProcessFileTime) {\n return currentProcessFileTime;\n }\n const request = windowsNativeProcessRequestSchema.parse({\n operation: \"identity\",\n pid,\n });\n try {\n const output = execFileSync(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(request), \"utf8\").toString(\"base64\"),\n },\n encoding: \"utf8\",\n windowsHide: true,\n timeout: PROCESS_IDENTITY_TIMEOUT_MS,\n maxBuffer: 1024,\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n }).trim();\n if (!FILE_TIME_PATTERN.test(output)) {\n return null;\n }\n if (pid === process.pid) {\n currentProcessFileTime = output;\n }\n return output;\n }\n catch {\n return null;\n }\n}\nexport function startWindowsIdleSleepBlocker() {\n return spawn(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(windowsNativeProcessRequestSchema.parse({\n operation: \"prevent-idle-sleep\",\n }))).toString(\"base64\"),\n },\n windowsHide: true,\n stdio: [\"pipe\", \"pipe\", \"pipe\"],\n });\n}\n","import { execFileSync } from \"node:child_process\";\nimport { readWindowsProcessStartFileTime } from \"@openmeld/adapter-core/windows-system\";\n\nconst WINDOWS_PROCESS_IDENTITY_PATTERN = /^win32:\\d{10,20}$/u;\n\nexport function isPreciseProcessStartIdentity(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n ((value.startsWith(\"ps:\") && value.length > 3) ||\n WINDOWS_PROCESS_IDENTITY_PATTERN.test(value))\n );\n}\n\nexport const CURRENT_PROCESS_START_IDENTITY =\n readProcessStartIdentity(process.pid) ??\n `fallback:${process.pid}:${Math.floor(Date.now() - process.uptime() * 1000)}`;\n\nexport function isProcessIdentityAlive(\n input: { ownerPid: number; ownerProcessStartedAt: string },\n platform: NodeJS.Platform = process.platform\n): boolean {\n if (!isProcessAlive(input.ownerPid)) {\n return false;\n }\n const observedIdentity = readProcessStartIdentity(input.ownerPid, platform);\n if (\n isPreciseProcessStartIdentity(observedIdentity) &&\n isPreciseProcessStartIdentity(input.ownerProcessStartedAt) &&\n observedIdentity.split(\":\", 1)[0] ===\n input.ownerProcessStartedAt.split(\":\", 1)[0]\n ) {\n return observedIdentity === input.ownerProcessStartedAt;\n }\n // Fail closed when a live process cannot be identified precisely. A caller\n // may recover only after it can prove that the transition owner has exited.\n return true;\n}\n\nexport function readProcessStartIdentity(\n pid: number,\n platform: NodeJS.Platform = process.platform\n): string | null {\n if (!(Number.isSafeInteger(pid) && pid > 0)) {\n return null;\n }\n if (platform === \"win32\") {\n const created = readWindowsProcessStartFileTime(pid);\n return created === null ? null : `win32:${created}`;\n }\n try {\n const output = execFileSync(\"ps\", [\"-o\", \"lstart=\", \"-p\", String(pid)], {\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n timeout: 1000,\n windowsHide: true,\n }).trim();\n return output.length > 0 ? `ps:${output}` : null;\n } catch {\n return null;\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n return true;\n } catch (error) {\n return !isNodeError(error, \"ESRCH\");\n }\n}\n\nfunction isNodeError(error: unknown, code: string): boolean {\n return (\n error instanceof Error && \"code\" in error && String(error.code) === code\n );\n}\n"],"mappings":";;;;;;;;;AAGA,MAAa,qCAAqC;AAClD,SAAgB,oCAAoC;CAGhD,OAEM,cAGF,IAAI,IAAI,mBAAmB,mCAAmC,OAAO,KAAK,GAAG,CAAC;AACtF;;;ACPA,SAAgB,6BAA6B,MAAM,QAAQ,KAAK;CAC5D,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AAI,IAAI,QAAQ,OAAO,IAAI,GAAI;AAE5E,SAAgB,uBACd,OACA,WAA4B,QAAQ,UAC3B;CACT,IAAI,CAAC,eAAe,MAAM,QAAQ,GAChC,OAAO;CAET,MAAM,mBAAmB,yBAAyB,MAAM,UAAU,QAAQ;CAC1E,IACE,8BAA8B,gBAAgB,KAC9C,8BAA8B,MAAM,qBAAqB,KACzD,iBAAiB,MAAM,KAAK,CAAC,CAAC,CAAC,OAC7B,MAAM,sBAAsB,MAAM,KAAK,CAAC,CAAC,CAAC,IAE5C,OAAO,qBAAqB,MAAM;CAIpC,OAAO;AACT;AAEA,SAAgB,yBACd,KACA,WAA4B,QAAQ,UACrB;CACf,IAAI,EAAE,OAAO,cAAc,GAAG,KAAK,MAAM,IACvC,OAAO;CAET,IAAI,aAAa,SAAS;EACxB,MAAM,UAAU,gCAAgC,GAAG;EACnD,OAAO,YAAY,OAAO,OAAO,SAAS;CAC5C;CACA,IAAI;EACF,MAAM,SAAS,aAAa,MAAM;GAAC;GAAM;GAAW;GAAM,OAAO,GAAG;EAAC,GAAG;GACtE,UAAU;GACV,OAAO;IAAC;IAAU;IAAQ;GAAQ;GAClC,SAAS;GACT,aAAa;EACf,CAAC,CAAC,CAAC,KAAK;EACR,OAAO,OAAO,SAAS,IAAI,MAAM,WAAW;CAC9C,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,eAAe,KAAsB;CAC5C,IAAI;EACF,QAAQ,KAAK,KAAK,CAAC;EACnB,OAAO;CACT,SAAS,OAAO;EACd,OAAO,CAAC,YAAY,OAAO,OAAO;CACpC;AACF;AAEA,SAAS,YAAY,OAAgB,MAAuB;CAC1D,OACE,iBAAiB,SAAS,UAAU,SAAS,OAAO,MAAM,IAAI,MAAM;AAExE"}
1
+ {"version":3,"file":"process-identity-e30Hp6t3.js","names":[],"sources":["../../../runtime/adapters/core/dist/windows-native-process.js","../../../runtime/adapters/core/dist/windows-system.js","../src/system/process-identity.ts"],"sourcesContent":["import { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { WINDOWS_PROCESS_HELPER_FILENAME } from \"@openmeld/schemas\";\nexport const WINDOWS_NATIVE_PROCESS_REQUEST_ENV = \"OPENMELD_NATIVE_JOB_REQUEST\";\nexport function resolveWindowsNativeProcessHelper() {\n const binary = typeof __OPENMELD_DISTRIBUTION__ !== \"undefined\" &&\n __OPENMELD_DISTRIBUTION__ === \"binary\";\n return binary\n ? join(dirname(process.execPath), WINDOWS_PROCESS_HELPER_FILENAME)\n : fileURLToPath(\n // Both src/ (workspace tests) and dist/ (installed code) share this\n // package-owned build output. Never search another installation.\n new URL(`../dist/windows/${WINDOWS_PROCESS_HELPER_FILENAME}`, import.meta.url));\n}\n","import { execFile, execFileSync, spawn } from \"node:child_process\";\nimport { win32 } from \"node:path\";\nimport { promisify } from \"node:util\";\nimport { windowsNativeProcessRequestSchema } from \"@openmeld/schemas\";\nimport { normalizeCommandEnvironment } from \"./process-environment.js\";\nimport { resolveWindowsNativeProcessHelper, WINDOWS_NATIVE_PROCESS_REQUEST_ENV, } from \"./windows-native-process.js\";\nexport function resolveWindowsPowerShellPath(env = process.env) {\n const source = normalizeCommandEnvironment(env, \"win32\");\n const root = source.SystemRoot ?? source.WINDIR;\n if (!(root && win32.isAbsolute(root))) {\n throw new Error(\"Windows system directory is unavailable.\");\n }\n return win32.join(root, \"System32\", \"WindowsPowerShell\", \"v1.0\", \"powershell.exe\");\n}\nexport function powerShellEncodedArguments(script) {\n return [\n \"-NoLogo\",\n \"-NoProfile\",\n \"-NonInteractive\",\n \"-EncodedCommand\",\n Buffer.from(script, \"utf16le\").toString(\"base64\"),\n ];\n}\nconst FILE_TIME_PATTERN = /^\\d{10,20}$/u;\n// Keep native identity reads bounded; an unavailable identity fails admission.\nconst PROCESS_IDENTITY_TIMEOUT_MS = 15_000;\nlet currentProcessFileTime;\nexport async function activateWindowsManagedCommand(binDirectory) {\n const request = windowsNativeProcessRequestSchema.parse({\n operation: \"activate-managed-command\",\n binDirectory,\n });\n const { stdout } = await promisify(execFile)(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(request), \"utf8\").toString(\"base64\"),\n },\n encoding: \"utf8\",\n windowsHide: true,\n timeout: 15_000,\n maxBuffer: 4096,\n });\n const result = stdout.trim();\n if (result !== \"activated\" && result !== \"already_active\") {\n throw new Error(\"Windows returned an invalid command activation receipt.\");\n }\n return result;\n}\n/** Kernel sharing rules keep a live CLI and its helper together during pruning. */\nexport async function pruneWindowsBinaryBundle(directory) {\n const request = windowsNativeProcessRequestSchema.parse({\n operation: \"prune-binary-bundle\",\n directory,\n });\n const { stdout } = await promisify(execFile)(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(request), \"utf8\").toString(\"base64\"),\n },\n encoding: \"utf8\",\n windowsHide: true,\n timeout: 15_000,\n maxBuffer: 4096,\n });\n const result = stdout.trim();\n if (result !== \"removed\" &&\n result !== \"absent\" &&\n result !== \"in_use\" &&\n result !== \"unrecognized\") {\n throw new Error(\"Windows returned an invalid managed-version cleanup receipt.\");\n }\n return result;\n}\n/** An opened process handle binds the observation to the actual instance, not a reused PID. */\nexport function readWindowsProcessStartFileTime(pid) {\n if (!(Number.isSafeInteger(pid) && pid > 0)) {\n return null;\n }\n if (pid === process.pid && currentProcessFileTime) {\n return currentProcessFileTime;\n }\n const request = windowsNativeProcessRequestSchema.parse({\n operation: \"identity\",\n pid,\n });\n try {\n const output = execFileSync(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(request), \"utf8\").toString(\"base64\"),\n },\n encoding: \"utf8\",\n windowsHide: true,\n timeout: PROCESS_IDENTITY_TIMEOUT_MS,\n maxBuffer: 1024,\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n }).trim();\n if (!FILE_TIME_PATTERN.test(output)) {\n return null;\n }\n if (pid === process.pid) {\n currentProcessFileTime = output;\n }\n return output;\n }\n catch {\n return null;\n }\n}\nexport function startWindowsIdleSleepBlocker() {\n return spawn(resolveWindowsNativeProcessHelper(), [], {\n env: {\n ...process.env,\n [WINDOWS_NATIVE_PROCESS_REQUEST_ENV]: Buffer.from(JSON.stringify(windowsNativeProcessRequestSchema.parse({\n operation: \"prevent-idle-sleep\",\n }))).toString(\"base64\"),\n },\n windowsHide: true,\n stdio: [\"pipe\", \"pipe\", \"pipe\"],\n });\n}\n","import { execFileSync } from \"node:child_process\";\nimport { readWindowsProcessStartFileTime } from \"@openmeld/adapter-core/windows-system\";\n\nconst WINDOWS_PROCESS_IDENTITY_PATTERN = /^win32:\\d{10,20}$/u;\n\nexport function isPreciseProcessStartIdentity(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n ((value.startsWith(\"ps:\") && value.length > 3) ||\n WINDOWS_PROCESS_IDENTITY_PATTERN.test(value))\n );\n}\n\nexport const CURRENT_PROCESS_START_IDENTITY =\n readProcessStartIdentity(process.pid) ??\n `fallback:${process.pid}:${Math.floor(Date.now() - process.uptime() * 1000)}`;\n\nexport function isProcessIdentityAlive(\n input: { ownerPid: number; ownerProcessStartedAt: string },\n platform: NodeJS.Platform = process.platform\n): boolean {\n if (!isProcessAlive(input.ownerPid)) {\n return false;\n }\n const observedIdentity = readProcessStartIdentity(input.ownerPid, platform);\n if (\n isPreciseProcessStartIdentity(observedIdentity) &&\n isPreciseProcessStartIdentity(input.ownerProcessStartedAt) &&\n observedIdentity.split(\":\", 1)[0] ===\n input.ownerProcessStartedAt.split(\":\", 1)[0]\n ) {\n return observedIdentity === input.ownerProcessStartedAt;\n }\n // Fail closed when a live process cannot be identified precisely. A caller\n // may recover only after it can prove that the transition owner has exited.\n return true;\n}\n\nexport function readProcessStartIdentity(\n pid: number,\n platform: NodeJS.Platform = process.platform\n): string | null {\n if (!(Number.isSafeInteger(pid) && pid > 0)) {\n return null;\n }\n if (platform === \"win32\") {\n const created = readWindowsProcessStartFileTime(pid);\n return created === null ? null : `win32:${created}`;\n }\n try {\n const output = execFileSync(\"ps\", [\"-o\", \"lstart=\", \"-p\", String(pid)], {\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n timeout: 1000,\n windowsHide: true,\n }).trim();\n return output.length > 0 ? `ps:${output}` : null;\n } catch {\n return null;\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n return true;\n } catch (error) {\n return !isNodeError(error, \"ESRCH\");\n }\n}\n\nfunction isNodeError(error: unknown, code: string): boolean {\n return (\n error instanceof Error && \"code\" in error && String(error.code) === code\n );\n}\n"],"mappings":";;;;;;;;;AAGA,MAAa,qCAAqC;AAClD,SAAgB,oCAAoC;CAGhD,OAEM,cAGF,IAAI,IAAI,mBAAmB,mCAAmC,OAAO,KAAK,GAAG,CAAC;AACtF;;;ACPA,SAAgB,6BAA6B,MAAM,QAAQ,KAAK;CAC5D,MAAM,SAAS,4BAA4B,KAAK,OAAO;CACvD,MAAM,OAAO,OAAO,cAAc,OAAO;CACzC,IAAI,EAAE,QAAQ,MAAM,WAAW,IAAI,IAC/B,MAAM,IAAI,MAAM,0CAA0C;CAE9D,OAAO,MAAM,KAAK,MAAM,YAAY,qBAAqB,QAAQ,gBAAgB;AACrF;AACA,SAAgB,2BAA2B,QAAQ;CAC/C,OAAO;EACH;EACA;EACA;EACA;EACA,OAAO,KAAK,QAAQ,SAAS,CAAC,CAAC,SAAS,QAAQ;CACpD;AACJ;AACA,MAAM,oBAAoB;AAE1B,MAAM,8BAA8B;AACpC,IAAI;AACJ,eAAsB,8BAA8B,cAAc;CAC9D,MAAM,UAAU,kCAAkC,MAAM;EACpD,WAAW;EACX;CACJ,CAAC;CACD,MAAM,EAAE,WAAW,MAAM,UAAU,QAAQ,CAAC,CAAC,kCAAkC,GAAG,CA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,OAAO,OAAO,SAAS;CAC5C;CACA,IAAI;EACF,MAAM,SAAS,aAAa,MAAM;GAAC;GAAM;GAAW;GAAM,OAAO,GAAG;EAAC,GAAG;GACtE,UAAU;GACV,OAAO;IAAC;IAAU;IAAQ;GAAQ;GAClC,SAAS;GACT,aAAa;EACf,CAAC,CAAC,CAAC,KAAK;EACR,OAAO,OAAO,SAAS,IAAI,MAAM,WAAW;CAC9C,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,eAAe,KAAsB;CAC5C,IAAI;EACF,QAAQ,KAAK,KAAK,CAAC;EACnB,OAAO;CACT,SAAS,OAAO;EACd,OAAO,CAAC,YAAY,OAAO,OAAO;CACpC;AACF;AAEA,SAAS,YAAY,OAAgB,MAAuB;CAC1D,OACE,iBAAiB,SAAS,UAAU,SAAS,OAAO,MAAM,IAAI,MAAM;AAExE"}
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { $n as buildAgentContextLookupKey, $t as normalizeDispatchPostMessageAction, Ar as renderTaskKnowledgeIndex, Bn as buildRuntimeWorkspaceFingerprint, Cn as resolveCodexTimeoutMs, Dn as resolveCodexAppServerCompletedTurn, E as resolveProfileWorkspaceRuntime, Gn as removeConversationExecutionState, H as setAgentRegistrationEnabled, Hn as appendLedgerHistoryEntry, Ht as createRouteCatalogFromMutableState, Jn as settleInflightTask, Jt as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, Kn as resolveConversationExecutionStateByLookupKey, Kt as normalizeDispatchThreadAction, L as manageAgentRegistrationInstallation, On as verifyCodexAppServerThread, Q as canManageRegistryAgentSkillTargets, Qn as assertLegacyAgentContextAssociation, Rn as DaemonServiceRunError, Tn as forkCodexAppServerThread, Un as commitResolvedAgentContext, Ut as replaceMutableRouteCatalogState, Vn as buildTaskResultEnvelope, Vt as createMutableRouteCatalogState, Wn as loadLedgerState, Xn as withLedgerStateTransaction, Yn as upsertConversationExecutionState, Yt as SPACE_ACTION_TARGET_GUIDANCE_LINES, Zt as createSerialAgentInteractionCallback, _ as loadDaemonRouteCatalog, a as buildOpenClawSpaceSessionKey, an as createInflightTaskControlRegistry, b as resolveLocalController, cn as resolveCompatibleAgentContextMatch, cr as DISPATCH_SPACE_ACTION_DELIVERY_ONLY_ENV, dr as TASK_KNOWLEDGE_GUIDANCE, en as createPendingAgentInteractionRegistry, et as resolveSkillsAgentRegistry, fn as createLocalAdapterContainer, ft as listProjectBindings, g as writeDaemonRouteCatalogCache, gn as forkOpenCodeServerSession, h as readDaemonRouteCatalogCache, in as createLocalExecutionSlots, kt as resolveRegistryRuntimeAdapterContractByAgentControllerRef, ln as resolveCompatibleConversationExecutionState, nn as createLocalTaskInterruptSender, nt as resolveBuiltinAgentControllerDefinition, o as normalizeOpenClawSpaceIdPrefix, on as resolveDispatchQueueLogMeta, pn as createLocalAdapterEntries, pt as listProjectConnectionsWithStatus, qn as seedLegacyAgentContext, qt as syncRuntimeEventToInflightTaskControlRegistry, s as slugifyOpenClawNamePart, sn as resolveDispatchContinuityObservation, t as prepareProviderRuntime, tn as mergeOpenClawGatewayVisibility, un as resolveLatestScopedConversationExecutionState, ur as DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS, v as buildRuntimeRouteTargets, vn as resolveInstalledOpenCodeLaunchCandidates, w as resolveCurrentEffectiveProfileWorkingFolderRuntime, wn as resolveInstalledCodexLaunchCandidates, x as resolveLocalRuntimeControllerSupport, y as readLocalEnabledControllers, zn as runRuntimeTask, zr as supportsSpaceWorkHandoff } from "./prepare-provider-runtime-N0uP2aUG.js";
4
- import { a as resolveBaseUrl, f as getConfiguredDaemonDispatchLimits, g as getConfiguredSkillsConfig } from "./base-url-BMrQwJW4.js";
3
+ import { $n as withLedgerStateTransaction, $t as normalizeDispatchPostMessageAction, Cn as resolveCodexTimeoutMs, Dn as resolveCodexAppServerCompletedTurn, E as resolveProfileWorkspaceRuntime, Gn as appendLedgerHistoryEntry, H as setAgentRegistrationEnabled, Hn as runRuntimeTask, Hr as supportsSpaceWorkHandoff, Ht as createRouteCatalogFromMutableState, Jn as removeConversationExecutionState, Jt as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, Kn as commitResolvedAgentContext, Kt as normalizeDispatchThreadAction, L as manageAgentRegistrationInstallation, Mn as readClaudeNativeVersion, Nn as resolveClaudeNativeUpdateCommand, Nr as renderTaskKnowledgeIndex, On as verifyCodexAppServerThread, Pn as updateClaudeNativeInstallation, Q as canManageRegistryAgentSkillTargets, Qn as upsertConversationExecutionState, Tn as forkCodexAppServerThread, Un as buildRuntimeWorkspaceFingerprint, Ut as replaceMutableRouteCatalogState, V as resolveAgentTargetState, Vn as DaemonServiceRunError, Vt as createMutableRouteCatalogState, Wn as buildTaskResultEnvelope, Xn as seedLegacyAgentContext, Yn as resolveConversationExecutionStateByLookupKey, Yt as SPACE_ACTION_TARGET_GUIDANCE_LINES, Zn as settleInflightTask, Zt as createSerialAgentInteractionCallback, _ as loadDaemonRouteCatalog, a as buildOpenClawSpaceSessionKey, an as createInflightTaskControlRegistry, b as resolveLocalController, cn as resolveCompatibleAgentContextMatch, dr as DISPATCH_SPACE_ACTION_DELIVERY_ONLY_ENV, en as createPendingAgentInteractionRegistry, et as resolveSkillsAgentRegistry, fn as createLocalAdapterContainer, ft as listProjectBindings, g as writeDaemonRouteCatalogCache, gn as forkOpenCodeServerSession, h as readDaemonRouteCatalogCache, in as createLocalExecutionSlots, kt as resolveRegistryRuntimeAdapterContractByAgentControllerRef, ln as resolveCompatibleConversationExecutionState, mr as TASK_KNOWLEDGE_GUIDANCE, nn as createLocalTaskInterruptSender, nr as buildAgentContextLookupKey, nt as resolveBuiltinAgentControllerDefinition, o as normalizeOpenClawSpaceIdPrefix, on as resolveDispatchQueueLogMeta, pn as createLocalAdapterEntries, pr as DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS, pt as listProjectConnectionsWithStatus, qn as loadLedgerState, qt as syncRuntimeEventToInflightTaskControlRegistry, s as slugifyOpenClawNamePart, sn as resolveDispatchContinuityObservation, t as prepareProviderRuntime, tn as mergeOpenClawGatewayVisibility, tr as assertLegacyAgentContextAssociation, un as resolveLatestScopedConversationExecutionState, v as buildRuntimeRouteTargets, vn as resolveInstalledOpenCodeLaunchCandidates, w as resolveCurrentEffectiveProfileWorkingFolderRuntime, wn as resolveInstalledCodexLaunchCandidates, x as resolveLocalRuntimeControllerSupport, y as readLocalEnabledControllers } from "./prepare-provider-runtime-CkW7c9bF.js";
4
+ import { a as resolveBaseUrl, f as getConfiguredDaemonDispatchLimits, g as getConfiguredSkillsConfig } from "./base-url-B9NwMjEF.js";
5
5
  import { F as resolveOpenMeldRootDir } from "./paths-De9xdA2h.js";
6
- import { AR as normalizeOptionalWorkingDirectory, BO as runtimeCoordinatorExecutionTokenEnvelopeSchema, CI as normalizeKnownBuiltinAgentControllerId, Cv as agentExecutionSteerResponseSchema, Gw as OPENMELD_DAEMON_CANCEL_WITHDRAWN_BEFORE_START_REASON_CODE, Jb as runtimeTransportDispatchInteractionRequestSchema, Kb as runtimeTransportDeliverDispatchRequestSchema, Ox as runtimeTransportResumeControllerConversationFramePayloadSchema, PA as COMPUTER_FILE_ACCESS_OWNER_CANCELLED_REASON_CODE, Qb as runtimeTransportDispatchLifecycleRequestSchema, Rw as spaceWorkSelectionSchema, WT as providerDispatchRuntimeContextSchema, Ww as OPENMELD_DAEMON_CANCEL_STOP_REQUESTED_AFTER_START_REASON_CODE, Xb as runtimeTransportDispatchLifecycleAcknowledgementSchema, Xx as runtimeTransportSubmitTaskResultRequestSchema, Yb as runtimeTransportDispatchInteractionResponseFramePayloadSchema, ax as runtimeTransportDispatchRuntimeEvidenceRequestSchema, bu as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, cS as openMeldDaemonTaskResultPayloadSchema, d as SERVICE_EXECUTION_HOST_PROTOCOL, ek as runtimeTransportDeliveryExecutionIdentitySchema, ex as runtimeTransportDispatchPreviewEndRequestSchema, gE as resolveBuiltinAgentControllerConversationKind, gk as LOCAL_AGENT_REASONING_MAX_CHARS, gx as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, hx as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, iO as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, kx as runtimeTransportResumeControllerConversationResultFramePayloadSchema, lx as runtimeTransportForkAgentSessionResultSchema, mE as buildAgentControllerConversationRef, mO as agentInteractionResolutionSchema, mx as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, nj as computerPowerRequestSchema, nx as runtimeTransportDispatchProgressRequestSchema, p as serviceExecutionHostCatalogSchema, pO as agentInteractionRequestSchema, pv as OFFICIAL_CLI_SKILL_URL, px as runtimeTransportLocalAgentControlCancelFramePayloadSchema, qP as toCompatibleSpaceAddressingRequestWireValue, qb as runtimeTransportDispatchInteractionDeliveredRequestSchema, r as buildWorkingFolderRecoveryQuestion, rx as runtimeTransportDispatchReasoningRequestSchema, sx as runtimeTransportDispatchToolActivityRequestSchema, t as WORKING_FOLDER_RECOVERY_DECLINED, tj as computerPowerRequestFrameSchema, tx as runtimeTransportDispatchPreviewRequestSchema, vk as localAgentReasoningPreferencesSchema, yx as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema } from "./dist-Dx5paVZY.js";
7
- import { u as startWindowsIdleSleepBlocker } from "./process-identity-DtRa8niy.js";
8
- import { Nt as buildSpaceAttachmentDownloadPath, ln as createOrganizationSkillsApi, xn as createSpaceApi } from "./dist-BJy9X73H.js";
9
- import { d as getAuthSessionState } from "./auth-session-mNZMZihh.js";
10
- import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, f as buildOpenMeldRequestContextFromProfileIdentity, n as fetchSpaceRequestWithTimeout, t as createCliApiClientFoundation } from "./api-client-foundation-BDbeHD1i.js";
11
- import { t as emitDaemonLifecycleEvent } from "./daemon-lifecycle-journal-B2cNyBV2.js";
12
- import { S as CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS, _ as toErrorMessage$2, n as ensureDaemonRuntimePaths, s as emitRunLine, t as buildLedgerPaths, u as normalizeOptionalText$3, v as warnDaemonEvent } from "./daemon-device-id-DrGRbKdb.js";
13
- import { F as SPACE_COLLABORATION_CONTEXT_RULE, I as SPACE_PERSONAL_CONTRIBUTION_RULE, X as resolvePublicAgentFailureReason, Z as resolveSpacePublicationRequirement } from "./dual-view-guide-catalog-Cm8_zKnl.js";
14
- import { $t as createDispatchContinuationSpaceAccessContext, C as recordOpenMeldCreatedLocalAgentSession, D as readOpenCodeSessionRows, J as consumeArmedAgentControllerInterfaceReprobe, Yt as buildSpaceRoundSignalPublication, _ as sendDaemonFrame$1, _t as resolveBootstrapSpaceOwnerProfileId, an as getSpaceAccessPassword, at as emitDaemonDispatchJournalEvent, c as createDispatchSpaceActionContext, ct as readComputerFileAccessPolicy, d as readDispatchSpaceActionRecord, dt as isSameOrDescendantPath, f as supersedeDispatchSpaceActionRecordForReconsideration, ft as buildDispatchBootstrapTemplateFacts, g as parseDaemonFrame, gt as parseDispatchTask, ht as buildDispatchSessionTitle, k as resolveOpenCodeDatabasePath, l as readDispatchSpaceActionContextForReceiptFromEnv, ln as isWakeClosingSystemNoticeType, lt as resolveComputerFileAccessStorePath, mt as buildDispatchPromptPlan, on as getSpaceAccessRequestContext, pt as buildDispatchCorrelation, r as buildDispatchOwnedRuntimeEnv, s as OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV, un as listSpaceMemberDirectorySendTargets, vt as resolveBootstrapTargetProfileContext, xn as DISPATCH_SPACE_ACTION_CLI_FALLBACK_COMMAND, yt as resolveDispatchMentionSourceContext } from "./dispatch-owned-runtime-BxpC_aaI.js";
15
- import { t as ExecutionHostError } from "./channel-48XSbUsz.js";
16
- import { f as withSkillsInstallLock, r as ensureLocalSkills, t as resolveSkillInstallStateForTarget } from "./state-CBWBsV1X.js";
17
- import { a as submitRuntimeProviderConversationProofs, f as recordRuntimeProviderUsageLimits, i as submitRuntimeAgentControllerReports, l as resolveLocalAgentControllerReportDecision, o as collectLocalAgentControllerInventory, t as notifyRuntimeReportingAttemptObserver, u as probeAgentControllerUsageObservationAuth } from "./runtime-agent-controller-reporting-submission-YtLJgQc7.js";
18
- import { t as installSkillsToTargets } from "./installer-BLijIl6G.js";
19
- import { B as installAgentActivityIntegrations, C as recordRuntimeReportingFailure, D as startLocalAgentActivitySyncLoop, E as createLedgerIo, F as registerAgentActivityRoute, T as recordRuntimeReportingSuccess, _ as markExecutionContextWorkspaceInUse, a as createDispatchSpaceTools, b as releaseExecutionContextWorkspace, g as deriveExecutionContextComputerFileAccessPolicy, h as startDispatchSpaceProgressRelay, i as materializeOrganizationSkillRelease, k as discoverLocalAgentSessionProviders, n as createSpaceWorkingCopies, r as downloadWorkingCopyFile, s as readTaskKnowledge, t as fetchSpaceUpdates, v as prepareExecutionContextWorkspace, w as recordRuntimeReportingNotApplicable, x as prepareClaudeProjectContainer, y as readExecutionContextWorkspace, z as defaultManagedIntegrationPaths } from "./updates-api-ByctphEr.js";
20
- import { h as createCliSpaceApi } from "./meta-api-C0lRMWF1.js";
6
+ import { $b as runtimeTransportDispatchInteractionRequestSchema, Cv as agentExecutionSteerResponseSchema, Ek as localAgentReasoningPreferencesSchema, HA as COMPUTER_FILE_ACCESS_OWNER_CANCELLED_REASON_CODE, JO as runtimeCoordinatorExecutionTokenEnvelopeSchema, Nx as runtimeTransportResumeControllerConversationFramePayloadSchema, Px as runtimeTransportResumeControllerConversationResultFramePayloadSchema, Qb as runtimeTransportDispatchInteractionDeliveredRequestSchema, RR as normalizeOptionalWorkingDirectory, SE as buildAgentControllerConversationRef, SO as agentInteractionResolutionSchema, Uw as spaceWorkSelectionSchema, XT as localAgentUpdateOperationSchema, Xw as OPENMELD_DAEMON_CANCEL_WITHDRAWN_BEFORE_START_REASON_CODE, YT as providerDispatchRuntimeContextSchema, Yw as OPENMELD_DAEMON_CANCEL_STOP_REQUESTED_AFTER_START_REASON_CODE, Zb as runtimeTransportDeliverDispatchRequestSchema, ax as runtimeTransportDispatchPreviewEndRequestSchema, bu as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, bx as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, ck as runtimeTransportDeliveryExecutionIdentitySchema, cx as runtimeTransportDispatchReasoningRequestSchema, d as SERVICE_EXECUTION_HOST_PROTOCOL, ex as runtimeTransportDispatchInteractionResponseFramePayloadSchema, fO as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, fx as runtimeTransportDispatchToolActivityRequestSchema, jI as normalizeKnownBuiltinAgentControllerId, lj as computerPowerRequestFrameSchema, mx as runtimeTransportForkAgentSessionResultSchema, ox as runtimeTransportDispatchPreviewRequestSchema, p as serviceExecutionHostCatalogSchema, pS as openMeldDaemonTaskResultPayloadSchema, pv as OFFICIAL_CLI_SKILL_URL, r as buildWorkingFolderRecoveryQuestion, rx as runtimeTransportDispatchLifecycleRequestSchema, sx as runtimeTransportDispatchProgressRequestSchema, t as WORKING_FOLDER_RECOVERY_DECLINED, tF as toCompatibleSpaceAddressingRequestWireValue, tS as runtimeTransportSubmitTaskResultRequestSchema, tx as runtimeTransportDispatchLifecycleAcknowledgementSchema, uj as computerPowerRequestSchema, ux as runtimeTransportDispatchRuntimeEvidenceRequestSchema, vx as runtimeTransportLocalAgentControlCancelFramePayloadSchema, wE as resolveBuiltinAgentControllerConversationKind, wk as LOCAL_AGENT_REASONING_MAX_CHARS, wx as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, xO as agentInteractionRequestSchema, xx as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, yx as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema } from "./dist-CMBBVJVE.js";
7
+ import { u as startWindowsIdleSleepBlocker } from "./process-identity-e30Hp6t3.js";
8
+ import { Nt as buildSpaceAttachmentDownloadPath, ln as createOrganizationSkillsApi, xn as createSpaceApi } from "./dist-Dip3sgFz.js";
9
+ import { d as getAuthSessionState } from "./auth-session-RQOVI0Gb.js";
10
+ import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, f as buildOpenMeldRequestContextFromProfileIdentity, n as fetchSpaceRequestWithTimeout, t as createCliApiClientFoundation } from "./api-client-foundation-DBl_OaMj.js";
11
+ import { t as emitDaemonLifecycleEvent } from "./daemon-lifecycle-journal-D4Xupqhp.js";
12
+ import { S as CONTROLLED_SHUTDOWN_RESULT_ACK_TIMEOUT_MS, _ as toErrorMessage$2, n as ensureDaemonRuntimePaths, s as emitRunLine, t as buildLedgerPaths, u as normalizeOptionalText$3, v as warnDaemonEvent } from "./daemon-device-id-BmL_1aHE.js";
13
+ import { F as SPACE_COLLABORATION_CONTEXT_RULE, I as SPACE_PERSONAL_CONTRIBUTION_RULE, X as resolvePublicAgentFailureReason, Z as resolveSpacePublicationRequirement } from "./dual-view-guide-catalog-DkoOcvAt.js";
14
+ import { $t as createDispatchContinuationSpaceAccessContext, C as recordOpenMeldCreatedLocalAgentSession, D as readOpenCodeSessionRows, J as consumeArmedAgentControllerInterfaceReprobe, Yt as buildSpaceRoundSignalPublication, _ as sendDaemonFrame$1, _t as resolveBootstrapSpaceOwnerProfileId, an as getSpaceAccessPassword, at as emitDaemonDispatchJournalEvent, c as createDispatchSpaceActionContext, ct as readComputerFileAccessPolicy, d as readDispatchSpaceActionRecord, dt as isSameOrDescendantPath, f as supersedeDispatchSpaceActionRecordForReconsideration, ft as buildDispatchBootstrapTemplateFacts, g as parseDaemonFrame, gt as parseDispatchTask, ht as buildDispatchSessionTitle, k as resolveOpenCodeDatabasePath, l as readDispatchSpaceActionContextForReceiptFromEnv, ln as isWakeClosingSystemNoticeType, lt as resolveComputerFileAccessStorePath, mt as buildDispatchPromptPlan, on as getSpaceAccessRequestContext, pt as buildDispatchCorrelation, r as buildDispatchOwnedRuntimeEnv, s as OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV, un as listSpaceMemberDirectorySendTargets, vt as resolveBootstrapTargetProfileContext, xn as DISPATCH_SPACE_ACTION_CLI_FALLBACK_COMMAND, yt as resolveDispatchMentionSourceContext } from "./dispatch-owned-runtime-D5J7omXK.js";
15
+ import { t as ExecutionHostError } from "./channel-fUczwp7l.js";
16
+ import { f as withSkillsInstallLock, r as ensureLocalSkills, t as resolveSkillInstallStateForTarget } from "./state-6y71kBCo.js";
17
+ import { a as submitRuntimeProviderConversationProofs, f as recordRuntimeProviderUsageLimits, i as submitRuntimeAgentControllerReports, l as resolveLocalAgentControllerReportDecision, o as collectLocalAgentControllerInventory, t as notifyRuntimeReportingAttemptObserver, u as probeAgentControllerUsageObservationAuth } from "./runtime-agent-controller-reporting-submission-ZLj8H7TM.js";
18
+ import { t as installSkillsToTargets } from "./installer-BZfDlcZI.js";
19
+ import { B as installAgentActivityIntegrations, C as recordRuntimeReportingFailure, D as startLocalAgentActivitySyncLoop, E as createLedgerIo, F as registerAgentActivityRoute, T as recordRuntimeReportingSuccess, _ as markExecutionContextWorkspaceInUse, a as createDispatchSpaceTools, b as releaseExecutionContextWorkspace, g as deriveExecutionContextComputerFileAccessPolicy, h as startDispatchSpaceProgressRelay, i as materializeOrganizationSkillRelease, k as discoverLocalAgentSessionProviders, n as createSpaceWorkingCopies, r as downloadWorkingCopyFile, s as readTaskKnowledge, t as fetchSpaceUpdates, v as prepareExecutionContextWorkspace, w as recordRuntimeReportingNotApplicable, x as prepareClaudeProjectContainer, y as readExecutionContextWorkspace, z as defaultManagedIntegrationPaths } from "./updates-api-DluYmth3.js";
20
+ import { h as createCliSpaceApi } from "./meta-api-BPhaiMmU.js";
21
21
  import { createHash, randomUUID } from "node:crypto";
22
22
  import { homedir } from "node:os";
23
23
  import { basename, dirname, extname, join } from "node:path";
@@ -2551,6 +2551,151 @@ function stableJson(value) {
2551
2551
  return JSON.stringify(value) ?? "null";
2552
2552
  }
2553
2553
  //#endregion
2554
+ //#region src/local-service/execution-host/local-agent-update.ts
2555
+ function createLocalAgentUpdater(input) {
2556
+ const active = /* @__PURE__ */ new Set();
2557
+ let tail = Promise.resolve();
2558
+ const directory = join(input.rootDir, "local-agent-updates");
2559
+ const path = join(directory, "operations.json");
2560
+ const serialize = (run) => {
2561
+ const next = tail.then(run, run);
2562
+ tail = next.catch(() => void 0);
2563
+ return next;
2564
+ };
2565
+ async function read() {
2566
+ try {
2567
+ return localAgentUpdateOperationSchema.array().parse(JSON.parse(await readFile(path, "utf8")));
2568
+ } catch (error) {
2569
+ if (error.code === "ENOENT") return [];
2570
+ throw new Error("agents.update_receipt_unavailable: Update history could not be read. Check OpenMeld Service diagnostics.", { cause: error });
2571
+ }
2572
+ }
2573
+ async function save(operation) {
2574
+ const records = await read();
2575
+ const index = records.findIndex((record) => record.operationId === operation.operationId);
2576
+ if (index < 0) records.push(operation);
2577
+ else records[index] = operation;
2578
+ await mkdir(directory, {
2579
+ recursive: true,
2580
+ mode: 448
2581
+ });
2582
+ await writeFile(`${path}.tmp`, JSON.stringify(records), { mode: 384 });
2583
+ await rename(`${path}.tmp`, path);
2584
+ }
2585
+ function project(operation) {
2586
+ if (!operation) return null;
2587
+ return operation.status === "running" && !active.has(operation.operationId) ? {
2588
+ ...operation,
2589
+ status: "outcome_unknown",
2590
+ message: "OpenMeld Service restarted before the update was confirmed. Check the installation in your terminal before updating again."
2591
+ } : operation;
2592
+ }
2593
+ async function command(agentId, installationId) {
2594
+ if (agentId !== "claude-code") return null;
2595
+ const installations = await manageAgentRegistrationInstallation({
2596
+ agentId,
2597
+ operation: "list"
2598
+ });
2599
+ if (!installations.selectedInstallationId || installationId && installationId !== installations.selectedInstallationId) return null;
2600
+ const contract = (await resolveAgentTargetState(agentId))?.registration?.launchContract;
2601
+ return contract ? await resolveClaudeNativeUpdateCommand(contract) : null;
2602
+ }
2603
+ async function state(agentId) {
2604
+ const records = agentId === "claude-code" ? await serialize(read) : [];
2605
+ let supported = false;
2606
+ try {
2607
+ supported = Boolean(await command(agentId));
2608
+ } catch (error) {
2609
+ if (!records.length) throw error;
2610
+ input.log(`Could not inspect the installation for update status: ${String(error)}`);
2611
+ }
2612
+ return {
2613
+ supported,
2614
+ operation: project(records.at(-1))
2615
+ };
2616
+ }
2617
+ async function start(agentId, request) {
2618
+ let started;
2619
+ let rejected;
2620
+ const ready = new Promise((resolve, reject) => {
2621
+ started = resolve;
2622
+ rejected = reject;
2623
+ });
2624
+ await serialize(async () => {
2625
+ const records = await read();
2626
+ const existing = records.find((record) => record.operationId === request.operationId);
2627
+ if (existing) {
2628
+ if (agentId !== "claude-code" || existing.installationId !== request.installationId) throw new Error("agents.update_conflict: This update request belongs to a different installation.");
2629
+ started({
2630
+ supported: true,
2631
+ operation: project(existing)
2632
+ });
2633
+ return;
2634
+ }
2635
+ if (records.some((record) => record.status === "running" || record.status === "outcome_unknown")) throw new Error("agents.update_unconfirmed: An earlier update has not been confirmed. Check its status before updating again.");
2636
+ const executable = await command(agentId, request.installationId);
2637
+ if (!executable) throw new Error("agents.update_unsupported: This installation cannot be updated from OpenMeld. Use its original installer.");
2638
+ input.slots.runAdapterOperationIfIdle(agentId, async () => {
2639
+ const beforeVersion = await readClaudeNativeVersion(executable);
2640
+ const operation = {
2641
+ installationId: request.installationId,
2642
+ operationId: request.operationId,
2643
+ beforeVersion,
2644
+ afterVersion: null,
2645
+ status: "running",
2646
+ message: "Updating Claude Code. You can close this window."
2647
+ };
2648
+ active.add(request.operationId);
2649
+ await save(operation);
2650
+ started({
2651
+ supported: true,
2652
+ operation
2653
+ });
2654
+ try {
2655
+ if (await command(agentId, request.installationId) !== executable) throw new Error("The selected installation changed before the update started.");
2656
+ await updateClaudeNativeInstallation(executable);
2657
+ if (await command(agentId, request.installationId) !== executable) throw new Error("The selected installation could not be confirmed after the update.");
2658
+ const afterVersion = await readClaudeNativeVersion(executable);
2659
+ return {
2660
+ ...operation,
2661
+ afterVersion,
2662
+ status: "succeeded",
2663
+ message: beforeVersion === afterVersion ? `No newer version was installed. Claude Code is still ${afterVersion}.` : `Claude Code was updated from ${beforeVersion} to ${afterVersion}.`
2664
+ };
2665
+ } catch (error) {
2666
+ input.log(`Local agent update ${request.operationId} failed: ${String(error)}`);
2667
+ return {
2668
+ ...operation,
2669
+ status: "outcome_unknown",
2670
+ message: "The update could not be verified. Check Claude Code in your terminal and OpenMeld Service diagnostics before trying again."
2671
+ };
2672
+ }
2673
+ }).then(async (result) => {
2674
+ if (!result.accepted) {
2675
+ rejected(/* @__PURE__ */ new Error(result.status === "blocked_by_work" ? "agents.update_blocked_by_work: Claude Code has work in progress. Wait until it finishes before updating." : "agents.update_in_progress: This installation is already being changed. Check again shortly."));
2676
+ return;
2677
+ }
2678
+ await serialize(() => save(result.value));
2679
+ active.delete(request.operationId);
2680
+ await input.refresh();
2681
+ }, (error) => {
2682
+ active.delete(request.operationId);
2683
+ input.log(`Local agent update ${request.operationId} could not complete: ${String(error)}`);
2684
+ rejected(error);
2685
+ }).catch((error) => {
2686
+ active.delete(request.operationId);
2687
+ input.log(`Could not publish local agent update completion: ${String(error)}`);
2688
+ });
2689
+ await ready;
2690
+ });
2691
+ return ready;
2692
+ }
2693
+ return {
2694
+ state,
2695
+ start
2696
+ };
2697
+ }
2698
+ //#endregion
2554
2699
  //#region src/local-service/execution-host/controls.ts
2555
2700
  function isExecutionHostControlFrame(frame) {
2556
2701
  return frame.code === "daemon.local_agent_control.set_enabled" || frame.code === "daemon.local_agent_control.manage_installation" || frame.code === "daemon.local_agent_control.fork_session" || frame.code === "daemon.execution_recovery.resume_controller_conversation";
@@ -2561,6 +2706,15 @@ function createExecutionHostControls(input) {
2561
2706
  code,
2562
2707
  text
2563
2708
  });
2709
+ const updater = createLocalAgentUpdater({
2710
+ rootDir: input.ledgerPaths.rootDirPath,
2711
+ slots: input.localExecutionSlots,
2712
+ refresh: async () => {
2713
+ await refreshReports();
2714
+ input.invalidate("routes");
2715
+ },
2716
+ log: (message) => log("daemon.local_agent_update", message)
2717
+ });
2564
2718
  async function refreshReports() {
2565
2719
  try {
2566
2720
  const result = await input.refreshReports();
@@ -2603,12 +2757,24 @@ function createExecutionHostControls(input) {
2603
2757
  }
2604
2758
  async function manageInstallation(control) {
2605
2759
  try {
2760
+ if (control.operation === "update" || control.operation === "read_update") {
2761
+ const update = control.operation === "update" ? await updater.start(control.agentId, control) : await updater.state(control.agentId);
2762
+ return {
2763
+ accepted: true,
2764
+ agentId: control.agentId,
2765
+ status: "update_state",
2766
+ update
2767
+ };
2768
+ }
2606
2769
  let result;
2607
2770
  if (control.operation === "select") {
2608
2771
  const guarded = await input.localExecutionSlots.runAdapterOperationIfIdle(control.agentId, () => manageAgentRegistrationInstallation(control));
2609
2772
  if (!guarded.accepted) throw new Error(guarded.status === "operation_in_progress" ? "agents.installation_change_in_progress: this installation is already being changed; check again in a moment" : "agents.installation_change_blocked_by_work: this agent has work in progress; wait until it finishes before changing installations");
2610
2773
  result = guarded.value;
2611
- } else result = await manageAgentRegistrationInstallation(control);
2774
+ } else result = await manageAgentRegistrationInstallation({
2775
+ agentId: control.agentId,
2776
+ operation: "list"
2777
+ });
2612
2778
  const selectionStatus = input.localExecutionSlots.getAdapterOperationStatus(control.agentId);
2613
2779
  const reportSyncStatus = result.changed ? await refreshReports() : "skipped";
2614
2780
  if (result.changed) input.invalidate("routes");
@@ -9707,4 +9873,4 @@ function createExecutionHostRuntime(input) {
9707
9873
  //#endregion
9708
9874
  export { createExecutionHostResources, createExecutionHostRuntime };
9709
9875
 
9710
- //# sourceMappingURL=runtime-CUN9BLfZ.js.map
9876
+ //# sourceMappingURL=runtime-DoIazDNu.js.map