openmeld 0.3.261 → 0.3.263

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 (150) hide show
  1. package/README.md +7 -0
  2. package/dist/{add-me-membership-erEkzelq.js → add-me-membership-C_t_Mg-Z.js} +2 -2
  3. package/dist/{add-me-membership-erEkzelq.js.map → add-me-membership-C_t_Mg-Z.js.map} +1 -1
  4. package/dist/{agents-BGpftZJo.js → agents-DFHWtOt8.js} +13 -13
  5. package/dist/{agents-BGpftZJo.js.map → agents-DFHWtOt8.js.map} +1 -1
  6. package/dist/{api-client-foundation-DBl_OaMj.js → api-client-foundation-6MeNwklv.js} +4 -4
  7. package/dist/{api-client-foundation-DBl_OaMj.js.map → api-client-foundation-6MeNwklv.js.map} +1 -1
  8. package/dist/{api-client-foundation-DgQRzwbJ.js → api-client-foundation-BPJBWsRD.js} +1 -1
  9. package/dist/{auth-session-RQOVI0Gb.js → auth-session-B0J2UwSR.js} +5 -5
  10. package/dist/{auth-session-RQOVI0Gb.js.map → auth-session-B0J2UwSR.js.map} +1 -1
  11. package/dist/auth-session-DkDdLUPZ.js +4 -0
  12. package/dist/{auth-url-BH-9HTpn.js → auth-url-BheLcWg9.js} +2 -2
  13. package/dist/{auth-url-BH-9HTpn.js.map → auth-url-BheLcWg9.js.map} +1 -1
  14. package/dist/{base-url-B9NwMjEF.js → base-url-CLMqlF1w.js} +3 -3
  15. package/dist/{base-url-B9NwMjEF.js.map → base-url-CLMqlF1w.js.map} +1 -1
  16. package/dist/{base-url-DO0hjUUk.js → base-url-D84aBKXK.js} +1 -1
  17. package/dist/{channel-fUczwp7l.js → channel-7iF6DSp4.js} +2 -2
  18. package/dist/{channel-fUczwp7l.js.map → channel-7iF6DSp4.js.map} +1 -1
  19. package/dist/{cloud-computer-CCxIrSZU.js → cloud-computer-BddlwRAk.js} +6 -6
  20. package/dist/{cloud-computer-CCxIrSZU.js.map → cloud-computer-BddlwRAk.js.map} +1 -1
  21. package/dist/{command-BgBsh9xU.js → command-7ZoDO_Hy.js} +77 -21
  22. package/dist/command-7ZoDO_Hy.js.map +1 -0
  23. package/dist/{computer-connection-review-D4iW1JS7.js → computer-connection-review-vYYCtG_l.js} +6 -6
  24. package/dist/{computer-connection-review-D4iW1JS7.js.map → computer-connection-review-vYYCtG_l.js.map} +1 -1
  25. package/dist/{computer-disconnect-CZalrKK7.js → computer-disconnect-C0n2IGfR.js} +9 -9
  26. package/dist/{computer-disconnect-CZalrKK7.js.map → computer-disconnect-C0n2IGfR.js.map} +1 -1
  27. package/dist/{computer-setup-continuation-B4JriFmR.js → computer-setup-continuation-DiT88kEQ.js} +3 -3
  28. package/dist/{computer-setup-continuation-B4JriFmR.js.map → computer-setup-continuation-DiT88kEQ.js.map} +1 -1
  29. package/dist/{context-DqkwGCKj.js → context-DFf16i-C.js} +7 -7
  30. package/dist/{context-DqkwGCKj.js.map → context-DFf16i-C.js.map} +1 -1
  31. package/dist/{daemon-device-id-BmL_1aHE.js → daemon-device-id-C3UTBv9T.js} +4 -4
  32. package/dist/{daemon-device-id-BmL_1aHE.js.map → daemon-device-id-C3UTBv9T.js.map} +1 -1
  33. package/dist/{daemon-lifecycle-journal-D4Xupqhp.js → daemon-lifecycle-journal-DoAQ-E6K.js} +7 -7
  34. package/dist/{daemon-lifecycle-journal-D4Xupqhp.js.map → daemon-lifecycle-journal-DoAQ-E6K.js.map} +1 -1
  35. package/dist/{daemon-runtime-lease-Cvssoa6x.js → daemon-runtime-lease-CACGRuZ3.js} +1 -1
  36. package/dist/{daemon-runtime-lease-B--QbOlQ.js → daemon-runtime-lease-D5f4zLXB.js} +3 -3
  37. package/dist/{daemon-runtime-lease-B--QbOlQ.js.map → daemon-runtime-lease-D5f4zLXB.js.map} +1 -1
  38. package/dist/{daemon-service-contract-DGPRa_PH.js → daemon-service-contract-D9gUVdhc.js} +3 -3
  39. package/dist/{daemon-service-contract-DGPRa_PH.js.map → daemon-service-contract-D9gUVdhc.js.map} +1 -1
  40. package/dist/{daemon-service-manager-CDBNfjOu.js → daemon-service-manager-BDIsfrfx.js} +5 -5
  41. package/dist/{daemon-service-manager-CDBNfjOu.js.map → daemon-service-manager-BDIsfrfx.js.map} +1 -1
  42. package/dist/{daemon-service-manager-DW6ySNEe.js → daemon-service-manager-k9IJJuqv.js} +1 -1
  43. package/dist/{daemon-service-runtime-BMUXKr64.js → daemon-service-runtime-LFoUNQQu.js} +14 -14
  44. package/dist/{daemon-service-runtime-BMUXKr64.js.map → daemon-service-runtime-LFoUNQQu.js.map} +1 -1
  45. package/dist/{daemon-service-update-coordinator-ef1RLL_R.js → daemon-service-update-coordinator-4WJr8-5_.js} +21 -23
  46. package/dist/daemon-service-update-coordinator-4WJr8-5_.js.map +1 -0
  47. package/dist/{daemon-state-e0klzRsC.js → daemon-state-C09DaALw.js} +3 -3
  48. package/dist/{daemon-state-e0klzRsC.js.map → daemon-state-C09DaALw.js.map} +1 -1
  49. package/dist/{dispatch-owned-runtime-D5J7omXK.js → dispatch-owned-runtime-BTK0uuOV.js} +10 -10
  50. package/dist/{dispatch-owned-runtime-D5J7omXK.js.map → dispatch-owned-runtime-BTK0uuOV.js.map} +1 -1
  51. package/dist/{dist-DGZXxIvJ.js → dist-DRfPWuFM.js} +1 -1
  52. package/dist/{dist-Dip3sgFz.js → dist-DY8oLAop.js} +21 -2
  53. package/dist/dist-DY8oLAop.js.map +1 -0
  54. package/dist/dist-Df2Qywqr.js +4 -0
  55. package/dist/{dist-CMBBVJVE.js → dist-YSbIHBnl.js} +52 -3
  56. package/dist/dist-YSbIHBnl.js.map +1 -0
  57. package/dist/{dual-view-guide-catalog-DkoOcvAt.js → dual-view-guide-catalog-3LaB18SR.js} +3 -3
  58. package/dist/{dual-view-guide-catalog-DkoOcvAt.js.map → dual-view-guide-catalog-3LaB18SR.js.map} +1 -1
  59. package/dist/{elapsed-time-COLGQWPQ.js → elapsed-time-CGeKqTzX.js} +4 -4
  60. package/dist/{elapsed-time-COLGQWPQ.js.map → elapsed-time-CGeKqTzX.js.map} +1 -1
  61. package/dist/{entry-agrfgBQh.js → entry-CMDScEVO.js} +12 -12
  62. package/dist/{entry-agrfgBQh.js.map → entry-CMDScEVO.js.map} +1 -1
  63. package/dist/{installation-inventory-Bxelkj89.js → installation-inventory-CvtmIZj8.js} +4 -4
  64. package/dist/{installation-inventory-Bxelkj89.js.map → installation-inventory-CvtmIZj8.js.map} +1 -1
  65. package/dist/{installer-BZfDlcZI.js → installer-CwK5uV4Q.js} +2 -2
  66. package/dist/{installer-BZfDlcZI.js.map → installer-CwK5uV4Q.js.map} +1 -1
  67. package/dist/{lock-CqozgAXC.js → lock-Cz8h_yJh.js} +3 -3
  68. package/dist/{lock-CqozgAXC.js.map → lock-Cz8h_yJh.js.map} +1 -1
  69. package/dist/{meta-api-BPhaiMmU.js → meta-api-B01L3fo4.js} +7 -7
  70. package/dist/{meta-api-BPhaiMmU.js.map → meta-api-B01L3fo4.js.map} +1 -1
  71. package/dist/{openmeld-CiLo42M9.js → openmeld-RoIfH4iG.js} +43 -41
  72. package/dist/{openmeld-CiLo42M9.js.map → openmeld-RoIfH4iG.js.map} +1 -1
  73. package/dist/{openmeld-dev-environment-Dt_yVZn2.js → openmeld-dev-environment-POXQHtTN.js} +3 -3
  74. package/dist/{openmeld-dev-environment-Dt_yVZn2.js.map → openmeld-dev-environment-POXQHtTN.js.map} +1 -1
  75. package/dist/openmeld-dev.js +1 -1
  76. package/dist/{openmeld-environment-target-BjcRwYW3.js → openmeld-environment-target-B0Z7eI6O.js} +3 -3
  77. package/dist/{openmeld-environment-target-BjcRwYW3.js.map → openmeld-environment-target-B0Z7eI6O.js.map} +1 -1
  78. package/dist/{openmeld-maintenance-worker-pgUSH8PK.js → openmeld-maintenance-worker--ucPEftH.js} +14 -14
  79. package/dist/{openmeld-maintenance-worker-pgUSH8PK.js.map → openmeld-maintenance-worker--ucPEftH.js.map} +1 -1
  80. package/dist/{openmeld-tools-update-join-BuJ6DCqG.js → openmeld-tools-update-join-gps19byt.js} +4 -4
  81. package/dist/{openmeld-tools-update-join-BuJ6DCqG.js.map → openmeld-tools-update-join-gps19byt.js.map} +1 -1
  82. package/dist/{openmeld-tools-update-process-frame-CMSbyGR2.js → openmeld-tools-update-process-frame-C9hDfFXg.js} +1 -1
  83. package/dist/{openmeld-tools-update-process-frame-CwO6rIba.js → openmeld-tools-update-process-frame-Ctim4GrA.js} +2 -2
  84. package/dist/{openmeld-tools-update-process-frame-CwO6rIba.js.map → openmeld-tools-update-process-frame-Ctim4GrA.js.map} +1 -1
  85. package/dist/openmeld.js +23 -7
  86. package/dist/openmeld.js.map +1 -1
  87. package/dist/{prepare-provider-runtime-CkW7c9bF.js → prepare-provider-runtime-CyIGaDTC.js} +786 -490
  88. package/dist/prepare-provider-runtime-CyIGaDTC.js.map +1 -0
  89. package/dist/{prepare-session-executor-BExa01B_.js → prepare-session-executor-BesIXfWv.js} +25 -25
  90. package/dist/{prepare-session-executor-BExa01B_.js.map → prepare-session-executor-BesIXfWv.js.map} +1 -1
  91. package/dist/{process-channel-BCIgC7jM.js → process-channel-DILzf1ek.js} +2 -2
  92. package/dist/{process-channel-BCIgC7jM.js.map → process-channel-DILzf1ek.js.map} +1 -1
  93. package/dist/{process-identity-e30Hp6t3.js → process-identity-D_VPVruT.js} +2 -2
  94. package/dist/{process-identity-e30Hp6t3.js.map → process-identity-D_VPVruT.js.map} +1 -1
  95. package/dist/{runtime-DoIazDNu.js → runtime-BsLzW985.js} +174 -24
  96. package/dist/runtime-BsLzW985.js.map +1 -0
  97. package/dist/{runtime-agent-controller-reporting-submission-ZLj8H7TM.js → runtime-agent-controller-reporting-submission-Dtvml_vt.js} +10 -10
  98. package/dist/runtime-agent-controller-reporting-submission-Dtvml_vt.js.map +1 -0
  99. package/dist/{service-8ReqDsOx.js → service-BNpxWxYQ.js} +31 -30
  100. package/dist/service-BNpxWxYQ.js.map +1 -0
  101. package/dist/{service-account-authorization-CznmJjXZ.js → service-account-authorization-CJv1vZzm.js} +5 -5
  102. package/dist/{service-account-authorization-CznmJjXZ.js.map → service-account-authorization-CJv1vZzm.js.map} +1 -1
  103. package/dist/{service-account-control-DhU1ulXB.js → service-account-control-f9-hQZzW.js} +15 -15
  104. package/dist/{service-account-control-DhU1ulXB.js.map → service-account-control-f9-hQZzW.js.map} +1 -1
  105. package/dist/{service-control-capabilities-BVarsj7B.js → service-control-capabilities-D2-b-23n.js} +1 -1
  106. package/dist/{service-control-capabilities-DWOxjL2z.js → service-control-capabilities-DyX9foHw.js} +6 -6
  107. package/dist/{service-control-capabilities-DWOxjL2z.js.map → service-control-capabilities-DyX9foHw.js.map} +1 -1
  108. package/dist/{service-control-carrier-capability-DsHkOLJ6.js → service-control-carrier-capability-B8-5s0Z4.js} +3 -3
  109. package/dist/{service-control-carrier-capability-DsHkOLJ6.js.map → service-control-carrier-capability-B8-5s0Z4.js.map} +1 -1
  110. package/dist/setup-node-runtime-n0iHzmDA.js +19 -0
  111. package/dist/setup-node-runtime-n0iHzmDA.js.map +1 -0
  112. package/dist/{state-6y71kBCo.js → state-BlZXA4Rd.js} +3 -3
  113. package/dist/{state-6y71kBCo.js.map → state-BlZXA4Rd.js.map} +1 -1
  114. package/dist/{updates-api-DluYmth3.js → updates-api-BpuVusi5.js} +14 -14
  115. package/dist/{updates-api-DluYmth3.js.map → updates-api-BpuVusi5.js.map} +1 -1
  116. package/dist/{upgrade-BARBtyld.js → upgrade-CII-Xiab.js} +9 -9
  117. package/dist/{upgrade-BARBtyld.js.map → upgrade-CII-Xiab.js.map} +1 -1
  118. package/dist/upgrade-D3f82xoM.js +4 -0
  119. package/dist/windows/openmeld-windows-process.exe +0 -0
  120. package/dist/{windows-managed-install-q2TxKIIe.js → windows-managed-install-Db8X1tQ4.js} +2 -2
  121. package/dist/{windows-managed-install-q2TxKIIe.js.map → windows-managed-install-Db8X1tQ4.js.map} +1 -1
  122. package/dist/{windows-preview-channel-CqHp94Vp.js → windows-preview-channel-BJfMRixx.js} +3 -3
  123. package/dist/{windows-preview-channel-CqHp94Vp.js.map → windows-preview-channel-BJfMRixx.js.map} +1 -1
  124. package/dist/{windows-task-command-67Zb0gGt.js → windows-task-command-BGrlQDFJ.js} +2 -2
  125. package/dist/{windows-task-command-67Zb0gGt.js.map → windows-task-command-BGrlQDFJ.js.map} +1 -1
  126. package/dist/{windows-task-entry-ufpxSuX_.js → windows-task-entry-bzn-6mTB.js} +3 -3
  127. package/dist/{windows-task-entry-ufpxSuX_.js.map → windows-task-entry-bzn-6mTB.js.map} +1 -1
  128. package/dist/{windows-user-task-jz44qH1q.js → windows-user-task-GqNzbzc9.js} +1 -1
  129. package/dist/{windows-user-task-QsSEzkhv.js → windows-user-task-bkBjpShZ.js} +6 -6
  130. package/dist/{windows-user-task-QsSEzkhv.js.map → windows-user-task-bkBjpShZ.js.map} +1 -1
  131. package/package.json +8 -8
  132. package/skills/openmeld-cli/SKILL.md +6 -0
  133. package/skills/openmeld-cli/playbooks/agent-onboarding.md +8 -0
  134. package/skills/openmeld-cli/playbooks/computer.md +6 -0
  135. package/skills/openmeld-cli/playbooks/plugins.md +6 -0
  136. package/skills/openmeld-cli/playbooks/space-ops.md +20 -0
  137. package/skills/openmeld-cli/playbooks/space-reads.md +6 -0
  138. package/skills/openmeld-cli/references/commands.md +6 -0
  139. package/skills/openmeld-cli/references/runtime-resolution.md +6 -0
  140. package/dist/auth-session-CNPe3mUj.js +0 -4
  141. package/dist/command-BgBsh9xU.js.map +0 -1
  142. package/dist/daemon-service-update-coordinator-ef1RLL_R.js.map +0 -1
  143. package/dist/dist-CMBBVJVE.js.map +0 -1
  144. package/dist/dist-Dip3sgFz.js.map +0 -1
  145. package/dist/dist-qVdtMWpW.js +0 -4
  146. package/dist/prepare-provider-runtime-CkW7c9bF.js.map +0 -1
  147. package/dist/runtime-DoIazDNu.js.map +0 -1
  148. package/dist/runtime-agent-controller-reporting-submission-ZLj8H7TM.js.map +0 -1
  149. package/dist/service-8ReqDsOx.js.map +0 -1
  150. package/dist/upgrade-CshMPPlp.js +0 -4
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { C as updateConfiguredDeviceRuntimeState, T as updateConfiguredSkillsConfig, a as resolveBaseUrl, d as createDefaultRuntimeAgentControllerSettings, g as getConfiguredSkillsConfig, p as getConfiguredDeviceRuntimeState, v as getRuntimeConfigReadHealth, y as resolveRuntimeSkillsCustomTargetId } from "./base-url-B9NwMjEF.js";
3
+ import { C as updateConfiguredDeviceRuntimeState, T as updateConfiguredSkillsConfig, a as resolveBaseUrl, d as createDefaultRuntimeAgentControllerSettings, g as getConfiguredSkillsConfig, p as getConfiguredDeviceRuntimeState, v as getRuntimeConfigReadHealth, y as resolveRuntimeSkillsCustomTargetId } from "./base-url-CLMqlF1w.js";
4
4
  import { F as resolveOpenMeldRootDir, P as resolveOpenMeldEnvPreset, a as accountProfileWorkspacePath, b as normalizeOpenMeldProfileId, c as deviceOpenClawProfileBootstrapPath, h as isPublishedOpenMeldHome, l as deviceOpenClawProfileDir, n as accountProfileLocalMetaPath, u as deviceOpenClawProfileWorkspaceDir } from "./paths-De9xdA2h.js";
5
- import { $a as daemonRouteCatalogCacheSchema, DI as buildAgentControllerRoutingKey, DS as aiUsageObservationSchema, Dv as grokBotMessageReceiptSchema, EI as HOSTED_REMOTE_AGENT_CONTROLLER_REF, Ev as grokBotEntriesSchema, GR as profileWorkspaceModeSchema, IR as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, KR as profileWorkspaceOriginSchema, MI as parseAgentControllerRef$1, Nb as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, OI as canonicalizeAgentControllerRef, Ov as grokBotStoredCredentialSchema, Pa as windowsNativeProcessRequestSchema, RR as normalizeOptionalWorkingDirectory, SE as buildAgentControllerConversationRef, SO as agentInteractionResolutionSchema, Sv as agentExecutionSteerRequestSchema, TI as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, Tv as grokBotConversationIdSchema, XP as agentControllerCollaborationModeSchema, YP as agentControllerPermissionModeSchema, YT as providerDispatchRuntimeContextSchema, Za as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_NAME, aT as openMeldDaemonControlPlaneResponseSchema, bM as daemonServiceLaneSchema, cI as resolveCommandAgentWorkActivity, eE as conversationExecutionStateSchema, fS as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, iT as openMeldDaemonControlPlaneRequestSchema, jg as modelCatalogSchema, kI as canonicalizeBuiltinAgentControllerRef, nS as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, pD as normalizeMessageEnvelope, rS as isOriginalErrorSafeForMessageDetails, sD as formatCanonicalMentionLiteral, sS as openMeldDaemonProviderAccessEvidenceSchema, uS as openMeldDaemonTaskResultEnvelopeWriteSchema, vE as runtimeTransportModeSchema, wE as resolveBuiltinAgentControllerConversationKind, wI as HOSTED_CENTER_AGENT_CONTROLLER_REF, xI as compareAgentControllerRefsForDisplay } from "./dist-CMBBVJVE.js";
6
- import { a as isOpenMeldOrphanedLockError, d as runWithHeldLock, i as isOpenMeldLockError, t as acquireLock } from "./lock-CqozgAXC.js";
5
+ import { $P as agentControllerCollaborationModeSchema, $a as daemonRouteCatalogCacheSchema, AI as buildAgentControllerRoutingKey, CM as daemonServiceLaneSchema, DE as resolveBuiltinAgentControllerConversationKind, DI as HOSTED_CENTER_AGENT_CONTROLLER_REF, DS as aiUsageObservationSchema, Dv as grokBotMessageReceiptSchema, Ev as grokBotEntriesSchema, FI as parseAgentControllerRef$1, JR as profileWorkspaceModeSchema, MI as canonicalizeBuiltinAgentControllerRef, Nb as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, OI as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, Ov as grokBotStoredCredentialSchema, Pa as windowsNativeProcessRequestSchema, QP as agentControllerPermissionModeSchema, Sv as agentExecutionSteerRequestSchema, TE as buildAgentControllerConversationRef, TO as agentInteractionResolutionSchema, Tv as grokBotConversationIdSchema, VR as normalizeOptionalWorkingDirectory, YR as profileWorkspaceOriginSchema, YT as providerDispatchRuntimeContextSchema, Za as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_NAME, aT as openMeldDaemonControlPlaneResponseSchema, dI as resolveCommandAgentWorkActivity, fS as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, gD as normalizeMessageEnvelope, iT as openMeldDaemonControlPlaneRequestSchema, jI as canonicalizeAgentControllerRef, jg as modelCatalogSchema, kI as HOSTED_REMOTE_AGENT_CONTROLLER_REF, nS as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, rE as conversationExecutionStateSchema, rS as isOriginalErrorSafeForMessageDetails, sS as openMeldDaemonProviderAccessEvidenceSchema, uD as formatCanonicalMentionLiteral, uS as openMeldDaemonTaskResultEnvelopeWriteSchema, wI as compareAgentControllerRefsForDisplay, wv as grokBotAccountSchema, xE as runtimeTransportModeSchema, zR as MAX_PROFILE_WORKING_DIRECTORY_LENGTH } from "./dist-YSbIHBnl.js";
6
+ import { a as isOpenMeldOrphanedLockError, d as runWithHeldLock, i as isOpenMeldLockError, t as acquireLock } from "./lock-Cz8h_yJh.js";
7
7
  import { n as normalizeCommandEnvironment } from "./process-environment-BWSFeUu6.js";
8
- import { c as readWindowsProcessStartFileTime, d as WINDOWS_NATIVE_PROCESS_REQUEST_ENV, f as resolveWindowsNativeProcessHelper, l as resolveWindowsPowerShellPath, o as powerShellEncodedArguments, r as isProcessIdentityAlive, t as CURRENT_PROCESS_START_IDENTITY } from "./process-identity-e30Hp6t3.js";
9
- import { Vt as createAgentProfileBindingApi, an as createLocalRuntimeExpectedRoutesApi, t as OpenMeldApiClientHttpError } from "./dist-Dip3sgFz.js";
10
- import { F as resolveCurrentOpenMeldAccountContext, _ as touchDaemonCatalogSyncSignal, d as listOpenMeldProfiles } from "./context-DqkwGCKj.js";
11
- import { Y as OPENCLAW_CLI_TIMEOUT_MS$1, d as getAuthSessionState } from "./auth-session-RQOVI0Gb.js";
8
+ import { c as readWindowsProcessStartFileTime, d as WINDOWS_NATIVE_PROCESS_REQUEST_ENV, f as resolveWindowsNativeProcessHelper, l as resolveWindowsPowerShellPath, o as powerShellEncodedArguments, r as isProcessIdentityAlive, t as CURRENT_PROCESS_START_IDENTITY } from "./process-identity-D_VPVruT.js";
9
+ import { Vt as createAgentProfileBindingApi, an as createLocalRuntimeExpectedRoutesApi, t as OpenMeldApiClientHttpError } from "./dist-DY8oLAop.js";
10
+ import { F as resolveCurrentOpenMeldAccountContext, _ as touchDaemonCatalogSyncSignal, d as listOpenMeldProfiles } from "./context-DFf16i-C.js";
11
+ import { Y as OPENCLAW_CLI_TIMEOUT_MS$1, d as getAuthSessionState } from "./auth-session-B0J2UwSR.js";
12
12
  import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
13
- import { m as daemonRuntimeDataPath } from "./daemon-state-e0klzRsC.js";
14
- import { d as buildOpenMeldRequestContextFromProfile, t as createCliApiClientFoundation } from "./api-client-foundation-DBl_OaMj.js";
15
- import { i as readDaemonServiceContract } from "./daemon-service-contract-DGPRa_PH.js";
16
- import { C as requestLocalSyncRouteCatalog } from "./daemon-lifecycle-journal-D4Xupqhp.js";
13
+ import { m as daemonRuntimeDataPath } from "./daemon-state-C09DaALw.js";
14
+ import { d as buildOpenMeldRequestContextFromProfile, t as createCliApiClientFoundation } from "./api-client-foundation-6MeNwklv.js";
15
+ import { i as readDaemonServiceContract } from "./daemon-service-contract-D9gUVdhc.js";
16
+ import { C as requestLocalSyncRouteCatalog } from "./daemon-lifecycle-journal-DoAQ-E6K.js";
17
17
  import { i as resolveWindowsCommandPath, n as quoteWindowsProcessArgument, r as resolvePlatformCommand, t as execPlatformFile } from "./process-launch-B0pHlkV_.js";
18
- import { _ as toErrorMessage$20, d as normalizeText$11, g as parseTransportMode$1, h as parseStreamingMode$1, m as parseRuntimeTransportMode, p as parseContextIdMappingSpec, s as emitRunLine, u as normalizeOptionalText$49 } from "./daemon-device-id-BmL_1aHE.js";
18
+ import { _ as toErrorMessage$20, d as normalizeText$11, g as parseTransportMode$1, h as parseStreamingMode$1, m as parseRuntimeTransportMode, p as parseContextIdMappingSpec, s as emitRunLine, u as normalizeOptionalText$49 } from "./daemon-device-id-C3UTBv9T.js";
19
19
  import { createRequire } from "node:module";
20
20
  import { createHash, randomBytes, randomUUID } from "node:crypto";
21
21
  import { homedir, loadavg, tmpdir } from "node:os";
@@ -19858,6 +19858,205 @@ const installCursorAdapter = {
19858
19858
  }
19859
19859
  };
19860
19860
  //#endregion
19861
+ //#region ../../runtime/adapters/grok-bot/dist/setup.js
19862
+ const NODE_VERSION = "24.14.0";
19863
+ const BDK_VERSION = "0.2.25";
19864
+ function grokBotSetupPaths(root) {
19865
+ const directory = join(root, "connection-tools", "grok-bot");
19866
+ const nodeDirectory = join(directory, `node-v${NODE_VERSION}-${process.platform}-${process.arch}`);
19867
+ return {
19868
+ directory,
19869
+ nodeDirectory,
19870
+ node: join(nodeDirectory, "bin", "node"),
19871
+ npm: join(nodeDirectory, "lib", "node_modules", "npm", "bin", "npm-cli.js"),
19872
+ script: join(directory, "bdk", "node_modules", "@cursor", "bdk", "dist", "bin", "agent-serve.js"),
19873
+ config: join(directory, "auth"),
19874
+ launcher: join(directory, "launcher.mjs")
19875
+ };
19876
+ }
19877
+ function supportsGrokBotSetup() {
19878
+ return ["darwin", "linux"].includes(process.platform) && ["arm64", "x64"].includes(process.arch);
19879
+ }
19880
+ function run(command, args, options) {
19881
+ return new Promise((resolve, reject) => {
19882
+ const child = spawn(command, args, {
19883
+ cwd: options.cwd,
19884
+ env: options.env,
19885
+ stdio: [
19886
+ "ignore",
19887
+ "pipe",
19888
+ "pipe"
19889
+ ],
19890
+ shell: false
19891
+ });
19892
+ let output = "";
19893
+ let hardKill;
19894
+ const timer = setTimeout(() => {
19895
+ child.kill("SIGTERM");
19896
+ hardKill = setTimeout(() => child.kill("SIGKILL"), 5e3);
19897
+ }, options.timeout);
19898
+ child.stdout.on("data", (chunk) => {
19899
+ output = (output + String(chunk)).slice(-16384);
19900
+ });
19901
+ child.stderr.resume();
19902
+ child.on("error", (error) => {
19903
+ clearTimeout(timer);
19904
+ reject(error);
19905
+ });
19906
+ child.on("close", (code) => {
19907
+ clearTimeout(timer);
19908
+ clearTimeout(hardKill);
19909
+ if (code === 0) resolve(output);
19910
+ else reject(/* @__PURE__ */ new Error("The connection tool did not finish successfully. Try again or open the setup guide."));
19911
+ });
19912
+ });
19913
+ }
19914
+ async function readManagedGrokBotCandidate(root) {
19915
+ const paths = grokBotSetupPaths(root);
19916
+ try {
19917
+ await access(paths.node);
19918
+ await access(paths.script);
19919
+ await access(paths.launcher);
19920
+ } catch {
19921
+ return null;
19922
+ }
19923
+ return {
19924
+ installId: "openmeld-managed-grok-bot",
19925
+ label: "OpenMeld connection tools",
19926
+ detail: `BDK ${BDK_VERSION} · managed by OpenMeld`,
19927
+ commandPath: paths.launcher,
19928
+ launchContract: {
19929
+ kind: "node_script",
19930
+ nodePath: paths.node,
19931
+ scriptPath: paths.launcher
19932
+ }
19933
+ };
19934
+ }
19935
+ async function installGrokBotTools(root) {
19936
+ if (!supportsGrokBotSetup()) throw new Error("Install connection tools manually on this platform.");
19937
+ const paths = grokBotSetupPaths(root);
19938
+ await mkdir(paths.directory, {
19939
+ recursive: true,
19940
+ mode: 448
19941
+ });
19942
+ const archive = `node-v${NODE_VERSION}-${process.platform}-${process.arch}.tar.gz`;
19943
+ try {
19944
+ await access(paths.node);
19945
+ } catch {
19946
+ const base = `https://nodejs.org/dist/v${NODE_VERSION}/`;
19947
+ const [checksumResponse, archiveResponse] = await Promise.all([fetch(`${base}SHASUMS256.txt`, { signal: AbortSignal.timeout(6e4) }), fetch(`${base}${archive}`, { signal: AbortSignal.timeout(18e4) })]);
19948
+ if (!(checksumResponse.ok && archiveResponse.ok)) throw new Error("Could not download the connection runtime. Check the connection and retry.");
19949
+ const expected = (await checksumResponse.text()).split("\n").find((line) => line.endsWith(` ${archive}`))?.split(" ")[0];
19950
+ const bytes = Buffer.from(await archiveResponse.arrayBuffer());
19951
+ if (!expected || createHash("sha256").update(bytes).digest("hex") !== expected) throw new Error("Connection runtime verification failed.");
19952
+ const temporary = join(paths.directory, "download");
19953
+ await mkdir(temporary, {
19954
+ recursive: true,
19955
+ mode: 448
19956
+ });
19957
+ await writeFile(join(temporary, archive), bytes, { mode: 384 });
19958
+ await run("tar", [
19959
+ "-xzf",
19960
+ join(temporary, archive),
19961
+ "-C",
19962
+ temporary
19963
+ ], {
19964
+ cwd: temporary,
19965
+ timeout: 6e4
19966
+ });
19967
+ await rename(join(temporary, archive.replace(".tar.gz", "")), paths.nodeDirectory);
19968
+ await rm(temporary, {
19969
+ recursive: true,
19970
+ force: true
19971
+ });
19972
+ }
19973
+ const bdk = join(paths.directory, "bdk");
19974
+ await mkdir(bdk, {
19975
+ recursive: true,
19976
+ mode: 448
19977
+ });
19978
+ await run(paths.node, [
19979
+ paths.npm,
19980
+ "install",
19981
+ "--prefix",
19982
+ bdk,
19983
+ "--no-audit",
19984
+ "--no-fund",
19985
+ "--ignore-scripts",
19986
+ "--registry=https://registry.npmjs.org",
19987
+ `@cursor/bdk@${BDK_VERSION}`
19988
+ ], {
19989
+ cwd: paths.directory,
19990
+ env: {
19991
+ ...process.env,
19992
+ PATH: `${join(paths.nodeDirectory, "bin")}:${process.env.PATH ?? ""}`
19993
+ },
19994
+ timeout: 3e5
19995
+ });
19996
+ await run(paths.node, [paths.script, "--version"], {
19997
+ cwd: paths.directory,
19998
+ timeout: 15e3
19999
+ });
20000
+ await writeFile(paths.launcher, `import { fileURLToPath } from 'node:url';\nprocess.env.AGENT_SERVE_CONFIG_DIR = fileURLToPath(new URL('./auth', import.meta.url));\nfor (const key of ['CURSOR_API_KEY','CURSOR_API_KEY_FILE','CURSOR_SERVICE_ACCOUNT_KEY','CURSOR_API_BASE_URL','CURSOR_WEBSITE_URL']) delete process.env[key];\nawait import('./bdk/node_modules/@cursor/bdk/dist/bin/agent-serve.js');\n`, { mode: 384 });
20001
+ }
20002
+ function managedGrokBotEnvironment(root) {
20003
+ const env = {
20004
+ ...process.env,
20005
+ AGENT_SERVE_CONFIG_DIR: grokBotSetupPaths(root).config
20006
+ };
20007
+ for (const key of [
20008
+ "CURSOR_API_KEY",
20009
+ "CURSOR_API_KEY_FILE",
20010
+ "CURSOR_SERVICE_ACCOUNT_KEY",
20011
+ "CURSOR_API_BASE_URL",
20012
+ "CURSOR_WEBSITE_URL"
20013
+ ]) delete env[key];
20014
+ return env;
20015
+ }
20016
+ async function isManagedGrokBotSignedIn(root) {
20017
+ const paths = grokBotSetupPaths(root);
20018
+ try {
20019
+ await access(join(paths.config, "credentials.json"));
20020
+ const output = await run(paths.node, [
20021
+ paths.script,
20022
+ "whoami",
20023
+ "--json"
20024
+ ], {
20025
+ cwd: paths.directory,
20026
+ env: managedGrokBotEnvironment(root),
20027
+ timeout: 15e3
20028
+ });
20029
+ return grokBotAccountSchema.safeParse(JSON.parse(output)).success;
20030
+ } catch {
20031
+ return false;
20032
+ }
20033
+ }
20034
+ async function loginManagedGrokBot(root) {
20035
+ const paths = grokBotSetupPaths(root);
20036
+ await mkdir(paths.config, {
20037
+ recursive: true,
20038
+ mode: 448
20039
+ });
20040
+ await run(paths.node, [
20041
+ paths.script,
20042
+ "login",
20043
+ "--key-name",
20044
+ "OpenMeld Grok Bot"
20045
+ ], {
20046
+ cwd: paths.directory,
20047
+ env: managedGrokBotEnvironment(root),
20048
+ timeout: 6e5
20049
+ });
20050
+ if (!await isManagedGrokBotSignedIn(root)) throw new Error("Sign-in could not be verified. Sign in again.");
20051
+ }
20052
+ async function readManagedGrokBotCredential(launcher) {
20053
+ try {
20054
+ return grokBotStoredCredentialSchema.parse(JSON.parse(await readFile(join(dirname(launcher), "auth", "credentials.json"), "utf8"))).apiKey;
20055
+ } catch {
20056
+ throw new Error("Could not read the managed Grok Bot sign-in.");
20057
+ }
20058
+ }
20059
+ //#endregion
19861
20060
  //#region ../../runtime/adapters/grok-bot/dist/client.js
19862
20061
  var GrokBotError = class extends Error {
19863
20062
  errorType = "runtime";
@@ -19942,15 +20141,16 @@ async function verifyGrokBotLaunchContract(input) {
19942
20141
  });
19943
20142
  }
19944
20143
  async function resolveInstalledGrokBotLaunchCandidates(input) {
20144
+ const managed = input?.managedRoot ? await readManagedGrokBotCandidate(input.managedRoot) : null;
19945
20145
  const result = await resolveInstalledNodeScriptLaunchCandidates({
19946
20146
  commandName: "bdk",
19947
20147
  configuredCommand: process.env.OPENMELD_DAEMON_RUNTIME_GROK_BOT_BIN ?? null,
19948
20148
  displayName: "Grok Bot BDK",
19949
20149
  preferredLaunchContract: input?.preferredLaunchContract
19950
20150
  });
19951
- if (!result.ok) return result;
20151
+ if (!(result.ok || managed)) return result;
19952
20152
  const candidates = await resolveLaunchCandidatesAfterVerification({
19953
- candidates: result.candidates,
20153
+ candidates: [...managed ? [managed] : [], ...result.ok ? result.candidates : []],
19954
20154
  verify: (candidate) => verifyGrokBotLaunchContract({ launchContract: candidate.launchContract })
19955
20155
  });
19956
20156
  return candidates.length ? {
@@ -19992,6 +20192,13 @@ async function publishReply(request, output) {
19992
20192
  if (!request.spaceActionTools) return;
19993
20193
  if ((await request.spaceActionTools.call("reply", { message: output })).isError) throw new GrokBotError("grok-bot.reply_rejected", "OpenMeld could not record the Bot reply. Check the task diagnostics before retrying.");
19994
20194
  }
20195
+ async function readDispatchCredential(request) {
20196
+ if (request.launchContract?.kind === "node_script" && request.launchContract.scriptPath.endsWith("/connection-tools/grok-bot/launcher.mjs")) return await readManagedGrokBotCredential(request.launchContract.scriptPath);
20197
+ return await readGrokBotCredential({
20198
+ ...process.env,
20199
+ ...request.env
20200
+ });
20201
+ }
19995
20202
  function createGrokBotAdapter(options = {}) {
19996
20203
  const active = /* @__PURE__ */ new Map();
19997
20204
  const conversations = /* @__PURE__ */ new Set();
@@ -20039,10 +20246,7 @@ function createGrokBotAdapter(options = {}) {
20039
20246
  };
20040
20247
  active.set(request.taskId, turn);
20041
20248
  try {
20042
- const client = options.createClient ? await options.createClient(request) : new GrokBotClient(await readGrokBotCredential({
20043
- ...process.env,
20044
- ...request.env
20045
- }));
20249
+ const client = options.createClient ? await options.createClient(request) : new GrokBotClient(await readDispatchCredential(request));
20046
20250
  turn.client = client;
20047
20251
  const cursor = await readIdleCursor(client, sessionId);
20048
20252
  if (turn.stopRequested) throw new GrokBotError("runtime.turn.cancelled", "Stopped before the message was sent.");
@@ -20402,117 +20606,7 @@ function toRecord$3(value) {
20402
20606
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
20403
20607
  }
20404
20608
  //#endregion
20405
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/date.js
20406
- /*!
20407
- * Copyright (c) Squirrel Chat et al., All rights reserved.
20408
- * SPDX-License-Identifier: BSD-3-Clause
20409
- *
20410
- * Redistribution and use in source and binary forms, with or without
20411
- * modification, are permitted provided that the following conditions are met:
20412
- *
20413
- * 1. Redistributions of source code must retain the above copyright notice, this
20414
- * list of conditions and the following disclaimer.
20415
- * 2. Redistributions in binary form must reproduce the above copyright notice,
20416
- * this list of conditions and the following disclaimer in the
20417
- * documentation and/or other materials provided with the distribution.
20418
- * 3. Neither the name of the copyright holder nor the names of its contributors
20419
- * may be used to endorse or promote products derived from this software without
20420
- * specific prior written permission.
20421
- *
20422
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20423
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20424
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20425
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20426
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20427
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20428
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20429
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20430
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20431
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20432
- */
20433
- let DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
20434
- var TomlDate = class TomlDate extends Date {
20435
- #hasDate = false;
20436
- #hasTime = false;
20437
- #offset = null;
20438
- constructor(date) {
20439
- let hasDate = true;
20440
- let hasTime = true;
20441
- let offset = "Z";
20442
- if (typeof date === "string") {
20443
- let match = date.match(DATE_TIME_RE);
20444
- if (match) {
20445
- if (!match[1]) {
20446
- hasDate = false;
20447
- date = `0000-01-01T${date}`;
20448
- }
20449
- hasTime = !!match[2];
20450
- hasTime && date[10] === " " && (date = date.replace(" ", "T"));
20451
- if (match[2] && +match[2] > 23) date = "";
20452
- else {
20453
- offset = match[3] || null;
20454
- date = date.toUpperCase();
20455
- if (!offset && hasTime) date += "Z";
20456
- }
20457
- } else date = "";
20458
- }
20459
- super(date);
20460
- if (!isNaN(this.getTime())) {
20461
- this.#hasDate = hasDate;
20462
- this.#hasTime = hasTime;
20463
- this.#offset = offset;
20464
- }
20465
- }
20466
- isDateTime() {
20467
- return this.#hasDate && this.#hasTime;
20468
- }
20469
- isLocal() {
20470
- return !this.#hasDate || !this.#hasTime || !this.#offset;
20471
- }
20472
- isDate() {
20473
- return this.#hasDate && !this.#hasTime;
20474
- }
20475
- isTime() {
20476
- return this.#hasTime && !this.#hasDate;
20477
- }
20478
- isValid() {
20479
- return this.#hasDate || this.#hasTime;
20480
- }
20481
- toISOString() {
20482
- let iso = super.toISOString();
20483
- if (this.isDate()) return iso.slice(0, 10);
20484
- if (this.isTime()) return iso.slice(11, 23);
20485
- if (this.#offset === null) return iso.slice(0, -1);
20486
- if (this.#offset === "Z") return iso;
20487
- let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
20488
- offset = this.#offset[0] === "-" ? offset : -offset;
20489
- return (/* @__PURE__ */ new Date(this.getTime() - offset * 6e4)).toISOString().slice(0, -1) + this.#offset;
20490
- }
20491
- static wrapAsOffsetDateTime(jsDate, offset = "Z") {
20492
- let date = new TomlDate(jsDate);
20493
- date.#offset = offset;
20494
- return date;
20495
- }
20496
- static wrapAsLocalDateTime(jsDate) {
20497
- let date = new TomlDate(jsDate);
20498
- date.#offset = null;
20499
- return date;
20500
- }
20501
- static wrapAsLocalDate(jsDate) {
20502
- let date = new TomlDate(jsDate);
20503
- date.#hasTime = false;
20504
- date.#offset = null;
20505
- return date;
20506
- }
20507
- static wrapAsLocalTime(jsDate) {
20508
- let date = new TomlDate(jsDate);
20509
- date.#hasDate = false;
20510
- date.#offset = null;
20511
- return date;
20512
- }
20513
- };
20514
- //#endregion
20515
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/error.js
20609
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/error.js
20516
20610
  /*!
20517
20611
  * Copyright (c) Squirrel Chat et al., All rights reserved.
20518
20612
  * SPDX-License-Identifier: BSD-3-Clause
@@ -20541,11 +20635,11 @@ var TomlDate = class TomlDate extends Date {
20541
20635
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20542
20636
  */
20543
20637
  function getLineColFromPtr(string, ptr) {
20544
- let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
20638
+ let lines = string.slice(0, ptr).split(/\r?\n/);
20545
20639
  return [lines.length, lines.pop().length + 1];
20546
20640
  }
20547
20641
  function makeCodeBlock(string, line, column) {
20548
- let lines = string.split(/\r\n|\n|\r/g);
20642
+ let lines = string.split(/\r?\n/);
20549
20643
  let codeblock = "";
20550
20644
  let numberLen = (Math.log10(line + 1) | 0) + 1;
20551
20645
  for (let i = line - 1; i <= line + 1; i++) {
@@ -20562,7 +20656,7 @@ function makeCodeBlock(string, line, column) {
20562
20656
  }
20563
20657
  return codeblock;
20564
20658
  }
20565
- var TomlError = class extends Error {
20659
+ var TomlError = class TomlError extends Error {
20566
20660
  line;
20567
20661
  column;
20568
20662
  codeblock;
@@ -20574,9 +20668,16 @@ var TomlError = class extends Error {
20574
20668
  this.column = column;
20575
20669
  this.codeblock = codeblock;
20576
20670
  }
20671
+ /** @internal */
20672
+ static x(message, ctx, ptr) {
20673
+ throw new TomlError(message, {
20674
+ toml: ctx.s,
20675
+ ptr: ptr ?? ctx.p
20676
+ });
20677
+ }
20577
20678
  };
20578
20679
  //#endregion
20579
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/primitive.js
20680
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/primitive.js
20580
20681
  /*!
20581
20682
  * Copyright (c) Squirrel Chat et al., All rights reserved.
20582
20683
  * SPDX-License-Identifier: BSD-3-Clause
@@ -20604,126 +20705,78 @@ var TomlError = class extends Error {
20604
20705
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20605
20706
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20606
20707
  */
20607
- let INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
20608
- let FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
20609
- let LEADING_ZERO = /^[+-]?0[0-9_]/;
20610
- function parseString(str, ptr) {
20611
- let c = str[ptr++];
20708
+ /** @internal */
20709
+ function parseString(ctx) {
20710
+ let startPtr = ctx.p;
20711
+ let c = ctx.s.charCodeAt(ctx.p++);
20612
20712
  let first = c;
20613
- let isLiteral = c === "'";
20614
- let isMultiline = c === str[ptr] && c === str[ptr + 1];
20713
+ let isLiteral = c === 39;
20714
+ let isMultiline = c === ctx.s.charCodeAt(ctx.p) && c === ctx.s.charCodeAt(ctx.p + 1);
20615
20715
  if (isMultiline) {
20616
- if (str[ptr += 2] === "\n") ptr++;
20617
- else if (str[ptr] === "\r" && str[ptr + 1] === "\n") ptr += 2;
20716
+ if ((c = ctx.s.charCodeAt(ctx.p += 2)) === 10) ctx.p++;
20717
+ else if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) ctx.p += 2;
20618
20718
  }
20619
20719
  let parsed = "";
20620
- let sliceStart = ptr;
20720
+ let sliceStart = ctx.p;
20621
20721
  let state = 0;
20622
- for (let i = ptr; i < str.length; i++) {
20623
- c = str[i];
20624
- if (isMultiline && (c === "\n" || c === "\r" && str[i + 1] === "\n")) state = state && 3;
20625
- else if (c < " " && c !== " " || c === "") throw new TomlError("control characters are not allowed in strings", {
20626
- toml: str,
20627
- ptr: i
20628
- });
20629
- else if ((!state || state === 3) && c === first && (!isMultiline || str[i + 1] === first && str[i + 2] === first)) {
20722
+ for (; ctx.p < ctx.s.length; ctx.p++) {
20723
+ c = ctx.s.charCodeAt(ctx.p);
20724
+ if (isMultiline && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) state = state && 3;
20725
+ else if (c < 32 && c !== 9 || c === 127) TomlError.x("control characters are not allowed in strings", ctx);
20726
+ else if ((!state || state === 3) && c === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
20630
20727
  if (isMultiline) {
20631
- if (str[i + 3] === first) i++;
20632
- if (str[i + 3] === first) i++;
20728
+ if (ctx.s.charCodeAt(ctx.p + 3) === first) ctx.p++;
20729
+ if (ctx.s.charCodeAt(ctx.p + 3) === first) ctx.p++;
20633
20730
  }
20634
- return [state ? parsed : parsed + str.slice(sliceStart, i), i + (isMultiline ? 3 : 1)];
20731
+ if (!state) {
20732
+ let s = ctx.s.slice(sliceStart, ctx.p);
20733
+ parsed = parsed ? parsed + s : s;
20734
+ }
20735
+ ctx.p += isMultiline ? 3 : 1;
20736
+ return parsed;
20635
20737
  } else if (!state) {
20636
- if (!isLiteral && c === "\\") {
20637
- parsed += str.slice(sliceStart, sliceStart = i);
20738
+ if (!isLiteral && c === 92) {
20739
+ parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
20638
20740
  state = 1;
20639
20741
  }
20640
- } else if (state === 1) if (c === "x" || c === "u" || c === "U") {
20742
+ } else if (state === 1) if (c === 120 || c === 117 || c === 85) {
20743
+ let errPtr = ctx.p++ - 1;
20641
20744
  let value = 0;
20642
- let len = c === "x" ? 2 : c === "u" ? 4 : 8;
20643
- for (let j = 0; j < len; j++, i++) {
20644
- let hex = str.charCodeAt(i + 1);
20745
+ let len = c === 120 ? 2 : c === 117 ? 4 : 8;
20746
+ for (let j = 0; j < len; j++, ctx.p++) {
20747
+ let hex = ctx.s.charCodeAt(ctx.p);
20645
20748
  let digit = hex >= 48 && hex <= 57 ? hex - 48 : hex >= 65 && hex <= 70 ? hex - 65 + 10 : hex >= 97 && hex <= 102 ? hex - 97 + 10 : -1;
20646
- if (digit < 0) throw new TomlError("invalid non-hex character in unicode escape", {
20647
- toml: str,
20648
- ptr: i + 1
20649
- });
20749
+ if (digit < 0) TomlError.x("invalid non-hex character in unicode escape", ctx);
20650
20750
  value = value << 4 | digit;
20651
20751
  }
20652
- if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) throw new TomlError("invalid unicode escape", {
20653
- toml: str,
20654
- ptr: i
20655
- });
20752
+ if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) TomlError.x("invalid unicode escape", ctx, errPtr);
20656
20753
  parsed += String.fromCodePoint(value);
20657
- sliceStart = i + 1;
20754
+ sliceStart = ctx.p--;
20658
20755
  state = 0;
20659
- } else if (c === " " || c === " ") state = 2;
20756
+ } else if (isMultiline && (c === 32 || c === 9)) state = 2;
20660
20757
  else {
20661
- if (c === "b") parsed += "\b";
20662
- else if (c === "t") parsed += " ";
20663
- else if (c === "n") parsed += "\n";
20664
- else if (c === "f") parsed += "\f";
20665
- else if (c === "r") parsed += "\r";
20666
- else if (c === "e") parsed += "\x1B";
20667
- else if (c === "\"") parsed += "\"";
20668
- else if (c === "\\") parsed += "\\";
20669
- else throw new TomlError("unrecognized escape sequence", {
20670
- toml: str,
20671
- ptr: i
20672
- });
20673
- sliceStart = i + 1;
20758
+ if (c === 98) parsed += "\b";
20759
+ else if (c === 116) parsed += " ";
20760
+ else if (c === 110) parsed += "\n";
20761
+ else if (c === 102) parsed += "\f";
20762
+ else if (c === 114) parsed += "\r";
20763
+ else if (c === 101) parsed += "\x1B";
20764
+ else if (c === 34) parsed += "\"";
20765
+ else if (c === 92) parsed += "\\";
20766
+ else TomlError.x("unrecognised escape sequence", ctx);
20767
+ sliceStart = ctx.p + 1;
20674
20768
  state = 0;
20675
20769
  }
20676
- else if (c !== " " && c !== " ") {
20677
- if (state === 2) throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
20678
- toml: str,
20679
- ptr: sliceStart
20680
- });
20681
- state = !isLiteral && c === "\\" ? 1 : 0;
20682
- sliceStart = i;
20683
- }
20684
- }
20685
- throw new TomlError("unfinished string", {
20686
- toml: str,
20687
- ptr
20688
- });
20689
- }
20690
- function parseValue(value, toml, ptr, integersAsBigInt) {
20691
- if (value === "true") return true;
20692
- if (value === "false") return false;
20693
- if (value === "-inf") return -Infinity;
20694
- if (value === "inf" || value === "+inf") return Infinity;
20695
- if (value === "nan" || value === "+nan" || value === "-nan") return NaN;
20696
- if (value === "-0") return integersAsBigInt ? 0n : 0;
20697
- let isInt = INT_REGEX.test(value);
20698
- if (isInt || FLOAT_REGEX.test(value)) {
20699
- if (LEADING_ZERO.test(value)) throw new TomlError("leading zeroes are not allowed", {
20700
- toml,
20701
- ptr
20702
- });
20703
- value = value.replace(/_/g, "");
20704
- let numeric = +value;
20705
- if (isNaN(numeric)) throw new TomlError("invalid number", {
20706
- toml,
20707
- ptr
20708
- });
20709
- if (isInt) {
20710
- if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) throw new TomlError("integer value cannot be represented losslessly", {
20711
- toml,
20712
- ptr
20713
- });
20714
- if (isInt || integersAsBigInt === true) numeric = BigInt(value);
20770
+ else if (c !== 32 && c !== 9) {
20771
+ if (state === 2) TomlError.x("invalid escape: only line-ending whitespace may be escaped", ctx, sliceStart);
20772
+ state = !isLiteral && c === 92 ? 1 : 0;
20773
+ sliceStart = ctx.p;
20715
20774
  }
20716
- return numeric;
20717
20775
  }
20718
- const date = new TomlDate(value);
20719
- if (!date.isValid()) throw new TomlError("invalid value", {
20720
- toml,
20721
- ptr
20722
- });
20723
- return date;
20776
+ TomlError.x("unfinished string", ctx, startPtr);
20724
20777
  }
20725
20778
  //#endregion
20726
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/util.js
20779
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/date.js
20727
20780
  /*!
20728
20781
  * Copyright (c) Squirrel Chat et al., All rights reserved.
20729
20782
  * SPDX-License-Identifier: BSD-3-Clause
@@ -20751,50 +20804,104 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
20751
20804
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20752
20805
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20753
20806
  */
20754
- function indexOfNewline(str, start = 0, end = str.length) {
20755
- let idx = str.indexOf("\n", start);
20756
- if (str[idx - 1] === "\r") idx--;
20757
- return idx <= end ? idx : -1;
20758
- }
20759
- function skipComment(str, ptr) {
20760
- for (let i = ptr; i < str.length; i++) {
20761
- let c = str[i];
20762
- if (c === "\n") return i;
20763
- if (c === "\r" && str[i + 1] === "\n") return i + 1;
20764
- if (c < " " && c !== " " || c === "") throw new TomlError("control characters are not allowed in comments", {
20765
- toml: str,
20766
- ptr
20767
- });
20807
+ let DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i;
20808
+ var TomlDate = class TomlDate extends Date {
20809
+ #hasDate = false;
20810
+ #hasTime = false;
20811
+ #offset = null;
20812
+ constructor(date, fasttype, unsafeDelim) {
20813
+ let hasDate = true;
20814
+ let hasTime = true;
20815
+ let offset = "Z";
20816
+ let c;
20817
+ if (typeof date === "string") if (fasttype) prep: {
20818
+ if (fasttype < 3) {
20819
+ if (+date.slice(11, 13) > 23) {
20820
+ date = "";
20821
+ break prep;
20822
+ }
20823
+ if (fasttype === 2) {
20824
+ offset = null;
20825
+ date += "Z";
20826
+ } else if ((c = date.charCodeAt(date.length - 1)) !== 90 && c !== 122) offset = date.slice(date.length - 6);
20827
+ if (unsafeDelim) date = date.slice(0, 10) + "T" + date.slice(11);
20828
+ } else if (fasttype === 4) date = +date.slice(0, 2) > 23 ? "" : `0000-01-01T${date}Z`;
20829
+ hasDate = fasttype !== 4;
20830
+ hasTime = fasttype !== 3;
20831
+ }
20832
+ else {
20833
+ let match = date.match(DATE_TIME_RE);
20834
+ if (match) {
20835
+ if (!match[1]) {
20836
+ hasDate = false;
20837
+ date = `0000-01-01T${date}`;
20838
+ }
20839
+ hasTime = !!match[2];
20840
+ hasTime && date[10] === " " && (date = date.replace(" ", "T"));
20841
+ if (match[2] && +match[2] > 23) date = "";
20842
+ else {
20843
+ offset = match[3] || null;
20844
+ if (!offset && hasTime) date += "Z";
20845
+ }
20846
+ } else date = "";
20847
+ }
20848
+ super(date);
20849
+ if (!isNaN(this.getTime())) {
20850
+ this.#hasDate = hasDate;
20851
+ this.#hasTime = hasTime;
20852
+ this.#offset = offset;
20853
+ }
20768
20854
  }
20769
- return str.length;
20770
- }
20771
- function skipVoid(str, ptr, banNewLines, banComments) {
20772
- let c;
20773
- while (1) {
20774
- while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n")) ptr++;
20775
- if (banComments || c !== "#") break;
20776
- ptr = skipComment(str, ptr);
20855
+ isDateTime() {
20856
+ return this.#hasDate && this.#hasTime;
20777
20857
  }
20778
- return ptr;
20779
- }
20780
- function skipUntil(str, ptr, sep, end, banNewLines = false) {
20781
- if (!end) {
20782
- ptr = indexOfNewline(str, ptr);
20783
- return ptr < 0 ? str.length : ptr;
20858
+ isLocal() {
20859
+ return !this.#hasDate || !this.#hasTime || !this.#offset;
20784
20860
  }
20785
- for (let i = ptr; i < str.length; i++) {
20786
- let c = str[i];
20787
- if (c === "#") i = indexOfNewline(str, i);
20788
- else if (c === sep) return i + 1;
20789
- else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) return i;
20861
+ isDate() {
20862
+ return this.#hasDate && !this.#hasTime;
20790
20863
  }
20791
- throw new TomlError("cannot find end of structure", {
20792
- toml: str,
20793
- ptr
20794
- });
20795
- }
20864
+ isTime() {
20865
+ return this.#hasTime && !this.#hasDate;
20866
+ }
20867
+ isValid() {
20868
+ return this.#hasDate || this.#hasTime;
20869
+ }
20870
+ toISOString() {
20871
+ let iso = super.toISOString();
20872
+ if (this.isDate()) return iso.slice(0, 10);
20873
+ if (this.isTime()) return iso.slice(11, 23);
20874
+ if (this.#offset === null) return iso.slice(0, -1);
20875
+ if (this.#offset === "Z" || this.#offset === "z") return iso;
20876
+ let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
20877
+ offset = this.#offset[0] === "-" ? offset : -offset;
20878
+ return (/* @__PURE__ */ new Date(this.getTime() - offset * 6e4)).toISOString().slice(0, -1) + this.#offset;
20879
+ }
20880
+ static wrapAsOffsetDateTime(jsDate, offset = "Z") {
20881
+ let date = new TomlDate(jsDate);
20882
+ date.#offset = offset;
20883
+ return date;
20884
+ }
20885
+ static wrapAsLocalDateTime(jsDate) {
20886
+ let date = new TomlDate(jsDate);
20887
+ date.#offset = null;
20888
+ return date;
20889
+ }
20890
+ static wrapAsLocalDate(jsDate) {
20891
+ let date = new TomlDate(jsDate);
20892
+ date.#hasTime = false;
20893
+ date.#offset = null;
20894
+ return date;
20895
+ }
20896
+ static wrapAsLocalTime(jsDate) {
20897
+ let date = new TomlDate(jsDate);
20898
+ date.#hasDate = false;
20899
+ date.#offset = null;
20900
+ return date;
20901
+ }
20902
+ };
20796
20903
  //#endregion
20797
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/extract.js
20904
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/extract.js
20798
20905
  /*!
20799
20906
  * Copyright (c) Squirrel Chat et al., All rights reserved.
20800
20907
  * SPDX-License-Identifier: BSD-3-Clause
@@ -20822,59 +20929,195 @@ function skipUntil(str, ptr, sep, end, banNewLines = false) {
20822
20929
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20823
20930
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20824
20931
  */
20825
- function sliceAndTrimEndOf(str, startPtr, endPtr) {
20826
- let value = str.slice(startPtr, endPtr);
20827
- let commentIdx = value.indexOf("#");
20828
- if (commentIdx > -1) {
20829
- skipComment(str, commentIdx);
20830
- value = value.slice(0, commentIdx);
20831
- }
20832
- return [value.trimEnd(), commentIdx];
20833
- }
20834
- function extractValue(str, ptr, end, depth, integersAsBigInt) {
20835
- if (depth === 0) throw new TomlError("document contains excessively nested structures. aborting.", {
20836
- toml: str,
20837
- ptr
20838
- });
20839
- let c = str[ptr];
20840
- if (c === "[" || c === "{") {
20841
- let [value, endPtr] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
20842
- if (end) {
20843
- endPtr = skipVoid(str, endPtr);
20844
- if (str[endPtr] === ",") endPtr++;
20845
- else if (str[endPtr] !== end) throw new TomlError("expected comma or end of structure", {
20846
- toml: str,
20847
- ptr: endPtr
20848
- });
20932
+ function isDigit(char, base = 10) {
20933
+ return base === 16 ? char > 47 && char < 58 || char > 64 && char < 71 || char > 96 && char < 103 : char > 47 && char < 48 + base;
20934
+ }
20935
+ function isEndOfValue(char, delim) {
20936
+ return char === 32 || char === 9 || char === 10 || char === 13 || delim && (char === delim || char === 44) || char === 35;
20937
+ }
20938
+ /** @internal */
20939
+ function extractValue(ctx, end) {
20940
+ let errPtr = ctx.p;
20941
+ let c = ctx.s.charCodeAt(ctx.p);
20942
+ if (c === 91 || c === 123) {
20943
+ ctx.d-- || TomlError.x("document contains excessively nested structures. aborting.", ctx);
20944
+ let value = c === 91 ? parseArray(ctx) : parseInlineTable(ctx);
20945
+ ctx.d++;
20946
+ return value;
20947
+ }
20948
+ if (c === 34 || c === 39) return parseString(ctx);
20949
+ if (c === 116) {
20950
+ if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101) TomlError.x("invalid value", ctx, errPtr);
20951
+ return ctx.p++, true;
20952
+ }
20953
+ if (c === 102) {
20954
+ if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 108 || ctx.s.charCodeAt(++ctx.p) !== 115 || ctx.s.charCodeAt(++ctx.p) !== 101) TomlError.x("invalid value", ctx, errPtr);
20955
+ return ctx.p++, false;
20956
+ }
20957
+ if (c === 43 || c === 45) return parseNumber(ctx, ctx.p, ctx.s.charCodeAt(++ctx.p), 44 - c, end);
20958
+ if (ctx.s.charCodeAt(ctx.p + 4) === 45 && ctx.s.charCodeAt(ctx.p + 7) === 45) return parseDate(ctx, c, end);
20959
+ if (ctx.s.charCodeAt(ctx.p + 2) === 58) return parseTime(ctx, c, end);
20960
+ return parseNumber(ctx, ctx.p, c, 0, end);
20961
+ }
20962
+ function parseNumber(ctx, startPtr, startChr, sign, endChr) {
20963
+ let c = startChr;
20964
+ let state = 0;
20965
+ let hasUnderscores = false;
20966
+ if (c === 105) {
20967
+ if (ctx.s.charCodeAt(++ctx.p) !== 110 || ctx.s.charCodeAt(++ctx.p) !== 102) TomlError.x("invalid value", ctx, startPtr);
20968
+ return ctx.p++, (sign || 1) / 0;
20969
+ }
20970
+ if (c === 110) {
20971
+ if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 110) TomlError.x("invalid value", ctx, startPtr);
20972
+ return ctx.p++, NaN;
20973
+ }
20974
+ if (c === 48) {
20975
+ if (++ctx.p >= ctx.s.length || isEndOfValue(c = ctx.s.charCodeAt(ctx.p), endChr)) return ctx.bi === true ? 0n : 0;
20976
+ if (!sign) {
20977
+ if (c === 120) return parseIntegerBaseN(ctx, startPtr, 16, endChr);
20978
+ else if (c === 98) return parseIntegerBaseN(ctx, startPtr, 2, endChr);
20979
+ else if (c === 111) return parseIntegerBaseN(ctx, startPtr, 8, endChr);
20980
+ }
20981
+ if (c === 46) state = 2;
20982
+ else if (c === 101 || c === 69) state = 4;
20983
+ else TomlError.x("illegal leading zero", ctx, startPtr);
20984
+ } else if (!isDigit(c)) TomlError.x("invalid value", ctx, startPtr);
20985
+ while (++ctx.p < ctx.s.length && (c = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c, endChr))) {
20986
+ if (!state) state = 1;
20987
+ if (c === 95) {
20988
+ if (!(state & 1)) TomlError.x("illegal underscore", ctx);
20989
+ state += 11;
20990
+ hasUnderscores = true;
20991
+ } else if (state === 1 && c === 46) state = 2;
20992
+ else if ((state === 1 || state === 3) && (c === 101 || c === 69)) state = 4;
20993
+ else if (state === 4 && (c === 43 || c === 45)) {} else if (!isDigit(c)) TomlError.x(`illegal character in numeric literal`, ctx);
20994
+ else if (state > 9) state -= 11;
20995
+ else if (!(state & 1)) state++;
20996
+ }
20997
+ if (!state) {
20998
+ let val = (startChr - 48) * (sign || 1);
20999
+ return ctx.bi === true ? BigInt(val) : val;
21000
+ }
21001
+ if (!(state & 1)) TomlError.x("unfinished numeric value", ctx, startPtr);
21002
+ let str = ctx.s.slice(startPtr, ctx.p);
21003
+ if (hasUnderscores) str = str.replaceAll("_", "");
21004
+ return state > 1 ? parseFloat(str) : parseInteger(ctx, str, 10, startPtr);
21005
+ }
21006
+ function parseIntegerBaseN(ctx, startPtr, base, endChr) {
21007
+ let c, underscore = 1;
21008
+ while (++ctx.p < ctx.s.length && (c = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c, endChr))) if (c === 95) {
21009
+ if (underscore & 1) TomlError.x("illegal underscore", ctx);
21010
+ underscore = 3;
21011
+ } else if (!isDigit(c, base)) TomlError.x(`illegal character in numeric literal`, ctx);
21012
+ else if (underscore & 1) underscore--;
21013
+ if (underscore & 1) TomlError.x("unfinished numeric value", ctx);
21014
+ let str = ctx.s.slice(startPtr + 2, ctx.p);
21015
+ if (underscore) str = str.replaceAll("_", "");
21016
+ return parseInteger(ctx, str, base, startPtr);
21017
+ }
21018
+ function parseInteger(ctx, str, base, startPtr) {
21019
+ if (ctx.bi !== true) int: {
21020
+ let val = parseInt(str, base);
21021
+ if (!Number.isSafeInteger(val)) {
21022
+ if (ctx.bi) break int;
21023
+ TomlError.x("integer value cannot be represented losslessly", ctx, startPtr);
21024
+ }
21025
+ return val;
21026
+ }
21027
+ return base === 10 ? BigInt(str) : BigInt((base === 2 ? "0b" : base === 8 ? "0o" : "0x") + str);
21028
+ }
21029
+ function parseDate(ctx, c, endChr) {
21030
+ let startPtr = ctx.p++, unsafeSeparator;
21031
+ if (!isDigit(c) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++))) return parseNumber(ctx, ctx.p = startPtr, c, 0, endChr);
21032
+ ctx.p += 5;
21033
+ if (!isDigit(ctx.s.charCodeAt(ctx.p++))) TomlError.x("invalid date-time: date part is malformed", ctx, startPtr);
21034
+ if (ctx.p >= ctx.s.length || ((c = ctx.s.charCodeAt(ctx.p)) !== 32 || (unsafeSeparator = true, !isDigit(ctx.s.charCodeAt(ctx.p + 1)))) && c !== 84 && c !== 116) return readDate(ctx, ctx.s.slice(startPtr, ctx.p), 3, false, startPtr);
21035
+ if (ctx.s.charCodeAt(ctx.p += 3) !== 58) TomlError.x("invalid date-time: time part is malformed", ctx, startPtr);
21036
+ if (ctx.s.charCodeAt(ctx.p += 3) === 58) ctx.p += 3;
21037
+ if (ctx.s.charCodeAt(ctx.p) === 46) while (isDigit(ctx.s.charCodeAt(++ctx.p)));
21038
+ if (c = ctx.s.charCodeAt(ctx.p)) {
21039
+ if (c === 90 || c === 122) return readDate(ctx, ctx.s.slice(startPtr, ++ctx.p), 1, unsafeSeparator, startPtr, "[+00:00]");
21040
+ if (c === 43 || c === 45) return readDate(ctx, ctx.s.slice(startPtr, ctx.p += 6), 1, unsafeSeparator, startPtr, !ctx.ld && "[" + ctx.s.slice(ctx.p - 6, ctx.p) + "]");
21041
+ }
21042
+ return readDate(ctx, ctx.s.slice(startPtr, ctx.p), 2, unsafeSeparator, startPtr);
21043
+ }
21044
+ function parseTime(ctx, c, endChr) {
21045
+ let start = ctx.p;
21046
+ if (!isDigit(c) || !isDigit(ctx.s.charCodeAt(++ctx.p))) return parseNumber(ctx, --ctx.p, c, 0, endChr);
21047
+ if (ctx.s.charCodeAt(ctx.p += 4) === 58) ctx.p += 3;
21048
+ if (ctx.s.charCodeAt(ctx.p) === 46) while (isDigit(ctx.s.charCodeAt(++ctx.p)));
21049
+ return readDate(ctx, ctx.s.slice(start, ctx.p), 4, false, start);
21050
+ }
21051
+ function readDate(ctx, str, type, unsafeDelim, errPtr, temporalSuffix) {
21052
+ if (ctx.ld) {
21053
+ let date = new TomlDate(str, type, unsafeDelim);
21054
+ if (!date.isValid()) TomlError.x("invalid date", ctx, errPtr);
21055
+ return date;
21056
+ }
21057
+ try {
21058
+ if (temporalSuffix) str += temporalSuffix;
21059
+ switch (type) {
21060
+ case 1: return Temporal.ZonedDateTime.from(str);
21061
+ case 2: return Temporal.PlainDateTime.from(str);
21062
+ case 3: return Temporal.PlainDate.from(str);
21063
+ case 4: return Temporal.PlainTime.from(str);
20849
21064
  }
20850
- return [value, endPtr];
21065
+ } catch (e) {
21066
+ TomlError.x(e instanceof Error ? e.message : "" + e, ctx, errPtr);
20851
21067
  }
20852
- if (c === "\"" || c === "'") {
20853
- let [parsed, endPtr] = parseString(str, ptr);
20854
- if (end) {
20855
- endPtr = skipVoid(str, endPtr);
20856
- if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") throw new TomlError("unexpected character encountered", {
20857
- toml: str,
20858
- ptr: endPtr
20859
- });
20860
- if (str[endPtr] === ",") endPtr++;
21068
+ }
21069
+ //#endregion
21070
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/util.js
21071
+ /*!
21072
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
21073
+ * SPDX-License-Identifier: BSD-3-Clause
21074
+ *
21075
+ * Redistribution and use in source and binary forms, with or without
21076
+ * modification, are permitted provided that the following conditions are met:
21077
+ *
21078
+ * 1. Redistributions of source code must retain the above copyright notice, this
21079
+ * list of conditions and the following disclaimer.
21080
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
21081
+ * this list of conditions and the following disclaimer in the
21082
+ * documentation and/or other materials provided with the distribution.
21083
+ * 3. Neither the name of the copyright holder nor the names of its contributors
21084
+ * may be used to endorse or promote products derived from this software without
21085
+ * specific prior written permission.
21086
+ *
21087
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21088
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21089
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21090
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21091
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21092
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21093
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21094
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21095
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21096
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21097
+ */
21098
+ /** @internal */
21099
+ function skipComment(ctx) {
21100
+ for (; ctx.p < ctx.s.length; ctx.p++) {
21101
+ let c = ctx.s.charCodeAt(ctx.p);
21102
+ if (c === 10) break;
21103
+ if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
21104
+ ctx.p++;
21105
+ break;
20861
21106
  }
20862
- return [parsed, endPtr];
21107
+ if (c < 32 && c !== 9 || c === 127) TomlError.x("control characters are not allowed in comments", ctx);
20863
21108
  }
20864
- let endPtr = skipUntil(str, ptr, ",", end);
20865
- let slice = sliceAndTrimEndOf(str, ptr, endPtr - (str[endPtr - 1] === "," ? 1 : 0));
20866
- if (!slice[0]) throw new TomlError("incomplete key-value declaration: no value specified", {
20867
- toml: str,
20868
- ptr
20869
- });
20870
- if (end && slice[1] > -1) {
20871
- endPtr = skipVoid(str, ptr + slice[1]);
20872
- if (str[endPtr] === ",") endPtr++;
21109
+ }
21110
+ /** @internal */
21111
+ function skipVoid(ctx, banNewLines, banComments) {
21112
+ let c;
21113
+ while (ctx.p < ctx.s.length) {
21114
+ while (ctx.p < ctx.s.length && ((c = ctx.s.charCodeAt(ctx.p)) === 32 || c === 9 || !banNewLines && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))) ctx.p++;
21115
+ if (banComments || c !== 35) break;
21116
+ skipComment(ctx);
20873
21117
  }
20874
- return [parseValue(slice[0], str, ptr, integersAsBigInt), endPtr];
20875
21118
  }
20876
21119
  //#endregion
20877
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/struct.js
21120
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/struct.js
20878
21121
  /*!
20879
21122
  * Copyright (c) Squirrel Chat et al., All rights reserved.
20880
21123
  * SPDX-License-Identifier: BSD-3-Clause
@@ -20902,119 +21145,102 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
20902
21145
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20903
21146
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20904
21147
  */
20905
- let KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
20906
- function parseKey(str, ptr, end = "=") {
20907
- let dot = ptr - 1;
21148
+ /** @internal */
21149
+ function parseKey(ctx, end = 61) {
21150
+ let startPtr;
21151
+ let state = 0;
20908
21152
  let parsed = [];
20909
- let endPtr = str.indexOf(end, ptr);
20910
- if (endPtr < 0) throw new TomlError("incomplete key-value: cannot find end of key", {
20911
- toml: str,
20912
- ptr
20913
- });
20914
- do {
20915
- let c = str[ptr = ++dot];
20916
- if (c !== " " && c !== " ") if (c === "\"" || c === "'") {
20917
- if (c === str[ptr + 1] && c === str[ptr + 2]) throw new TomlError("multiline strings are not allowed in keys", {
20918
- toml: str,
20919
- ptr
20920
- });
20921
- let [part, eos] = parseString(str, ptr);
20922
- dot = str.indexOf(".", eos);
20923
- let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
20924
- let newLine = indexOfNewline(strEnd);
20925
- if (newLine > -1) throw new TomlError("newlines are not allowed in keys", {
20926
- toml: str,
20927
- ptr: ptr + dot + newLine
20928
- });
20929
- if (strEnd.trimStart()) throw new TomlError("found extra tokens after the string part", {
20930
- toml: str,
20931
- ptr: eos
20932
- });
20933
- if (endPtr < eos) {
20934
- endPtr = str.indexOf(end, eos);
20935
- if (endPtr < 0) throw new TomlError("incomplete key-value: cannot find end of key", {
20936
- toml: str,
20937
- ptr
20938
- });
21153
+ let sliceStart;
21154
+ let c = ctx.s.charCodeAt(startPtr = ctx.p);
21155
+ do
21156
+ if (c === end) {
21157
+ if (!state) TomlError.x("unexpected end of key", ctx);
21158
+ if (state === 1) parsed.push(ctx.s.slice(sliceStart, ctx.p));
21159
+ return ctx.p++, parsed;
21160
+ } else if (c === 46) {
21161
+ if (!state) TomlError.x("illegal empty bare key", ctx);
21162
+ if (state === 1) parsed.push(ctx.s.slice(sliceStart, ctx.p));
21163
+ state = 0;
21164
+ } else if (!state && (c === 34 || c === 39)) {
21165
+ if (c === ctx.s.charCodeAt(ctx.p + 1) && c === ctx.s.charCodeAt(ctx.p + 2)) TomlError.x("illegal quoted key: multiline strings are not allowed", ctx);
21166
+ parsed.push(parseString(ctx));
21167
+ state = 2;
21168
+ ctx.p--;
21169
+ } else if (c === 32 || c === 9) {
21170
+ if (state === 1) {
21171
+ parsed.push(ctx.s.slice(sliceStart, ctx.p));
21172
+ state = 2;
20939
21173
  }
20940
- parsed.push(part);
20941
- } else {
20942
- dot = str.indexOf(".", ptr);
20943
- let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
20944
- if (!KEY_PART_RE.test(part)) throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
20945
- toml: str,
20946
- ptr
20947
- });
20948
- parsed.push(part.trimEnd());
20949
- }
20950
- } while (dot + 1 && dot < endPtr);
20951
- return [parsed, skipVoid(str, endPtr + 1, true, true)];
20952
- }
20953
- function parseInlineTable(str, ptr, depth, integersAsBigInt) {
20954
- let res = {};
21174
+ } else if (state === 2 || c < 48 && c !== 45 || c > 57 && c < 65 || c > 90 && c < 97 && c !== 95 || c > 122) TomlError.x("illegal character in key", ctx);
21175
+ else if (!state) {
21176
+ state = 1;
21177
+ sliceStart = ctx.p;
21178
+ }
21179
+ while (c = ctx.s.charCodeAt(++ctx.p));
21180
+ TomlError.x("incomplete key-value: cannot find end of key", ctx, startPtr);
21181
+ }
21182
+ /** @internal */
21183
+ function parseInlineTable(ctx) {
21184
+ let startPtr = ctx.p++;
21185
+ let res = Object.create(null);
20955
21186
  let seen = /* @__PURE__ */ new Set();
20956
21187
  let c;
20957
- ptr++;
20958
- while ((c = str[ptr++]) !== "}" && c) if (c === ",") throw new TomlError("expected value, found comma", {
20959
- toml: str,
20960
- ptr: ptr - 1
20961
- });
20962
- else if (c === "#") ptr = skipComment(str, ptr);
20963
- else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
21188
+ while (ctx.p < ctx.s.length) {
21189
+ skipVoid(ctx);
21190
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 125) {
21191
+ ctx.p++;
21192
+ return res;
21193
+ }
20964
21194
  let k;
20965
21195
  let t = res;
20966
21196
  let hasOwn = false;
20967
- let [key, keyEndPtr] = parseKey(str, ptr - 1);
21197
+ let errPtr = ctx.p;
21198
+ let key = parseKey(ctx);
20968
21199
  for (let i = 0; i < key.length; i++) {
20969
- if (i) t = hasOwn ? t[k] : t[k] = {};
21200
+ if (i) t = hasOwn ? t[k] : t[k] = Object.create(null);
20970
21201
  k = key[i];
20971
- if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) throw new TomlError("trying to redefine an already defined value", {
20972
- toml: str,
20973
- ptr
20974
- });
20975
- if (!hasOwn && k === "__proto__") Object.defineProperty(t, k, {
21202
+ if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) TomlError.x("trying to redefine an already defined value", ctx, errPtr);
21203
+ let unsafe = k === "__proto__";
21204
+ if (ctx.uk && (unsafe || k === "constructor")) {
21205
+ t = ctx.uk !== 1 && TomlError.x("document contains an unsafe property", ctx, errPtr);
21206
+ break;
21207
+ }
21208
+ if (!hasOwn && unsafe) Object.defineProperty(t, k, {
20976
21209
  enumerable: true,
20977
21210
  configurable: true,
20978
21211
  writable: true
20979
21212
  });
20980
21213
  }
20981
- if (hasOwn) throw new TomlError("trying to redefine an already defined value", {
20982
- toml: str,
20983
- ptr
20984
- });
20985
- let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
20986
- seen.add(value);
20987
- t[k] = value;
20988
- ptr = valueEndPtr;
21214
+ if (hasOwn) TomlError.x("trying to redefine an already defined value", ctx, errPtr);
21215
+ skipVoid(ctx, true, true);
21216
+ let value = extractValue(ctx, 125);
21217
+ if (t && typeof (t[k] = value) === "object") seen.add(value);
21218
+ skipVoid(ctx);
21219
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 125) return res;
21220
+ if (c !== 44) TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
20989
21221
  }
20990
- if (!c) throw new TomlError("unfinished table encountered", {
20991
- toml: str,
20992
- ptr
20993
- });
20994
- return [res, ptr];
21222
+ TomlError.x("unfinished table", ctx, startPtr);
20995
21223
  }
20996
- function parseArray(str, ptr, depth, integersAsBigInt) {
21224
+ /** @internal */
21225
+ function parseArray(ctx) {
21226
+ let startPtr = ctx.p++;
20997
21227
  let res = [];
20998
21228
  let c;
20999
- ptr++;
21000
- while ((c = str[ptr++]) !== "]" && c) if (c === ",") throw new TomlError("expected value, found comma", {
21001
- toml: str,
21002
- ptr: ptr - 1
21003
- });
21004
- else if (c === "#") ptr = skipComment(str, ptr);
21005
- else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
21006
- let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
21007
- res.push(e[0]);
21008
- ptr = e[1];
21229
+ while (ctx.p < ctx.s.length) {
21230
+ skipVoid(ctx);
21231
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 93) {
21232
+ ctx.p++;
21233
+ return res;
21234
+ }
21235
+ res.push(extractValue(ctx, 93));
21236
+ skipVoid(ctx);
21237
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 93) return res;
21238
+ if (c !== 44) TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
21009
21239
  }
21010
- if (!c) throw new TomlError("unfinished array encountered", {
21011
- toml: str,
21012
- ptr
21013
- });
21014
- return [res, ptr];
21240
+ TomlError.x("unfinished array", ctx, startPtr);
21015
21241
  }
21016
21242
  //#endregion
21017
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/parse.js
21243
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/parse.js
21018
21244
  /*!
21019
21245
  * Copyright (c) Squirrel Chat et al., All rights reserved.
21020
21246
  * SPDX-License-Identifier: BSD-3-Clause
@@ -21042,7 +21268,7 @@ function parseArray(str, ptr, depth, integersAsBigInt) {
21042
21268
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21043
21269
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21044
21270
  */
21045
- function peekTable(key, table, meta, type) {
21271
+ function peekTable(ctx, key, table, meta, type) {
21046
21272
  let t = table;
21047
21273
  let m = meta;
21048
21274
  let k;
@@ -21050,7 +21276,7 @@ function peekTable(key, table, meta, type) {
21050
21276
  let state;
21051
21277
  for (let i = 0; i < key.length; i++) {
21052
21278
  if (i) {
21053
- t = hasOwn ? t[k] : t[k] = {};
21279
+ t = hasOwn ? t[k] : t[k] = Object.create(null);
21054
21280
  m = (state = m[k]).c;
21055
21281
  if (type === 0 && (state.t === 1 || state.t === 2)) return null;
21056
21282
  if (state.t === 2) {
@@ -21062,7 +21288,9 @@ function peekTable(key, table, meta, type) {
21062
21288
  k = key[i];
21063
21289
  if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 && m[k]?.d) return null;
21064
21290
  if (!hasOwn) {
21065
- if (k === "__proto__") {
21291
+ let unsafe = k === "__proto__";
21292
+ if (ctx.uk && (unsafe || k === "constructor")) return false;
21293
+ if (unsafe) {
21066
21294
  Object.defineProperty(t, k, {
21067
21295
  enumerable: true,
21068
21296
  configurable: true,
@@ -21078,7 +21306,7 @@ function peekTable(key, table, meta, type) {
21078
21306
  t: i < key.length - 1 && type === 2 ? 3 : type,
21079
21307
  d: false,
21080
21308
  i: 0,
21081
- c: {}
21309
+ c: Object.create(null)
21082
21310
  };
21083
21311
  }
21084
21312
  }
@@ -21089,17 +21317,17 @@ function peekTable(key, table, meta, type) {
21089
21317
  state.d = true;
21090
21318
  t[k] = [];
21091
21319
  }
21092
- t[k].push(t = {});
21320
+ t[k].push(t = Object.create(null));
21093
21321
  state.c[state.i++] = state = {
21094
21322
  t: 1,
21095
21323
  d: false,
21096
21324
  i: 0,
21097
- c: {}
21325
+ c: Object.create(null)
21098
21326
  };
21099
21327
  }
21100
21328
  if (state.d) return null;
21101
21329
  state.d = true;
21102
- if (type === 1) t = hasOwn ? t[k] : t[k] = {};
21330
+ if (type === 1) t = hasOwn ? t[k] : t[k] = Object.create(null);
21103
21331
  else if (type === 0 && hasOwn) return null;
21104
21332
  return [
21105
21333
  k,
@@ -21107,52 +21335,60 @@ function peekTable(key, table, meta, type) {
21107
21335
  state.c
21108
21336
  ];
21109
21337
  }
21110
- function parse$1(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
21111
- let res = {};
21112
- let meta = {};
21338
+ function validateTablePeek(ctx, peek, ptr) {
21339
+ if (peek === null || ctx.uk === 2) TomlError.x(peek === null ? "trying to redefine an already defined table or value" : "document contains an unsafe property", ctx, ptr);
21340
+ }
21341
+ function parse$1(toml, options = {}) {
21342
+ let ctx = {
21343
+ s: toml,
21344
+ p: 0,
21345
+ d: options.maxDepth ?? 1e3,
21346
+ bi: options.integersAsBigInt ?? false,
21347
+ ld: options.useLegacyDate ?? true,
21348
+ uk: options.unsafeKeyBehaviour === "throw" ? 2 : options.unsafeKeyBehaviour === "drop" ? 1 : 0
21349
+ };
21350
+ let res = Object.create(null);
21351
+ let meta = Object.create(null);
21352
+ let tmp;
21353
+ let skipping = false;
21113
21354
  let tbl = res;
21114
21355
  let m = meta;
21115
- for (let ptr = skipVoid(toml, 0); ptr < toml.length;) {
21116
- if (toml[ptr] === "[") {
21117
- let isTableArray = toml[++ptr] === "[";
21118
- let k = parseKey(toml, ptr += +isTableArray, "]");
21356
+ if (toml.charCodeAt(0) === 65279) ctx.p++;
21357
+ skipVoid(ctx);
21358
+ while (ctx.p < toml.length) {
21359
+ if (toml.charCodeAt(ctx.p) === 91) {
21360
+ let isTableArray = toml.charCodeAt(++ctx.p) === 91;
21361
+ tmp = ctx.p += +isTableArray;
21362
+ skipping = false;
21363
+ let k = parseKey(ctx, 93);
21119
21364
  if (isTableArray) {
21120
- if (toml[k[1] - 1] !== "]") throw new TomlError("expected end of table declaration", {
21121
- toml,
21122
- ptr: k[1] - 1
21123
- });
21124
- k[1]++;
21365
+ if (toml.charCodeAt(ctx.p) !== 93) TomlError.x("expected end of table array declaration", ctx);
21366
+ ctx.p++;
21367
+ }
21368
+ let p = peekTable(ctx, k, res, meta, isTableArray ? 2 : 1);
21369
+ if (!p) {
21370
+ validateTablePeek(ctx, p, tmp);
21371
+ skipping = true;
21372
+ } else {
21373
+ m = p[2];
21374
+ tbl = p[1];
21125
21375
  }
21126
- let p = peekTable(k[0], res, meta, isTableArray ? 2 : 1);
21127
- if (!p) throw new TomlError("trying to redefine an already defined table or value", {
21128
- toml,
21129
- ptr
21130
- });
21131
- m = p[2];
21132
- tbl = p[1];
21133
- ptr = k[1];
21134
21376
  } else {
21135
- let k = parseKey(toml, ptr);
21136
- let p = peekTable(k[0], tbl, m, 0);
21137
- if (!p) throw new TomlError("trying to redefine an already defined table or value", {
21138
- toml,
21139
- ptr
21140
- });
21141
- let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
21142
- p[1][p[0]] = v[0];
21143
- ptr = v[1];
21377
+ tmp = ctx.p;
21378
+ let p = peekTable(ctx, parseKey(ctx), tbl, m, 0);
21379
+ if (!p && !skipping) validateTablePeek(ctx, p, tmp);
21380
+ skipVoid(ctx, true, true);
21381
+ let v = extractValue(ctx, void 0);
21382
+ if (p && !skipping) p[1][p[0]] = v;
21144
21383
  }
21145
- ptr = skipVoid(toml, ptr, true);
21146
- if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") throw new TomlError("each key-value declaration must be followed by an end-of-line", {
21147
- toml,
21148
- ptr
21149
- });
21150
- ptr = skipVoid(toml, ptr);
21384
+ skipVoid(ctx, true);
21385
+ if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && (tmp !== 13 || toml.charCodeAt(ctx.p + 1) !== 10)) TomlError.x("each key-value declaration must be followed by an end-of-line", ctx);
21386
+ skipVoid(ctx);
21151
21387
  }
21152
21388
  return res;
21153
21389
  }
21154
21390
  //#endregion
21155
- //#region ../../node_modules/.pnpm/smol-toml@1.7.0/node_modules/smol-toml/dist/stringify.js
21391
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/stringify.js
21156
21392
  /*!
21157
21393
  * Copyright (c) Squirrel Chat et al., All rights reserved.
21158
21394
  * SPDX-License-Identifier: BSD-3-Clause
@@ -21181,11 +21417,20 @@ function parse$1(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
21181
21417
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21182
21418
  */
21183
21419
  let BARE_KEY = /^[a-z0-9-_]+$/i;
21420
+ let HAS_WELLFORMED = !!"".isWellFormed;
21184
21421
  function extendedTypeOf(obj) {
21185
21422
  let type = typeof obj;
21186
21423
  if (type === "object") {
21187
21424
  if (Array.isArray(obj)) return "array";
21188
- if (obj instanceof Date) return "date";
21425
+ if (typeof obj.getUTCDate === "function" && obj instanceof Date) return "date";
21426
+ if (globalThis.Temporal) {
21427
+ if (obj.until) {
21428
+ if (obj instanceof Temporal.ZonedDateTime) return "temporal/tz+uc";
21429
+ if (obj instanceof Temporal.PlainDateTime || obj instanceof Temporal.PlainDate) return "temporal/uc";
21430
+ if (obj instanceof Temporal.PlainTime || obj instanceof Temporal.Instant) return "temporal";
21431
+ if (obj instanceof Temporal.PlainYearMonth) return "temporal/x";
21432
+ } else if (obj.toPlainDate && obj instanceof Temporal.PlainMonthDay || obj.negated && obj instanceof Temporal.Duration) return "temporal/x";
21433
+ }
21189
21434
  }
21190
21435
  return type;
21191
21436
  }
@@ -21193,60 +21438,79 @@ function isArrayOfTables(obj) {
21193
21438
  for (let i = 0; i < obj.length; i++) if (extendedTypeOf(obj[i]) !== "object") return false;
21194
21439
  return obj.length != 0;
21195
21440
  }
21441
+ function formatWellFormedStringUnchecked(s) {
21442
+ return JSON.stringify(s).replaceAll("", "\\u007f");
21443
+ }
21196
21444
  function formatString(s) {
21197
- return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
21445
+ return formatWellFormedStringUnchecked(HAS_WELLFORMED ? s.toWellFormed() : s);
21198
21446
  }
21199
- function stringifyValue(val, type, depth, numberAsFloat) {
21447
+ function formatKey(s) {
21448
+ if (BARE_KEY.test(s)) return s;
21449
+ if (HAS_WELLFORMED && !s.isWellFormed()) throw new RangeError("key contains illegal lone surrogates");
21450
+ return formatWellFormedStringUnchecked(s);
21451
+ }
21452
+ function stringifyValue(val, type, depth, numberAsFloat, strictTemporal) {
21200
21453
  if (depth === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
21201
- if (type === "number") {
21202
- if (isNaN(val)) return "nan";
21203
- if (val === Infinity) return "inf";
21204
- if (val === -Infinity) return "-inf";
21205
- if (Number.isInteger(val) && (numberAsFloat || !Number.isSafeInteger(val))) return val.toFixed(1);
21206
- return val.toString();
21207
- }
21208
- if (type === "bigint" || type === "boolean") return val.toString();
21209
- if (type === "string") return formatString(val);
21210
- if (type === "date") {
21211
- if (isNaN(val.getTime())) throw new TypeError("cannot serialize invalid date");
21212
- return val.toISOString();
21213
- }
21214
- if (type === "object") return stringifyInlineTable(val, depth, numberAsFloat);
21215
- if (type === "array") return stringifyArray(val, depth, numberAsFloat);
21216
- }
21217
- function stringifyInlineTable(obj, depth, numberAsFloat) {
21454
+ switch (type) {
21455
+ case "number":
21456
+ if (isNaN(val)) return "nan";
21457
+ if (val === Infinity) return "inf";
21458
+ if (val === -Infinity) return "-inf";
21459
+ if (Number.isInteger(val) && (numberAsFloat || !Number.isSafeInteger(val))) return val.toFixed(1);
21460
+ case "bigint":
21461
+ case "boolean":
21462
+ case "temporal": return val.toString();
21463
+ case "string": return formatString(val);
21464
+ case "date":
21465
+ if (isNaN(val.getTime())) throw new TypeError("cannot serialize invalid date");
21466
+ return val.toISOString();
21467
+ case "object": return stringifyInlineTable(val, depth, numberAsFloat, strictTemporal);
21468
+ case "array": return stringifyArray(val, depth, numberAsFloat, strictTemporal);
21469
+ case "temporal/tz+uc": if (strictTemporal) {
21470
+ let tz = val.timeZoneId;
21471
+ let tzc = tz.charCodeAt(0);
21472
+ if (tzc !== 43 && tzc !== 45 && (tzc !== 85 && tzc !== 71 && tzc !== 90 && tzc !== 69 || tz !== "UTC" && tz !== "UCT" && tz !== "Universal" && tz !== "Zulu" && !tz.startsWith("GMT") && tz !== "Greenwich" && !tz.startsWith("Etc/"))) throw new TypeError("Temporal objects with an IANA timezone are not allowed in Temporal strict mode");
21473
+ }
21474
+ case "temporal/uc":
21475
+ if (strictTemporal && val.calendarId !== "iso8601") throw new TypeError("Temporal objects with a non-default calendar are not allowed in Temporal strict mode");
21476
+ return val.toString({
21477
+ calendarName: "never",
21478
+ timeZoneName: "never"
21479
+ });
21480
+ case "temporal/x": throw new TypeError("Unsupported " + val[Symbol.toStringTag]);
21481
+ }
21482
+ }
21483
+ function stringifyInlineTable(obj, depth, numberAsFloat, strictTemporal) {
21218
21484
  let keys = Object.keys(obj);
21219
21485
  if (keys.length === 0) return "{}";
21220
21486
  let res = "{ ";
21221
21487
  for (let i = 0; i < keys.length; i++) {
21222
21488
  let k = keys[i];
21223
21489
  if (i) res += ", ";
21224
- res += BARE_KEY.test(k) ? k : formatString(k);
21225
- res += " = ";
21226
- res += stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat);
21490
+ res += formatKey(k) + " = " + stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat, strictTemporal);
21227
21491
  }
21228
21492
  return res + " }";
21229
21493
  }
21230
- function stringifyArray(array, depth, numberAsFloat) {
21494
+ function stringifyArray(array, depth, numberAsFloat, strictTemporal) {
21231
21495
  if (array.length === 0) return "[]";
21232
21496
  let res = "[ ";
21233
21497
  for (let i = 0; i < array.length; i++) {
21234
21498
  if (i) res += ", ";
21235
21499
  if (array[i] === null || array[i] === void 0) throw new TypeError("arrays cannot contain null or undefined values");
21236
- res += stringifyValue(array[i], extendedTypeOf(array[i]), depth - 1, numberAsFloat);
21500
+ res += stringifyValue(array[i], extendedTypeOf(array[i]), depth - 1, numberAsFloat, strictTemporal);
21237
21501
  }
21238
21502
  return res + " ]";
21239
21503
  }
21240
- function stringifyArrayTable(array, key, depth, numberAsFloat) {
21504
+ function stringifyArrayTable(array, key, depth, numberAsFloat, strictTemporal) {
21241
21505
  if (depth === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
21242
21506
  let res = "";
21243
21507
  for (let i = 0; i < array.length; i++) {
21244
21508
  res += `${res && "\n"}[[${key}]]\n`;
21245
- res += stringifyTable(0, array[i], key, depth, numberAsFloat);
21509
+ res += stringifyTable(0, array[i], key, depth, numberAsFloat, strictTemporal);
21246
21510
  }
21247
21511
  return res;
21248
21512
  }
21249
- function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
21513
+ function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat, strictTemporal) {
21250
21514
  if (depth === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
21251
21515
  let preamble = "";
21252
21516
  let tables = "";
@@ -21256,15 +21520,15 @@ function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
21256
21520
  if (obj[k] !== null && obj[k] !== void 0) {
21257
21521
  let type = extendedTypeOf(obj[k]);
21258
21522
  if (type === "symbol" || type === "function") throw new TypeError(`cannot serialize values of type '${type}'`);
21259
- let key = BARE_KEY.test(k) ? k : formatString(k);
21260
- if (type === "array" && isArrayOfTables(obj[k])) tables += (tables && "\n") + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat);
21523
+ let key = formatKey(k);
21524
+ if (type === "array" && isArrayOfTables(obj[k])) tables += (tables && "\n") + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat, strictTemporal);
21261
21525
  else if (type === "object") {
21262
21526
  let tblKey = prefix ? `${prefix}.${key}` : key;
21263
- tables += (tables && "\n") + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat);
21527
+ tables += (tables && "\n") + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat, strictTemporal);
21264
21528
  } else {
21265
21529
  preamble += key;
21266
21530
  preamble += " = ";
21267
- preamble += stringifyValue(obj[k], type, depth, numberAsFloat);
21531
+ preamble += stringifyValue(obj[k], type, depth, numberAsFloat, strictTemporal);
21268
21532
  preamble += "\n";
21269
21533
  }
21270
21534
  }
@@ -21272,13 +21536,42 @@ function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
21272
21536
  if (tableKey && (preamble || !tables)) preamble = preamble ? `[${tableKey}]\n${preamble}` : `[${tableKey}]`;
21273
21537
  return preamble && tables ? `${preamble}\n${tables}` : preamble || tables;
21274
21538
  }
21275
- function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
21539
+ function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false, strictTemporal = false } = {}) {
21276
21540
  if (extendedTypeOf(obj) !== "object") throw new TypeError("stringify can only be called with an object");
21277
- let str = stringifyTable(0, obj, "", maxDepth, numbersAsFloat);
21541
+ let str = stringifyTable(0, obj, "", maxDepth, numbersAsFloat, strictTemporal);
21278
21542
  if (str[str.length - 1] !== "\n") return str + "\n";
21279
21543
  return str;
21280
21544
  }
21281
21545
  //#endregion
21546
+ //#region ../../node_modules/.pnpm/smol-toml@1.9.0/node_modules/smol-toml/dist/index.js
21547
+ /*!
21548
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
21549
+ * SPDX-License-Identifier: BSD-3-Clause
21550
+ *
21551
+ * Redistribution and use in source and binary forms, with or without
21552
+ * modification, are permitted provided that the following conditions are met:
21553
+ *
21554
+ * 1. Redistributions of source code must retain the above copyright notice, this
21555
+ * list of conditions and the following disclaimer.
21556
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
21557
+ * this list of conditions and the following disclaimer in the
21558
+ * documentation and/or other materials provided with the distribution.
21559
+ * 3. Neither the name of the copyright holder nor the names of its contributors
21560
+ * may be used to endorse or promote products derived from this software without
21561
+ * specific prior written permission.
21562
+ *
21563
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21564
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21565
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21566
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21567
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21568
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21569
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21570
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21571
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21572
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21573
+ */
21574
+ //#endregion
21282
21575
  //#region ../../runtime/adapters/grok-build/dist/transport/grok-build-delivery-only.js
21283
21576
  const FINAL_TOOLS = [
21284
21577
  "read_receipt",
@@ -31814,7 +32107,10 @@ const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
31814
32107
  mode: "unsupported"
31815
32108
  },
31816
32109
  installResolver: {
31817
- resolveInstalledLaunchCandidates: resolveInstalledGrokBotLaunchCandidates,
32110
+ resolveInstalledLaunchCandidates: (input) => resolveInstalledGrokBotLaunchCandidates({
32111
+ ...input,
32112
+ managedRoot: resolveOpenMeldRootDir()
32113
+ }),
31818
32114
  verifyLaunchContract: verifyGrokBotLaunchContract
31819
32115
  },
31820
32116
  nativeInterface: "local-cli",
@@ -33920,9 +34216,9 @@ function createModelCatalogReadSession(input) {
33920
34216
  async function readModelCatalogOnce(baseUrl) {
33921
34217
  try {
33922
34218
  const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
33923
- import("./dist-DGZXxIvJ.js"),
33924
- import("./base-url-DO0hjUUk.js"),
33925
- import("./api-client-foundation-DgQRzwbJ.js")
34219
+ import("./dist-DRfPWuFM.js"),
34220
+ import("./base-url-D84aBKXK.js"),
34221
+ import("./api-client-foundation-BPJBWsRD.js")
33926
34222
  ]);
33927
34223
  if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
33928
34224
  const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
@@ -35766,6 +36062,6 @@ async function prepareProviderRuntime(input, options = {}) {
35766
36062
  return await preparer(input);
35767
36063
  }
35768
36064
  //#endregion
35769
- export { detectInstalledSkillsAgents as $, withLedgerStateTransaction as $n, normalizeDispatchPostMessageAction as $t, createExpectedRoutesReadSession as A, readCodexAccountUsageObservation as An, peopleComputerContainsDevice as Ar, ensureOpenMeldManagedProfileWorkspace as At, removeAgentCustomTarget as B, emitReconcileStartedEvidence as Bn, resolveSelectableCandidates as Br, describeProfileWorkspacePathValidationFailure as Bt, createModelCatalogReadSession as C, resolveCodexTimeoutMs as Cn, getAgentControllerPermissionModeDisplayMetadata as Cr, resolveLocalProjectConnectionForPath as Ct, NO_LOCAL_AGENTS_NEED_OPENMELD_SERVICE_REASON as D, resolveCodexAppServerCompletedTurn as Dn, isAgentExecutionReadyOrConnecting as Dr, resolveRegistryOriginLaunchCommand as Dt, resolveProfileWorkspaceRuntime as E, probeCodexAppServerAccount as En, isAgentControllerUsageRefreshUnavailable as Er, listBuiltinAgentsRegistryEntries as Et, listAgentRegistrations as F, resolveInstalledClaudeCodeLaunchCandidates as Fn, resolveAgentControllerPermissionModeForController as Fr, resolveConfiguredProfileWorkspacePath as Ft, notifyDaemonRouteCatalogChanged as G, appendLedgerHistoryEntry as Gn, MAX_HEARTBEAT_INTERVAL_MS as Gr, syncDaemonRouteCatalogState as Gt, setAgentRegistrationEnabled as H, runRuntimeTask as Hn, supportsSpaceWorkHandoff as Hr, createRouteCatalogFromMutableState as Ht, listAgentTargetStates as I, checkAntigravityAcpAccount as In, resolveAgentExecutionStatus as Ir, resolveConfiguredProfileWorkspacePathForAccount as It, parseAgentEnabledOption as J, removeConversationExecutionState as Jn, applyIntervalJitterMs as Jr, SPACE_ACTION_CONTEXT_GUIDANCE_LINES as Jt, normalizeAgentId as K, commitResolvedAgentContext as Kn, MIN_HEARTBEAT_INTERVAL_MS as Kr, normalizeDispatchThreadAction as Kt, manageAgentRegistrationInstallation as L, isAntigravityAcpLaunchContract as Ln, resolveAgentProfileEditCapabilities as Lr, setCustomProfileWorkspace as Lt, addAgentCustomTarget as M, readClaudeNativeVersion as Mn, renderInformationProtectionPrompt as Mr, readProfileWorkspaceConfig as Mt, createRegistrationFromCatalogTarget as N, resolveClaudeNativeUpdateCommand as Nn, renderTaskKnowledgeIndex as Nr, readProfileWorkspaceConfigForAccount as Nt, syncDeviceRuntimeStateProjection as O, verifyCodexAppServerThread as On, listAgentControllerPermissionModeOptions as Or, resolveRegistryRuntimeAdapterCapabilitySnapshot as Ot, listAgentCustomTargets as P, updateClaudeNativeInstallation as Pn, renderWorkingLanguagePrompt as Pr, readSavedProfileWorkspaceForAccount as Pt, canManageRegistryAgentSkillTargets as Q, upsertConversationExecutionState as Qn, __toESM as Qr, buildDispatchReplyContextSummary as Qt, readAgentRuntimeConfigHealth as R, emitDriftDetectedEvidence as Rn, resolveEvidenceSyncHealth as Rr, setOpenMeldManagedProfileWorkspace as Rt, syncProfileWorkspaceState as S, projectCursorUsageLimits as Sn, createAuthorityOpenMeldServiceRuntimeId as Sr, canonicalizeLocalProjectPath as St, resolveEffectiveProfileWorkingFolderRuntime as T, forkCodexAppServerThread as Tn, isAgentControllerUsageAccountUnavailable as Tr, withAgentActivityLocalStateLock as Tt, updateAgentCustomTarget as U, buildRuntimeWorkspaceFingerprint as Un, resolveRouteRegistrationReconcileDecision as Ur, replaceMutableRouteCatalogState as Ut, resolveAgentTargetState as V, DaemonServiceRunError as Vn, supportsExecutionContextSelection as Vr, createMutableRouteCatalogState as Vt, updateAgentRegistrations as W, buildTaskResultEnvelope as Wn, ADAPTIVE_HEARTBEAT_JITTER_RATIO as Wr, summarizeSkippedDaemonProfiles as Wt, repairBuiltinControllerInstall as X, seedLegacyAgentContext as Xn, resolveAdaptiveHeartbeatIntervalMs as Xr, isDaemonReconcileInProgressError as Xt, sortAgentRegistrations as Y, resolveConversationExecutionStateByLookupKey as Yn, pruneStaleLeases as Yr, SPACE_ACTION_TARGET_GUIDANCE_LINES as Yt, resolveLocalRegistryAgentIdFromAgentControllerRef as Z, settleInflightTask as Zn, resolveCatalogSyncIntervalMs as Zr, createSerialAgentInteractionCallback as Zt, loadDaemonRouteCatalog as _, readOpenCode2Inventory as _n, buildInformationProtectionPromptPlan as _r, removeProjectConnection as _t, buildOpenClawSpaceSessionKey as a, createInflightTaskControlRegistry as an, resolveDispatchSpaceActionMcpServer as ar, isNpmGlobalCommandPath as at, resolveLocalController as b, probeGrokBuildAcpInterface as bn, createAgentControllerInterfaceDisplayRows as br, setDefaultProjectConnection as bt, findOpenClawAgentById as c, resolveCompatibleAgentContextMatch as cn, resolveExecutablePathsOnPath as cr, ProjectBindingStoreUpdateRequiredError as ct, resolveOpenClawAuthStatus as d, resolveCatalogSyncSkippedProfilesLogState as dn, DISPATCH_SPACE_ACTION_DELIVERY_ONLY_ENV as dr, isProjectBound as dt, createPendingAgentInteractionRegistry as en, buildAuthenticatedControlPlaneResponse as er, resolveSkillsAgentRegistry as et, resolveOpenClawProviderRuntimeWorkingDirectory as f, createLocalAdapterContainer as fn, isDispatchSpaceActionDeliveryOnly as fr, listProjectBindings as ft, writeDaemonRouteCatalogCache as g, forkOpenCodeServerSession as gn, buildAgentControllerRef as gr, removeMissingProjectConnections as gt, readDaemonRouteCatalogCache as h, parseOpenCodeGoUsageResponse as hn, areAgentControllerInterfaceAccountsSame as hr, removeAgentActivityBindingsWhileDeliveryLocked as ht, listOpenClawGatewayAgents as i, createLocalExecutionSlots as in, createUnsupportedProviderUsageLimits as ir, isHomebrewCommandPath as it, resolveAgentProfilePrimaryAgentControllerReport as j, probeClaudeCodeUsageLimits as jn, projectPeopleComputersToLegacyLocalRuntimes as jr, normalizeCustomProfileWorkspacePath as jt, createPrimaryBindingReadSession as k, projectCodexUsageObservation as kn, parseAgentControllerRef as kr, resolveRegistryRuntimeAdapterContractByAgentControllerRef as kt, findOpenClawAgentsByWorkspace as l, resolveCompatibleConversationExecutionState as ln, listAgentControllerSupervisedProcessIds as lr, bindProject as lt, resolveOpenClawLocalBootstrapPaths as m, parseOpenRouterUsageResponse as mn, TASK_KNOWLEDGE_GUIDANCE as mr, migrateProjectBindingStore as mt, fetchOpenClawGatewayHealth as n, createLocalTaskInterruptSender as nn, buildAgentContextLookupKey as nr, resolveBuiltinAgentControllerDefinition as nt, normalizeOpenClawSpaceIdPrefix as o, resolveDispatchQueueLogMeta as on, buildCliLaunchInvocation as or, isPnpmGlobalCommandPath as ot, readOpenClawLocalBootstrapState as p, createLocalAdapterEntries as pn, DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS as pr, listProjectConnectionsWithStatus as pt, normalizeAgentIds as q, loadLedgerState as qn, applyAcceptedLeases as qr, syncRuntimeEventToInflightTaskControlRegistry as qt, listOpenClawAgents as r, buildLocalServiceDiagnosticsPayload as rn, createUnavailableProviderUsageLimits as rr, isBunGlobalCommandPath as rt, slugifyOpenClawNamePart as s, resolveDispatchContinuityObservation as sn, materializeCliLaunchCommand as sr, ProjectBindingOperationError as st, prepareProviderRuntime as t, mergeOpenClawGatewayVisibility as tn, assertLegacyAgentContextAssociation as tr, EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES as tt, matchesExpectedWorkspace as u, resolveLatestScopedConversationExecutionState as un, createProviderOriginalError as ur, hasProjectBindingForPath as ut, buildRuntimeRouteTargets as v, resolveInstalledOpenCodeLaunchCandidates as vn, buildWorkingLanguagePromptPlan as vr, resolveProjectBindingForPath as vt, resolveCurrentEffectiveProfileWorkingFolderRuntime as w, resolveInstalledCodexLaunchCandidates as wn, getAgentControllerPermissionModeFieldLabel as wr, withAgentActivityDeliveryLock as wt, resolveLocalRuntimeControllerSupport as x, resolveInstalledGrokBuildLaunchCandidates as xn, createAgentExecutionStatusDisplayRows as xr, unbindProject as xt, readLocalEnabledControllers as y, GrokBuildAcpTransportError as yn, compareAgentControllerVersions as yr, runIfAgentActivityBindingGenerationIsCurrent as yt, reconcileNewRunnableBuiltinAgentsForSetup as z, emitReconcileCompletedEvidence as zn, resolveNativeAgentControllerPermissionModeForController as zr, validateCustomProfileWorkspacePath as zt };
36065
+ export { canManageRegistryAgentSkillTargets as $, loadLedgerState as $n, applyAcceptedLeases as $r, buildDispatchReplyContextSummary as $t, createExpectedRoutesReadSession as A, resolveInstalledCodexLaunchCandidates as An, getAgentControllerPermissionModeFieldLabel as Ar, resolveRegistryRuntimeAdapterContractByAgentControllerRef as At, reconcileNewRunnableBuiltinAgentsForSetup as B, updateClaudeNativeInstallation as Bn, renderWorkingLanguagePrompt as Br, validateCustomProfileWorkspacePath as Bt, createModelCatalogReadSession as C, installGrokBotTools as Cn, buildInformationProtectionPromptPlan as Cr, canonicalizeLocalProjectPath as Ct, NO_LOCAL_AGENTS_NEED_OPENMELD_SERVICE_REASON as D, supportsGrokBotSetup as Dn, createAgentExecutionStatusDisplayRows as Dr, listBuiltinAgentsRegistryEntries as Dt, resolveProfileWorkspaceRuntime as E, readManagedGrokBotCandidate as En, createAgentControllerInterfaceDisplayRows as Er, withAgentActivityLocalStateLock as Et, listAgentRegistrations as F, projectCodexUsageObservation as Fn, parseAgentControllerRef as Fr, readSavedProfileWorkspaceForAccount as Ft, updateAgentRegistrations as G, emitReconcileCompletedEvidence as Gn, resolveNativeAgentControllerPermissionModeForController as Gr, summarizeSkippedDaemonProfiles as Gt, resolveAgentTargetState as H, checkAntigravityAcpAccount as Hn, resolveAgentExecutionStatus as Hr, createMutableRouteCatalogState as Ht, listAgentTargetStates as I, readCodexAccountUsageObservation as In, peopleComputerContainsDevice as Ir, resolveConfiguredProfileWorkspacePath as It, normalizeAgentIds as J, runRuntimeTask as Jn, supportsSpaceWorkHandoff as Jr, syncRuntimeEventToInflightTaskControlRegistry as Jt, notifyDaemonRouteCatalogChanged as K, emitReconcileStartedEvidence as Kn, resolveSelectableCandidates as Kr, syncDaemonRouteCatalogState as Kt, manageAgentRegistrationInstallation as L, probeClaudeCodeUsageLimits as Ln, projectPeopleComputersToLegacyLocalRuntimes as Lr, resolveConfiguredProfileWorkspacePathForAccount as Lt, addAgentCustomTarget as M, probeCodexAppServerAccount as Mn, isAgentControllerUsageRefreshUnavailable as Mr, normalizeCustomProfileWorkspacePath as Mt, createRegistrationFromCatalogTarget as N, resolveCodexAppServerCompletedTurn as Nn, isAgentExecutionReadyOrConnecting as Nr, readProfileWorkspaceConfig as Nt, syncDeviceRuntimeStateProjection as O, projectCursorUsageLimits as On, createAuthorityOpenMeldServiceRuntimeId as Or, resolveRegistryOriginLaunchCommand as Ot, listAgentCustomTargets as P, verifyCodexAppServerThread as Pn, listAgentControllerPermissionModeOptions as Pr, readProfileWorkspaceConfigForAccount as Pt, resolveLocalRegistryAgentIdFromAgentControllerRef as Q, commitResolvedAgentContext as Qn, MIN_HEARTBEAT_INTERVAL_MS as Qr, createSerialAgentInteractionCallback as Qt, readAgentRuntimeConfigHealth as R, readClaudeNativeVersion as Rn, renderInformationProtectionPrompt as Rr, setCustomProfileWorkspace as Rt, syncProfileWorkspaceState as S, resolveInstalledGrokBuildLaunchCandidates as Sn, buildAgentControllerRef as Sr, unbindProject as St, resolveEffectiveProfileWorkingFolderRuntime as T, loginManagedGrokBot as Tn, compareAgentControllerVersions as Tr, withAgentActivityDeliveryLock as Tt, setAgentRegistrationEnabled as U, isAntigravityAcpLaunchContract as Un, resolveAgentProfileEditCapabilities as Ur, createRouteCatalogFromMutableState as Ut, removeAgentCustomTarget as V, resolveInstalledClaudeCodeLaunchCandidates as Vn, resolveAgentControllerPermissionModeForController as Vr, describeProfileWorkspacePathValidationFailure as Vt, updateAgentCustomTarget as W, emitDriftDetectedEvidence as Wn, resolveEvidenceSyncHealth as Wr, replaceMutableRouteCatalogState as Wt, sortAgentRegistrations as X, buildTaskResultEnvelope as Xn, ADAPTIVE_HEARTBEAT_JITTER_RATIO as Xr, SPACE_ACTION_TARGET_GUIDANCE_LINES as Xt, parseAgentEnabledOption as Y, buildRuntimeWorkspaceFingerprint as Yn, resolveRouteRegistrationReconcileDecision as Yr, SPACE_ACTION_CONTEXT_GUIDANCE_LINES as Yt, repairBuiltinControllerInstall as Z, appendLedgerHistoryEntry as Zn, MAX_HEARTBEAT_INTERVAL_MS as Zr, isDaemonReconcileInProgressError as Zt, loadDaemonRouteCatalog as _, forkOpenCodeServerSession as _n, DISPATCH_SPACE_ACTION_DELIVERY_ONLY_ENV as _r, removeMissingProjectConnections as _t, buildOpenClawSpaceSessionKey as a, createLocalExecutionSlots as an, withLedgerStateTransaction as ar, isHomebrewCommandPath as at, resolveLocalController as b, GrokBuildAcpTransportError as bn, TASK_KNOWLEDGE_GUIDANCE as br, runIfAgentActivityBindingGenerationIsCurrent as bt, findOpenClawAgentById as c, resolveDispatchContinuityObservation as cn, buildAgentContextLookupKey as cr, ProjectBindingOperationError as ct, resolveOpenClawAuthStatus as d, resolveLatestScopedConversationExecutionState as dn, resolveDispatchSpaceActionMcpServer as dr, hasProjectBindingForPath as dt, applyIntervalJitterMs as ei, normalizeDispatchPostMessageAction as en, removeConversationExecutionState as er, detectInstalledSkillsAgents as et, resolveOpenClawProviderRuntimeWorkingDirectory as f, resolveCatalogSyncSkippedProfilesLogState as fn, buildCliLaunchInvocation as fr, isProjectBound as ft, writeDaemonRouteCatalogCache as g, parseOpenCodeGoUsageResponse as gn, createProviderOriginalError as gr, removeAgentActivityBindingsWhileDeliveryLocked as gt, readDaemonRouteCatalogCache as h, parseOpenRouterUsageResponse as hn, listAgentControllerSupervisedProcessIds as hr, migrateProjectBindingStore as ht, listOpenClawGatewayAgents as i, __toESM as ii, buildLocalServiceDiagnosticsPayload as in, upsertConversationExecutionState as ir, isBunGlobalCommandPath as it, resolveAgentProfilePrimaryAgentControllerReport as j, forkCodexAppServerThread as jn, isAgentControllerUsageAccountUnavailable as jr, ensureOpenMeldManagedProfileWorkspace as jt, createPrimaryBindingReadSession as k, resolveCodexTimeoutMs as kn, getAgentControllerPermissionModeDisplayMetadata as kr, resolveRegistryRuntimeAdapterCapabilitySnapshot as kt, findOpenClawAgentsByWorkspace as l, resolveCompatibleAgentContextMatch as ln, createUnavailableProviderUsageLimits as lr, ProjectBindingStoreUpdateRequiredError as lt, resolveOpenClawLocalBootstrapPaths as m, createLocalAdapterEntries as mn, resolveExecutablePathsOnPath as mr, listProjectConnectionsWithStatus as mt, fetchOpenClawGatewayHealth as n, resolveAdaptiveHeartbeatIntervalMs as ni, mergeOpenClawGatewayVisibility as nn, seedLegacyAgentContext as nr, EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES as nt, normalizeOpenClawSpaceIdPrefix as o, createInflightTaskControlRegistry as on, buildAuthenticatedControlPlaneResponse as or, isNpmGlobalCommandPath as ot, readOpenClawLocalBootstrapState as p, createLocalAdapterContainer as pn, materializeCliLaunchCommand as pr, listProjectBindings as pt, normalizeAgentId as q, DaemonServiceRunError as qn, supportsExecutionContextSelection as qr, normalizeDispatchThreadAction as qt, listOpenClawAgents as r, resolveCatalogSyncIntervalMs as ri, createLocalTaskInterruptSender as rn, settleInflightTask as rr, resolveBuiltinAgentControllerDefinition as rt, slugifyOpenClawNamePart as s, resolveDispatchQueueLogMeta as sn, assertLegacyAgentContextAssociation as sr, isPnpmGlobalCommandPath as st, prepareProviderRuntime as t, pruneStaleLeases as ti, createPendingAgentInteractionRegistry as tn, resolveConversationExecutionStateByLookupKey as tr, resolveSkillsAgentRegistry as tt, matchesExpectedWorkspace as u, resolveCompatibleConversationExecutionState as un, createUnsupportedProviderUsageLimits as ur, bindProject as ut, buildRuntimeRouteTargets as v, readOpenCode2Inventory as vn, isDispatchSpaceActionDeliveryOnly as vr, removeProjectConnection as vt, resolveCurrentEffectiveProfileWorkingFolderRuntime as w, isManagedGrokBotSignedIn as wn, buildWorkingLanguagePromptPlan as wr, resolveLocalProjectConnectionForPath as wt, resolveLocalRuntimeControllerSupport as x, probeGrokBuildAcpInterface as xn, areAgentControllerInterfaceAccountsSame as xr, setDefaultProjectConnection as xt, readLocalEnabledControllers as y, resolveInstalledOpenCodeLaunchCandidates as yn, DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS as yr, resolveProjectBindingForPath as yt, reconcileNewRunnableBuiltinAgentRegistrations as z, resolveClaudeNativeUpdateCommand as zn, renderTaskKnowledgeIndex as zr, setOpenMeldManagedProfileWorkspace as zt };
35770
36066
 
35771
- //# sourceMappingURL=prepare-provider-runtime-CkW7c9bF.js.map
36067
+ //# sourceMappingURL=prepare-provider-runtime-CyIGaDTC.js.map