@skillcap/gdh 3.2.1 → 3.2.3

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 (639) hide show
  1. package/INSTALL-BUNDLE.json +1 -1
  2. package/RELEASE-SPAN-UPDATE-CONTRACTS.json +134 -0
  3. package/node_modules/@clack/core/CHANGELOG.md +8 -0
  4. package/node_modules/@clack/core/dist/index.d.mts +18 -4
  5. package/node_modules/@clack/core/dist/index.mjs +16 -10
  6. package/node_modules/@clack/core/dist/index.mjs.map +1 -1
  7. package/node_modules/@clack/core/package.json +5 -2
  8. package/node_modules/@clack/prompts/CHANGELOG.md +15 -0
  9. package/node_modules/@clack/prompts/README.md +107 -2
  10. package/node_modules/@clack/prompts/dist/index.d.mts +16 -11
  11. package/node_modules/@clack/prompts/dist/index.mjs +114 -107
  12. package/node_modules/@clack/prompts/dist/index.mjs.map +1 -1
  13. package/node_modules/@clack/prompts/package.json +7 -4
  14. package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
  15. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +1 -1
  16. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
  17. package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts.map +1 -1
  18. package/node_modules/@gdh/adapters/dist/claude-settings-patch.js +4 -2
  19. package/node_modules/@gdh/adapters/dist/claude-settings-patch.js.map +1 -1
  20. package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
  21. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +1 -1
  22. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
  23. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts.map +1 -1
  24. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +1 -1
  25. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js.map +1 -1
  26. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts.map +1 -1
  27. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +1 -1
  28. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js.map +1 -1
  29. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts.map +1 -1
  30. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js +1 -1
  31. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js.map +1 -1
  32. package/node_modules/@gdh/adapters/dist/durable-backup.d.ts.map +1 -1
  33. package/node_modules/@gdh/adapters/dist/durable-backup.js +3 -5
  34. package/node_modules/@gdh/adapters/dist/durable-backup.js.map +1 -1
  35. package/node_modules/@gdh/adapters/dist/index.d.ts +11 -37
  36. package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
  37. package/node_modules/@gdh/adapters/dist/index.js +18 -90
  38. package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
  39. package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts.map +1 -1
  40. package/node_modules/@gdh/adapters/dist/inventory-sweep.js +1 -3
  41. package/node_modules/@gdh/adapters/dist/inventory-sweep.js.map +1 -1
  42. package/node_modules/@gdh/adapters/dist/managed-surfaces.d.ts +32 -0
  43. package/node_modules/@gdh/adapters/dist/managed-surfaces.d.ts.map +1 -0
  44. package/node_modules/@gdh/adapters/dist/managed-surfaces.js +66 -0
  45. package/node_modules/@gdh/adapters/dist/managed-surfaces.js.map +1 -0
  46. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts +1 -1
  47. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts.map +1 -1
  48. package/node_modules/@gdh/adapters/dist/process-orchestration.js +3 -2
  49. package/node_modules/@gdh/adapters/dist/process-orchestration.js.map +1 -1
  50. package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts.map +1 -1
  51. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js +11 -23
  52. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js.map +1 -1
  53. package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
  54. package/node_modules/@gdh/adapters/dist/skill-rendering.js +2 -8
  55. package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
  56. package/node_modules/@gdh/adapters/dist/template-assets.js.map +1 -1
  57. package/node_modules/@gdh/adapters/package.json +7 -8
  58. package/node_modules/@gdh/authoring/dist/authoring-state-store.d.ts.map +1 -1
  59. package/node_modules/@gdh/authoring/dist/authoring-state-store.js.map +1 -1
  60. package/node_modules/@gdh/authoring/dist/cache.d.ts.map +1 -1
  61. package/node_modules/@gdh/authoring/dist/cache.js.map +1 -1
  62. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts +2 -2
  63. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts.map +1 -1
  64. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js +2 -2
  65. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js.map +1 -1
  66. package/node_modules/@gdh/authoring/dist/diagnostics-broker.d.ts.map +1 -1
  67. package/node_modules/@gdh/authoring/dist/diagnostics-broker.js +15 -12
  68. package/node_modules/@gdh/authoring/dist/diagnostics-broker.js.map +1 -1
  69. package/node_modules/@gdh/authoring/dist/lsp-broker-snapshot.d.ts.map +1 -1
  70. package/node_modules/@gdh/authoring/dist/lsp-broker-snapshot.js.map +1 -1
  71. package/node_modules/@gdh/authoring/dist/lsp-client.d.ts.map +1 -1
  72. package/node_modules/@gdh/authoring/dist/lsp-client.js.map +1 -1
  73. package/node_modules/@gdh/authoring/dist/lsp-constants.d.ts +17 -0
  74. package/node_modules/@gdh/authoring/dist/lsp-constants.d.ts.map +1 -0
  75. package/node_modules/@gdh/authoring/dist/lsp-constants.js +17 -0
  76. package/node_modules/@gdh/authoring/dist/lsp-constants.js.map +1 -0
  77. package/node_modules/@gdh/authoring/dist/lsp-warmup.d.ts.map +1 -1
  78. package/node_modules/@gdh/authoring/dist/lsp-warmup.js +2 -4
  79. package/node_modules/@gdh/authoring/dist/lsp-warmup.js.map +1 -1
  80. package/node_modules/@gdh/authoring/dist/lsp.d.ts.map +1 -1
  81. package/node_modules/@gdh/authoring/dist/lsp.js +30 -64
  82. package/node_modules/@gdh/authoring/dist/lsp.js.map +1 -1
  83. package/node_modules/@gdh/authoring/dist/prepare.d.ts.map +1 -1
  84. package/node_modules/@gdh/authoring/dist/prepare.js +1 -3
  85. package/node_modules/@gdh/authoring/dist/prepare.js.map +1 -1
  86. package/node_modules/@gdh/authoring/dist/project.d.ts.map +1 -1
  87. package/node_modules/@gdh/authoring/dist/project.js +4 -13
  88. package/node_modules/@gdh/authoring/dist/project.js.map +1 -1
  89. package/node_modules/@gdh/authoring/dist/report.d.ts.map +1 -1
  90. package/node_modules/@gdh/authoring/dist/report.js +2 -11
  91. package/node_modules/@gdh/authoring/dist/report.js.map +1 -1
  92. package/node_modules/@gdh/authoring/dist/scene-resource.d.ts.map +1 -1
  93. package/node_modules/@gdh/authoring/dist/scene-resource.js.map +1 -1
  94. package/node_modules/@gdh/authoring/dist/tcp-port.d.ts +2 -0
  95. package/node_modules/@gdh/authoring/dist/tcp-port.d.ts.map +1 -0
  96. package/node_modules/@gdh/authoring/dist/tcp-port.js +23 -0
  97. package/node_modules/@gdh/authoring/dist/tcp-port.js.map +1 -0
  98. package/node_modules/@gdh/authoring/dist/warmup.d.ts.map +1 -1
  99. package/node_modules/@gdh/authoring/dist/warmup.js.map +1 -1
  100. package/node_modules/@gdh/authoring/package.json +2 -2
  101. package/node_modules/@gdh/cli/dist/args.d.ts +44 -0
  102. package/node_modules/@gdh/cli/dist/args.d.ts.map +1 -0
  103. package/node_modules/@gdh/cli/dist/args.js +124 -0
  104. package/node_modules/@gdh/cli/dist/args.js.map +1 -0
  105. package/node_modules/@gdh/cli/dist/bridge-session.d.ts +1 -1
  106. package/node_modules/@gdh/cli/dist/bridge-session.d.ts.map +1 -1
  107. package/node_modules/@gdh/cli/dist/bridge-session.js +9 -8
  108. package/node_modules/@gdh/cli/dist/bridge-session.js.map +1 -1
  109. package/node_modules/@gdh/cli/dist/index.d.ts +4 -52
  110. package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
  111. package/node_modules/@gdh/cli/dist/index.js +8 -197
  112. package/node_modules/@gdh/cli/dist/index.js.map +1 -1
  113. package/node_modules/@gdh/cli/dist/io.d.ts +10 -0
  114. package/node_modules/@gdh/cli/dist/io.d.ts.map +1 -0
  115. package/node_modules/@gdh/cli/dist/io.js +26 -0
  116. package/node_modules/@gdh/cli/dist/io.js.map +1 -0
  117. package/node_modules/@gdh/cli/dist/mcp-cleanup.d.ts +3 -0
  118. package/node_modules/@gdh/cli/dist/mcp-cleanup.d.ts.map +1 -1
  119. package/node_modules/@gdh/cli/dist/mcp-cleanup.js +47 -0
  120. package/node_modules/@gdh/cli/dist/mcp-cleanup.js.map +1 -1
  121. package/node_modules/@gdh/cli/dist/migrate.d.ts +1 -1
  122. package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
  123. package/node_modules/@gdh/cli/dist/migrate.js +23 -30
  124. package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
  125. package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
  126. package/node_modules/@gdh/cli/dist/self-update.js +13 -20
  127. package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
  128. package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
  129. package/node_modules/@gdh/cli/dist/setup.js.map +1 -1
  130. package/node_modules/@gdh/cli/dist/status-command.d.ts +3 -0
  131. package/node_modules/@gdh/cli/dist/status-command.d.ts.map +1 -0
  132. package/node_modules/@gdh/cli/dist/status-command.js +44 -0
  133. package/node_modules/@gdh/cli/dist/status-command.js.map +1 -0
  134. package/node_modules/@gdh/cli/dist/update-banner.d.ts.map +1 -1
  135. package/node_modules/@gdh/cli/dist/update-banner.js +1 -1
  136. package/node_modules/@gdh/cli/dist/update-banner.js.map +1 -1
  137. package/node_modules/@gdh/cli/package.json +11 -11
  138. package/node_modules/@gdh/core/dist/dev-mode.d.ts.map +1 -1
  139. package/node_modules/@gdh/core/dist/dev-mode.js.map +1 -1
  140. package/node_modules/@gdh/core/dist/editor-operation-runner.d.ts +3 -0
  141. package/node_modules/@gdh/core/dist/editor-operation-runner.d.ts.map +1 -0
  142. package/node_modules/@gdh/core/dist/editor-operation-runner.js +682 -0
  143. package/node_modules/@gdh/core/dist/editor-operation-runner.js.map +1 -0
  144. package/node_modules/@gdh/core/dist/git-root.d.ts.map +1 -1
  145. package/node_modules/@gdh/core/dist/git-root.js +4 -1
  146. package/node_modules/@gdh/core/dist/git-root.js.map +1 -1
  147. package/node_modules/@gdh/core/dist/godot-docs-version.d.ts.map +1 -1
  148. package/node_modules/@gdh/core/dist/godot-docs-version.js.map +1 -1
  149. package/node_modules/@gdh/core/dist/godot-stderr-fatality.d.ts.map +1 -1
  150. package/node_modules/@gdh/core/dist/godot-stderr-fatality.js +1 -2
  151. package/node_modules/@gdh/core/dist/godot-stderr-fatality.js.map +1 -1
  152. package/node_modules/@gdh/core/dist/index.d.ts +10 -5
  153. package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
  154. package/node_modules/@gdh/core/dist/index.js +15 -5
  155. package/node_modules/@gdh/core/dist/index.js.map +1 -1
  156. package/node_modules/@gdh/core/dist/managed-gitignore.d.ts.map +1 -1
  157. package/node_modules/@gdh/core/dist/managed-gitignore.js +4 -14
  158. package/node_modules/@gdh/core/dist/managed-gitignore.js.map +1 -1
  159. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts.map +1 -1
  160. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js +2 -2
  161. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js.map +1 -1
  162. package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.d.ts.map +1 -1
  163. package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js +6 -14
  164. package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js.map +1 -1
  165. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts.map +1 -1
  166. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js +7 -23
  167. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js.map +1 -1
  168. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts.map +1 -1
  169. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js.map +1 -1
  170. package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts.map +1 -1
  171. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js +1 -2
  172. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js.map +1 -1
  173. package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts.map +1 -1
  174. package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts.map +1 -1
  175. package/node_modules/@gdh/core/dist/migrations/golden-harness.js.map +1 -1
  176. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -1
  177. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -1
  178. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts.map +1 -1
  179. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js.map +1 -1
  180. package/node_modules/@gdh/core/dist/migrations/probes.d.ts.map +1 -1
  181. package/node_modules/@gdh/core/dist/migrations/probes.js.map +1 -1
  182. package/node_modules/@gdh/core/dist/migrations/registry.d.ts +1 -1
  183. package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -1
  184. package/node_modules/@gdh/core/dist/migrations/registry.js +3 -6
  185. package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -1
  186. package/node_modules/@gdh/core/dist/official-docs.d.ts.map +1 -1
  187. package/node_modules/@gdh/core/dist/process-termination.d.ts +29 -0
  188. package/node_modules/@gdh/core/dist/process-termination.d.ts.map +1 -0
  189. package/node_modules/@gdh/core/dist/process-termination.js +125 -0
  190. package/node_modules/@gdh/core/dist/process-termination.js.map +1 -0
  191. package/node_modules/@gdh/core/dist/release-span-preview.d.ts.map +1 -1
  192. package/node_modules/@gdh/core/dist/release-span-preview.js +1 -1
  193. package/node_modules/@gdh/core/dist/release-span-preview.js.map +1 -1
  194. package/node_modules/@gdh/core/dist/release-span-update-contract.d.ts.map +1 -1
  195. package/node_modules/@gdh/core/dist/release-span-update-contract.js +5 -10
  196. package/node_modules/@gdh/core/dist/release-span-update-contract.js.map +1 -1
  197. package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.d.ts.map +1 -1
  198. package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.js.map +1 -1
  199. package/node_modules/@gdh/core/dist/state/migration-state.d.ts.map +1 -1
  200. package/node_modules/@gdh/core/dist/state/migration-state.js +3 -8
  201. package/node_modules/@gdh/core/dist/state/migration-state.js.map +1 -1
  202. package/node_modules/@gdh/core/dist/state/migration-trace.d.ts.map +1 -1
  203. package/node_modules/@gdh/core/dist/state/migration-trace.js +3 -8
  204. package/node_modules/@gdh/core/dist/state/migration-trace.js.map +1 -1
  205. package/node_modules/@gdh/core/dist/state/render-inventory.d.ts.map +1 -1
  206. package/node_modules/@gdh/core/dist/state/render-inventory.js.map +1 -1
  207. package/node_modules/@gdh/core/dist/update-cache.d.ts.map +1 -1
  208. package/node_modules/@gdh/core/dist/update-cache.js.map +1 -1
  209. package/node_modules/@gdh/core/dist/update-probe.d.ts.map +1 -1
  210. package/node_modules/@gdh/core/dist/update-probe.js +1 -3
  211. package/node_modules/@gdh/core/dist/update-probe.js.map +1 -1
  212. package/node_modules/@gdh/core/package.json +1 -1
  213. package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
  214. package/node_modules/@gdh/docs/dist/agent-contract.js +2 -4
  215. package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
  216. package/node_modules/@gdh/docs/dist/files.d.ts +1 -1
  217. package/node_modules/@gdh/docs/dist/files.d.ts.map +1 -1
  218. package/node_modules/@gdh/docs/dist/guidance.js +1 -1
  219. package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
  220. package/node_modules/@gdh/docs/dist/index.d.ts +4 -4
  221. package/node_modules/@gdh/docs/dist/index.d.ts.map +1 -1
  222. package/node_modules/@gdh/docs/dist/index.js +3 -3
  223. package/node_modules/@gdh/docs/dist/index.js.map +1 -1
  224. package/node_modules/@gdh/docs/dist/official-docs.d.ts.map +1 -1
  225. package/node_modules/@gdh/docs/dist/official-docs.js +16 -5
  226. package/node_modules/@gdh/docs/dist/official-docs.js.map +1 -1
  227. package/node_modules/@gdh/docs/dist/query.d.ts.map +1 -1
  228. package/node_modules/@gdh/docs/dist/query.js +8 -3
  229. package/node_modules/@gdh/docs/dist/query.js.map +1 -1
  230. package/node_modules/@gdh/docs/dist/recovery-hints.d.ts.map +1 -1
  231. package/node_modules/@gdh/docs/dist/recovery-hints.js +0 -1
  232. package/node_modules/@gdh/docs/dist/recovery-hints.js.map +1 -1
  233. package/node_modules/@gdh/docs/dist/template-assets.js.map +1 -1
  234. package/node_modules/@gdh/docs/package.json +2 -2
  235. package/node_modules/@gdh/editor/dist/index.d.ts +1 -3
  236. package/node_modules/@gdh/editor/dist/index.d.ts.map +1 -1
  237. package/node_modules/@gdh/editor/dist/index.js +46 -683
  238. package/node_modules/@gdh/editor/dist/index.js.map +1 -1
  239. package/node_modules/@gdh/editor/package.json +2 -2
  240. package/node_modules/@gdh/mcp/dist/bridge-tools.d.ts +8 -1
  241. package/node_modules/@gdh/mcp/dist/bridge-tools.d.ts.map +1 -1
  242. package/node_modules/@gdh/mcp/dist/bridge-tools.js +81 -2
  243. package/node_modules/@gdh/mcp/dist/bridge-tools.js.map +1 -1
  244. package/node_modules/@gdh/mcp/dist/index.d.ts.map +1 -1
  245. package/node_modules/@gdh/mcp/dist/index.js +10 -77
  246. package/node_modules/@gdh/mcp/dist/index.js.map +1 -1
  247. package/node_modules/@gdh/mcp/package.json +8 -10
  248. package/node_modules/@gdh/observability/dist/guidance-audit.d.ts.map +1 -1
  249. package/node_modules/@gdh/observability/dist/guidance-audit.js +11 -21
  250. package/node_modules/@gdh/observability/dist/guidance-audit.js.map +1 -1
  251. package/node_modules/@gdh/observability/dist/index.d.ts +2 -2
  252. package/node_modules/@gdh/observability/dist/index.d.ts.map +1 -1
  253. package/node_modules/@gdh/observability/dist/index.js +1 -1
  254. package/node_modules/@gdh/observability/dist/index.js.map +1 -1
  255. package/node_modules/@gdh/observability/dist/runtime-bundles.d.ts.map +1 -1
  256. package/node_modules/@gdh/observability/dist/runtime-bundles.js +3 -10
  257. package/node_modules/@gdh/observability/dist/runtime-bundles.js.map +1 -1
  258. package/node_modules/@gdh/observability/dist/runtime-corpus.d.ts.map +1 -1
  259. package/node_modules/@gdh/observability/dist/runtime-corpus.js +1 -1
  260. package/node_modules/@gdh/observability/dist/runtime-corpus.js.map +1 -1
  261. package/node_modules/@gdh/observability/package.json +3 -2
  262. package/node_modules/@gdh/runtime/dist/bridge-broker-client.d.ts +2 -1
  263. package/node_modules/@gdh/runtime/dist/bridge-broker-client.d.ts.map +1 -1
  264. package/node_modules/@gdh/runtime/dist/bridge-broker-client.js +8 -1
  265. package/node_modules/@gdh/runtime/dist/bridge-broker-client.js.map +1 -1
  266. package/node_modules/@gdh/runtime/dist/bridge-broker.d.ts +2 -1
  267. package/node_modules/@gdh/runtime/dist/bridge-broker.d.ts.map +1 -1
  268. package/node_modules/@gdh/runtime/dist/bridge-broker.js +71 -21
  269. package/node_modules/@gdh/runtime/dist/bridge-broker.js.map +1 -1
  270. package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts +1 -1
  271. package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts.map +1 -1
  272. package/node_modules/@gdh/runtime/dist/bridge-surface.js +2 -2
  273. package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
  274. package/node_modules/@gdh/runtime/dist/docker-provider.d.ts +1 -1
  275. package/node_modules/@gdh/runtime/dist/docker-provider.d.ts.map +1 -1
  276. package/node_modules/@gdh/runtime/dist/docker-provider.js +5 -16
  277. package/node_modules/@gdh/runtime/dist/docker-provider.js.map +1 -1
  278. package/node_modules/@gdh/runtime/dist/index.d.ts +1 -1
  279. package/node_modules/@gdh/runtime/dist/index.d.ts.map +1 -1
  280. package/node_modules/@gdh/runtime/dist/index.js +65 -18
  281. package/node_modules/@gdh/runtime/dist/index.js.map +1 -1
  282. package/node_modules/@gdh/runtime/dist/knowledge-surface.d.ts.map +1 -1
  283. package/node_modules/@gdh/runtime/dist/knowledge-surface.js +21 -10
  284. package/node_modules/@gdh/runtime/dist/knowledge-surface.js.map +1 -1
  285. package/node_modules/@gdh/runtime/package.json +2 -3
  286. package/node_modules/@gdh/scan/dist/detect-existing-onboarding.d.ts.map +1 -1
  287. package/node_modules/@gdh/scan/dist/detect-existing-onboarding.js +1 -5
  288. package/node_modules/@gdh/scan/dist/detect-existing-onboarding.js.map +1 -1
  289. package/node_modules/@gdh/scan/dist/index.d.ts +3 -3
  290. package/node_modules/@gdh/scan/dist/index.d.ts.map +1 -1
  291. package/node_modules/@gdh/scan/dist/index.js +3 -3
  292. package/node_modules/@gdh/scan/dist/index.js.map +1 -1
  293. package/node_modules/@gdh/scan/dist/inventory-cache.js +1 -1
  294. package/node_modules/@gdh/scan/dist/inventory-cache.js.map +1 -1
  295. package/node_modules/@gdh/scan/dist/onboard.d.ts +1 -2
  296. package/node_modules/@gdh/scan/dist/onboard.d.ts.map +1 -1
  297. package/node_modules/@gdh/scan/dist/onboard.js +4 -5
  298. package/node_modules/@gdh/scan/dist/onboard.js.map +1 -1
  299. package/node_modules/@gdh/scan/dist/scan.d.ts.map +1 -1
  300. package/node_modules/@gdh/scan/dist/scan.js +4 -2
  301. package/node_modules/@gdh/scan/dist/scan.js.map +1 -1
  302. package/node_modules/@gdh/scan/package.json +3 -3
  303. package/node_modules/@gdh/verify/dist/corpus.d.ts.map +1 -1
  304. package/node_modules/@gdh/verify/dist/corpus.js +7 -6
  305. package/node_modules/@gdh/verify/dist/corpus.js.map +1 -1
  306. package/node_modules/@gdh/verify/dist/index.d.ts.map +1 -1
  307. package/node_modules/@gdh/verify/dist/index.js +0 -1
  308. package/node_modules/@gdh/verify/dist/index.js.map +1 -1
  309. package/node_modules/@gdh/verify/dist/readiness.d.ts.map +1 -1
  310. package/node_modules/@gdh/verify/dist/readiness.js.map +1 -1
  311. package/node_modules/@gdh/verify/dist/scenarios.d.ts +1 -1
  312. package/node_modules/@gdh/verify/dist/scenarios.d.ts.map +1 -1
  313. package/node_modules/@gdh/verify/dist/scenarios.js +14 -11
  314. package/node_modules/@gdh/verify/dist/scenarios.js.map +1 -1
  315. package/node_modules/@gdh/verify/package.json +6 -7
  316. package/node_modules/@hono/node-server/dist/index.js +22 -0
  317. package/node_modules/@hono/node-server/dist/index.mjs +22 -0
  318. package/node_modules/@hono/node-server/dist/listener.js +22 -0
  319. package/node_modules/@hono/node-server/dist/listener.mjs +22 -0
  320. package/node_modules/@hono/node-server/dist/request.js +11 -0
  321. package/node_modules/@hono/node-server/dist/request.mjs +11 -0
  322. package/node_modules/@hono/node-server/dist/response.js +11 -0
  323. package/node_modules/@hono/node-server/dist/response.mjs +11 -0
  324. package/node_modules/@hono/node-server/dist/server.js +22 -0
  325. package/node_modules/@hono/node-server/dist/server.mjs +22 -0
  326. package/node_modules/@hono/node-server/dist/utils.d.mts +2 -2
  327. package/node_modules/@hono/node-server/dist/utils.d.ts +2 -2
  328. package/node_modules/@hono/node-server/dist/vercel.js +22 -0
  329. package/node_modules/@hono/node-server/dist/vercel.mjs +22 -0
  330. package/node_modules/@hono/node-server/package.json +1 -1
  331. package/node_modules/ajv/README.md +1 -1
  332. package/node_modules/ajv/dist/core.js +1 -1
  333. package/node_modules/ajv/dist/core.js.map +1 -1
  334. package/node_modules/ajv/lib/core.ts +1 -1
  335. package/node_modules/ajv/package.json +2 -3
  336. package/node_modules/eventsource-parser/LICENSE +1 -1
  337. package/node_modules/eventsource-parser/dist/index.cjs +104 -44
  338. package/node_modules/eventsource-parser/dist/index.cjs.map +1 -1
  339. package/node_modules/eventsource-parser/dist/index.d.cts +23 -21
  340. package/node_modules/eventsource-parser/dist/index.d.ts +23 -21
  341. package/node_modules/eventsource-parser/dist/index.js +104 -44
  342. package/node_modules/eventsource-parser/dist/index.js.map +1 -1
  343. package/node_modules/eventsource-parser/dist/stream.d.cts +22 -19
  344. package/node_modules/eventsource-parser/dist/stream.d.ts +22 -19
  345. package/node_modules/eventsource-parser/package.json +54 -77
  346. package/node_modules/eventsource-parser/src/parse.ts +270 -107
  347. package/node_modules/express-rate-limit/dist/index.cjs +51 -10
  348. package/node_modules/express-rate-limit/dist/index.d.cts +31 -1
  349. package/node_modules/express-rate-limit/dist/index.d.mts +31 -1
  350. package/node_modules/express-rate-limit/dist/index.d.ts +31 -1
  351. package/node_modules/express-rate-limit/dist/index.mjs +51 -10
  352. package/node_modules/express-rate-limit/package.json +3 -2
  353. package/node_modules/express-rate-limit/readme.md +3 -0
  354. package/node_modules/fast-string-truncated-width/dist/index.js +36 -96
  355. package/node_modules/fast-string-truncated-width/dist/types.d.ts +0 -3
  356. package/node_modules/fast-string-truncated-width/dist/utils.d.ts +3 -3
  357. package/node_modules/fast-string-truncated-width/dist/utils.js +14 -9
  358. package/node_modules/fast-string-truncated-width/package.json +1 -1
  359. package/node_modules/fast-string-truncated-width/readme.md +2 -3
  360. package/node_modules/fast-string-width/package.json +2 -2
  361. package/node_modules/fast-string-width/readme.md +0 -3
  362. package/node_modules/fast-uri/.github/workflows/ci.yml +12 -7
  363. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  364. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
  365. package/node_modules/fast-uri/LICENSE +1 -3
  366. package/node_modules/fast-uri/README.md +13 -4
  367. package/node_modules/fast-uri/index.js +90 -24
  368. package/node_modules/fast-uri/lib/utils.js +129 -22
  369. package/node_modules/fast-uri/package.json +3 -4
  370. package/node_modules/fast-wrap-ansi/lib/main.js +4 -1
  371. package/node_modules/fast-wrap-ansi/lib/main.js.map +1 -1
  372. package/node_modules/fast-wrap-ansi/package.json +2 -2
  373. package/node_modules/get-intrinsic/CHANGELOG.md +0 -7
  374. package/node_modules/get-intrinsic/index.js +13 -8
  375. package/node_modules/get-intrinsic/package.json +4 -7
  376. package/node_modules/hasown/CHANGELOG.md +11 -0
  377. package/node_modules/hasown/eslint.config.mjs +6 -0
  378. package/node_modules/hasown/index.d.ts +1 -0
  379. package/node_modules/hasown/package.json +14 -14
  380. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +9 -2
  381. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +9 -2
  382. package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +2 -0
  383. package/node_modules/hono/dist/cjs/jsx/base.js +7 -1
  384. package/node_modules/hono/dist/cjs/jsx/dom/render.js +22 -9
  385. package/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +3 -0
  386. package/node_modules/hono/dist/cjs/jsx/utils.js +155 -5
  387. package/node_modules/hono/dist/cjs/middleware/body-limit/index.js +21 -30
  388. package/node_modules/hono/dist/cjs/middleware/cache/index.js +11 -3
  389. package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
  390. package/node_modules/hono/dist/cjs/middleware/method-override/index.js +1 -1
  391. package/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js +2 -2
  392. package/node_modules/hono/dist/cjs/utils/jwt/jws.js +1 -1
  393. package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +12 -6
  394. package/node_modules/hono/dist/helper/ssg/ssg.js +2 -0
  395. package/node_modules/hono/dist/jsx/base.js +13 -2
  396. package/node_modules/hono/dist/jsx/dom/render.js +22 -9
  397. package/node_modules/hono/dist/jsx/jsx-runtime.js +4 -1
  398. package/node_modules/hono/dist/jsx/utils.js +153 -5
  399. package/node_modules/hono/dist/middleware/body-limit/index.js +21 -30
  400. package/node_modules/hono/dist/middleware/cache/index.js +11 -3
  401. package/node_modules/hono/dist/middleware/cors/index.js +2 -5
  402. package/node_modules/hono/dist/middleware/method-override/index.js +1 -1
  403. package/node_modules/hono/dist/middleware/trailing-slash/index.js +2 -2
  404. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
  405. package/node_modules/hono/dist/types/jsx/utils.d.ts +3 -1
  406. package/node_modules/hono/dist/types/middleware/cache/index.d.ts +2 -0
  407. package/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
  408. package/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +16 -0
  409. package/node_modules/hono/dist/types/types.d.ts +116 -116
  410. package/node_modules/hono/dist/utils/jwt/jws.js +1 -1
  411. package/node_modules/hono/dist/utils/jwt/jwt.js +12 -6
  412. package/node_modules/hono/package.json +1 -1
  413. package/node_modules/ip-address/README.md +249 -76
  414. package/node_modules/ip-address/dist/address-error.d.ts +0 -1
  415. package/node_modules/ip-address/dist/address-error.js.map +1 -1
  416. package/node_modules/ip-address/dist/common.d.ts +6 -1
  417. package/node_modules/ip-address/dist/common.js +21 -0
  418. package/node_modules/ip-address/dist/common.js.map +1 -1
  419. package/node_modules/ip-address/dist/ip-address.d.ts +0 -1
  420. package/node_modules/ip-address/dist/ip-address.js.map +1 -1
  421. package/node_modules/ip-address/dist/ipv4.d.ts +115 -57
  422. package/node_modules/ip-address/dist/ipv4.js +193 -68
  423. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  424. package/node_modules/ip-address/dist/ipv6.d.ts +172 -111
  425. package/node_modules/ip-address/dist/ipv6.js +345 -131
  426. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  427. package/node_modules/ip-address/dist/v4/constants.d.ts +0 -1
  428. package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  429. package/node_modules/ip-address/dist/v6/constants.d.ts +0 -1
  430. package/node_modules/ip-address/dist/v6/constants.js +5 -0
  431. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  432. package/node_modules/ip-address/dist/v6/helpers.d.ts +1 -1
  433. package/node_modules/ip-address/dist/v6/helpers.js +12 -3
  434. package/node_modules/ip-address/dist/v6/helpers.js.map +1 -1
  435. package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +0 -1
  436. package/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -1
  437. package/node_modules/ip-address/package.json +45 -35
  438. package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  439. package/node_modules/jose/dist/webapi/lib/pbes2kw.js +3 -0
  440. package/node_modules/jose/package.json +1 -1
  441. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -3
  442. package/node_modules/yaml/browser/dist/nodes/Alias.js +2 -0
  443. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +11 -8
  444. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -1
  445. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +5 -3
  446. package/node_modules/yaml/dist/nodes/Alias.js +2 -0
  447. package/node_modules/yaml/dist/nodes/Scalar.d.ts +5 -1
  448. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +10 -7
  449. package/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -1
  450. package/node_modules/yaml/package.json +1 -1
  451. package/node_modules/zod/README.md +1 -18
  452. package/node_modules/zod/locales/package.json +2 -1
  453. package/node_modules/zod/mini/package.json +2 -1
  454. package/node_modules/zod/package.json +1 -1
  455. package/node_modules/zod/src/v4/classic/errors.ts +2 -2
  456. package/node_modules/zod/src/v4/classic/external.ts +1 -0
  457. package/node_modules/zod/src/v4/classic/from-json-schema.ts +39 -23
  458. package/node_modules/zod/src/v4/classic/parse.ts +6 -6
  459. package/node_modules/zod/src/v4/classic/schemas.ts +414 -151
  460. package/node_modules/zod/src/v4/core/api.ts +31 -6
  461. package/node_modules/zod/src/v4/core/checks.ts +1 -1
  462. package/node_modules/zod/src/v4/core/core.ts +17 -2
  463. package/node_modules/zod/src/v4/core/errors.ts +31 -24
  464. package/node_modules/zod/src/v4/core/json-schema-processors.ts +17 -18
  465. package/node_modules/zod/src/v4/core/parse.ts +7 -7
  466. package/node_modules/zod/src/v4/core/regexes.ts +8 -1
  467. package/node_modules/zod/src/v4/core/schemas.ts +263 -71
  468. package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -1
  469. package/node_modules/zod/src/v4/core/util.ts +52 -35
  470. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  471. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  472. package/node_modules/zod/src/v4/locales/en.ts +4 -0
  473. package/node_modules/zod/src/v4/locales/fr.ts +24 -8
  474. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  475. package/node_modules/zod/src/v4/locales/index.ts +3 -0
  476. package/node_modules/zod/src/v4/locales/it.ts +1 -1
  477. package/node_modules/zod/src/v4/locales/ka.ts +8 -8
  478. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  479. package/node_modules/zod/src/v4/locales/uz.ts +1 -0
  480. package/node_modules/zod/src/v4/mini/external.ts +1 -0
  481. package/node_modules/zod/src/v4/mini/schemas.ts +56 -25
  482. package/node_modules/zod/v3/package.json +2 -1
  483. package/node_modules/zod/v4/classic/errors.js +2 -2
  484. package/node_modules/zod/v4/classic/external.d.cts +1 -0
  485. package/node_modules/zod/v4/classic/external.d.ts +1 -0
  486. package/node_modules/zod/v4/classic/from-json-schema.cjs +31 -16
  487. package/node_modules/zod/v4/classic/from-json-schema.js +31 -16
  488. package/node_modules/zod/v4/classic/package.json +2 -1
  489. package/node_modules/zod/v4/classic/schemas.cjs +358 -119
  490. package/node_modules/zod/v4/classic/schemas.d.cts +42 -14
  491. package/node_modules/zod/v4/classic/schemas.d.ts +42 -14
  492. package/node_modules/zod/v4/classic/schemas.js +356 -118
  493. package/node_modules/zod/v4/core/api.cjs +7 -2
  494. package/node_modules/zod/v4/core/api.d.cts +26 -5
  495. package/node_modules/zod/v4/core/api.d.ts +26 -5
  496. package/node_modules/zod/v4/core/api.js +7 -2
  497. package/node_modules/zod/v4/core/checks.d.cts +1 -1
  498. package/node_modules/zod/v4/core/checks.d.ts +1 -1
  499. package/node_modules/zod/v4/core/core.cjs +3 -1
  500. package/node_modules/zod/v4/core/core.js +4 -2
  501. package/node_modules/zod/v4/core/errors.cjs +26 -23
  502. package/node_modules/zod/v4/core/errors.d.cts +1 -0
  503. package/node_modules/zod/v4/core/errors.d.ts +1 -0
  504. package/node_modules/zod/v4/core/errors.js +26 -23
  505. package/node_modules/zod/v4/core/json-schema-processors.cjs +16 -20
  506. package/node_modules/zod/v4/core/json-schema-processors.js +16 -20
  507. package/node_modules/zod/v4/core/package.json +2 -1
  508. package/node_modules/zod/v4/core/parse.cjs +7 -7
  509. package/node_modules/zod/v4/core/parse.js +7 -7
  510. package/node_modules/zod/v4/core/regexes.cjs +9 -3
  511. package/node_modules/zod/v4/core/regexes.d.cts +6 -0
  512. package/node_modules/zod/v4/core/regexes.d.ts +6 -0
  513. package/node_modules/zod/v4/core/regexes.js +7 -1
  514. package/node_modules/zod/v4/core/schemas.cjs +211 -65
  515. package/node_modules/zod/v4/core/schemas.d.cts +39 -1
  516. package/node_modules/zod/v4/core/schemas.d.ts +39 -1
  517. package/node_modules/zod/v4/core/schemas.js +210 -64
  518. package/node_modules/zod/v4/core/to-json-schema.cjs +12 -1
  519. package/node_modules/zod/v4/core/to-json-schema.js +12 -1
  520. package/node_modules/zod/v4/core/util.cjs +54 -30
  521. package/node_modules/zod/v4/core/util.d.cts +1 -0
  522. package/node_modules/zod/v4/core/util.d.ts +1 -0
  523. package/node_modules/zod/v4/core/util.js +55 -32
  524. package/node_modules/zod/v4/core/versions.cjs +2 -2
  525. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  526. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  527. package/node_modules/zod/v4/core/versions.js +2 -2
  528. package/node_modules/zod/v4/locales/el.cjs +136 -0
  529. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  530. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  531. package/node_modules/zod/v4/locales/el.js +109 -0
  532. package/node_modules/zod/v4/locales/en.cjs +4 -0
  533. package/node_modules/zod/v4/locales/en.js +4 -0
  534. package/node_modules/zod/v4/locales/fr.cjs +24 -7
  535. package/node_modules/zod/v4/locales/fr.js +24 -7
  536. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  537. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  538. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  539. package/node_modules/zod/v4/locales/hr.js +122 -0
  540. package/node_modules/zod/v4/locales/index.cjs +8 -1
  541. package/node_modules/zod/v4/locales/index.d.cts +3 -0
  542. package/node_modules/zod/v4/locales/index.d.ts +3 -0
  543. package/node_modules/zod/v4/locales/index.js +3 -0
  544. package/node_modules/zod/v4/locales/it.cjs +1 -1
  545. package/node_modules/zod/v4/locales/it.js +1 -1
  546. package/node_modules/zod/v4/locales/ka.cjs +8 -8
  547. package/node_modules/zod/v4/locales/ka.js +8 -8
  548. package/node_modules/zod/v4/locales/package.json +2 -1
  549. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  550. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  551. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  552. package/node_modules/zod/v4/locales/ro.js +119 -0
  553. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  554. package/node_modules/zod/v4/locales/uz.js +1 -0
  555. package/node_modules/zod/v4/mini/external.d.cts +1 -0
  556. package/node_modules/zod/v4/mini/external.d.ts +1 -0
  557. package/node_modules/zod/v4/mini/package.json +2 -1
  558. package/node_modules/zod/v4/mini/schemas.cjs +41 -4
  559. package/node_modules/zod/v4/mini/schemas.d.cts +28 -10
  560. package/node_modules/zod/v4/mini/schemas.d.ts +28 -10
  561. package/node_modules/zod/v4/mini/schemas.js +40 -4
  562. package/node_modules/zod/v4/package.json +2 -1
  563. package/node_modules/zod/v4-mini/package.json +2 -1
  564. package/package.json +12 -12
  565. package/node_modules/async-function/.eslintrc +0 -16
  566. package/node_modules/async-function/.github/FUNDING.yml +0 -12
  567. package/node_modules/async-function/.nycrc +0 -9
  568. package/node_modules/async-function/CHANGELOG.md +0 -16
  569. package/node_modules/async-function/LICENSE +0 -21
  570. package/node_modules/async-function/README.md +0 -51
  571. package/node_modules/async-function/index.d.mts +0 -3
  572. package/node_modules/async-function/index.d.ts +0 -13
  573. package/node_modules/async-function/index.js +0 -8
  574. package/node_modules/async-function/index.mjs +0 -4
  575. package/node_modules/async-function/legacy.js +0 -18
  576. package/node_modules/async-function/package.json +0 -86
  577. package/node_modules/async-function/require.mjs +0 -5
  578. package/node_modules/async-function/tsconfig.json +0 -9
  579. package/node_modules/async-generator-function/.eslintrc +0 -26
  580. package/node_modules/async-generator-function/.github/FUNDING.yml +0 -12
  581. package/node_modules/async-generator-function/.nycrc +0 -9
  582. package/node_modules/async-generator-function/CHANGELOG.md +0 -15
  583. package/node_modules/async-generator-function/LICENSE +0 -21
  584. package/node_modules/async-generator-function/README.md +0 -52
  585. package/node_modules/async-generator-function/index.d.mts +0 -3
  586. package/node_modules/async-generator-function/index.d.ts +0 -22
  587. package/node_modules/async-generator-function/index.js +0 -8
  588. package/node_modules/async-generator-function/index.mjs +0 -4
  589. package/node_modules/async-generator-function/legacy.js +0 -18
  590. package/node_modules/async-generator-function/package.json +0 -87
  591. package/node_modules/async-generator-function/require.mjs +0 -5
  592. package/node_modules/async-generator-function/tsconfig.json +0 -9
  593. package/node_modules/fast-uri/.github/.stale.yml +0 -21
  594. package/node_modules/fast-uri/.github/tests_checker.yml +0 -8
  595. package/node_modules/generator-function/.eslintrc +0 -16
  596. package/node_modules/generator-function/.github/FUNDING.yml +0 -12
  597. package/node_modules/generator-function/.nycrc +0 -9
  598. package/node_modules/generator-function/CHANGELOG.md +0 -27
  599. package/node_modules/generator-function/LICENSE.md +0 -7
  600. package/node_modules/generator-function/README.md +0 -51
  601. package/node_modules/generator-function/index.d.mts +0 -3
  602. package/node_modules/generator-function/index.d.ts +0 -3
  603. package/node_modules/generator-function/index.js +0 -8
  604. package/node_modules/generator-function/index.mjs +0 -4
  605. package/node_modules/generator-function/legacy.js +0 -18
  606. package/node_modules/generator-function/package.json +0 -88
  607. package/node_modules/generator-function/require.mjs +0 -5
  608. package/node_modules/generator-function/tsconfig.json +0 -9
  609. package/node_modules/hasown/.eslintrc +0 -5
  610. package/node_modules/ip-address/dist/address-error.d.ts.map +0 -1
  611. package/node_modules/ip-address/dist/common.d.ts.map +0 -1
  612. package/node_modules/ip-address/dist/ip-address.d.ts.map +0 -1
  613. package/node_modules/ip-address/dist/ipv4.d.ts.map +0 -1
  614. package/node_modules/ip-address/dist/ipv6.d.ts.map +0 -1
  615. package/node_modules/ip-address/dist/v4/constants.d.ts.map +0 -1
  616. package/node_modules/ip-address/dist/v6/constants.d.ts.map +0 -1
  617. package/node_modules/ip-address/dist/v6/helpers.d.ts.map +0 -1
  618. package/node_modules/ip-address/dist/v6/regular-expressions.d.ts.map +0 -1
  619. package/node_modules/ip-address/src/address-error.ts +0 -11
  620. package/node_modules/ip-address/src/common.ts +0 -55
  621. package/node_modules/ip-address/src/ip-address.ts +0 -7
  622. package/node_modules/ip-address/src/ipv4.ts +0 -394
  623. package/node_modules/ip-address/src/ipv6.ts +0 -1212
  624. package/node_modules/ip-address/src/v4/constants.ts +0 -7
  625. package/node_modules/ip-address/src/v6/constants.ts +0 -79
  626. package/node_modules/ip-address/src/v6/helpers.ts +0 -48
  627. package/node_modules/ip-address/src/v6/regular-expressions.ts +0 -94
  628. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/.npmignore +0 -0
  629. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/LICENSE +0 -0
  630. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/README.md +0 -0
  631. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/index.js +0 -0
  632. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/mode.js +0 -0
  633. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/package.json +0 -0
  634. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/windows.js +0 -0
  635. /package/node_modules/{cross-spawn/node_modules/which → which}/LICENSE +0 -0
  636. /package/node_modules/{cross-spawn/node_modules/which → which}/README.md +0 -0
  637. /package/node_modules/{cross-spawn/node_modules/which → which}/bin/node-which +0 -0
  638. /package/node_modules/{cross-spawn/node_modules/which → which}/package.json +0 -0
  639. /package/node_modules/{cross-spawn/node_modules/which → which}/which.js +0 -0
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "product": "GDH",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "installMode": "packaged_install"
5
5
  }
@@ -4131,6 +4131,140 @@
4131
4131
  }
4132
4132
  ]
4133
4133
  }
4134
+ },
4135
+ {
4136
+ "version": "3.2.2",
4137
+ "releaseTag": "v3.2.2",
4138
+ "migrationStatus": "required",
4139
+ "summary": "v3.2.2 fixes adopted editor PID liveness checks in sandboxed hosts, documents local target-side dogfooding diagnostics, and refreshes deterministic managed target surfaces. GDH_AGENT_CONTRACT_VERSION moves 25 -> 26, GDH_GUIDANCE_INDEX_VERSION moves 9 -> 10, GDH_GUIDANCE_UNIT_VERSION moves 27 -> 28, GDH_UPDATE_HOOK_VERSION moves 20 -> 21, and GDH_RUNTIME_BRIDGE_SURFACE_VERSION moves 15 -> 16. No project config schema change is introduced.",
4140
+ "releaseHighlights": {
4141
+ "summary": "v3.2.2 is a patch release for adopted Godot editor sessions and managed target surface freshness. GDH now treats `EPERM` from host PID liveness checks as an inaccessible-but-live process, so sandboxed agents can still adopt a reachable running editor bridge instead of incorrectly reporting `adopted_editor_process_not_alive`. The release also documents the target-side diagnostic files agents should inspect when a local dogfooding target path is available, and refreshes managed surface versions for post-v3.2.1 guidance, hook/statusline, agent contract, and runtime/editor bridge rendering changes.",
4142
+ "operatorChanges": [
4143
+ "**Adopted editor sessions survive inaccessible PID checks.** A fresh",
4144
+ "**Dogfooding diagnostics are explicit.** The dogfooding workflow now points",
4145
+ "**Managed surfaces re-bake.** Existing managed targets refresh generated agent"
4146
+ ]
4147
+ },
4148
+ "updateContract": {
4149
+ "summary": "Existing managed targets should self-update to v3.2.2 and re-bake managed agent, guidance, hook/statusline, and runtime/editor bridge surfaces. The re-bake refreshes generated files only; it does not migrate project-owned schema data.",
4150
+ "steps": [
4151
+ {
4152
+ "id": "install_v3_2_2",
4153
+ "kind": "mechanical",
4154
+ "summary": "Install the v3.2.2 GDH package.",
4155
+ "detail": "Run the normal GDH update flow so the target uses the package with the refreshed managed surface versions.",
4156
+ "commands": [
4157
+ "gdh self-update --apply"
4158
+ ],
4159
+ "validationCommands": [
4160
+ "gdh status"
4161
+ ]
4162
+ },
4163
+ {
4164
+ "id": "rebake_managed_surfaces",
4165
+ "kind": "mechanical",
4166
+ "summary": "Re-bake managed agent, guidance, hook/statusline, and bridge surfaces.",
4167
+ "detail": "Run migration when lifecycle status reports managed-surface work. This refreshes generated guidance, hook/statusline files, and managed bridge output.",
4168
+ "commands": [
4169
+ "gdh migrate --apply"
4170
+ ],
4171
+ "validationCommands": [
4172
+ "gdh adapters status <target>",
4173
+ "gdh bridge status <target>",
4174
+ "gdh verify drift <target>",
4175
+ "gdh status"
4176
+ ]
4177
+ },
4178
+ {
4179
+ "id": "repair_bridge_if_needed",
4180
+ "kind": "mechanical",
4181
+ "summary": "Repair bridge output directly when bridge status remains stale.",
4182
+ "detail": "If lifecycle or bridge status reports stale managed bridge files after update, run bridge repair for the affected target.",
4183
+ "commands": [
4184
+ "gdh bridge repair <target>"
4185
+ ],
4186
+ "validationCommands": [
4187
+ "gdh bridge status <target>",
4188
+ "gdh verify drift <target>"
4189
+ ]
4190
+ },
4191
+ {
4192
+ "id": "inspect_local_dogfood_diagnostics",
4193
+ "kind": "agent_reasoning",
4194
+ "summary": "Use local target diagnostics before asking the user to restart editor tooling.",
4195
+ "detail": "When a dogfooding report includes a local target path, inspect .gdh-state/editor-bridge metadata, operation artifacts, generated bridge files, and Godot logs before concluding that a running editor session is unrecoverable.",
4196
+ "commands": [],
4197
+ "validationCommands": [
4198
+ "gdh editor session status <target>",
4199
+ "gdh editor operation run <target> --input-json '{\"mode\":\"adopt_only\",\"operation\":{\"kind\":\"editor.state\"}}'"
4200
+ ]
4201
+ }
4202
+ ]
4203
+ }
4204
+ },
4205
+ {
4206
+ "version": "3.2.3",
4207
+ "releaseTag": "v3.2.3",
4208
+ "migrationStatus": "no_op",
4209
+ "summary": "v3.2.3 hardens host-side GDH-owned process cleanup across managed LSP, MCP cleanup, runtime broker/session paths, runtime recipe timeouts, and managed headless editor operations. It introduces no managed target schema, generated surface, agent contract, hook/statusline, or bridge surface version changes.",
4210
+ "releaseHighlights": {
4211
+ "summary": "v3.2.3 is a patch release that hardens GDH-owned process cleanup across MCP, managed Godot LSP, runtime bridge broker, runtime recipe execution, bridge sessions, and managed headless editor operations. GDH now uses a shared termination helper that verifies process liveness, requests graceful shutdown, escalates to `SIGKILL` when needed, and reports when a process may still be alive. This reduces stale Godot or GDH-owned helper processes after failed startup, timeout, prune, stop, or cleanup paths.",
4212
+ "operatorChanges": [
4213
+ "**Managed Godot LSP cleanup is stricter.** GDH-owned LSP processes now go",
4214
+ "**MCP cleanup escalates when ownership is proven.** `gdh mcp cleanup --apply`",
4215
+ "**Runtime broker prune shuts down compatible live brokers.** `gdh bridge",
4216
+ "**Runtime and editor timeouts avoid SIGTERM-only cleanup.** Runtime recipe",
4217
+ "**Lifecycle review findings are documented.** The release includes a detailed"
4218
+ ]
4219
+ },
4220
+ "updateContract": {
4221
+ "summary": "Existing managed targets can update to v3.2.3 through the normal GDH update flow. The release changes host-side process cleanup behavior only and does not require managed project migration when the target is otherwise healthy.",
4222
+ "steps": [
4223
+ {
4224
+ "id": "install_v3_2_3",
4225
+ "kind": "mechanical",
4226
+ "summary": "Install the v3.2.3 GDH package.",
4227
+ "detail": "Run the normal GDH update flow so the target uses the package with hardened host-side process cleanup.",
4228
+ "commands": [
4229
+ "gdh self-update --apply"
4230
+ ],
4231
+ "validationCommands": [
4232
+ "gdh status"
4233
+ ]
4234
+ },
4235
+ {
4236
+ "id": "confirm_no_managed_migration",
4237
+ "kind": "agent_reasoning",
4238
+ "summary": "Confirm the target has no release-specific migration work.",
4239
+ "detail": "This release has no managed surface or project schema version change. If gdh status reports migration work, treat it as pre-existing target drift rather than v3.2.3-specific migration.",
4240
+ "commands": [
4241
+ "gdh status"
4242
+ ],
4243
+ "validationCommands": [
4244
+ "gdh status",
4245
+ "gdh verify drift <target>"
4246
+ ]
4247
+ },
4248
+ {
4249
+ "id": "use_bounded_cleanup_commands",
4250
+ "kind": "manual_review",
4251
+ "summary": "Use GDH cleanup commands before manually killing processes.",
4252
+ "detail": "When stale GDH-owned processes are suspected, prefer gdh lsp doctor/prune/stop, gdh mcp cleanup --target <target> --apply, and gdh bridge session doctor/prune <target>. GDH still avoids killing unrelated editor, Godot, or user processes.",
4253
+ "commands": [
4254
+ "gdh lsp doctor",
4255
+ "gdh lsp prune",
4256
+ "gdh mcp cleanup --target <target> --apply",
4257
+ "gdh bridge session doctor <target>",
4258
+ "gdh bridge session prune <target>"
4259
+ ],
4260
+ "validationCommands": [
4261
+ "gdh lsp status",
4262
+ "gdh bridge session doctor <target>",
4263
+ "gdh status"
4264
+ ]
4265
+ }
4266
+ ]
4267
+ }
4134
4268
  }
4135
4269
  ]
4136
4270
  }
@@ -1,5 +1,13 @@
1
1
  # @clack/core
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 78fd3ae: Remove unused `debug` option key.
8
+ - ea5702e: fix: add engines field expressing node >=20.12 requirement
9
+ - 814ab9a: Add new multiline prompt for multi-line text input.
10
+
3
11
  ## 1.2.0
4
12
 
5
13
  ### Minor Changes
@@ -100,7 +100,6 @@ interface PromptOptions<TValue, Self extends Prompt<TValue>> {
100
100
  validate?: ((value: TValue | undefined) => string | Error | undefined) | undefined;
101
101
  input?: Readable;
102
102
  output?: Writable;
103
- debug?: boolean;
104
103
  signal?: AbortSignal;
105
104
  }
106
105
  declare class Prompt<TValue> {
@@ -148,6 +147,7 @@ declare class Prompt<TValue> {
148
147
  emit<T extends keyof ClackEvents<TValue>>(event: T, ...data: Parameters<ClackEvents<TValue>[T]>): void;
149
148
  prompt(): Promise<symbol | TValue | undefined>;
150
149
  protected _isActionKey(char: string | undefined, _key: Key): boolean;
150
+ protected _shouldSubmit(_char: string | undefined, _key: Key): boolean;
151
151
  protected _setValue(value: TValue | undefined): void;
152
152
  protected _setUserInput(value: string | undefined, write?: boolean): void;
153
153
  protected _clearUserInput(): void;
@@ -258,6 +258,20 @@ declare class GroupMultiSelectPrompt<T extends {
258
258
  constructor(opts: GroupMultiSelectOptions<T>);
259
259
  }
260
260
 
261
+ interface MultiLineOptions extends PromptOptions<string, MultiLinePrompt> {
262
+ placeholder?: string;
263
+ defaultValue?: string;
264
+ showSubmit?: boolean;
265
+ }
266
+ declare class MultiLinePrompt extends Prompt<string> {
267
+ #private;
268
+ focused: 'editor' | 'submit';
269
+ get userInputWithCursor(): string;
270
+ get cursor(): number;
271
+ protected _shouldSubmit(_char: string | undefined, _key: Key): boolean;
272
+ constructor(opts: MultiLineOptions);
273
+ }
274
+
261
275
  interface OptionLike {
262
276
  value: any;
263
277
  disabled?: boolean;
@@ -343,7 +357,7 @@ interface BlockOptions {
343
357
  declare function block({ input, output, overwrite, hideCursor, }?: BlockOptions): () => void;
344
358
  declare const getColumns: (output: Writable) => number;
345
359
  declare const getRows: (output: Writable) => number;
346
- declare function wrapTextWithPrefix(output: Writable | undefined, text: string, prefix: string, startPrefix?: string): string;
360
+ declare function wrapTextWithPrefix(output: Writable | undefined, text: string, prefix: string, startPrefix?: string, lineFormatter?: (line: string, index: number) => string): string;
347
361
 
348
- export { AutocompletePrompt, ConfirmPrompt, DatePrompt, GroupMultiSelectPrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, TextPrompt, block, getColumns, getRows, isCancel, settings, updateSettings, wrapTextWithPrefix };
349
- export type { AutocompleteOptions, ClackSettings, ConfirmOptions, DateFormat, DateOptions, DateParts, GroupMultiSelectOptions, MultiSelectOptions, PasswordOptions, PromptOptions, SelectKeyOptions, SelectOptions, ClackState as State, TextOptions };
362
+ export { AutocompletePrompt, ConfirmPrompt, DatePrompt, GroupMultiSelectPrompt, MultiLinePrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, TextPrompt, block, getColumns, getRows, isCancel, settings, updateSettings, wrapTextWithPrefix };
363
+ export type { AutocompleteOptions, ClackSettings, ConfirmOptions, DateFormat, DateOptions, DateParts, GroupMultiSelectOptions, MultiLineOptions, MultiSelectOptions, PasswordOptions, PromptOptions, SelectKeyOptions, SelectOptions, ClackState as State, TextOptions };
@@ -1,11 +1,17 @@
1
- import{styleText as y}from"node:util";import{stdout as S,stdin as $}from"node:process";import*as _ from"node:readline";import P from"node:readline";import{wrapAnsi as x}from"fast-wrap-ansi";import{cursor as c,erase as M}from"sisteransi";import{ReadStream as D}from"node:tty";function d(r,t,e){if(!e.some(o=>!o.disabled))return r;const s=r+t,i=Math.max(e.length-1,0),n=s<0?i:s>i?0:s;return e[n].disabled?d(n,t<0?-1:1,e):n}const E=["up","down","left","right","space","enter","cancel"],G=["January","February","March","April","May","June","July","August","September","October","November","December"],u={actions:new Set(E),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...G],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(r,t)=>`There are only ${r} days in ${t}`,afterMin:r=>`Date must be on or after ${r.toISOString().slice(0,10)}`,beforeMax:r=>`Date must be on or before ${r.toISOString().slice(0,10)}`}}};function K(r){if(r.aliases!==void 0){const t=r.aliases;for(const e in t){if(!Object.hasOwn(t,e))continue;const s=t[e];u.actions.has(s)&&(u.aliases.has(e)||u.aliases.set(e,s))}}if(r.messages!==void 0){const t=r.messages;t.cancel!==void 0&&(u.messages.cancel=t.cancel),t.error!==void 0&&(u.messages.error=t.error)}if(r.withGuide!==void 0&&(u.withGuide=r.withGuide!==!1),r.date!==void 0){const t=r.date;t.monthNames!==void 0&&(u.date.monthNames=[...t.monthNames]),t.messages!==void 0&&(t.messages.required!==void 0&&(u.date.messages.required=t.messages.required),t.messages.invalidMonth!==void 0&&(u.date.messages.invalidMonth=t.messages.invalidMonth),t.messages.invalidDay!==void 0&&(u.date.messages.invalidDay=t.messages.invalidDay),t.messages.afterMin!==void 0&&(u.date.messages.afterMin=t.messages.afterMin),t.messages.beforeMax!==void 0&&(u.date.messages.beforeMax=t.messages.beforeMax))}}function V(r,t){if(typeof r=="string")return u.aliases.get(r)===t;for(const e of r)if(e!==void 0&&V(e,t))return!0;return!1}function j(r,t){if(r===t)return;const e=r.split(`
2
- `),s=t.split(`
3
- `),i=Math.max(e.length,s.length),n=[];for(let o=0;o<i;o++)e[o]!==s[o]&&n.push(o);return{lines:n,numLinesBefore:e.length,numLinesAfter:s.length,numLines:i}}const Y=globalThis.process.platform.startsWith("win"),C=Symbol("clack:cancel");function q(r){return r===C}function w(r,t){const e=r;e.isTTY&&e.setRawMode(t)}function z({input:r=$,output:t=S,overwrite:e=!0,hideCursor:s=!0}={}){const i=_.createInterface({input:r,output:t,prompt:"",tabSize:1});_.emitKeypressEvents(r,i),r instanceof D&&r.isTTY&&r.setRawMode(!0);const n=(o,{name:a,sequence:h})=>{const l=String(o);if(V([l,a,h],"cancel")){s&&t.write(c.show),process.exit(0);return}if(!e)return;const f=a==="return"?0:-1,v=a==="return"?-1:0;_.moveCursor(t,f,v,()=>{_.clearLine(t,1,()=>{r.once("keypress",n)})})};return s&&t.write(c.hide),r.once("keypress",n),()=>{r.off("keypress",n),s&&t.write(c.show),r instanceof D&&r.isTTY&&!Y&&r.setRawMode(!1),i.terminal=!1,i.close()}}const O=r=>"columns"in r&&typeof r.columns=="number"?r.columns:80,A=r=>"rows"in r&&typeof r.rows=="number"?r.rows:20;function R(r,t,e,s=e){const i=O(r??S);return x(t,i-e.length,{hard:!0,trim:!1}).split(`
4
- `).map((n,o)=>`${o===0?s:e}${n}`).join(`
5
- `)}let p=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(t,e=!0){const{input:s=$,output:i=S,render:n,signal:o,...a}=t;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=n.bind(this),this._track=e,this._abortSignal=o,this.input=s,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,e){const s=this._subscribers.get(t)??[];s.push(e),this._subscribers.set(t,s)}on(t,e){this.setSubscriber(t,{cb:e})}once(t,e){this.setSubscriber(t,{cb:e,once:!0})}emit(t,...e){const s=this._subscribers.get(t)??[],i=[];for(const n of s)n.cb(...e),n.once&&i.push(()=>s.splice(s.indexOf(n),1));for(const n of i)n()}prompt(){return new Promise(t=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(C);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=P.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),w(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(c.show),this.output.off("resize",this.render),w(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(c.show),this.output.off("resize",this.render),w(this.input,!1),t(C)})})}_isActionKey(t,e){return t===" "}_setValue(t){this.value=t,this.emit("value",this.value)}_setUserInput(t,e){this.userInput=t??"",this.emit("userInput",this.userInput),e&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(t,e){if(this._track&&e.name!=="return"&&(e.name&&this._isActionKey(t,e)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),e?.name&&(!this._track&&u.aliases.has(e.name)&&this.emit("cursor",u.aliases.get(e.name)),u.actions.has(e.name)&&this.emit("cursor",e.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),this.emit("key",t?.toLowerCase(),e),e?.name==="return"){if(this.opts.validate){const s=this.opts.validate(this.value);s&&(this.error=s instanceof Error?s.message:s,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}V([t,e?.name,e?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
6
- `),w(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const t=x(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
7
- `).length-1;this.output.write(c.move(-999,t*-1))}render(){const t=x(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(c.hide);else{const e=j(this._prevFrame,t),s=A(this.output);if(this.restoreCursor(),e){const i=Math.max(0,e.numLinesAfter-s),n=Math.max(0,e.numLinesBefore-s);let o=e.lines.find(a=>a>=i);if(o===void 0){this._prevFrame=t;return}if(e.lines.length===1){this.output.write(c.move(0,o-n)),this.output.write(M.lines(1));const a=t.split(`
8
- `);this.output.write(a[o]),this._prevFrame=t,this.output.write(c.move(0,a.length-o-1));return}else if(e.lines.length>1){if(i<n)o=i;else{const h=o-n;h>0&&this.output.write(c.move(0,h))}this.output.write(M.down());const a=t.split(`
9
- `).slice(o);this.output.write(a.join(`
10
- `)),this._prevFrame=t;return}}this.output.write(M.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};function W(r,t){if(r===void 0||t.length===0)return 0;const e=t.findIndex(s=>s.value===r);return e!==-1?e:0}function B(r,t){return(t.label??String(t.value)).toLowerCase().includes(r.toLowerCase())}function J(r,t){if(t)return r?t:t[0]}let H=class extends p{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#e=0;#o="";#t;#n;#a;get cursor(){return this.#e}get userInputWithCursor(){if(!this.userInput)return y(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}\u2588`;const t=this.userInput.slice(0,this._cursor),[e,...s]=this.userInput.slice(this._cursor);return`${t}${y("inverse",e)}${s.join("")}`}get options(){return typeof this.#n=="function"?this.#n():this.#n}constructor(t){super(t),this.#n=t.options,this.#a=t.placeholder;const e=this.options;this.filteredOptions=[...e],this.multiple=t.multiple===!0,this.#t=typeof t.options=="function"?t.filter:t.filter??B;let s;if(t.initialValue&&Array.isArray(t.initialValue)?this.multiple?s=t.initialValue:s=t.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(s=[this.options[0].value]),s)for(const i of s){const n=e.findIndex(o=>o.value===i);n!==-1&&(this.toggleSelected(i),this.#e=n)}this.focusedValue=this.options[this.#e]?.value,this.on("key",(i,n)=>this.#s(i,n)),this.on("userInput",i=>this.#i(i))}_isActionKey(t,e){return t===" "||this.multiple&&this.isNavigating&&e.name==="space"&&t!==void 0&&t!==""}#s(t,e){const s=e.name==="up",i=e.name==="down",n=e.name==="return",o=this.userInput===""||this.userInput===" ",a=this.#a,h=this.options,l=a!==void 0&&a!==""&&h.some(f=>!f.disabled&&(this.#t?this.#t(a,f):!0));if(e.name==="tab"&&o&&l){this.userInput===" "&&this._clearUserInput(),this._setUserInput(a,!0),this.isNavigating=!1;return}s||i?(this.#e=d(this.#e,s?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#e]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):n?this.value=J(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(e.name==="tab"||this.isNavigating&&e.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected(t){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes(t)?this.selectedValues=this.selectedValues.filter(e=>e!==t):this.selectedValues=[...this.selectedValues,t]:this.selectedValues=[t])}#i(t){if(t!==this.#o){this.#o=t;const e=this.options;t&&this.#t?this.filteredOptions=e.filter(n=>this.#t?.(t,n)):this.filteredOptions=[...e];const s=W(this.focusedValue,this.filteredOptions);this.#e=d(s,0,this.filteredOptions);const i=this.filteredOptions[this.#e];i&&!i.disabled?this.focusedValue=i.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};class Q extends p{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",e=>{this.output.write(c.move(0,-1)),this.value=e,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}const X={Y:{type:"year",len:4},M:{type:"month",len:2},D:{type:"day",len:2}};function L(r){return[...r].map(t=>X[t])}function Z(r){const t=new Intl.DateTimeFormat(r,{year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date(2e3,0,15)),e=[];let s="/";for(const i of t)i.type==="literal"?s=i.value.trim()||i.value:(i.type==="year"||i.type==="month"||i.type==="day")&&e.push({type:i.type,len:i.type==="year"?4:2});return{segments:e,separator:s}}function k(r){return Number.parseInt((r||"0").replace(/_/g,"0"),10)||0}function I(r){return{year:k(r.year),month:k(r.month),day:k(r.day)}}function T(r,t){return new Date(r||2001,t||1,0).getDate()}function F(r){const{year:t,month:e,day:s}=I(r);if(!t||t<0||t>9999||!e||e<1||e>12||!s||s<1)return;const i=new Date(Date.UTC(t,e-1,s));if(!(i.getUTCFullYear()!==t||i.getUTCMonth()!==e-1||i.getUTCDate()!==s))return{year:t,month:e,day:s}}function N(r){const t=F(r);return t?new Date(Date.UTC(t.year,t.month-1,t.day)):void 0}function tt(r,t,e,s){const i=e?{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate()}:null,n=s?{year:s.getUTCFullYear(),month:s.getUTCMonth()+1,day:s.getUTCDate()}:null;return r==="year"?{min:i?.year??1,max:n?.year??9999}:r==="month"?{min:i&&t.year===i.year?i.month:1,max:n&&t.year===n.year?n.month:12}:{min:i&&t.year===i.year&&t.month===i.month?i.day:1,max:n&&t.year===n.year&&t.month===n.month?n.day:T(t.year,t.month)}}class et extends p{#e;#o;#t;#n;#a;#s={segmentIndex:0,positionInSegment:0};#i=!0;#r=null;inlineError="";get segmentCursor(){return{...this.#s}}get segmentValues(){return{...this.#t}}get segments(){return this.#e}get separator(){return this.#o}get formattedValue(){return this.#c(this.#t)}#c(t){return this.#e.map(e=>t[e.type]).join(this.#o)}#h(){this._setUserInput(this.#c(this.#t)),this._setValue(N(this.#t)??void 0)}constructor(t){const e=t.format?{segments:L(t.format),separator:t.separator??"/"}:Z(t.locale),s=t.separator??e.separator,i=t.format?L(t.format):e.segments,n=t.initialValue??t.defaultValue,o=n?{year:String(n.getUTCFullYear()).padStart(4,"0"),month:String(n.getUTCMonth()+1).padStart(2,"0"),day:String(n.getUTCDate()).padStart(2,"0")}:{year:"____",month:"__",day:"__"},a=i.map(h=>o[h.type]).join(s);super({...t,initialUserInput:a},!1),this.#e=i,this.#o=s,this.#t=o,this.#n=t.minDate,this.#a=t.maxDate,this.#h(),this.on("cursor",h=>this.#d(h)),this.on("key",(h,l)=>this.#f(h,l)),this.on("finalize",()=>this.#g(t))}#u(){const t=Math.max(0,Math.min(this.#s.segmentIndex,this.#e.length-1)),e=this.#e[t];if(e)return this.#s.positionInSegment=Math.max(0,Math.min(this.#s.positionInSegment,e.len-1)),{segment:e,index:t}}#l(t){this.inlineError="",this.#r=null;const e=this.#u();e&&(this.#s.segmentIndex=Math.max(0,Math.min(this.#e.length-1,e.index+t)),this.#s.positionInSegment=0,this.#i=!0)}#p(t){const e=this.#u();if(!e)return;const{segment:s}=e,i=this.#t[s.type],n=!i||i.replace(/_/g,"")==="",o=Number.parseInt((i||"0").replace(/_/g,"0"),10)||0,a=tt(s.type,I(this.#t),this.#n,this.#a);let h;n?h=t===1?a.min:a.max:h=Math.max(Math.min(a.max,o+t),a.min),this.#t={...this.#t,[s.type]:h.toString().padStart(s.len,"0")},this.#i=!0,this.#r=null,this.#h()}#d(t){if(t)switch(t){case"right":return this.#l(1);case"left":return this.#l(-1);case"up":return this.#p(1);case"down":return this.#p(-1)}}#f(t,e){if(e?.name==="backspace"||e?.sequence==="\x7F"||e?.sequence==="\b"||t==="\x7F"||t==="\b"){this.inlineError="";const s=this.#u();if(!s)return;if(!this.#t[s.segment.type].replace(/_/g,"")){this.#l(-1);return}this.#t[s.segment.type]="_".repeat(s.segment.len),this.#i=!0,this.#s.positionInSegment=0,this.#h();return}if(e?.name==="tab"){this.inlineError="";const s=this.#u();if(!s)return;const i=e.shift?-1:1,n=s.index+i;n>=0&&n<this.#e.length&&(this.#s.segmentIndex=n,this.#s.positionInSegment=0,this.#i=!0);return}if(t&&/^[0-9]$/.test(t)){const s=this.#u();if(!s)return;const{segment:i}=s,n=!this.#t[i.type].replace(/_/g,"");if(this.#i&&this.#r!==null&&!n){const m=this.#r+t,g={...this.#t,[i.type]:m},b=this.#m(g,i);if(b){this.inlineError=b,this.#r=null,this.#i=!1;return}this.inlineError="",this.#t[i.type]=m,this.#r=null,this.#i=!1,this.#h(),s.index<this.#e.length-1&&(this.#s.segmentIndex=s.index+1,this.#s.positionInSegment=0,this.#i=!0);return}this.#i&&!n&&(this.#t[i.type]="_".repeat(i.len),this.#s.positionInSegment=0),this.#i=!1,this.#r=null;const o=this.#t[i.type],a=o.indexOf("_"),h=a>=0?a:Math.min(this.#s.positionInSegment,i.len-1);if(h<0||h>=i.len)return;let l=o.slice(0,h)+t+o.slice(h+1),f=!1;if(h===0&&o==="__"&&(i.type==="month"||i.type==="day")){const m=Number.parseInt(t,10);l=`0${t}`,f=m<=(i.type==="month"?1:2)}if(i.type==="year"&&(l=(o.replace(/_/g,"")+t).padStart(i.len,"_")),!l.includes("_")){const m={...this.#t,[i.type]:l},g=this.#m(m,i);if(g){this.inlineError=g;return}}this.inlineError="",this.#t[i.type]=l;const v=l.includes("_")?void 0:F(this.#t);if(v){const{year:m,month:g}=v,b=T(m,g);this.#t={year:String(Math.max(0,Math.min(9999,m))).padStart(4,"0"),month:String(Math.max(1,Math.min(12,g))).padStart(2,"0"),day:String(Math.max(1,Math.min(b,v.day))).padStart(2,"0")}}this.#h();const U=l.indexOf("_");f?(this.#i=!0,this.#r=t):U>=0?this.#s.positionInSegment=U:a>=0&&s.index<this.#e.length-1?(this.#s.segmentIndex=s.index+1,this.#s.positionInSegment=0,this.#i=!0):this.#s.positionInSegment=Math.min(h+1,i.len-1)}}#m(t,e){const{month:s,day:i}=I(t);if(e.type==="month"&&(s<0||s>12))return u.date.messages.invalidMonth;if(e.type==="day"&&(i<0||i>31))return u.date.messages.invalidDay(31,"any month")}#g(t){const{year:e,month:s,day:i}=I(this.#t);if(e&&s&&i){const n=T(e,s);this.#t={...this.#t,day:String(Math.min(i,n)).padStart(2,"0")}}this.value=N(this.#t)??t.defaultValue??void 0}}class st extends p{options;cursor=0;#e;getGroupItems(t){return this.options.filter(e=>e.group===t)}isGroupSelected(t){const e=this.getGroupItems(t),s=this.value;return s===void 0?!1:e.every(i=>s.includes(i.value))}toggleValue(){const t=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),t.group===!0){const e=t.value,s=this.getGroupItems(e);this.isGroupSelected(e)?this.value=this.value.filter(i=>s.findIndex(n=>n.value===i)===-1):this.value=[...this.value,...s.map(i=>i.value)],this.value=Array.from(new Set(this.value))}else{const e=this.value.includes(t.value);this.value=e?this.value.filter(s=>s!==t.value):[...this.value,t.value]}}constructor(t){super(t,!1);const{options:e}=t;this.#e=t.selectableGroups!==!1,this.options=Object.entries(e).flatMap(([s,i])=>[{value:s,group:!0,label:s},...i.map(n=>({...n,group:s}))]),this.value=[...t.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:s})=>s===t.cursorAt),this.#e?0:1),this.on("cursor",s=>{switch(s){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;const i=this.options[this.cursor]?.group===!0;!this.#e&&i&&(this.cursor=this.cursor===0?this.options.length-1:this.cursor-1);break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;const i=this.options[this.cursor]?.group===!0;!this.#e&&i&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}}let it=class extends p{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(t=>t.disabled!==!0)}toggleAll(){const t=this._enabledOptions,e=this.value!==void 0&&this.value.length===t.length;this.value=e?[]:t.map(s=>s.value)}toggleInvert(){const t=this.value;if(!t)return;const e=this._enabledOptions.filter(s=>!t.includes(s.value));this.value=e.map(s=>s.value)}toggleValue(){this.value===void 0&&(this.value=[]);const t=this.value.includes(this._value);this.value=t?this.value.filter(e=>e!==this._value):[...this.value,this._value]}constructor(t){super(t,!1),this.options=t.options,this.value=[...t.initialValues??[]];const e=Math.max(this.options.findIndex(({value:s})=>s===t.cursorAt),0);this.cursor=this.options[e].disabled?d(e,1,this.options):e,this.on("key",s=>{s==="a"&&this.toggleAll(),s==="i"&&this.toggleInvert()}),this.on("cursor",s=>{switch(s){case"left":case"up":this.cursor=d(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=d(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};class rt extends p{_mask="\u2022";get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state==="submit"||this.state==="cancel")return this.masked;const t=this.userInput;if(this.cursor>=t.length)return`${this.masked}${y(["inverse","hidden"],"_")}`;const e=this.masked,s=e.slice(0,this.cursor),i=e.slice(this.cursor);return`${s}${y("inverse",i[0])}${i.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:t,...e}){super(e),this._mask=t??"\u2022",this.on("userInput",s=>{this._setValue(s)})}}class nt extends p{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(t){super(t,!1),this.options=t.options;const e=this.options.findIndex(({value:i})=>i===t.initialValue),s=e===-1?0:e;this.cursor=this.options[s].disabled?d(s,1,this.options):s,this.changeValue(),this.on("cursor",i=>{switch(i){case"left":case"up":this.cursor=d(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=d(this.cursor,1,this.options);break}this.changeValue()})}}class ot extends p{options;cursor=0;constructor(t){super(t,!1),this.options=t.options;const e=t.caseSensitive===!0,s=this.options.map(({value:[i]})=>e?i:i?.toLowerCase());this.cursor=Math.max(s.indexOf(t.initialValue),0),this.on("key",(i,n)=>{if(!i)return;const o=e&&n.shift?i.toUpperCase():i;if(!s.includes(o))return;const a=this.options.find(({value:[h]})=>e?h===o:h?.toLowerCase()===i);a&&(this.value=a.value,this.state="submit",this.emit("submit"))})}}class at extends p{get userInputWithCursor(){if(this.state==="submit")return this.userInput;const t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;const e=t.slice(0,this.cursor),[s,...i]=t.slice(this.cursor);return`${e}${y("inverse",s)}${i.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",e=>{this._setValue(e)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}}export{H as AutocompletePrompt,Q as ConfirmPrompt,et as DatePrompt,st as GroupMultiSelectPrompt,it as MultiSelectPrompt,rt as PasswordPrompt,p as Prompt,ot as SelectKeyPrompt,nt as SelectPrompt,at as TextPrompt,z as block,O as getColumns,A as getRows,q as isCancel,u as settings,K as updateSettings,R as wrapTextWithPrefix};
1
+ import{styleText as v}from"node:util";import{stdout as S,stdin as D}from"node:process";import*as b from"node:readline";import E from"node:readline";import{wrapAnsi as M}from"fast-wrap-ansi";import{cursor as c,erase as V}from"sisteransi";import{ReadStream as O}from"node:tty";function d(r,t,s){if(!s.some(o=>!o.disabled))return r;const e=r+t,i=Math.max(s.length-1,0),n=e<0?i:e>i?0:e;return s[n].disabled?d(n,t<0?-1:1,s):n}function I(r,t,s,e){const i=e.split(`
2
+ `);let n=0,o=r;for(const a of i){if(o<=a.length)break;o-=a.length+1,n++}for(n=Math.max(0,Math.min(i.length-1,n+s)),o=Math.min(o,i[n].length)+t;o<0&&n>0;)n--,o+=i[n].length+1;for(;o>i[n].length&&n<i.length-1;)o-=i[n].length+1,n++;o=Math.max(0,Math.min(i[n].length,o));let u=0;for(let a=0;a<n;a++)u+=i[a].length+1;return u+o}const G=["up","down","left","right","space","enter","cancel"],K=["January","February","March","April","May","June","July","August","September","October","November","December"],h={actions:new Set(G),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...K],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(r,t)=>`There are only ${r} days in ${t}`,afterMin:r=>`Date must be on or after ${r.toISOString().slice(0,10)}`,beforeMax:r=>`Date must be on or before ${r.toISOString().slice(0,10)}`}}};function j(r){if(r.aliases!==void 0){const t=r.aliases;for(const s in t){if(!Object.hasOwn(t,s))continue;const e=t[s];h.actions.has(e)&&(h.aliases.has(s)||h.aliases.set(s,e))}}if(r.messages!==void 0){const t=r.messages;t.cancel!==void 0&&(h.messages.cancel=t.cancel),t.error!==void 0&&(h.messages.error=t.error)}if(r.withGuide!==void 0&&(h.withGuide=r.withGuide!==!1),r.date!==void 0){const t=r.date;t.monthNames!==void 0&&(h.date.monthNames=[...t.monthNames]),t.messages!==void 0&&(t.messages.required!==void 0&&(h.date.messages.required=t.messages.required),t.messages.invalidMonth!==void 0&&(h.date.messages.invalidMonth=t.messages.invalidMonth),t.messages.invalidDay!==void 0&&(h.date.messages.invalidDay=t.messages.invalidDay),t.messages.afterMin!==void 0&&(h.date.messages.afterMin=t.messages.afterMin),t.messages.beforeMax!==void 0&&(h.date.messages.beforeMax=t.messages.beforeMax))}}function C(r,t){if(typeof r=="string")return h.aliases.get(r)===t;for(const s of r)if(s!==void 0&&C(s,t))return!0;return!1}function z(r,t){if(r===t)return;const s=r.split(`
3
+ `),e=t.split(`
4
+ `),i=Math.max(s.length,e.length),n=[];for(let o=0;o<i;o++)s[o]!==e[o]&&n.push(o);return{lines:n,numLinesBefore:s.length,numLinesAfter:e.length,numLines:i}}const Y=globalThis.process.platform.startsWith("win"),k=Symbol("clack:cancel");function q(r){return r===k}function w(r,t){const s=r;s.isTTY&&s.setRawMode(t)}function R({input:r=D,output:t=S,overwrite:s=!0,hideCursor:e=!0}={}){const i=b.createInterface({input:r,output:t,prompt:"",tabSize:1});b.emitKeypressEvents(r,i),r instanceof O&&r.isTTY&&r.setRawMode(!0);const n=(o,{name:u,sequence:a})=>{const l=String(o);if(C([l,u,a],"cancel")){e&&t.write(c.show),process.exit(0);return}if(!s)return;const f=u==="return"?0:-1,y=u==="return"?-1:0;b.moveCursor(t,f,y,()=>{b.clearLine(t,1,()=>{r.once("keypress",n)})})};return e&&t.write(c.hide),r.once("keypress",n),()=>{r.off("keypress",n),e&&t.write(c.show),r instanceof O&&r.isTTY&&!Y&&r.setRawMode(!1),i.terminal=!1,i.close()}}const A=r=>"columns"in r&&typeof r.columns=="number"?r.columns:80,L=r=>"rows"in r&&typeof r.rows=="number"?r.rows:20;function W(r,t,s,e=s,i){const n=A(r??S);return M(t,n-s.length,{hard:!0,trim:!1}).split(`
5
+ `).map((o,u)=>{const a=i?i(o,u):o;return`${u===0?e:s}${a}`}).join(`
6
+ `)}let p=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(t,s=!0){const{input:e=D,output:i=S,render:n,signal:o,...u}=t;this.opts=u,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=n.bind(this),this._track=s,this._abortSignal=o,this.input=e,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,s){const e=this._subscribers.get(t)??[];e.push(s),this._subscribers.set(t,e)}on(t,s){this.setSubscriber(t,{cb:s})}once(t,s){this.setSubscriber(t,{cb:s,once:!0})}emit(t,...s){const e=this._subscribers.get(t)??[],i=[];for(const n of e)n.cb(...s),n.once&&i.push(()=>e.splice(e.indexOf(n),1));for(const n of i)n()}prompt(){return new Promise(t=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(k);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=E.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),w(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(c.show),this.output.off("resize",this.render),w(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(c.show),this.output.off("resize",this.render),w(this.input,!1),t(k)})})}_isActionKey(t,s){return t===" "}_shouldSubmit(t,s){return!0}_setValue(t){this.value=t,this.emit("value",this.value)}_setUserInput(t,s){this.userInput=t??"",this.emit("userInput",this.userInput),s&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(t,s){if(this._track&&s.name!=="return"&&(s.name&&this._isActionKey(t,s)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),s?.name&&(!this._track&&h.aliases.has(s.name)&&this.emit("cursor",h.aliases.get(s.name)),h.actions.has(s.name)&&this.emit("cursor",s.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),this.emit("key",t?.toLowerCase(),s),s?.name==="return"&&this._shouldSubmit(t,s)){if(this.opts.validate){const e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}C([t,s?.name,s?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
7
+ `),w(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const t=M(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
8
+ `).length-1;this.output.write(c.move(-999,t*-1))}render(){const t=M(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(c.hide);else{const s=z(this._prevFrame,t),e=L(this.output);if(this.restoreCursor(),s){const i=Math.max(0,s.numLinesAfter-e),n=Math.max(0,s.numLinesBefore-e);let o=s.lines.find(u=>u>=i);if(o===void 0){this._prevFrame=t;return}if(s.lines.length===1){this.output.write(c.move(0,o-n)),this.output.write(V.lines(1));const u=t.split(`
9
+ `);this.output.write(u[o]),this._prevFrame=t,this.output.write(c.move(0,u.length-o-1));return}else if(s.lines.length>1){if(i<n)o=i;else{const a=o-n;a>0&&this.output.write(c.move(0,a))}this.output.write(V.down());const u=t.split(`
10
+ `).slice(o);this.output.write(u.join(`
11
+ `)),this._prevFrame=t;return}}this.output.write(V.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};function B(r,t){if(r===void 0||t.length===0)return 0;const s=t.findIndex(e=>e.value===r);return s!==-1?s:0}function J(r,t){return(t.label??String(t.value)).toLowerCase().includes(r.toLowerCase())}function H(r,t){if(t)return r?t:t[0]}let Q=class extends p{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#s=0;#r="";#t;#n;#u;get cursor(){return this.#s}get userInputWithCursor(){if(!this.userInput)return v(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}\u2588`;const t=this.userInput.slice(0,this._cursor),[s,...e]=this.userInput.slice(this._cursor);return`${t}${v("inverse",s)}${e.join("")}`}get options(){return typeof this.#n=="function"?this.#n():this.#n}constructor(t){super(t),this.#n=t.options,this.#u=t.placeholder;const s=this.options;this.filteredOptions=[...s],this.multiple=t.multiple===!0,this.#t=typeof t.options=="function"?t.filter:t.filter??J;let e;if(t.initialValue&&Array.isArray(t.initialValue)?this.multiple?e=t.initialValue:e=t.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(e=[this.options[0].value]),e)for(const i of e){const n=s.findIndex(o=>o.value===i);n!==-1&&(this.toggleSelected(i),this.#s=n)}this.focusedValue=this.options[this.#s]?.value,this.on("key",(i,n)=>this.#e(i,n)),this.on("userInput",i=>this.#i(i))}_isActionKey(t,s){return t===" "||this.multiple&&this.isNavigating&&s.name==="space"&&t!==void 0&&t!==""}#e(t,s){const e=s.name==="up",i=s.name==="down",n=s.name==="return",o=this.userInput===""||this.userInput===" ",u=this.#u,a=this.options,l=u!==void 0&&u!==""&&a.some(f=>!f.disabled&&(this.#t?this.#t(u,f):!0));if(s.name==="tab"&&o&&l){this.userInput===" "&&this._clearUserInput(),this._setUserInput(u,!0),this.isNavigating=!1;return}e||i?(this.#s=d(this.#s,e?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#s]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):n?this.value=H(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(s.name==="tab"||this.isNavigating&&s.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected(t){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes(t)?this.selectedValues=this.selectedValues.filter(s=>s!==t):this.selectedValues=[...this.selectedValues,t]:this.selectedValues=[t])}#i(t){if(t!==this.#r){this.#r=t;const s=this.options;t&&this.#t?this.filteredOptions=s.filter(n=>this.#t?.(t,n)):this.filteredOptions=[...s];const e=B(this.focusedValue,this.filteredOptions);this.#s=d(e,0,this.filteredOptions);const i=this.filteredOptions[this.#s];i&&!i.disabled?this.focusedValue=i.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};class X extends p{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",s=>{this.output.write(c.move(0,-1)),this.value=s,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}const Z={Y:{type:"year",len:4},M:{type:"month",len:2},D:{type:"day",len:2}};function P(r){return[...r].map(t=>Z[t])}function tt(r){const t=new Intl.DateTimeFormat(r,{year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date(2e3,0,15)),s=[];let e="/";for(const i of t)i.type==="literal"?e=i.value.trim()||i.value:(i.type==="year"||i.type==="month"||i.type==="day")&&s.push({type:i.type,len:i.type==="year"?4:2});return{segments:s,separator:e}}function U(r){return Number.parseInt((r||"0").replace(/_/g,"0"),10)||0}function x(r){return{year:U(r.year),month:U(r.month),day:U(r.day)}}function $(r,t){return new Date(r||2001,t||1,0).getDate()}function F(r){const{year:t,month:s,day:e}=x(r);if(!t||t<0||t>9999||!s||s<1||s>12||!e||e<1)return;const i=new Date(Date.UTC(t,s-1,e));if(!(i.getUTCFullYear()!==t||i.getUTCMonth()!==s-1||i.getUTCDate()!==e))return{year:t,month:s,day:e}}function N(r){const t=F(r);return t?new Date(Date.UTC(t.year,t.month-1,t.day)):void 0}function st(r,t,s,e){const i=s?{year:s.getUTCFullYear(),month:s.getUTCMonth()+1,day:s.getUTCDate()}:null,n=e?{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate()}:null;return r==="year"?{min:i?.year??1,max:n?.year??9999}:r==="month"?{min:i&&t.year===i.year?i.month:1,max:n&&t.year===n.year?n.month:12}:{min:i&&t.year===i.year&&t.month===i.month?i.day:1,max:n&&t.year===n.year&&t.month===n.month?n.day:$(t.year,t.month)}}class et extends p{#s;#r;#t;#n;#u;#e={segmentIndex:0,positionInSegment:0};#i=!0;#o=null;inlineError="";get segmentCursor(){return{...this.#e}}get segmentValues(){return{...this.#t}}get segments(){return this.#s}get separator(){return this.#r}get formattedValue(){return this.#c(this.#t)}#c(t){return this.#s.map(s=>t[s.type]).join(this.#r)}#a(){this._setUserInput(this.#c(this.#t)),this._setValue(N(this.#t)??void 0)}constructor(t){const s=t.format?{segments:P(t.format),separator:t.separator??"/"}:tt(t.locale),e=t.separator??s.separator,i=t.format?P(t.format):s.segments,n=t.initialValue??t.defaultValue,o=n?{year:String(n.getUTCFullYear()).padStart(4,"0"),month:String(n.getUTCMonth()+1).padStart(2,"0"),day:String(n.getUTCDate()).padStart(2,"0")}:{year:"____",month:"__",day:"__"},u=i.map(a=>o[a.type]).join(e);super({...t,initialUserInput:u},!1),this.#s=i,this.#r=e,this.#t=o,this.#n=t.minDate,this.#u=t.maxDate,this.#a(),this.on("cursor",a=>this.#d(a)),this.on("key",(a,l)=>this.#f(a,l)),this.on("finalize",()=>this.#g(t))}#h(){const t=Math.max(0,Math.min(this.#e.segmentIndex,this.#s.length-1)),s=this.#s[t];if(s)return this.#e.positionInSegment=Math.max(0,Math.min(this.#e.positionInSegment,s.len-1)),{segment:s,index:t}}#l(t){this.inlineError="",this.#o=null;const s=this.#h();s&&(this.#e.segmentIndex=Math.max(0,Math.min(this.#s.length-1,s.index+t)),this.#e.positionInSegment=0,this.#i=!0)}#p(t){const s=this.#h();if(!s)return;const{segment:e}=s,i=this.#t[e.type],n=!i||i.replace(/_/g,"")==="",o=Number.parseInt((i||"0").replace(/_/g,"0"),10)||0,u=st(e.type,x(this.#t),this.#n,this.#u);let a;n?a=t===1?u.min:u.max:a=Math.max(Math.min(u.max,o+t),u.min),this.#t={...this.#t,[e.type]:a.toString().padStart(e.len,"0")},this.#i=!0,this.#o=null,this.#a()}#d(t){if(t)switch(t){case"right":return this.#l(1);case"left":return this.#l(-1);case"up":return this.#p(1);case"down":return this.#p(-1)}}#f(t,s){if(s?.name==="backspace"||s?.sequence==="\x7F"||s?.sequence==="\b"||t==="\x7F"||t==="\b"){this.inlineError="";const e=this.#h();if(!e)return;if(!this.#t[e.segment.type].replace(/_/g,"")){this.#l(-1);return}this.#t[e.segment.type]="_".repeat(e.segment.len),this.#i=!0,this.#e.positionInSegment=0,this.#a();return}if(s?.name==="tab"){this.inlineError="";const e=this.#h();if(!e)return;const i=s.shift?-1:1,n=e.index+i;n>=0&&n<this.#s.length&&(this.#e.segmentIndex=n,this.#e.positionInSegment=0,this.#i=!0);return}if(t&&/^[0-9]$/.test(t)){const e=this.#h();if(!e)return;const{segment:i}=e,n=!this.#t[i.type].replace(/_/g,"");if(this.#i&&this.#o!==null&&!n){const m=this.#o+t,g={...this.#t,[i.type]:m},_=this.#m(g,i);if(_){this.inlineError=_,this.#o=null,this.#i=!1;return}this.inlineError="",this.#t[i.type]=m,this.#o=null,this.#i=!1,this.#a(),e.index<this.#s.length-1&&(this.#e.segmentIndex=e.index+1,this.#e.positionInSegment=0,this.#i=!0);return}this.#i&&!n&&(this.#t[i.type]="_".repeat(i.len),this.#e.positionInSegment=0),this.#i=!1,this.#o=null;const o=this.#t[i.type],u=o.indexOf("_"),a=u>=0?u:Math.min(this.#e.positionInSegment,i.len-1);if(a<0||a>=i.len)return;let l=o.slice(0,a)+t+o.slice(a+1),f=!1;if(a===0&&o==="__"&&(i.type==="month"||i.type==="day")){const m=Number.parseInt(t,10);l=`0${t}`,f=m<=(i.type==="month"?1:2)}if(i.type==="year"&&(l=(o.replace(/_/g,"")+t).padStart(i.len,"_")),!l.includes("_")){const m={...this.#t,[i.type]:l},g=this.#m(m,i);if(g){this.inlineError=g;return}}this.inlineError="",this.#t[i.type]=l;const y=l.includes("_")?void 0:F(this.#t);if(y){const{year:m,month:g}=y,_=$(m,g);this.#t={year:String(Math.max(0,Math.min(9999,m))).padStart(4,"0"),month:String(Math.max(1,Math.min(12,g))).padStart(2,"0"),day:String(Math.max(1,Math.min(_,y.day))).padStart(2,"0")}}this.#a();const T=l.indexOf("_");f?(this.#i=!0,this.#o=t):T>=0?this.#e.positionInSegment=T:u>=0&&e.index<this.#s.length-1?(this.#e.segmentIndex=e.index+1,this.#e.positionInSegment=0,this.#i=!0):this.#e.positionInSegment=Math.min(a+1,i.len-1)}}#m(t,s){const{month:e,day:i}=x(t);if(s.type==="month"&&(e<0||e>12))return h.date.messages.invalidMonth;if(s.type==="day"&&(i<0||i>31))return h.date.messages.invalidDay(31,"any month")}#g(t){const{year:s,month:e,day:i}=x(this.#t);if(s&&e&&i){const n=$(s,e);this.#t={...this.#t,day:String(Math.min(i,n)).padStart(2,"0")}}this.value=N(this.#t)??t.defaultValue??void 0}}class it extends p{options;cursor=0;#s;getGroupItems(t){return this.options.filter(s=>s.group===t)}isGroupSelected(t){const s=this.getGroupItems(t),e=this.value;return e===void 0?!1:s.every(i=>e.includes(i.value))}toggleValue(){const t=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),t.group===!0){const s=t.value,e=this.getGroupItems(s);this.isGroupSelected(s)?this.value=this.value.filter(i=>e.findIndex(n=>n.value===i)===-1):this.value=[...this.value,...e.map(i=>i.value)],this.value=Array.from(new Set(this.value))}else{const s=this.value.includes(t.value);this.value=s?this.value.filter(e=>e!==t.value):[...this.value,t.value]}}constructor(t){super(t,!1);const{options:s}=t;this.#s=t.selectableGroups!==!1,this.options=Object.entries(s).flatMap(([e,i])=>[{value:e,group:!0,label:e},...i.map(n=>({...n,group:e}))]),this.value=[...t.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===t.cursorAt),this.#s?0:1),this.on("cursor",e=>{switch(e){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;const i=this.options[this.cursor]?.group===!0;!this.#s&&i&&(this.cursor=this.cursor===0?this.options.length-1:this.cursor-1);break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;const i=this.options[this.cursor]?.group===!0;!this.#s&&i&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}}class rt extends p{#s=!1;#r;focused="editor";get userInputWithCursor(){if(this.state==="submit")return this.userInput;const t=this.userInput;if(this.cursor>=t.length)return`${t}\u2588`;const s=t.slice(0,this.cursor),e=t[this.cursor],i=t.slice(this.cursor+1);return e===`
12
+ `?`${s}\u2588
13
+ ${i}`:`${s}${v("inverse",e)}${i}`}get cursor(){return this._cursor}#t(t){if(this.userInput.length===0){this._setUserInput(t);return}this._setUserInput(this.userInput.slice(0,this.cursor)+t+this.userInput.slice(this.cursor))}#n(t){const s=this.value??"";switch(t){case"up":this._cursor=I(this._cursor,0,-1,s);return;case"down":this._cursor=I(this._cursor,0,1,s);return;case"left":this._cursor=I(this._cursor,-1,0,s);return;case"right":this._cursor=I(this._cursor,1,0,s);return}}_shouldSubmit(t,s){if(this.#r)return this.focused==="submit"?!0:(this.#t(`
14
+ `),this._cursor++,!1);const e=this.#s;return this.#s=!0,e?(this.userInput[this.cursor-1]===`
15
+ `&&(this._setUserInput(this.userInput.slice(0,this.cursor-1)+this.userInput.slice(this.cursor)),this._cursor--),!0):(this.#t(`
16
+ `),this._cursor++,!1)}constructor(t){super(t,!1),this.#r=t.showSubmit??!1,this.on("key",(s,e)=>{if(e?.name&&h.actions.has(e.name)){this.#n(e.name);return}if(s===" "&&this.#r){this.focused=this.focused==="editor"?"submit":"editor";return}if(e?.name!=="return"){if(this.#s=!1,e?.name==="backspace"&&this.cursor>0){this._setUserInput(this.userInput.slice(0,this.cursor-1)+this.userInput.slice(this.cursor)),this._cursor--;return}if(e?.name==="delete"&&this.cursor<this.userInput.length){this._setUserInput(this.userInput.slice(0,this.cursor)+this.userInput.slice(this.cursor+1));return}s&&(this.#r&&this.focused==="submit"&&(this.focused="editor"),this.#t(s??""),this._cursor++)}}),this.on("userInput",s=>{this._setValue(s)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}}let nt=class extends p{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(t=>t.disabled!==!0)}toggleAll(){const t=this._enabledOptions,s=this.value!==void 0&&this.value.length===t.length;this.value=s?[]:t.map(e=>e.value)}toggleInvert(){const t=this.value;if(!t)return;const s=this._enabledOptions.filter(e=>!t.includes(e.value));this.value=s.map(e=>e.value)}toggleValue(){this.value===void 0&&(this.value=[]);const t=this.value.includes(this._value);this.value=t?this.value.filter(s=>s!==this._value):[...this.value,this._value]}constructor(t){super(t,!1),this.options=t.options,this.value=[...t.initialValues??[]];const s=Math.max(this.options.findIndex(({value:e})=>e===t.cursorAt),0);this.cursor=this.options[s].disabled?d(s,1,this.options):s,this.on("key",e=>{e==="a"&&this.toggleAll(),e==="i"&&this.toggleInvert()}),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=d(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=d(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};class ot extends p{_mask="\u2022";get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state==="submit"||this.state==="cancel")return this.masked;const t=this.userInput;if(this.cursor>=t.length)return`${this.masked}${v(["inverse","hidden"],"_")}`;const s=this.masked,e=s.slice(0,this.cursor),i=s.slice(this.cursor);return`${e}${v("inverse",i[0])}${i.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:t,...s}){super(s),this._mask=t??"\u2022",this.on("userInput",e=>{this._setValue(e)})}}class ut extends p{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(t){super(t,!1),this.options=t.options;const s=this.options.findIndex(({value:i})=>i===t.initialValue),e=s===-1?0:s;this.cursor=this.options[e].disabled?d(e,1,this.options):e,this.changeValue(),this.on("cursor",i=>{switch(i){case"left":case"up":this.cursor=d(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=d(this.cursor,1,this.options);break}this.changeValue()})}}class at extends p{options;cursor=0;constructor(t){super(t,!1),this.options=t.options;const s=t.caseSensitive===!0,e=this.options.map(({value:[i]})=>s?i:i?.toLowerCase());this.cursor=Math.max(e.indexOf(t.initialValue),0),this.on("key",(i,n)=>{if(!i)return;const o=s&&n.shift?i.toUpperCase():i;if(!e.includes(o))return;const u=this.options.find(({value:[a]})=>s?a===o:a?.toLowerCase()===i);u&&(this.value=u.value,this.state="submit",this.emit("submit"))})}}class ht extends p{get userInputWithCursor(){if(this.state==="submit")return this.userInput;const t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;const s=t.slice(0,this.cursor),[e,...i]=t.slice(this.cursor);return`${s}${v("inverse",e)}${i.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",s=>{this._setValue(s)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}}export{Q as AutocompletePrompt,X as ConfirmPrompt,et as DatePrompt,it as GroupMultiSelectPrompt,rt as MultiLinePrompt,nt as MultiSelectPrompt,ot as PasswordPrompt,p as Prompt,at as SelectKeyPrompt,ut as SelectPrompt,ht as TextPrompt,R as block,A as getColumns,L as getRows,q as isCancel,h as settings,j as updateSettings,W as wrapTextWithPrefix};
11
17
  //# sourceMappingURL=index.mjs.map