openmeld 0.3.246 → 0.3.248

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 (104) hide show
  1. package/dist/{add-me-membership-C7dYkfPz.js → add-me-membership-zSJAa2ET.js} +2 -2
  2. package/dist/{add-me-membership-C7dYkfPz.js.map → add-me-membership-zSJAa2ET.js.map} +1 -1
  3. package/dist/{agents-QisYIlFS.js → agents-DLjDbkLV.js} +10 -10
  4. package/dist/{agents-QisYIlFS.js.map → agents-DLjDbkLV.js.map} +1 -1
  5. package/dist/{api-client-foundation-CYbEdm9o.js → api-client-foundation-BZvzqIeX.js} +3 -3
  6. package/dist/{api-client-foundation-CYbEdm9o.js.map → api-client-foundation-BZvzqIeX.js.map} +1 -1
  7. package/dist/{api-client-foundation-B1aTRrIy.js → api-client-foundation-DE_UqE2s.js} +1 -1
  8. package/dist/auth-session-BOi-tZ2y.js +4 -0
  9. package/dist/{auth-session-JhILeJRO.js → auth-session-DywRZLBr.js} +4 -4
  10. package/dist/{auth-session-JhILeJRO.js.map → auth-session-DywRZLBr.js.map} +1 -1
  11. package/dist/{channel-C6tm9T7P.js → channel-40SR2b5S.js} +3 -3
  12. package/dist/{channel-C6tm9T7P.js.map → channel-40SR2b5S.js.map} +1 -1
  13. package/dist/{cloud-computer-J2tdcTPm.js → cloud-computer-BqFhsHhC.js} +4 -4
  14. package/dist/{cloud-computer-J2tdcTPm.js.map → cloud-computer-BqFhsHhC.js.map} +1 -1
  15. package/dist/{command-BXJ-OwBD.js → command-DBfu-GeG.js} +15 -15
  16. package/dist/{command-BXJ-OwBD.js.map → command-DBfu-GeG.js.map} +1 -1
  17. package/dist/{computer-connection-BKtrn0d2.js → computer-connection-CVyM42a0.js} +2 -2
  18. package/dist/{computer-connection-BKtrn0d2.js.map → computer-connection-CVyM42a0.js.map} +1 -1
  19. package/dist/{computer-connection-review-bUqNKi6q.js → computer-connection-review-B5qKu2C9.js} +5 -5
  20. package/dist/{computer-connection-review-bUqNKi6q.js.map → computer-connection-review-B5qKu2C9.js.map} +1 -1
  21. package/dist/{computer-disconnect-D_Apsn9P.js → computer-disconnect-BxhAjQQx.js} +7 -7
  22. package/dist/{computer-disconnect-D_Apsn9P.js.map → computer-disconnect-BxhAjQQx.js.map} +1 -1
  23. package/dist/{computer-setup-continuation-occq0LmS.js → computer-setup-continuation-V40ov5FS.js} +3 -3
  24. package/dist/{computer-setup-continuation-occq0LmS.js.map → computer-setup-continuation-V40ov5FS.js.map} +1 -1
  25. package/dist/{context-M7dvalCp.js → context-BEgBhfbb.js} +4 -4
  26. package/dist/{context-M7dvalCp.js.map → context-BEgBhfbb.js.map} +1 -1
  27. package/dist/{daemon-device-id-C3gKch4E.js → daemon-device-id-CmykIapy.js} +4 -4
  28. package/dist/{daemon-device-id-C3gKch4E.js.map → daemon-device-id-CmykIapy.js.map} +1 -1
  29. package/dist/{daemon-lifecycle-journal-CGUuJshv.js → daemon-lifecycle-journal-2dzGUSWU.js} +3 -3
  30. package/dist/{daemon-lifecycle-journal-CGUuJshv.js.map → daemon-lifecycle-journal-2dzGUSWU.js.map} +1 -1
  31. package/dist/{daemon-service-runtime-CktU3ER4.js → daemon-service-runtime-pECs8jVc.js} +2 -2
  32. package/dist/{daemon-service-runtime-CktU3ER4.js.map → daemon-service-runtime-pECs8jVc.js.map} +1 -1
  33. package/dist/{daemon-service-update-coordinator-D0-15tZW.js → daemon-service-update-coordinator-DJKBTEjx.js} +14 -14
  34. package/dist/daemon-service-update-coordinator-DJKBTEjx.js.map +1 -0
  35. package/dist/{dispatch-owned-runtime-gOluDX5_.js → dispatch-owned-runtime-QhxDRdNr.js} +191 -52
  36. package/dist/dispatch-owned-runtime-QhxDRdNr.js.map +1 -0
  37. package/dist/{dist-KibLweLD.js → dist-BQcUIyf6.js} +747 -529
  38. package/dist/dist-BQcUIyf6.js.map +1 -0
  39. package/dist/dist-C8M8nzJ2.js +4 -0
  40. package/dist/{dual-view-guide-catalog-0kSizTFt.js → dual-view-guide-catalog-DDsnLpIT.js} +3 -3
  41. package/dist/{dual-view-guide-catalog-0kSizTFt.js.map → dual-view-guide-catalog-DDsnLpIT.js.map} +1 -1
  42. package/dist/{elapsed-time-Bo1CJczC.js → elapsed-time-DTb6L36x.js} +3 -3
  43. package/dist/{elapsed-time-Bo1CJczC.js.map → elapsed-time-DTb6L36x.js.map} +1 -1
  44. package/dist/{entry-B11DkH2I.js → entry-B3w4ZTC5.js} +7 -7
  45. package/dist/{entry-B11DkH2I.js.map → entry-B3w4ZTC5.js.map} +1 -1
  46. package/dist/{installation-inventory-BZgQmVup.js → installation-inventory-CCkKix8R.js} +3 -3
  47. package/dist/{installation-inventory-BZgQmVup.js.map → installation-inventory-CCkKix8R.js.map} +1 -1
  48. package/dist/{installer-k2gOOs58.js → installer-BiZM-o_y.js} +2 -2
  49. package/dist/{installer-k2gOOs58.js.map → installer-BiZM-o_y.js.map} +1 -1
  50. package/dist/{meta-api-DruuiAx-.js → meta-api-9iqkG_MP.js} +5 -5
  51. package/dist/{meta-api-DruuiAx-.js.map → meta-api-9iqkG_MP.js.map} +1 -1
  52. package/dist/{open-code-permission-DHFJYc_o.js → open-code-permission-B5f1e5an.js} +2 -31
  53. package/dist/open-code-permission-B5f1e5an.js.map +1 -0
  54. package/dist/{openmeld-DUdN78WD.js → openmeld-C70uo4ON.js} +215 -71
  55. package/dist/openmeld-C70uo4ON.js.map +1 -0
  56. package/dist/{openmeld-maintenance-worker-DwkvZD0q.js → openmeld-maintenance-worker-BFPEm1rE.js} +9 -9
  57. package/dist/{openmeld-maintenance-worker-DwkvZD0q.js.map → openmeld-maintenance-worker-BFPEm1rE.js.map} +1 -1
  58. package/dist/{openmeld-tools-update-join-BNUIw_Lo.js → openmeld-tools-update-join-Bki3ugUW.js} +4 -4
  59. package/dist/{openmeld-tools-update-join-BNUIw_Lo.js.map → openmeld-tools-update-join-Bki3ugUW.js.map} +1 -1
  60. package/dist/openmeld.js +4 -4
  61. package/dist/{prepare-provider-runtime-_XRIioDp.js → prepare-provider-runtime-CWZOcEF7.js} +85 -23
  62. package/dist/prepare-provider-runtime-CWZOcEF7.js.map +1 -0
  63. package/dist/{prepare-session-executor-B5AjN0qz.js → prepare-session-executor-B8XSTQdx.js} +18 -18
  64. package/dist/{prepare-session-executor-B5AjN0qz.js.map → prepare-session-executor-B8XSTQdx.js.map} +1 -1
  65. package/dist/{process-channel-CTXWjlBP.js → process-channel-DLXPiGRF.js} +2 -2
  66. package/dist/{process-channel-CTXWjlBP.js.map → process-channel-DLXPiGRF.js.map} +1 -1
  67. package/dist/{runtime-DCBc6YOq.js → runtime-DzToUfqW.js} +115 -32
  68. package/dist/{runtime-DCBc6YOq.js.map → runtime-DzToUfqW.js.map} +1 -1
  69. package/dist/{runtime-agent-controller-reporting-submission-CGa3GGL6.js → runtime-agent-controller-reporting-submission-BszHi0S1.js} +8 -8
  70. package/dist/{runtime-agent-controller-reporting-submission-CGa3GGL6.js.map → runtime-agent-controller-reporting-submission-BszHi0S1.js.map} +1 -1
  71. package/dist/{runtime-transport-BzCp9hM3.js → runtime-transport-DFBYm5Re.js} +214 -21
  72. package/dist/runtime-transport-DFBYm5Re.js.map +1 -0
  73. package/dist/{service-BEH6-P8U.js → service-8EozP77B.js} +546 -21
  74. package/dist/service-8EozP77B.js.map +1 -0
  75. package/dist/{service-account-authorization-CtvSn02O.js → service-account-authorization-CqUcNoD1.js} +2 -2
  76. package/dist/{service-account-authorization-CtvSn02O.js.map → service-account-authorization-CqUcNoD1.js.map} +1 -1
  77. package/dist/{service-account-control-BUPiFEGo.js → service-account-control-CzPgo-Iy.js} +9 -9
  78. package/dist/{service-account-control-BUPiFEGo.js.map → service-account-control-CzPgo-Iy.js.map} +1 -1
  79. package/dist/{service-control-capabilities-PMvSlaJj.js → service-control-capabilities-C5hd37o9.js} +3 -3
  80. package/dist/{service-control-capabilities-PMvSlaJj.js.map → service-control-capabilities-C5hd37o9.js.map} +1 -1
  81. package/dist/{service-control-capabilities-D-Nhqqgo.js → service-control-capabilities-CcwdbQf3.js} +1 -1
  82. package/dist/{state-C_iJAzKh.js → state-Fskb-utn.js} +2 -2
  83. package/dist/{state-C_iJAzKh.js.map → state-Fskb-utn.js.map} +1 -1
  84. package/dist/{updates-api-s2-QB929.js → updates-api-JM7f1ZDQ.js} +43 -146
  85. package/dist/updates-api-JM7f1ZDQ.js.map +1 -0
  86. package/dist/{upgrade-JmhCNmvs.js → upgrade-CDW-7zvb.js} +8 -8
  87. package/dist/{upgrade-JmhCNmvs.js.map → upgrade-CDW-7zvb.js.map} +1 -1
  88. package/dist/upgrade-r6W5TzOo.js +4 -0
  89. package/package.json +11 -11
  90. package/skills/openmeld-cli/SKILL.md +2 -0
  91. package/skills/openmeld-cli/playbooks/computer.md +55 -0
  92. package/skills/openmeld-cli/playbooks/plugins.md +37 -0
  93. package/dist/auth-session-DUYOBXO3.js +0 -4
  94. package/dist/daemon-service-update-coordinator-D0-15tZW.js.map +0 -1
  95. package/dist/dispatch-owned-runtime-gOluDX5_.js.map +0 -1
  96. package/dist/dist-DMlKqjUf.js +0 -4
  97. package/dist/dist-KibLweLD.js.map +0 -1
  98. package/dist/open-code-permission-DHFJYc_o.js.map +0 -1
  99. package/dist/openmeld-DUdN78WD.js.map +0 -1
  100. package/dist/prepare-provider-runtime-_XRIioDp.js.map +0 -1
  101. package/dist/runtime-transport-BzCp9hM3.js.map +0 -1
  102. package/dist/service-BEH6-P8U.js.map +0 -1
  103. package/dist/updates-api-s2-QB929.js.map +0 -1
  104. package/dist/upgrade-Dikfgr8z.js +0 -4
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { T as runtimeTransportLeaseSchema, a as daemonStreamFrameSchema, s as localWakeRouteWorkingFolderObservationSchema } from "./runtime-transport-BzCp9hM3.js";
3
+ import { T as runtimeTransportLeaseSchema, a as daemonStreamFrameSchema, s as localWakeRouteWorkingFolderObservationSchema } from "./runtime-transport-DFBYm5Re.js";
4
4
  import { a as openMeldDaemonCancelRequestPayloadSchema, b as skippedDaemonProfileSchema, c as openMeldDaemonConversationExecutionStatusPayloadSchema, d as openMeldDaemonInterruptRequestPayloadSchema, h as openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema, i as openMeldDaemonCancelPayloadSchema, l as openMeldDaemonConversationExecutionStatusRequestPayloadSchema, m as openMeldDaemonSetLocalAgentEnabledPayloadSchema, u as openMeldDaemonInterruptPayloadSchema, x as providerDispatchRuntimeContextSchema } from "./control-plane-B93wmVS6.js";
5
5
  import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
6
- import { B as cachedDaemonRouteConfigSchema, U as agentExecutionSteerResponseSchema } from "./daemon-device-id-C3gKch4E.js";
6
+ import { B as cachedDaemonRouteConfigSchema, U as agentExecutionSteerResponseSchema } from "./daemon-device-id-CmykIapy.js";
7
7
  import { randomUUID } from "node:crypto";
8
8
  import * as z$1 from "zod/v4";
9
9
  //#region ../../packages/schemas/dist/local-execution-input.js
@@ -611,4 +611,4 @@ function serveExecutionHost(input) {
611
611
  //#endregion
612
612
  export { serviceExecutionHostCatalogSchema as a, serviceExecutionHostSnapshotSchema as c, localExecutionInputResponseSchema as d, SERVICE_EXECUTION_HOST_PROTOCOL as i, LOCAL_EXECUTION_INPUT_CAPABILITY_HEADER as l, createExecutionHostClient as n, serviceExecutionHostMethods as o, serveExecutionHost as r, serviceExecutionHostOwnerSchema as s, ExecutionHostError as t, localExecutionInputFrameSchema as u };
613
613
 
614
- //# sourceMappingURL=channel-C6tm9T7P.js.map
614
+ //# sourceMappingURL=channel-40SR2b5S.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"channel-C6tm9T7P.js","names":[],"sources":["../../../packages/schemas/dist/local-execution-input.js","../../../packages/schemas/dist/service-execution-host.js","../src/local-service/execution-host/channel.ts"],"sourcesContent":["import { agentExecutionSteerResponseSchema } from \"./schemas/runtime/agent-execution-steer.js\";\nimport * as z$1 from \"zod/v4\";\n//#region src/local-execution-input.ts\nconst id = z$1.string().min(1).max(1024);\nconst LOCAL_EXECUTION_INPUT_CAPABILITY_HEADER = \"x-openmeld-local-execution-input\";\nconst localExecutionInputRequestSchema = z$1.strictObject({\n\tinputId: id,\n\townerUserId: id,\n\tdispatchId: id,\n\truntimeCoordinatorExecutionId: id,\n\tattemptId: id,\n\truntimeCoordinatorRunId: id,\n\ttargetProfileId: id,\n\tsource: z$1.strictObject({\n\t\tspaceId: id,\n\t\tsignalId: id,\n\t\tauthorProfileId: id,\n\t\trequesterUserId: id,\n\t\teffect: z$1.literal(\"steer\")\n\t}),\n\ttext: z$1.string().trim().min(1).max(1e5)\n});\nconst localExecutionInputResponseSchema = z$1.discriminatedUnion(\"status\", [\n\tagentExecutionSteerResponseSchema.options[0].extend({ inputId: id }),\n\tagentExecutionSteerResponseSchema.options[1].extend({\n\t\tinputId: id,\n\t\ttaskId: id.nullable()\n\t}),\n\tagentExecutionSteerResponseSchema.options[2].extend({ inputId: id }),\n\tz$1.strictObject({\n\t\tinputId: id,\n\t\tstatus: z$1.enum([\n\t\t\t\"not_found\",\n\t\t\t\"conflict\",\n\t\t\t\"capacity\"\n\t\t])\n\t})\n]);\nconst localExecutionInputOperationSchema = z$1.strictObject({\n\toperation: z$1.enum([\"apply\", \"read\"]),\n\trequest: localExecutionInputRequestSchema\n});\nconst localExecutionInputFrameSchema = localExecutionInputOperationSchema.extend({\n\trequestId: id,\n\tconnectionGeneration: z$1.number().int().positive(),\n\tleaseEpoch: z$1.number().int().positive()\n});\nconst localExecutionInputResultFrameSchema = z$1.strictObject({\n\trequestId: id,\n\tresult: localExecutionInputResponseSchema\n});\nconst localExecutionInputResolveSchema = z$1.strictObject({\n\townerUserId: id,\n\truntimeCoordinatorExecutionId: id,\n\tdispatchId: id,\n\ttargetProfileId: id,\n\tspaceId: id,\n\tauthorProfileId: id\n});\nconst localExecutionInputBindingSchema = localExecutionInputRequestSchema.pick({\n\townerUserId: true,\n\truntimeCoordinatorExecutionId: true,\n\tdispatchId: true,\n\ttargetProfileId: true,\n\tattemptId: true,\n\truntimeCoordinatorRunId: true\n});\n//#endregion\nexport { LOCAL_EXECUTION_INPUT_CAPABILITY_HEADER, localExecutionInputBindingSchema, localExecutionInputFrameSchema, localExecutionInputOperationSchema, localExecutionInputRequestSchema, localExecutionInputResolveSchema, localExecutionInputResponseSchema, localExecutionInputResultFrameSchema };\n\n//# sourceMappingURL=local-execution-input.js.map","import { daemonServiceLaneSchema } from \"./schemas/daemon/service-contract.js\";\nimport { providerDispatchRuntimeContextSchema } from \"./schemas/daemon/provider-runtime-context.js\";\nimport { openMeldDaemonCancelPayloadSchema, openMeldDaemonCancelRequestPayloadSchema, openMeldDaemonConversationExecutionStatusPayloadSchema, openMeldDaemonConversationExecutionStatusRequestPayloadSchema, openMeldDaemonInterruptPayloadSchema, openMeldDaemonInterruptRequestPayloadSchema, openMeldDaemonSetLocalAgentEnabledPayloadSchema, openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema, skippedDaemonProfileSchema } from \"./schemas/daemon/control-plane.js\";\nimport { daemonStreamFrameSchema, localWakeRouteWorkingFolderObservationSchema, runtimeTransportLeaseSchema } from \"./schemas/daemon/runtime-transport.js\";\nimport { localExecutionInputRequestSchema, localExecutionInputResponseSchema } from \"./local-execution-input.js\";\nimport { cachedDaemonRouteConfigSchema } from \"./schemas/daemon/route-catalog-cache.js\";\nimport * as z$1 from \"zod/v4\";\n//#region src/service-execution-host.ts\nconst SERVICE_EXECUTION_HOST_PROTOCOL = \"service-execution-host-v1\";\nconst SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES = 8 * 1024 * 1024;\nconst SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS = 64;\nconst identityString = z$1.string().min(1).max(1024);\nconst count = z$1.number().int().nonnegative();\nconst empty = z$1.strictObject({});\nconst serviceExecutionHostIdentitySchema = z$1.strictObject({\n\townerUserId: identityString,\n\tdeviceId: identityString,\n\tlane: daemonServiceLaneSchema,\n\tdaemonSessionId: identityString,\n\tserviceContractGeneration: count,\n\tsessionIdentity: identityString,\n\tstateRoot: z$1.string().min(1).max(4096),\n\tauthBaseUrl: z$1.url(),\n\tgatewayBaseUrl: z$1.url(),\n\tparentPid: z$1.number().int().positive(),\n\tparentProcessStartedAt: identityString\n});\nconst serviceExecutionHostSnapshotSchema = z$1.strictObject({\n\tpid: z$1.number().int().positive(),\n\tadmission: z$1.enum([\"open\", \"draining\"]),\n\tactiveCount: count,\n\tpendingCount: count,\n\tlocalQuiescent: z$1.boolean(),\n\tunacknowledgedResultCount: count,\n\tstartupReplayPending: z$1.boolean(),\n\tadapterIds: z$1.array(identityString).max(256)\n});\nconst serviceExecutionHostOwnerV1Schema = z$1.strictObject({\n\tschema: z$1.literal(\"service-execution-host-owner-v1\"),\n\thostInstanceId: z$1.uuid(),\n\townerUserId: identityString,\n\tdeviceId: identityString,\n\tlane: daemonServiceLaneSchema,\n\tpid: z$1.number().int().positive(),\n\tbootIdentity: identityString.nullable(),\n\tlocalQuiescent: z$1.boolean()\n});\nconst serviceExecutionHostOwnedProcessTreeSchema = z$1.strictObject({\n\tpid: z$1.number().int().positive(),\n\tprocessStartedAt: identityString,\n\tsignalTarget: z$1.enum([\"process\", \"process_group\"])\n});\nconst serviceExecutionHostOwnerV2Schema = z$1.strictObject({\n\tschema: z$1.literal(\"service-execution-host-owner-v2\"),\n\thostInstanceId: z$1.uuid(),\n\townerUserId: identityString,\n\tdeviceId: identityString,\n\tlane: daemonServiceLaneSchema,\n\tpid: z$1.number().int().positive(),\n\tprocessStartedAt: identityString,\n\tbootIdentity: identityString.nullable(),\n\tlocalQuiescent: z$1.boolean(),\n\tprocessEvidenceComplete: z$1.boolean(),\n\townedProcessTrees: z$1.array(serviceExecutionHostOwnedProcessTreeSchema).max(64)\n});\nconst serviceExecutionHostOwnerSchema = z$1.discriminatedUnion(\"schema\", [serviceExecutionHostOwnerV1Schema, serviceExecutionHostOwnerV2Schema]);\nconst profileWorkingFolderFactSchema = z$1.strictObject({\n\tdefaultProjectId: identityString.nullable(),\n\tlocalProjectBindingGeneration: identityString.nullable(),\n\tobservedAtMs: count,\n\treasonCode: z$1.enum([\n\t\t\"profile.workspace.invalid\",\n\t\t\"profile.workspace.missing\",\n\t\t\"project.local_connection.folder_missing\",\n\t\t\"project.local_connection.invalid\",\n\t\t\"project.local_connection.missing\"\n\t]).nullable(),\n\tsource: z$1.enum([\"default_project\", \"profile_workspace\"]),\n\tstatus: z$1.enum([\n\t\t\"invalid\",\n\t\t\"missing\",\n\t\t\"ready\"\n\t])\n});\nconst readyWorkingFolder = {\n\tconfiguredWorkspacePath: z$1.string().min(1),\n\teffectiveRuntimeWorkingDirectory: z$1.string().min(1),\n\truntimeContext: providerDispatchRuntimeContextSchema,\n\tstatus: z$1.literal(\"ready\"),\n\tworkingFolderFact: profileWorkingFolderFactSchema\n};\nconst serviceExecutionHostRouteSchema = cachedDaemonRouteConfigSchema.extend({\n\tagentControllerConversationId: identityString.nullable().optional(),\n\tworkingFolderRuntime: z$1.discriminatedUnion(\"workingFolderSource\", [z$1.strictObject({\n\t\t...readyWorkingFolder,\n\t\tconfigPath: z$1.string().min(1),\n\t\tworkspaceMode: z$1.enum([\"openmeld_managed\", \"custom\"]),\n\t\tworkingFolderSource: z$1.literal(\"profile_workspace\")\n\t}), z$1.strictObject({\n\t\t...readyWorkingFolder,\n\t\tconfigPath: z$1.null(),\n\t\tworkspaceMode: z$1.null(),\n\t\tdefaultProjectId: identityString,\n\t\tdefaultProjectBindingGeneration: identityString,\n\t\tworkingFolderSource: z$1.literal(\"default_project\")\n\t})]).optional()\n});\nconst serviceExecutionHostCatalogSchema = z$1.strictObject({\n\trevision: z$1.number().int().positive(),\n\texpectedRoutesContractVersion: z$1.literal(\"v4\").optional(),\n\tprofileIds: z$1.array(identityString).max(1e4),\n\troutes: z$1.array(serviceExecutionHostRouteSchema).max(1e4),\n\tskippedProfiles: z$1.array(skippedDaemonProfileSchema).max(1e4),\n\tworkingFolderExpectedProfileIds: z$1.array(identityString).max(1e4).optional(),\n\tworkingFolderObservations: z$1.array(localWakeRouteWorkingFolderObservationSchema).max(1e4).optional()\n}).superRefine((catalog, context) => {\n\tconst ids = new Set(catalog.profileIds);\n\tconst routes = new Set(catalog.routes.map((route) => route.profileId));\n\tif (ids.size !== catalog.profileIds.length || routes.size !== catalog.routes.length || ids.size !== routes.size || catalog.profileIds.some((id) => !routes.has(id))) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Host catalog must contain exactly one route per profile.\"\n\t});\n});\nconst reportResult = z$1.strictObject({\n\tstatus: z$1.enum([\"skipped\", \"submitted\"]),\n\treasonCodes: z$1.array(z$1.string().max(256)).max(1024),\n\tsubmittedCount: count,\n\tfailedCount: count\n});\nconst executionFrameCodes = /* @__PURE__ */ new Set([\n\t\"daemon.dispatch.deliver\",\n\t\"daemon.dispatch.lifecycle_acknowledged\",\n\t\"daemon.dispatch.accepted\",\n\t\"daemon.dispatch.interaction_response\",\n\t\"daemon.reasoning.preferences\",\n\t\"daemon.local_agent_control.cancel\",\n\t\"daemon.local_agent_control.interrupt\",\n\t\"daemon.local_agent_control.fork_session\",\n\t\"daemon.local_agent_control.manage_installation\",\n\t\"daemon.local_agent_control.set_enabled\",\n\t\"daemon.execution_recovery.resume_controller_conversation\"\n]);\nconst executionOutputFrameCodes = /* @__PURE__ */ new Set([\n\t\"daemon.dispatch.result\",\n\t\"daemon.dispatch.lifecycle\",\n\t\"daemon.dispatch.runtime_evidence\",\n\t\"daemon.dispatch.reasoning\",\n\t\"daemon.dispatch.progress\",\n\t\"daemon.dispatch.tool_activity\",\n\t\"daemon.dispatch.interaction_request\",\n\t\"daemon.dispatch.interaction_delivered\",\n\t\"daemon.dispatch.preview\",\n\t\"daemon.dispatch.preview_end\",\n\t\"daemon.local_agent_control.result\",\n\t\"daemon.execution_recovery.resume_controller_conversation_result\"\n]);\nconst serviceExecutionHostMethods = {\n\tinitialize: {\n\t\tinput: serviceExecutionHostIdentitySchema,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\thealth: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tloadCatalog: {\n\t\tinput: z$1.strictObject({ initial: z$1.boolean() }),\n\t\toutput: serviceExecutionHostCatalogSchema\n\t},\n\tconfigureConnection: {\n\t\tinput: z$1.strictObject({\n\t\t\texecutionAdmissionConfirmation: z$1.boolean().optional(),\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tcatalogRevision: count,\n\t\t\tleases: z$1.array(runtimeTransportLeaseSchema).max(1e4)\n\t\t}),\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tdetachConnection: {\n\t\tinput: z$1.strictObject({ connectionGeneration: z$1.number().int().positive() }),\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\theartbeat: {\n\t\tinput: z$1.strictObject({\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tstaleProfileIds: z$1.array(identityString).max(1e4)\n\t\t}),\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\thandleFrame: {\n\t\tinput: z$1.strictObject({\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tframe: daemonStreamFrameSchema.refine((frame) => executionFrameCodes.has(frame.code), \"This frame belongs to the connector, not the execution host.\")\n\t\t}),\n\t\toutput: empty\n\t},\n\tcancel: {\n\t\tinput: openMeldDaemonCancelRequestPayloadSchema,\n\t\toutput: openMeldDaemonCancelPayloadSchema\n\t},\n\tinterrupt: {\n\t\tinput: openMeldDaemonInterruptRequestPayloadSchema,\n\t\toutput: openMeldDaemonInterruptPayloadSchema\n\t},\n\texecutionInput: {\n\t\tinput: z$1.strictObject({\n\t\t\toperation: z$1.enum([\"apply\", \"read\"]),\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tleaseEpoch: z$1.number().int().positive(),\n\t\t\trequest: localExecutionInputRequestSchema\n\t\t}),\n\t\toutput: localExecutionInputResponseSchema\n\t},\n\tconversationStatus: {\n\t\tinput: openMeldDaemonConversationExecutionStatusRequestPayloadSchema,\n\t\toutput: openMeldDaemonConversationExecutionStatusPayloadSchema\n\t},\n\tsetEnabled: {\n\t\tinput: openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema,\n\t\toutput: openMeldDaemonSetLocalAgentEnabledPayloadSchema\n\t},\n\treportControllers: {\n\t\tinput: z$1.strictObject({ probePolicy: z$1.enum([\"background\", \"fresh\"]) }),\n\t\toutput: reportResult.extend({\n\t\t\treportCount: count,\n\t\t\thasArmedReprobe: z$1.boolean()\n\t\t})\n\t},\n\treportConversations: {\n\t\tinput: empty,\n\t\toutput: reportResult.extend({ proofCount: count })\n\t},\n\tpersistCatalog: {\n\t\tinput: z$1.strictObject({ revision: z$1.number().int().positive() }),\n\t\toutput: empty\n\t},\n\tsyncActivity: {\n\t\tinput: z$1.strictObject({ refreshIntegrations: z$1.boolean().optional() }),\n\t\toutput: empty\n\t},\n\tbeginDrain: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tdrain: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tsettleResults: {\n\t\tinput: empty,\n\t\toutput: z$1.strictObject({ status: z$1.enum([\n\t\t\t\"acknowledged\",\n\t\t\t\"connection_closed\",\n\t\t\t\"timeout\"\n\t\t]) })\n\t},\n\tstop: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t}\n};\nconst method = z$1.enum(Object.keys(serviceExecutionHostMethods));\nconst envelope = {\n\tprotocol: z$1.literal(SERVICE_EXECUTION_HOST_PROTOCOL),\n\thostInstanceId: z$1.uuid()\n};\nconst serviceExecutionHostRequestSchema = z$1.strictObject({\n\t...envelope,\n\trequestId: z$1.uuid(),\n\tmethod,\n\tpayload: z$1.unknown()\n});\nconst serviceExecutionHostMessageSchema = z$1.discriminatedUnion(\"type\", [\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"reply\"),\n\t\trequestId: z$1.uuid(),\n\t\tmethod,\n\t\tresult: z$1.discriminatedUnion(\"ok\", [z$1.strictObject({\n\t\t\tok: z$1.literal(true),\n\t\t\tpayload: z$1.unknown()\n\t\t}), z$1.strictObject({\n\t\t\tok: z$1.literal(false),\n\t\t\terror: z$1.strictObject({\n\t\t\t\tcode: z$1.string().min(1).max(256),\n\t\t\t\tmessage: z$1.string().min(1).max(4096)\n\t\t\t})\n\t\t})])\n\t}),\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"frame\"),\n\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\tframe: daemonStreamFrameSchema.refine((frame) => executionOutputFrameCodes.has(frame.code), \"The execution host cannot emit connector-owned frames.\")\n\t}),\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"invalidate\"),\n\t\tscope: z$1.enum([\n\t\t\t\"routes\",\n\t\t\t\"activity\",\n\t\t\t\"execution\"\n\t\t])\n\t}),\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"authentication_failure\"),\n\t\tconnectionGeneration: z$1.number().int().positive().nullable(),\n\t\tfailure: z$1.strictObject({\n\t\t\tcredentialFingerprint: z$1.string().min(1).max(256).optional(),\n\t\t\tmessage: z$1.string().min(1).max(4096),\n\t\t\treasonCode: z$1.string().min(1).max(256)\n\t\t})\n\t})\n]);\n//#endregion\nexport { SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES, SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS, SERVICE_EXECUTION_HOST_PROTOCOL, profileWorkingFolderFactSchema, serviceExecutionHostCatalogSchema, serviceExecutionHostIdentitySchema, serviceExecutionHostMessageSchema, serviceExecutionHostMethods, serviceExecutionHostOwnerSchema, serviceExecutionHostRequestSchema, serviceExecutionHostRouteSchema, serviceExecutionHostSnapshotSchema };\n\n//# sourceMappingURL=service-execution-host.js.map","import { randomUUID } from \"node:crypto\";\nimport {\n SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES,\n SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS,\n SERVICE_EXECUTION_HOST_PROTOCOL,\n type ServiceExecutionHostArguments,\n type ServiceExecutionHostInput,\n type ServiceExecutionHostMessage,\n type ServiceExecutionHostMethod,\n type ServiceExecutionHostOutput,\n serviceExecutionHostMessageSchema,\n serviceExecutionHostMethods,\n serviceExecutionHostRequestSchema,\n} from \"@openmeld/schemas\";\n\nexport type ExecutionHostChannel = {\n connected(): boolean;\n send(message: object, completed: (error: Error | null) => void): void;\n onMessage(listener: (message: unknown) => void): () => void;\n onDisconnect(listener: (error?: Error) => void): () => void;\n};\n\nexport class ExecutionHostError extends Error {\n readonly code: string;\n\n constructor(code: string, message: string) {\n super(message);\n this.name = \"ExecutionHostError\";\n this.code = code;\n }\n}\n\nconst RESERVED_CONTROL_REQUESTS = 4;\nconst controlMethods = new Set<ServiceExecutionHostMethod>([\n \"health\",\n \"beginDrain\",\n \"detachConnection\",\n \"stop\",\n]);\n\nfunction assertFrameSize(message: unknown): number {\n const serialized = JSON.stringify(message);\n if (serialized === undefined) {\n throw new ExecutionHostError(\n \"host.invalid_frame\",\n \"Host IPC requires JSON.\"\n );\n }\n const size = Buffer.byteLength(serialized);\n if (size > SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES) {\n throw new ExecutionHostError(\n \"host.frame_too_large\",\n \"The local execution message exceeds the IPC limit.\"\n );\n }\n return size;\n}\n\nfunction createSender(channel: ExecutionHostChannel) {\n let queuedBytes = 0;\n return (message: object, completed: (error: Error | null) => void): void => {\n const size = assertFrameSize(message);\n if (!channel.connected()) {\n throw new ExecutionHostError(\n \"host.disconnected\",\n \"The Host IPC channel is closed.\"\n );\n }\n if (queuedBytes + size > SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES * 2) {\n throw new ExecutionHostError(\n \"host.backpressure\",\n \"Host IPC is full; no new message was queued.\"\n );\n }\n queuedBytes += size;\n let settled = false;\n const settle = (error: Error | null) => {\n if (settled) {\n return;\n }\n settled = true;\n queuedBytes -= size;\n completed(error);\n };\n try {\n channel.send(message, settle);\n } catch (error) {\n settle(error instanceof Error ? error : new Error(String(error)));\n }\n };\n}\n\ntype PendingRequest = {\n method: ServiceExecutionHostMethod;\n resolve(value: unknown): void;\n reject(error: Error): void;\n timer: ReturnType<typeof setTimeout> | null;\n};\n\nfunction resolveReply(\n request: PendingRequest,\n message: Extract<ServiceExecutionHostMessage, { type: \"reply\" }>\n): void {\n if (!message.result.ok) {\n request.reject(\n new ExecutionHostError(\n message.result.error.code,\n message.result.error.message\n )\n );\n return;\n }\n const result = serviceExecutionHostMethods[request.method].output.safeParse(\n message.result.payload\n );\n if (!result.success) {\n const error = new ExecutionHostError(\n \"host.invalid_response\",\n `Invalid ${request.method} response from the execution host.`\n );\n request.reject(error);\n throw error;\n }\n request.resolve(result.data);\n}\n\nexport function createExecutionHostClient(input: {\n channel: ExecutionHostChannel;\n hostInstanceId: string;\n onEvent?(\n event: Exclude<ServiceExecutionHostMessage, { type: \"reply\" }>\n ): void;\n onFailure?(error: Error): void;\n}) {\n const pending = new Map<string, PendingRequest>();\n const send = createSender(input.channel);\n let failure: Error | null = null;\n\n const fail = (error: Error) => {\n if (failure) {\n return;\n }\n failure = error;\n for (const request of pending.values()) {\n if (request.timer) {\n clearTimeout(request.timer);\n }\n request.reject(error);\n }\n pending.clear();\n input.onFailure?.(error);\n };\n\n const stopMessages = input.channel.onMessage((raw) => {\n if (failure) {\n return;\n }\n try {\n assertFrameSize(raw);\n const parsed = serviceExecutionHostMessageSchema.safeParse(raw);\n if (\n !parsed.success ||\n parsed.data.hostInstanceId !== input.hostInstanceId\n ) {\n throw new ExecutionHostError(\n \"host.invalid_response\",\n \"Host response does not match this process incarnation.\"\n );\n }\n const message = parsed.data;\n if (message.type !== \"reply\") {\n input.onEvent?.(message);\n return;\n }\n const request = pending.get(message.requestId);\n // A timed-out observer is gone, not the accepted operation. Do not retry it\n // or turn its late result into the outcome of a newer request.\n if (!request) {\n return;\n }\n if (request.method !== message.method) {\n throw new ExecutionHostError(\n \"host.invalid_response\",\n \"Host response method does not match its request.\"\n );\n }\n pending.delete(message.requestId);\n if (request.timer) {\n clearTimeout(request.timer);\n }\n resolveReply(request, message);\n } catch (error) {\n fail(error instanceof Error ? error : new Error(String(error)));\n }\n });\n const stopDisconnect = input.channel.onDisconnect((cause) => {\n fail(\n new ExecutionHostError(\n \"host.disconnected\",\n cause\n ? `The execution host disconnected: ${cause.message}. In-flight outcomes are unconfirmed.`\n : \"The execution host disconnected; in-flight outcomes are unconfirmed.\"\n )\n );\n });\n\n return {\n call<M extends ServiceExecutionHostMethod>(\n method: M,\n value: ServiceExecutionHostInput<M>,\n options: { timeoutMs?: number | null } = {}\n ): Promise<ServiceExecutionHostOutput<M>> {\n if (failure) {\n return Promise.reject(failure);\n }\n const limit =\n SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS -\n (controlMethods.has(method) ? 0 : RESERVED_CONTROL_REQUESTS);\n if (pending.size >= limit) {\n return Promise.reject(\n new ExecutionHostError(\n \"host.busy\",\n \"Too many outstanding Host requests; no new request was sent.\"\n )\n );\n }\n const payload =\n serviceExecutionHostMethods[method].input.safeParse(value);\n if (!payload.success) {\n return Promise.reject(\n new ExecutionHostError(\n \"host.invalid_request\",\n `Invalid ${method} request.`\n )\n );\n }\n const requestId = randomUUID();\n const timeoutMs =\n options.timeoutMs === undefined ? 30_000 : options.timeoutMs;\n if (\n timeoutMs !== null &&\n (!Number.isFinite(timeoutMs) || timeoutMs <= 0)\n ) {\n return Promise.reject(\n new ExecutionHostError(\n \"host.invalid_timeout\",\n \"The observer deadline must be positive or absent.\"\n )\n );\n }\n return new Promise<ServiceExecutionHostOutput<M>>((resolve, reject) => {\n const request: PendingRequest = {\n method,\n resolve: (result) => resolve(result as ServiceExecutionHostOutput<M>),\n reject,\n timer: null,\n };\n if (timeoutMs !== null) {\n request.timer = setTimeout(() => {\n pending.delete(requestId);\n reject(\n new ExecutionHostError(\n \"host.observation_timeout\",\n `The ${method} response is unconfirmed. No operation was cancelled or retried.`\n )\n );\n }, timeoutMs);\n request.timer.unref?.();\n }\n pending.set(requestId, request);\n try {\n send(\n {\n protocol: SERVICE_EXECUTION_HOST_PROTOCOL,\n hostInstanceId: input.hostInstanceId,\n requestId,\n method,\n payload: payload.data,\n },\n (error) => {\n if (error) {\n fail(error);\n }\n }\n );\n } catch (error) {\n pending.delete(requestId);\n if (request.timer) {\n clearTimeout(request.timer);\n }\n reject(error);\n }\n });\n },\n pendingCount: () => pending.size,\n dispose(): void {\n stopMessages();\n stopDisconnect();\n fail(\n new ExecutionHostError(\n \"host.observer_closed\",\n \"The Host observer closed; accepted work was not cancelled.\"\n )\n );\n },\n };\n}\n\nexport type ExecutionHostHandlers = {\n [M in ServiceExecutionHostMethod]: (\n input: ServiceExecutionHostArguments<M>\n ) => Promise<ServiceExecutionHostOutput<M>> | ServiceExecutionHostOutput<M>;\n};\n\nexport function serveExecutionHost(input: {\n channel: ExecutionHostChannel;\n hostInstanceId: string;\n handlers: ExecutionHostHandlers;\n onFailure(error: Error): void;\n onDisconnect(): void;\n}) {\n const activeIds = new Set<string>();\n const send = createSender(input.channel);\n let closed = false;\n\n const sendMessage = (message: ServiceExecutionHostMessage) => {\n if (closed) {\n throw new ExecutionHostError(\n \"host.disconnected\",\n \"The connector is no longer observing this Host.\"\n );\n }\n send(message, (error) => {\n if (error) {\n input.onFailure(error);\n }\n });\n };\n\n const stopMessages = input.channel.onMessage((raw) => {\n if (closed) {\n return;\n }\n let request: ReturnType<typeof serviceExecutionHostRequestSchema.parse>;\n try {\n assertFrameSize(raw);\n const parsed = serviceExecutionHostRequestSchema.safeParse(raw);\n if (\n !parsed.success ||\n parsed.data.hostInstanceId !== input.hostInstanceId\n ) {\n throw new ExecutionHostError(\n \"host.invalid_request\",\n \"Host request does not match this process incarnation.\"\n );\n }\n request = parsed.data;\n } catch (error) {\n input.onFailure(\n error instanceof Error ? error : new Error(String(error))\n );\n return;\n }\n\n const respond = (\n result: Extract<ServiceExecutionHostMessage, { type: \"reply\" }>[\"result\"]\n ) => {\n if (!closed) {\n sendMessage({\n protocol: SERVICE_EXECUTION_HOST_PROTOCOL,\n hostInstanceId: input.hostInstanceId,\n type: \"reply\",\n requestId: request.requestId,\n method: request.method,\n result,\n });\n }\n };\n const reject = (error: unknown) => {\n try {\n respond({\n ok: false,\n error: {\n code:\n error instanceof ExecutionHostError\n ? error.code\n : \"host.operation_failed\",\n message:\n (error instanceof Error ? error.message : String(error)).slice(\n 0,\n 4096\n ) || \"Host operation failed.\",\n },\n });\n } catch (sendError) {\n input.onFailure(\n sendError instanceof Error ? sendError : new Error(String(sendError))\n );\n }\n };\n\n const limit =\n SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS -\n (controlMethods.has(request.method) ? 0 : RESERVED_CONTROL_REQUESTS);\n if (activeIds.has(request.requestId) || activeIds.size >= limit) {\n reject(\n new ExecutionHostError(\n \"host.busy\",\n \"Host request is duplicate or capacity is exhausted; it was not admitted again.\"\n )\n );\n return;\n }\n const method = serviceExecutionHostMethods[request.method];\n const payload = method.input.safeParse(request.payload);\n if (!payload.success) {\n reject(\n new ExecutionHostError(\n \"host.invalid_request\",\n `Invalid ${request.method} payload.`\n )\n );\n return;\n }\n activeIds.add(request.requestId);\n // This cast connects the fixed schema table to its corresponding handler.\n // Both request and response are runtime-validated, including local callers.\n const handler = input.handlers[request.method] as (\n value: unknown\n ) => unknown;\n Promise.resolve()\n .then(() => handler(payload.data))\n .then((result) => {\n const parsed = method.output.safeParse(result);\n if (!parsed.success) {\n throw new ExecutionHostError(\n \"host.invalid_response\",\n `The ${request.method} owner returned an invalid response.`\n );\n }\n respond({ ok: true, payload: parsed.data });\n })\n .catch(reject)\n .finally(() => activeIds.delete(request.requestId));\n });\n const stopDisconnect = input.channel.onDisconnect(() => {\n if (closed) {\n return;\n }\n closed = true;\n input.onDisconnect();\n });\n return {\n emit(event: Exclude<ServiceExecutionHostMessage, { type: \"reply\" }>): void {\n const parsed = serviceExecutionHostMessageSchema.safeParse(event);\n if (!parsed.success || event.hostInstanceId !== input.hostInstanceId) {\n throw new ExecutionHostError(\n \"host.invalid_event\",\n \"Invalid execution-host event.\"\n );\n }\n sendMessage(parsed.data);\n },\n dispose(): void {\n closed = true;\n stopMessages();\n stopDisconnect();\n },\n };\n}\n"],"mappings":";;;;;;;;;AAGA,MAAM,KAAK,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI;AACvC,MAAM,0CAA0C;AAChD,MAAM,mCAAmC,IAAI,aAAa;CACzD,SAAS;CACT,aAAa;CACb,YAAY;CACZ,+BAA+B;CAC/B,WAAW;CACX,yBAAyB;CACzB,iBAAiB;CACjB,QAAQ,IAAI,aAAa;EACxB,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,iBAAiB;EACjB,QAAQ,IAAI,QAAQ,OAAO;CAC5B,CAAC;CACD,MAAM,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AACzC,CAAC;AACD,MAAM,oCAAoC,IAAI,mBAAmB,UAAU;CAC1E,kCAAkC,QAAQ,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,CAAC;CACnE,kCAAkC,QAAQ,EAAE,CAAC,OAAO;EACnD,SAAS;EACT,QAAQ,GAAG,SAAS;CACrB,CAAC;CACD,kCAAkC,QAAQ,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,CAAC;CACnE,IAAI,aAAa;EAChB,SAAS;EACT,QAAQ,IAAI,KAAK;GAChB;GACA;GACA;EACD,CAAC;CACF,CAAC;AACF,CAAC;AAKD,MAAM,iCAJqC,IAAI,aAAa;CAC3D,WAAW,IAAI,KAAK,CAAC,SAAS,MAAM,CAAC;CACrC,SAAS;AACV,CACuC,CAAA,CAAmC,OAAO;CAChF,WAAW;CACX,sBAAsB,IAAI,OAAO,CAAC,CAAC,IAAI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B;EACtD,IAAI,QACF;EAEF,SAAS;EACT,MAAM,aAAa;CACrB,CAAC;CACD,OAAO;EACL,KAAK,OAAsE;GACzE,MAAM,SAAS,kCAAkC,UAAU,KAAK;GAChE,IAAI,CAAC,OAAO,WAAW,MAAM,mBAAmB,MAAM,gBACpD,MAAM,IAAI,mBACR,sBACA,+BACF;GAEF,YAAY,OAAO,IAAI;EACzB;EACA,UAAgB;GACd,SAAS;GACT,aAAa;GACb,eAAe;EACjB;CACF;AACF"}
1
+ {"version":3,"file":"channel-40SR2b5S.js","names":[],"sources":["../../../packages/schemas/dist/local-execution-input.js","../../../packages/schemas/dist/service-execution-host.js","../src/local-service/execution-host/channel.ts"],"sourcesContent":["import { agentExecutionSteerResponseSchema } from \"./schemas/runtime/agent-execution-steer.js\";\nimport * as z$1 from \"zod/v4\";\n//#region src/local-execution-input.ts\nconst id = z$1.string().min(1).max(1024);\nconst LOCAL_EXECUTION_INPUT_CAPABILITY_HEADER = \"x-openmeld-local-execution-input\";\nconst localExecutionInputRequestSchema = z$1.strictObject({\n\tinputId: id,\n\townerUserId: id,\n\tdispatchId: id,\n\truntimeCoordinatorExecutionId: id,\n\tattemptId: id,\n\truntimeCoordinatorRunId: id,\n\ttargetProfileId: id,\n\tsource: z$1.strictObject({\n\t\tspaceId: id,\n\t\tsignalId: id,\n\t\tauthorProfileId: id,\n\t\trequesterUserId: id,\n\t\teffect: z$1.literal(\"steer\")\n\t}),\n\ttext: z$1.string().trim().min(1).max(1e5)\n});\nconst localExecutionInputResponseSchema = z$1.discriminatedUnion(\"status\", [\n\tagentExecutionSteerResponseSchema.options[0].extend({ inputId: id }),\n\tagentExecutionSteerResponseSchema.options[1].extend({\n\t\tinputId: id,\n\t\ttaskId: id.nullable()\n\t}),\n\tagentExecutionSteerResponseSchema.options[2].extend({ inputId: id }),\n\tz$1.strictObject({\n\t\tinputId: id,\n\t\tstatus: z$1.enum([\n\t\t\t\"not_found\",\n\t\t\t\"conflict\",\n\t\t\t\"capacity\"\n\t\t])\n\t})\n]);\nconst localExecutionInputOperationSchema = z$1.strictObject({\n\toperation: z$1.enum([\"apply\", \"read\"]),\n\trequest: localExecutionInputRequestSchema\n});\nconst localExecutionInputFrameSchema = localExecutionInputOperationSchema.extend({\n\trequestId: id,\n\tconnectionGeneration: z$1.number().int().positive(),\n\tleaseEpoch: z$1.number().int().positive()\n});\nconst localExecutionInputResultFrameSchema = z$1.strictObject({\n\trequestId: id,\n\tresult: localExecutionInputResponseSchema\n});\nconst localExecutionInputResolveSchema = z$1.strictObject({\n\townerUserId: id,\n\truntimeCoordinatorExecutionId: id,\n\tdispatchId: id,\n\ttargetProfileId: id,\n\tspaceId: id,\n\tauthorProfileId: id\n});\nconst localExecutionInputBindingSchema = localExecutionInputRequestSchema.pick({\n\townerUserId: true,\n\truntimeCoordinatorExecutionId: true,\n\tdispatchId: true,\n\ttargetProfileId: true,\n\tattemptId: true,\n\truntimeCoordinatorRunId: true\n});\n//#endregion\nexport { LOCAL_EXECUTION_INPUT_CAPABILITY_HEADER, localExecutionInputBindingSchema, localExecutionInputFrameSchema, localExecutionInputOperationSchema, localExecutionInputRequestSchema, localExecutionInputResolveSchema, localExecutionInputResponseSchema, localExecutionInputResultFrameSchema };\n\n//# sourceMappingURL=local-execution-input.js.map","import { daemonServiceLaneSchema } from \"./schemas/daemon/service-contract.js\";\nimport { providerDispatchRuntimeContextSchema } from \"./schemas/daemon/provider-runtime-context.js\";\nimport { openMeldDaemonCancelPayloadSchema, openMeldDaemonCancelRequestPayloadSchema, openMeldDaemonConversationExecutionStatusPayloadSchema, openMeldDaemonConversationExecutionStatusRequestPayloadSchema, openMeldDaemonInterruptPayloadSchema, openMeldDaemonInterruptRequestPayloadSchema, openMeldDaemonSetLocalAgentEnabledPayloadSchema, openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema, skippedDaemonProfileSchema } from \"./schemas/daemon/control-plane.js\";\nimport { daemonStreamFrameSchema, localWakeRouteWorkingFolderObservationSchema, runtimeTransportLeaseSchema } from \"./schemas/daemon/runtime-transport.js\";\nimport { localExecutionInputRequestSchema, localExecutionInputResponseSchema } from \"./local-execution-input.js\";\nimport { cachedDaemonRouteConfigSchema } from \"./schemas/daemon/route-catalog-cache.js\";\nimport * as z$1 from \"zod/v4\";\n//#region src/service-execution-host.ts\nconst SERVICE_EXECUTION_HOST_PROTOCOL = \"service-execution-host-v1\";\nconst SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES = 8 * 1024 * 1024;\nconst SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS = 64;\nconst identityString = z$1.string().min(1).max(1024);\nconst count = z$1.number().int().nonnegative();\nconst empty = z$1.strictObject({});\nconst serviceExecutionHostIdentitySchema = z$1.strictObject({\n\townerUserId: identityString,\n\tdeviceId: identityString,\n\tlane: daemonServiceLaneSchema,\n\tdaemonSessionId: identityString,\n\tserviceContractGeneration: count,\n\tsessionIdentity: identityString,\n\tstateRoot: z$1.string().min(1).max(4096),\n\tauthBaseUrl: z$1.url(),\n\tgatewayBaseUrl: z$1.url(),\n\tparentPid: z$1.number().int().positive(),\n\tparentProcessStartedAt: identityString\n});\nconst serviceExecutionHostSnapshotSchema = z$1.strictObject({\n\tpid: z$1.number().int().positive(),\n\tadmission: z$1.enum([\"open\", \"draining\"]),\n\tactiveCount: count,\n\tpendingCount: count,\n\tlocalQuiescent: z$1.boolean(),\n\tunacknowledgedResultCount: count,\n\tstartupReplayPending: z$1.boolean(),\n\tadapterIds: z$1.array(identityString).max(256)\n});\nconst serviceExecutionHostOwnerV1Schema = z$1.strictObject({\n\tschema: z$1.literal(\"service-execution-host-owner-v1\"),\n\thostInstanceId: z$1.uuid(),\n\townerUserId: identityString,\n\tdeviceId: identityString,\n\tlane: daemonServiceLaneSchema,\n\tpid: z$1.number().int().positive(),\n\tbootIdentity: identityString.nullable(),\n\tlocalQuiescent: z$1.boolean()\n});\nconst serviceExecutionHostOwnedProcessTreeSchema = z$1.strictObject({\n\tpid: z$1.number().int().positive(),\n\tprocessStartedAt: identityString,\n\tsignalTarget: z$1.enum([\"process\", \"process_group\"])\n});\nconst serviceExecutionHostOwnerV2Schema = z$1.strictObject({\n\tschema: z$1.literal(\"service-execution-host-owner-v2\"),\n\thostInstanceId: z$1.uuid(),\n\townerUserId: identityString,\n\tdeviceId: identityString,\n\tlane: daemonServiceLaneSchema,\n\tpid: z$1.number().int().positive(),\n\tprocessStartedAt: identityString,\n\tbootIdentity: identityString.nullable(),\n\tlocalQuiescent: z$1.boolean(),\n\tprocessEvidenceComplete: z$1.boolean(),\n\townedProcessTrees: z$1.array(serviceExecutionHostOwnedProcessTreeSchema).max(64)\n});\nconst serviceExecutionHostOwnerSchema = z$1.discriminatedUnion(\"schema\", [serviceExecutionHostOwnerV1Schema, serviceExecutionHostOwnerV2Schema]);\nconst profileWorkingFolderFactSchema = z$1.strictObject({\n\tdefaultProjectId: identityString.nullable(),\n\tlocalProjectBindingGeneration: identityString.nullable(),\n\tobservedAtMs: count,\n\treasonCode: z$1.enum([\n\t\t\"profile.workspace.invalid\",\n\t\t\"profile.workspace.missing\",\n\t\t\"project.local_connection.folder_missing\",\n\t\t\"project.local_connection.invalid\",\n\t\t\"project.local_connection.missing\"\n\t]).nullable(),\n\tsource: z$1.enum([\"default_project\", \"profile_workspace\"]),\n\tstatus: z$1.enum([\n\t\t\"invalid\",\n\t\t\"missing\",\n\t\t\"ready\"\n\t])\n});\nconst readyWorkingFolder = {\n\tconfiguredWorkspacePath: z$1.string().min(1),\n\teffectiveRuntimeWorkingDirectory: z$1.string().min(1),\n\truntimeContext: providerDispatchRuntimeContextSchema,\n\tstatus: z$1.literal(\"ready\"),\n\tworkingFolderFact: profileWorkingFolderFactSchema\n};\nconst serviceExecutionHostRouteSchema = cachedDaemonRouteConfigSchema.extend({\n\tagentControllerConversationId: identityString.nullable().optional(),\n\tworkingFolderRuntime: z$1.discriminatedUnion(\"workingFolderSource\", [z$1.strictObject({\n\t\t...readyWorkingFolder,\n\t\tconfigPath: z$1.string().min(1),\n\t\tworkspaceMode: z$1.enum([\"openmeld_managed\", \"custom\"]),\n\t\tworkingFolderSource: z$1.literal(\"profile_workspace\")\n\t}), z$1.strictObject({\n\t\t...readyWorkingFolder,\n\t\tconfigPath: z$1.null(),\n\t\tworkspaceMode: z$1.null(),\n\t\tdefaultProjectId: identityString,\n\t\tdefaultProjectBindingGeneration: identityString,\n\t\tworkingFolderSource: z$1.literal(\"default_project\")\n\t})]).optional()\n});\nconst serviceExecutionHostCatalogSchema = z$1.strictObject({\n\trevision: z$1.number().int().positive(),\n\texpectedRoutesContractVersion: z$1.literal(\"v4\").optional(),\n\tprofileIds: z$1.array(identityString).max(1e4),\n\troutes: z$1.array(serviceExecutionHostRouteSchema).max(1e4),\n\tskippedProfiles: z$1.array(skippedDaemonProfileSchema).max(1e4),\n\tworkingFolderExpectedProfileIds: z$1.array(identityString).max(1e4).optional(),\n\tworkingFolderObservations: z$1.array(localWakeRouteWorkingFolderObservationSchema).max(1e4).optional()\n}).superRefine((catalog, context) => {\n\tconst ids = new Set(catalog.profileIds);\n\tconst routes = new Set(catalog.routes.map((route) => route.profileId));\n\tif (ids.size !== catalog.profileIds.length || routes.size !== catalog.routes.length || ids.size !== routes.size || catalog.profileIds.some((id) => !routes.has(id))) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Host catalog must contain exactly one route per profile.\"\n\t});\n});\nconst reportResult = z$1.strictObject({\n\tstatus: z$1.enum([\"skipped\", \"submitted\"]),\n\treasonCodes: z$1.array(z$1.string().max(256)).max(1024),\n\tsubmittedCount: count,\n\tfailedCount: count\n});\nconst executionFrameCodes = /* @__PURE__ */ new Set([\n\t\"daemon.dispatch.deliver\",\n\t\"daemon.dispatch.lifecycle_acknowledged\",\n\t\"daemon.dispatch.accepted\",\n\t\"daemon.dispatch.interaction_response\",\n\t\"daemon.reasoning.preferences\",\n\t\"daemon.local_agent_control.cancel\",\n\t\"daemon.local_agent_control.interrupt\",\n\t\"daemon.local_agent_control.fork_session\",\n\t\"daemon.local_agent_control.manage_installation\",\n\t\"daemon.local_agent_control.set_enabled\",\n\t\"daemon.execution_recovery.resume_controller_conversation\"\n]);\nconst executionOutputFrameCodes = /* @__PURE__ */ new Set([\n\t\"daemon.dispatch.result\",\n\t\"daemon.dispatch.lifecycle\",\n\t\"daemon.dispatch.runtime_evidence\",\n\t\"daemon.dispatch.reasoning\",\n\t\"daemon.dispatch.progress\",\n\t\"daemon.dispatch.tool_activity\",\n\t\"daemon.dispatch.interaction_request\",\n\t\"daemon.dispatch.interaction_delivered\",\n\t\"daemon.dispatch.preview\",\n\t\"daemon.dispatch.preview_end\",\n\t\"daemon.local_agent_control.result\",\n\t\"daemon.execution_recovery.resume_controller_conversation_result\"\n]);\nconst serviceExecutionHostMethods = {\n\tinitialize: {\n\t\tinput: serviceExecutionHostIdentitySchema,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\thealth: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tloadCatalog: {\n\t\tinput: z$1.strictObject({ initial: z$1.boolean() }),\n\t\toutput: serviceExecutionHostCatalogSchema\n\t},\n\tconfigureConnection: {\n\t\tinput: z$1.strictObject({\n\t\t\texecutionAdmissionConfirmation: z$1.boolean().optional(),\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tcatalogRevision: count,\n\t\t\tleases: z$1.array(runtimeTransportLeaseSchema).max(1e4)\n\t\t}),\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tdetachConnection: {\n\t\tinput: z$1.strictObject({ connectionGeneration: z$1.number().int().positive() }),\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\theartbeat: {\n\t\tinput: z$1.strictObject({\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tstaleProfileIds: z$1.array(identityString).max(1e4)\n\t\t}),\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\thandleFrame: {\n\t\tinput: z$1.strictObject({\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tframe: daemonStreamFrameSchema.refine((frame) => executionFrameCodes.has(frame.code), \"This frame belongs to the connector, not the execution host.\")\n\t\t}),\n\t\toutput: empty\n\t},\n\tcancel: {\n\t\tinput: openMeldDaemonCancelRequestPayloadSchema,\n\t\toutput: openMeldDaemonCancelPayloadSchema\n\t},\n\tinterrupt: {\n\t\tinput: openMeldDaemonInterruptRequestPayloadSchema,\n\t\toutput: openMeldDaemonInterruptPayloadSchema\n\t},\n\texecutionInput: {\n\t\tinput: z$1.strictObject({\n\t\t\toperation: z$1.enum([\"apply\", \"read\"]),\n\t\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\t\tleaseEpoch: z$1.number().int().positive(),\n\t\t\trequest: localExecutionInputRequestSchema\n\t\t}),\n\t\toutput: localExecutionInputResponseSchema\n\t},\n\tconversationStatus: {\n\t\tinput: openMeldDaemonConversationExecutionStatusRequestPayloadSchema,\n\t\toutput: openMeldDaemonConversationExecutionStatusPayloadSchema\n\t},\n\tsetEnabled: {\n\t\tinput: openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema,\n\t\toutput: openMeldDaemonSetLocalAgentEnabledPayloadSchema\n\t},\n\treportControllers: {\n\t\tinput: z$1.strictObject({ probePolicy: z$1.enum([\"background\", \"fresh\"]) }),\n\t\toutput: reportResult.extend({\n\t\t\treportCount: count,\n\t\t\thasArmedReprobe: z$1.boolean()\n\t\t})\n\t},\n\treportConversations: {\n\t\tinput: empty,\n\t\toutput: reportResult.extend({ proofCount: count })\n\t},\n\tpersistCatalog: {\n\t\tinput: z$1.strictObject({ revision: z$1.number().int().positive() }),\n\t\toutput: empty\n\t},\n\tsyncActivity: {\n\t\tinput: z$1.strictObject({ refreshIntegrations: z$1.boolean().optional() }),\n\t\toutput: empty\n\t},\n\tbeginDrain: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tdrain: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t},\n\tsettleResults: {\n\t\tinput: empty,\n\t\toutput: z$1.strictObject({ status: z$1.enum([\n\t\t\t\"acknowledged\",\n\t\t\t\"connection_closed\",\n\t\t\t\"timeout\"\n\t\t]) })\n\t},\n\tstop: {\n\t\tinput: empty,\n\t\toutput: serviceExecutionHostSnapshotSchema\n\t}\n};\nconst method = z$1.enum(Object.keys(serviceExecutionHostMethods));\nconst envelope = {\n\tprotocol: z$1.literal(SERVICE_EXECUTION_HOST_PROTOCOL),\n\thostInstanceId: z$1.uuid()\n};\nconst serviceExecutionHostRequestSchema = z$1.strictObject({\n\t...envelope,\n\trequestId: z$1.uuid(),\n\tmethod,\n\tpayload: z$1.unknown()\n});\nconst serviceExecutionHostMessageSchema = z$1.discriminatedUnion(\"type\", [\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"reply\"),\n\t\trequestId: z$1.uuid(),\n\t\tmethod,\n\t\tresult: z$1.discriminatedUnion(\"ok\", [z$1.strictObject({\n\t\t\tok: z$1.literal(true),\n\t\t\tpayload: z$1.unknown()\n\t\t}), z$1.strictObject({\n\t\t\tok: z$1.literal(false),\n\t\t\terror: z$1.strictObject({\n\t\t\t\tcode: z$1.string().min(1).max(256),\n\t\t\t\tmessage: z$1.string().min(1).max(4096)\n\t\t\t})\n\t\t})])\n\t}),\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"frame\"),\n\t\tconnectionGeneration: z$1.number().int().positive(),\n\t\tframe: daemonStreamFrameSchema.refine((frame) => executionOutputFrameCodes.has(frame.code), \"The execution host cannot emit connector-owned frames.\")\n\t}),\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"invalidate\"),\n\t\tscope: z$1.enum([\n\t\t\t\"routes\",\n\t\t\t\"activity\",\n\t\t\t\"execution\"\n\t\t])\n\t}),\n\tz$1.strictObject({\n\t\t...envelope,\n\t\ttype: z$1.literal(\"authentication_failure\"),\n\t\tconnectionGeneration: z$1.number().int().positive().nullable(),\n\t\tfailure: z$1.strictObject({\n\t\t\tcredentialFingerprint: z$1.string().min(1).max(256).optional(),\n\t\t\tmessage: z$1.string().min(1).max(4096),\n\t\t\treasonCode: z$1.string().min(1).max(256)\n\t\t})\n\t})\n]);\n//#endregion\nexport { SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES, SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS, SERVICE_EXECUTION_HOST_PROTOCOL, profileWorkingFolderFactSchema, serviceExecutionHostCatalogSchema, serviceExecutionHostIdentitySchema, serviceExecutionHostMessageSchema, serviceExecutionHostMethods, serviceExecutionHostOwnerSchema, serviceExecutionHostRequestSchema, serviceExecutionHostRouteSchema, serviceExecutionHostSnapshotSchema };\n\n//# sourceMappingURL=service-execution-host.js.map","import { randomUUID } from \"node:crypto\";\nimport {\n SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES,\n SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS,\n SERVICE_EXECUTION_HOST_PROTOCOL,\n type ServiceExecutionHostArguments,\n type ServiceExecutionHostInput,\n type ServiceExecutionHostMessage,\n type ServiceExecutionHostMethod,\n type ServiceExecutionHostOutput,\n serviceExecutionHostMessageSchema,\n serviceExecutionHostMethods,\n serviceExecutionHostRequestSchema,\n} from \"@openmeld/schemas\";\n\nexport type ExecutionHostChannel = {\n connected(): boolean;\n send(message: object, completed: (error: Error | null) => void): void;\n onMessage(listener: (message: unknown) => void): () => void;\n onDisconnect(listener: (error?: Error) => void): () => void;\n};\n\nexport class ExecutionHostError extends Error {\n readonly code: string;\n\n constructor(code: string, message: string) {\n super(message);\n this.name = \"ExecutionHostError\";\n this.code = code;\n }\n}\n\nconst RESERVED_CONTROL_REQUESTS = 4;\nconst controlMethods = new Set<ServiceExecutionHostMethod>([\n \"health\",\n \"beginDrain\",\n \"detachConnection\",\n \"stop\",\n]);\n\nfunction assertFrameSize(message: unknown): number {\n const serialized = JSON.stringify(message);\n if (serialized === undefined) {\n throw new ExecutionHostError(\n \"host.invalid_frame\",\n \"Host IPC requires JSON.\"\n );\n }\n const size = Buffer.byteLength(serialized);\n if (size > SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES) {\n throw new ExecutionHostError(\n \"host.frame_too_large\",\n \"The local execution message exceeds the IPC limit.\"\n );\n }\n return size;\n}\n\nfunction createSender(channel: ExecutionHostChannel) {\n let queuedBytes = 0;\n return (message: object, completed: (error: Error | null) => void): void => {\n const size = assertFrameSize(message);\n if (!channel.connected()) {\n throw new ExecutionHostError(\n \"host.disconnected\",\n \"The Host IPC channel is closed.\"\n );\n }\n if (queuedBytes + size > SERVICE_EXECUTION_HOST_MAX_FRAME_BYTES * 2) {\n throw new ExecutionHostError(\n \"host.backpressure\",\n \"Host IPC is full; no new message was queued.\"\n );\n }\n queuedBytes += size;\n let settled = false;\n const settle = (error: Error | null) => {\n if (settled) {\n return;\n }\n settled = true;\n queuedBytes -= size;\n completed(error);\n };\n try {\n channel.send(message, settle);\n } catch (error) {\n settle(error instanceof Error ? error : new Error(String(error)));\n }\n };\n}\n\ntype PendingRequest = {\n method: ServiceExecutionHostMethod;\n resolve(value: unknown): void;\n reject(error: Error): void;\n timer: ReturnType<typeof setTimeout> | null;\n};\n\nfunction resolveReply(\n request: PendingRequest,\n message: Extract<ServiceExecutionHostMessage, { type: \"reply\" }>\n): void {\n if (!message.result.ok) {\n request.reject(\n new ExecutionHostError(\n message.result.error.code,\n message.result.error.message\n )\n );\n return;\n }\n const result = serviceExecutionHostMethods[request.method].output.safeParse(\n message.result.payload\n );\n if (!result.success) {\n const error = new ExecutionHostError(\n \"host.invalid_response\",\n `Invalid ${request.method} response from the execution host.`\n );\n request.reject(error);\n throw error;\n }\n request.resolve(result.data);\n}\n\nexport function createExecutionHostClient(input: {\n channel: ExecutionHostChannel;\n hostInstanceId: string;\n onEvent?(\n event: Exclude<ServiceExecutionHostMessage, { type: \"reply\" }>\n ): void;\n onFailure?(error: Error): void;\n}) {\n const pending = new Map<string, PendingRequest>();\n const send = createSender(input.channel);\n let failure: Error | null = null;\n\n const fail = (error: Error) => {\n if (failure) {\n return;\n }\n failure = error;\n for (const request of pending.values()) {\n if (request.timer) {\n clearTimeout(request.timer);\n }\n request.reject(error);\n }\n pending.clear();\n input.onFailure?.(error);\n };\n\n const stopMessages = input.channel.onMessage((raw) => {\n if (failure) {\n return;\n }\n try {\n assertFrameSize(raw);\n const parsed = serviceExecutionHostMessageSchema.safeParse(raw);\n if (\n !parsed.success ||\n parsed.data.hostInstanceId !== input.hostInstanceId\n ) {\n throw new ExecutionHostError(\n \"host.invalid_response\",\n \"Host response does not match this process incarnation.\"\n );\n }\n const message = parsed.data;\n if (message.type !== \"reply\") {\n input.onEvent?.(message);\n return;\n }\n const request = pending.get(message.requestId);\n // A timed-out observer is gone, not the accepted operation. Do not retry it\n // or turn its late result into the outcome of a newer request.\n if (!request) {\n return;\n }\n if (request.method !== message.method) {\n throw new ExecutionHostError(\n \"host.invalid_response\",\n \"Host response method does not match its request.\"\n );\n }\n pending.delete(message.requestId);\n if (request.timer) {\n clearTimeout(request.timer);\n }\n resolveReply(request, message);\n } catch (error) {\n fail(error instanceof Error ? error : new Error(String(error)));\n }\n });\n const stopDisconnect = input.channel.onDisconnect((cause) => {\n fail(\n new ExecutionHostError(\n \"host.disconnected\",\n cause\n ? `The execution host disconnected: ${cause.message}. In-flight outcomes are unconfirmed.`\n : \"The execution host disconnected; in-flight outcomes are unconfirmed.\"\n )\n );\n });\n\n return {\n call<M extends ServiceExecutionHostMethod>(\n method: M,\n value: ServiceExecutionHostInput<M>,\n options: { timeoutMs?: number | null } = {}\n ): Promise<ServiceExecutionHostOutput<M>> {\n if (failure) {\n return Promise.reject(failure);\n }\n const limit =\n SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS -\n (controlMethods.has(method) ? 0 : RESERVED_CONTROL_REQUESTS);\n if (pending.size >= limit) {\n return Promise.reject(\n new ExecutionHostError(\n \"host.busy\",\n \"Too many outstanding Host requests; no new request was sent.\"\n )\n );\n }\n const payload =\n serviceExecutionHostMethods[method].input.safeParse(value);\n if (!payload.success) {\n return Promise.reject(\n new ExecutionHostError(\n \"host.invalid_request\",\n `Invalid ${method} request.`\n )\n );\n }\n const requestId = randomUUID();\n const timeoutMs =\n options.timeoutMs === undefined ? 30_000 : options.timeoutMs;\n if (\n timeoutMs !== null &&\n (!Number.isFinite(timeoutMs) || timeoutMs <= 0)\n ) {\n return Promise.reject(\n new ExecutionHostError(\n \"host.invalid_timeout\",\n \"The observer deadline must be positive or absent.\"\n )\n );\n }\n return new Promise<ServiceExecutionHostOutput<M>>((resolve, reject) => {\n const request: PendingRequest = {\n method,\n resolve: (result) => resolve(result as ServiceExecutionHostOutput<M>),\n reject,\n timer: null,\n };\n if (timeoutMs !== null) {\n request.timer = setTimeout(() => {\n pending.delete(requestId);\n reject(\n new ExecutionHostError(\n \"host.observation_timeout\",\n `The ${method} response is unconfirmed. No operation was cancelled or retried.`\n )\n );\n }, timeoutMs);\n request.timer.unref?.();\n }\n pending.set(requestId, request);\n try {\n send(\n {\n protocol: SERVICE_EXECUTION_HOST_PROTOCOL,\n hostInstanceId: input.hostInstanceId,\n requestId,\n method,\n payload: payload.data,\n },\n (error) => {\n if (error) {\n fail(error);\n }\n }\n );\n } catch (error) {\n pending.delete(requestId);\n if (request.timer) {\n clearTimeout(request.timer);\n }\n reject(error);\n }\n });\n },\n pendingCount: () => pending.size,\n dispose(): void {\n stopMessages();\n stopDisconnect();\n fail(\n new ExecutionHostError(\n \"host.observer_closed\",\n \"The Host observer closed; accepted work was not cancelled.\"\n )\n );\n },\n };\n}\n\nexport type ExecutionHostHandlers = {\n [M in ServiceExecutionHostMethod]: (\n input: ServiceExecutionHostArguments<M>\n ) => Promise<ServiceExecutionHostOutput<M>> | ServiceExecutionHostOutput<M>;\n};\n\nexport function serveExecutionHost(input: {\n channel: ExecutionHostChannel;\n hostInstanceId: string;\n handlers: ExecutionHostHandlers;\n onFailure(error: Error): void;\n onDisconnect(): void;\n}) {\n const activeIds = new Set<string>();\n const send = createSender(input.channel);\n let closed = false;\n\n const sendMessage = (message: ServiceExecutionHostMessage) => {\n if (closed) {\n throw new ExecutionHostError(\n \"host.disconnected\",\n \"The connector is no longer observing this Host.\"\n );\n }\n send(message, (error) => {\n if (error) {\n input.onFailure(error);\n }\n });\n };\n\n const stopMessages = input.channel.onMessage((raw) => {\n if (closed) {\n return;\n }\n let request: ReturnType<typeof serviceExecutionHostRequestSchema.parse>;\n try {\n assertFrameSize(raw);\n const parsed = serviceExecutionHostRequestSchema.safeParse(raw);\n if (\n !parsed.success ||\n parsed.data.hostInstanceId !== input.hostInstanceId\n ) {\n throw new ExecutionHostError(\n \"host.invalid_request\",\n \"Host request does not match this process incarnation.\"\n );\n }\n request = parsed.data;\n } catch (error) {\n input.onFailure(\n error instanceof Error ? error : new Error(String(error))\n );\n return;\n }\n\n const respond = (\n result: Extract<ServiceExecutionHostMessage, { type: \"reply\" }>[\"result\"]\n ) => {\n if (!closed) {\n sendMessage({\n protocol: SERVICE_EXECUTION_HOST_PROTOCOL,\n hostInstanceId: input.hostInstanceId,\n type: \"reply\",\n requestId: request.requestId,\n method: request.method,\n result,\n });\n }\n };\n const reject = (error: unknown) => {\n try {\n respond({\n ok: false,\n error: {\n code:\n error instanceof ExecutionHostError\n ? error.code\n : \"host.operation_failed\",\n message:\n (error instanceof Error ? error.message : String(error)).slice(\n 0,\n 4096\n ) || \"Host operation failed.\",\n },\n });\n } catch (sendError) {\n input.onFailure(\n sendError instanceof Error ? sendError : new Error(String(sendError))\n );\n }\n };\n\n const limit =\n SERVICE_EXECUTION_HOST_MAX_PENDING_REQUESTS -\n (controlMethods.has(request.method) ? 0 : RESERVED_CONTROL_REQUESTS);\n if (activeIds.has(request.requestId) || activeIds.size >= limit) {\n reject(\n new ExecutionHostError(\n \"host.busy\",\n \"Host request is duplicate or capacity is exhausted; it was not admitted again.\"\n )\n );\n return;\n }\n const method = serviceExecutionHostMethods[request.method];\n const payload = method.input.safeParse(request.payload);\n if (!payload.success) {\n reject(\n new ExecutionHostError(\n \"host.invalid_request\",\n `Invalid ${request.method} payload.`\n )\n );\n return;\n }\n activeIds.add(request.requestId);\n // This cast connects the fixed schema table to its corresponding handler.\n // Both request and response are runtime-validated, including local callers.\n const handler = input.handlers[request.method] as (\n value: unknown\n ) => unknown;\n Promise.resolve()\n .then(() => handler(payload.data))\n .then((result) => {\n const parsed = method.output.safeParse(result);\n if (!parsed.success) {\n throw new ExecutionHostError(\n \"host.invalid_response\",\n `The ${request.method} owner returned an invalid response.`\n );\n }\n respond({ ok: true, payload: parsed.data });\n })\n .catch(reject)\n .finally(() => activeIds.delete(request.requestId));\n });\n const stopDisconnect = input.channel.onDisconnect(() => {\n if (closed) {\n return;\n }\n closed = true;\n input.onDisconnect();\n });\n return {\n emit(event: Exclude<ServiceExecutionHostMessage, { type: \"reply\" }>): void {\n const parsed = serviceExecutionHostMessageSchema.safeParse(event);\n if (!parsed.success || event.hostInstanceId !== input.hostInstanceId) {\n throw new ExecutionHostError(\n \"host.invalid_event\",\n \"Invalid execution-host event.\"\n );\n }\n sendMessage(parsed.data);\n },\n dispose(): void {\n closed = true;\n stopMessages();\n stopDisconnect();\n },\n };\n}\n"],"mappings":";;;;;;;;;AAGA,MAAM,KAAK,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI;AACvC,MAAM,0CAA0C;AAChD,MAAM,mCAAmC,IAAI,aAAa;CACzD,SAAS;CACT,aAAa;CACb,YAAY;CACZ,+BAA+B;CAC/B,WAAW;CACX,yBAAyB;CACzB,iBAAiB;CACjB,QAAQ,IAAI,aAAa;EACxB,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,iBAAiB;EACjB,QAAQ,IAAI,QAAQ,OAAO;CAC5B,CAAC;CACD,MAAM,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AACzC,CA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ACpB,OACE,IAAI,mBACF,wBACA,WAAW,QAAQ,OAAO,UAC5B,CACF;GACA;EACF;EACA,UAAU,IAAI,QAAQ,SAAS;EAG/B,MAAM,UAAU,MAAM,SAAS,QAAQ;EAGvC,QAAQ,QAAQ,CAAC,CACd,WAAW,QAAQ,QAAQ,IAAI,CAAC,CAAC,CACjC,MAAM,WAAW;GAChB,MAAM,SAAS,OAAO,OAAO,UAAU,MAAM;GAC7C,IAAI,CAAC,OAAO,SACV,MAAM,IAAI,mBACR,yBACA,OAAO,QAAQ,OAAO,qCACxB;GAEF,QAAQ;IAAE,IAAI;IAAM,SAAS,OAAO;GAAK,CAAC;EAC5C,CAAC,CAAC,CACD,MAAM,MAAM,CAAC,CACb,cAAc,UAAU,OAAO,QAAQ,SAAS,CAAC;CACtD,CAAC;CACD,MAAM,iBAAiB,MAAM,QAAQ,mBAAmB;EACtD,IAAI,QACF;EAEF,SAAS;EACT,MAAM,aAAa;CACrB,CAAC;CACD,OAAO;EACL,KAAK,OAAsE;GACzE,MAAM,SAAS,kCAAkC,UAAU,KAAK;GAChE,IAAI,CAAC,OAAO,WAAW,MAAM,mBAAmB,MAAM,gBACpD,MAAM,IAAI,mBACR,sBACA,+BACF;GAEF,YAAY,OAAO,IAAI;EACzB;EACA,UAAgB;GACd,SAAS;GACT,aAAa;GACb,eAAe;EACjB;CACF;AACF"}
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Ht as createCloudComputerApi, ur as cloudComputerOperationSchema } from "./dist-KibLweLD.js";
3
+ import { Ht as createCloudComputerApi, fr as cloudComputerOperationSchema } from "./dist-BQcUIyf6.js";
4
4
  import { a as resolveBaseUrl } from "./base-url-0AoeTi3w.js";
5
- import { n as resolveRuntimeContext } from "./context-M7dvalCp.js";
5
+ import { n as resolveRuntimeContext } from "./context-BEgBhfbb.js";
6
6
  import { t as createPresenter } from "./presenter-BcxiQyJg.js";
7
- import { t as createCliApiClientFoundation } from "./api-client-foundation-CYbEdm9o.js";
7
+ import { t as createCliApiClientFoundation } from "./api-client-foundation-BZvzqIeX.js";
8
8
  //#region src/commands/cloud-computer.ts
9
9
  async function runCloudComputer(input) {
10
10
  const presenter = createPresenter(await resolveRuntimeContext({ view: input.view }));
@@ -18,4 +18,4 @@ async function runCloudComputer(input) {
18
18
  //#endregion
19
19
  export { runCloudComputer };
20
20
 
21
- //# sourceMappingURL=cloud-computer-J2tdcTPm.js.map
21
+ //# sourceMappingURL=cloud-computer-BqFhsHhC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-computer-J2tdcTPm.js","names":[],"sources":["../src/commands/cloud-computer.ts"],"sourcesContent":["import { createCloudComputerApi } from \"@openmeld/api-client\";\nimport { cloudComputerOperationSchema } from \"@openmeld/schemas\";\nimport { resolveBaseUrl } from \"../config/base-url\";\nimport { resolveRuntimeContext } from \"../runtime/context\";\nimport { createPresenter } from \"../runtime/presenter/index\";\nimport { createCliApiClientFoundation } from \"../space/api-client-foundation\";\n\nexport async function runCloudComputer(input: {\n operation?: string;\n view?: string;\n}) {\n const runtime = await resolveRuntimeContext({ view: input.view });\n const presenter = createPresenter(runtime);\n const api = createCloudComputerApi(\n createCliApiClientFoundation(await resolveBaseUrl())\n );\n const response = input.operation\n ? await api.execute(\n cloudComputerOperationSchema.parse(JSON.parse(input.operation))\n )\n : await api.read();\n presenter.data({ code: \"computer.cloud.completed\", payload: response });\n}\n"],"mappings":";;;;;;;;AAOA,eAAsB,iBAAiB,OAGpC;CAED,MAAM,YAAY,gBAAgB,MADZ,sBAAsB,EAAE,MAAM,MAAM,KAAK,CAAC,CACvB;CACzC,MAAM,MAAM,uBACV,6BAA6B,MAAM,eAAe,CAAC,CACrD;CACA,MAAM,WAAW,MAAM,YACnB,MAAM,IAAI,QACR,6BAA6B,MAAM,KAAK,MAAM,MAAM,SAAS,CAAC,CAChE,IACA,MAAM,IAAI,KAAK;CACnB,UAAU,KAAK;EAAE,MAAM;EAA4B,SAAS;CAAS,CAAC;AACxE"}
1
+ {"version":3,"file":"cloud-computer-BqFhsHhC.js","names":[],"sources":["../src/commands/cloud-computer.ts"],"sourcesContent":["import { createCloudComputerApi } from \"@openmeld/api-client\";\nimport { cloudComputerOperationSchema } from \"@openmeld/schemas\";\nimport { resolveBaseUrl } from \"../config/base-url\";\nimport { resolveRuntimeContext } from \"../runtime/context\";\nimport { createPresenter } from \"../runtime/presenter/index\";\nimport { createCliApiClientFoundation } from \"../space/api-client-foundation\";\n\nexport async function runCloudComputer(input: {\n operation?: string;\n view?: string;\n}) {\n const runtime = await resolveRuntimeContext({ view: input.view });\n const presenter = createPresenter(runtime);\n const api = createCloudComputerApi(\n createCliApiClientFoundation(await resolveBaseUrl())\n );\n const response = input.operation\n ? await api.execute(\n cloudComputerOperationSchema.parse(JSON.parse(input.operation))\n )\n : await api.read();\n presenter.data({ code: \"computer.cloud.completed\", payload: response });\n}\n"],"mappings":";;;;;;;;AAOA,eAAsB,iBAAiB,OAGpC;CAED,MAAM,YAAY,gBAAgB,MADZ,sBAAsB,EAAE,MAAM,MAAM,KAAK,CAAC,CACvB;CACzC,MAAM,MAAM,uBACV,6BAA6B,MAAM,eAAe,CAAC,CACrD;CACA,MAAM,WAAW,MAAM,YACnB,MAAM,IAAI,QACR,6BAA6B,MAAM,KAAK,MAAM,MAAM,SAAS,CAAC,CAChE,IACA,MAAM,IAAI,KAAK;CACnB,UAAU,KAAK;EAAE,MAAM;EAA4B,SAAS;CAAS,CAAC;AACxE"}
@@ -1,29 +1,29 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Cr as parseAgentControllerRef, Dt as resolveRegistryOriginLaunchCommand, Et as listBuiltinAgentsRegistryEntries, G as updateAgentRegistrations, Gr as resolveBuiltinAgentControllerBrand, H as resolveAgentTargetState, I as listAgentTargetStates, O as syncDeviceRuntimeStateProjection, Pr as resolveSelectableCandidates, Q as resolveLocalRegistryAgentIdFromAgentControllerRef, S as syncProfileWorkspaceState, gr as createAuthorityOpenMeldServiceRuntimeId, j as resolveAgentProfilePrimaryAgentControllerReport, kt as resolveRegistryRuntimeAdapterContractByAgentControllerRef, ur as buildAgentControllerRef, xr as isAgentExecutionReadyOrConnecting } from "./prepare-provider-runtime-_XRIioDp.js";
3
+ import { Dt as resolveRegistryOriginLaunchCommand, Et as listBuiltinAgentsRegistryEntries, Fr as resolveSelectableCandidates, G as updateAgentRegistrations, H as resolveAgentTargetState, I as listAgentTargetStates, Kr as resolveBuiltinAgentControllerBrand, O as syncDeviceRuntimeStateProjection, Q as resolveLocalRegistryAgentIdFromAgentControllerRef, S as syncProfileWorkspaceState, Sr as isAgentExecutionReadyOrConnecting, _r as createAuthorityOpenMeldServiceRuntimeId, dr as buildAgentControllerRef, j as resolveAgentProfilePrimaryAgentControllerReport, kt as resolveRegistryRuntimeAdapterContractByAgentControllerRef, wr as parseAgentControllerRef } from "./prepare-provider-runtime-CWZOcEF7.js";
4
4
  import { _ as toSpaceWsUrl, a as toSpaceCreateUrl, d as toSpaceMembersUrl, f as toSpaceMetaUrl, m as toSpaceRemoveMembersUrl, o as toSpaceCursorUrl, p as toSpacePasswordUrl, s as toSpaceDeleteUrl, t as normalizeBaseUrl, u as toSpaceLeaveUrl } from "./urls-CY2uzH2-.js";
5
5
  import { P as resolveOpenMeldEnvPreset } from "./paths-De9xdA2h.js";
6
6
  import { t as isLoopbackHostname } from "./loopback-hostname-DHQPKq8N.js";
7
- import { Dt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, Et as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Ki as MAX_TEXT_LENGTH, Ot as SPACE_MENTION_REJECT_NOTICE_PURPOSE, St as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Xn as parseOptionalClientMessageId, Yn as clientMessageIdSchema, cr as resolveSingleSpaceMentionLabels, or as normalizeSpacePasswordText } from "./runtime-transport-BzCp9hM3.js";
7
+ import { Dt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, Et as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Ot as SPACE_MENTION_REJECT_NOTICE_PURPOSE, St as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Zi as MAX_TEXT_LENGTH, dr as normalizeSpacePasswordText, er as clientMessageIdSchema, pr as resolveSingleSpaceMentionLabels, tr as parseOptionalClientMessageId } from "./runtime-transport-DFBYm5Re.js";
8
8
  import { D as normalizeOptionalWorkingDirectory } from "./control-plane-B93wmVS6.js";
9
- import { Bn as resolveProfileSpaceHistoryGatewayHost, Hn as toStructuredApiClientFailure, It as createAccountSpaceIndexApi, Rt as createAgentProfileBindingApi, Si as resolveInitialSpaceAccessMode, Yt as createFetchTransport, Zn as MAX_TEXT_LENGTH$1, bt as buildProfileSpaceHistoryStatusPath, ca as toCompatibleSpaceAddressingRequestWireValue, cn as createProfileSpaceHistoryApi, er as parseEnvelope$1, ii as removeSpaceMembersResponseSchema, n as OpenMeldApiClientInvalidResponseError, ni as leaveSpaceResponseSchema, nn as createOrganizationApi, nr as parseServerErrorFrame$1, ri as postSpaceMembersResponseSchema, rr as resolveCustomMentionAliasOverride, sa as toLegacySpaceImageGeometryWireValue, t as OpenMeldApiClientHttpError, tn as createOpenMeldApiClient, tr as parseIncoming$1, xt as buildProfileSpaceHistoryUpsertPath, zn as resolveAccountSpaceIndexGatewayHost } from "./dist-KibLweLD.js";
9
+ import { $n as MAX_TEXT_LENGTH$1, Hn as resolveProfileSpaceHistoryGatewayHost, It as createAccountSpaceIndexApi, Qi as resolveInitialSpaceAccessMode, Rt as createAgentProfileBindingApi, Vn as resolveAccountSpaceIndexGatewayHost, Wn as toStructuredApiClientFailure, Yt as createFetchTransport, ar as resolveCustomMentionAliasOverride, bt as buildProfileSpaceHistoryStatusPath, ga as toCompatibleSpaceAddressingRequestWireValue, ha as toLegacySpaceImageGeometryWireValue, hi as removeSpaceMembersResponseSchema, ir as parseServerErrorFrame$1, ln as createProfileSpaceHistoryApi, mi as postSpaceMembersResponseSchema, n as OpenMeldApiClientInvalidResponseError, nn as createOpenMeldApiClient, nr as parseEnvelope$1, pi as leaveSpaceResponseSchema, rn as createOrganizationApi, rr as parseIncoming$1, t as OpenMeldApiClientHttpError, xt as buildProfileSpaceHistoryUpsertPath } from "./dist-BQcUIyf6.js";
10
10
  import { v as canonicalizeBuiltinAgentControllerRef, x as parseAgentControllerRef$1, y as normalizeBuiltinAgentControllerId } from "./controller-contract-DAOCaefz.js";
11
- import { d as getAuthSessionState } from "./auth-session-JhILeJRO.js";
12
- import { D as createDelayedSpinner, G as ensureCommandAuthenticationOrCancel, N as renderHumanErrorCard, U as connectWebSocket, W as buildCommandAuthenticationPromptMessage, at as promptTextEntry, b as formatServiceRuntimeHeadline, it as buildUnifiedCardFrame, lt as getCurrentCommandCheckState, nt as renderInfoCard, x as resolveServiceParticipationReadiness, y as formatServiceParticipationReadinessLabel } from "./service-BEH6-P8U.js";
13
- import { $t as isTargetPickerState, Ct as updateSpaceLastSeenTs, Dt as SpaceComposerSubmissionError, Et as writeSpaceRecentMentionProfileIds, Ft as buildSpaceMemberAgentPresencePresentation, Ht as closeMentionPickerState, It as buildSpaceMentionProfileIndex, Jt as extractMentionAuthoringPrefix, Kt as createSpaceTargetCatalog, Lt as buildSpaceMessageReadRelationSummary, Mt as buildSignalIndex, Nt as buildSignalMessageReadProjection, Ot as buildDispatchResultMessageReadProjection, Pt as buildSignalReplyWorkflowProjection, Qt as isRelationPickerState, Rt as buildSpaceProfileAddPlan, St as toSpaceConfigListIntegrityError, Tt as writeSpaceCacheDeletionNoticeState, Ut as collectResolvedSpaceMentions, _t as readSpaceConfig, an as prepareSpaceComposerSubmission, bt as removeSpaceConfig, cn as resolveSpaceMemberAgentOwnerWakeDiagnosticsView, dt as projectSpaceProfileCache, ft as LocalSpaceStateIntegrityError, gt as readSpaceCacheDeletionNoticeState, ht as listSpaceConfigs, in as openTargetPickerState, ln as returnToTargetPickerState, mt as isLocalSpaceStateCorruptResult, nn as listSpaceMentionRelationChoices, on as prepareSpaceFileOnlySubmission, qt as enterRelationPickerState, rn as listSpaceMentionSuggestions, sn as resolveNextRecentMentionProfileIdsForQueuedText, t as assertDispatchOwnedRuntimePublicWriteAllowed, un as updateAuthoredMentionRanges, vt as readSpaceLastSeenTs, wt as upsertSpaceConfig, xt as toLocalSpaceStateIntegrityError, yt as readSpaceRecentMentionProfileIds } from "./dispatch-owned-runtime-gOluDX5_.js";
14
- import { a as GatewayHttpError, c as toStructuredGatewayFailure, f as prepareRequestedSpaceSendFiles, h as spaceSendRequestReceiptSchema, i as parseSpaceMetaResponse, m as createCliSpaceApi, o as readGatewayJsonResponse, p as uploadPreparedSpaceFiles, r as parseSpaceMetaPayload, t as fetchSpaceMeta, u as resolveSpaceSendText } from "./meta-api-DruuiAx-.js";
15
- import { F as formatSpaceMemberCommandRecoveryCopy, H as resolveGatewayChainRetryGuidance, I as resolveReplyReadinessAvailabilityReasonCopy, L as resolveReplyReadinessGuidanceSummaryCopy, M as formatReplyReadinessSummary, O as resolveCurrentReplyReadinessSnapshot, P as REPLY_READINESS_COPY, R as resolveOpenClawDiagnosticsGuidance, U as resolveOpenClawLocalDiagnosticsValue, V as resolveGatewayChainRepairGuidance, W as resolveLocalServiceDemand, b as buildDaemonServiceRepairGuidance, z as classifyGatewayChainFailure } from "./daemon-service-update-coordinator-D0-15tZW.js";
11
+ import { d as getAuthSessionState } from "./auth-session-DywRZLBr.js";
12
+ import { D as createDelayedSpinner, G as ensureCommandAuthenticationOrCancel, N as renderHumanErrorCard, U as connectWebSocket, W as buildCommandAuthenticationPromptMessage, at as promptTextEntry, b as formatServiceRuntimeHeadline, it as buildUnifiedCardFrame, lt as getCurrentCommandCheckState, nt as renderInfoCard, x as resolveServiceParticipationReadiness, y as formatServiceParticipationReadinessLabel } from "./service-8EozP77B.js";
13
+ import { At as buildDispatchResultMessageReadProjection, Bt as buildSpaceProfileAddPlan, Ct as toLocalSpaceStateIntegrityError, Dt as writeSpaceCacheDeletionNoticeState, Et as upsertSpaceConfig, Ft as buildSignalMessageReadProjection, Gt as collectResolvedSpaceMentions, It as buildSignalReplyWorkflowProjection, Jt as createSpaceTargetCatalog, Lt as buildSpaceMemberAgentPresencePresentation, Ot as writeSpaceRecentMentionProfileIds, Pt as buildSignalIndex, Rt as buildSpaceMentionProfileIndex, St as removeSpaceConfig, Tt as updateSpaceLastSeenTs, Wt as closeMentionPickerState, Xt as extractMentionAuthoringPrefix, Yt as enterRelationPickerState, _t as listSpaceConfigs, an as listSpaceMentionSuggestions, bt as readSpaceLastSeenTs, cn as prepareSpaceFileOnlySubmission, dn as returnToTargetPickerState, en as isRelationPickerState, fn as updateAuthoredMentionRanges, gt as isLocalSpaceStateCorruptResult, in as listSpaceMentionRelationChoices, kt as SpaceComposerSubmissionError, ln as resolveNextRecentMentionProfileIdsForQueuedText, mt as LocalSpaceStateIntegrityError, on as openTargetPickerState, pt as projectSpaceProfileCache, sn as prepareSpaceComposerSubmission, t as assertDispatchOwnedRuntimePublicWriteAllowed, tn as isTargetPickerState, un as resolveSpaceMemberAgentOwnerWakeDiagnosticsView, vt as readSpaceCacheDeletionNoticeState, wt as toSpaceConfigListIntegrityError, xt as readSpaceRecentMentionProfileIds, yt as readSpaceConfig, zt as buildSpaceMessageReadRelationSummary } from "./dispatch-owned-runtime-QhxDRdNr.js";
14
+ import { a as GatewayHttpError, c as toStructuredGatewayFailure, f as prepareRequestedSpaceSendFiles, h as spaceSendRequestReceiptSchema, i as parseSpaceMetaResponse, m as createCliSpaceApi, o as readGatewayJsonResponse, p as uploadPreparedSpaceFiles, r as parseSpaceMetaPayload, t as fetchSpaceMeta, u as resolveSpaceSendText } from "./meta-api-9iqkG_MP.js";
15
+ import { F as formatSpaceMemberCommandRecoveryCopy, H as resolveGatewayChainRetryGuidance, I as resolveReplyReadinessAvailabilityReasonCopy, L as resolveReplyReadinessGuidanceSummaryCopy, M as formatReplyReadinessSummary, O as resolveCurrentReplyReadinessSnapshot, P as REPLY_READINESS_COPY, R as resolveOpenClawDiagnosticsGuidance, U as resolveOpenClawLocalDiagnosticsValue, V as resolveGatewayChainRepairGuidance, W as resolveLocalServiceDemand, b as buildDaemonServiceRepairGuidance, z as classifyGatewayChainFailure } from "./daemon-service-update-coordinator-DJKBTEjx.js";
16
16
  import { d as runWithHeldLock, i as isOpenMeldLockError, t as acquireLock, u as resolveOpenMeldOrphanedLockIssue } from "./lock-BMI00i2F.js";
17
- import { A as createSpaceUpdatesGuideError, D as createSpaceSubcommandTargetGuideError, Dt as formatAgentOverviewPayload, O as createSpaceTargetGuideError, S as createSpaceResultGuideError, _ as createSpaceProfileRequiredGuideError, at as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, b as createSpaceRemoveMembersCurrentProfileGuideError, c as createSpaceAddMembersCurrentProfileGuideError, d as createSpaceContractSetGuideError, et as ROOT_ENTRY_COMMANDS, f as createSpaceCreateGuideError, ft as formatCliVersionSummary, g as createSpaceMenuGuideError, h as createSpaceLeaveGuideError, i as createProfileCreateGuideError, it as SPACE_ADD_MEMBERS_AGENT_OVERVIEW_STAGES, k as createSpaceUnsupportedProfileKindGuideError, l as createSpaceAddMembersGuideError, m as createSpaceLeaveCreatorGuideError, ot as resolveSpaceAddMembersProgressPhase, p as createSpaceDeleteHumanApprovalGuideError, pt as getCliVersionInfo, rt as validateSpaceMemberSelectionInput, tt as ROOT_ENTRY_START_COMMAND, v as createSpacePublicationSetGuideError, x as createSpaceRemoveMembersGuideError, y as createSpaceRemoveMembersCreatorGuideError } from "./dual-view-guide-catalog-0kSizTFt.js";
17
+ import { A as createSpaceUpdatesGuideError, D as createSpaceSubcommandTargetGuideError, Dt as formatAgentOverviewPayload, O as createSpaceTargetGuideError, S as createSpaceResultGuideError, _ as createSpaceProfileRequiredGuideError, at as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, b as createSpaceRemoveMembersCurrentProfileGuideError, c as createSpaceAddMembersCurrentProfileGuideError, d as createSpaceContractSetGuideError, et as ROOT_ENTRY_COMMANDS, f as createSpaceCreateGuideError, ft as formatCliVersionSummary, g as createSpaceMenuGuideError, h as createSpaceLeaveGuideError, i as createProfileCreateGuideError, it as SPACE_ADD_MEMBERS_AGENT_OVERVIEW_STAGES, k as createSpaceUnsupportedProfileKindGuideError, l as createSpaceAddMembersGuideError, m as createSpaceLeaveCreatorGuideError, ot as resolveSpaceAddMembersProgressPhase, p as createSpaceDeleteHumanApprovalGuideError, pt as getCliVersionInfo, rt as validateSpaceMemberSelectionInput, tt as ROOT_ENTRY_START_COMMAND, v as createSpacePublicationSetGuideError, x as createSpaceRemoveMembersGuideError, y as createSpaceRemoveMembersCreatorGuideError } from "./dual-view-guide-catalog-DDsnLpIT.js";
18
18
  import { a as resolveBaseUrl, d as createDefaultRuntimeAgentControllerSettings } from "./base-url-0AoeTi3w.js";
19
19
  import { t as sleep } from "./dist-BLuEEVHh.js";
20
- import { A as resolveAuthenticationGuidanceFromError, E as buildHumanAuthenticationCard, F as resolveCurrentOpenMeldAccountContext, a as requireOpenMeldProfile, c as createOpenMeldHumanProfile, d as listOpenMeldProfiles, h as assertAdditionalHumanProfileCreationEnabled, k as resolveAuthenticationGuidance, n as resolveRuntimeContext, o as resolveOpenMeldProfileOrNull, s as createOpenMeldAgentProfile, u as getOpenMeldProfileCapabilities } from "./context-M7dvalCp.js";
20
+ import { A as resolveAuthenticationGuidanceFromError, E as buildHumanAuthenticationCard, F as resolveCurrentOpenMeldAccountContext, a as requireOpenMeldProfile, c as createOpenMeldHumanProfile, d as listOpenMeldProfiles, h as assertAdditionalHumanProfileCreationEnabled, k as resolveAuthenticationGuidance, n as resolveRuntimeContext, o as resolveOpenMeldProfileOrNull, s as createOpenMeldAgentProfile, u as getOpenMeldProfileCapabilities } from "./context-BEgBhfbb.js";
21
21
  import { a as formatOpenMeldCliTextBlock, l as resolveUserFacingCliEntryCommand, n as formatOpenMeldCliCommand, o as formatProfileAwareOpenMeldCliCommand, r as formatOpenMeldCliCommands, t as formatInlineOpenMeldCliCommands } from "./cli-entry-command-CR_9QU1i.js";
22
22
  import { a as outJsonLine, i as errLine, n as sanitizeTerminalDisplayText, o as outLine, r as formatMessage, t as createPresenter } from "./presenter-BcxiQyJg.js";
23
- import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, m as resolveAuthRequestCompatibility, n as fetchSpaceRequestWithTimeout, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as resolveSpaceRequestTimeoutMsForDiagnostics, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-CYbEdm9o.js";
24
- import { g as canUseInteractivePrompts } from "./elapsed-time-Bo1CJczC.js";
25
- import { S as buildSpaceWebUrl, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, b as resolveOffsetVisibleWindow, f as runAgentsRepair, g as promptSearchMultiselectWorkbench, h as promptSearchMultiselect, l as runAgentsEnable, m as formatTransportModeDisplay, v as clampNumber$2, x as computeRetryDelayMs, y as resolveAnchoredVisibleWindow } from "./agents-QisYIlFS.js";
26
- import { l as resolveLocalAgentControllerReportDecision, n as submitProfileRuntimeAgentControllerReport, o as collectLocalAgentControllerInventory, r as submitRuntimeAgentControllerReport } from "./runtime-agent-controller-reporting-submission-CGa3GGL6.js";
23
+ import { a as buildOpenMeldProfileIdentityRequestHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, m as resolveAuthRequestCompatibility, n as fetchSpaceRequestWithTimeout, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as resolveSpaceRequestTimeoutMsForDiagnostics, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-BZvzqIeX.js";
24
+ import { g as canUseInteractivePrompts } from "./elapsed-time-DTb6L36x.js";
25
+ import { S as buildSpaceWebUrl, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, b as resolveOffsetVisibleWindow, f as runAgentsRepair, g as promptSearchMultiselectWorkbench, h as promptSearchMultiselect, l as runAgentsEnable, m as formatTransportModeDisplay, v as clampNumber$2, x as computeRetryDelayMs, y as resolveAnchoredVisibleWindow } from "./agents-DLjDbkLV.js";
26
+ import { l as resolveLocalAgentControllerReportDecision, n as submitProfileRuntimeAgentControllerReport, o as collectLocalAgentControllerInventory, r as submitRuntimeAgentControllerReport } from "./runtime-agent-controller-reporting-submission-BszHi0S1.js";
27
27
  import * as z$1 from "zod/v4";
28
28
  import { stripVTControlCharacters } from "node:util";
29
29
  import pc from "picocolors";
@@ -24255,4 +24255,4 @@ function isHumanInteractiveSpaceRuntime(runtime) {
24255
24255
  //#endregion
24256
24256
  export { assertFullSignalIdArgument as A, resolveAgentProfileSetup as B, buildFormalSignalReadPayload as C, resolveOrganizationVisibilityLabel as D, resolveLinkAccessLabel as E, emitSpaceCliAgentOverview as F, renderOpenMeldHeader as G, colorizeDisplayProfileLabel as H, prepareLocalAgentReadiness as I, createProfileByKind as J, renderOpenMeldLogo as K, buildReplyReadinessGuidance as L, prepareAuthenticatedSpaceCommandContext as M, resolveOpenMeldProfileForSpaceCommand as N, parseEnvelope as O, emitSpaceAgentOverview as P, assessActionParticipationCandidate as Q, resolveHumanControllerDisplayName as R, buildFormalDispatchResultReadPayload as S, formatHumanReadTargetList as T, printOpenMeldBanner as U, colorizeAgentLabel as V, renderOpenMeldBrandBlockLines as W, resolveCreateProfileName as X, resolveCreateProfileKind as Y, ensureAgentProfileRuntimeBinding as Z, emitHumanReadSignalsTextProjection as _, runSpaceDelete as a, loadSpaceSignalIndexOrNull as b, runSpaceLeave as c, runSpaceRemoveMembers as d, runSpaceSend as f, buildHumanReadSignalsTranscriptItems as g, runSpaceWriteWithPasswordRetry as h, runSpaceCreate as i, assertValidSpaceIdTarget as j, isSpaceCommandOutputHandledError as k, runSpaceList as l, runSpaceReadWithPasswordRetry as m, promptAndConfirmSpacePassword as n, runSpaceHistory as o, runSpaceWatch as p, renderOpenMeldTagline as q, runSpaceAddMembers as r, runSpaceJoin as s, buildCreateSpacePasswordPromptConfig as t, runSpacePassword as u, buildIdentityOnlyMembersSnapshotForReadProjection as v, buildHumanReplyContextSummary as w, toSpaceMetaUpsertInput as x, loadSpaceIdentityDirectoryOrNull as y, persistAgentTransportSelection as z };
24257
24257
 
24258
- //# sourceMappingURL=command-BXJ-OwBD.js.map
24258
+ //# sourceMappingURL=command-DBfu-GeG.js.map