@kjanat/dreamcli 3.0.0-rc.8 → 3.0.0

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 (490) hide show
  1. package/CHANGELOG.md +271 -1
  2. package/README.md +30 -13
  3. package/dist/core/cli/dispatch.mjs +0 -11
  4. package/dist/core/cli/index.d.mts +133 -9
  5. package/dist/core/cli/index.mjs +119 -27
  6. package/dist/core/cli/planner.mjs +7 -1
  7. package/dist/core/cli/root-help.mjs +5 -0
  8. package/dist/core/cli/runtime-preflight.d.mts +4 -0
  9. package/dist/core/cli/runtime-preflight.mjs +5 -3
  10. package/dist/core/completion/shells/shared.mjs +1 -0
  11. package/dist/core/config/index.d.mts +43 -12
  12. package/dist/core/config/index.mjs +55 -16
  13. package/dist/core/config/package-json.d.mts +1 -0
  14. package/dist/core/errors/index.d.mts +2 -2
  15. package/dist/core/execution/index.mjs +13 -1
  16. package/dist/core/help/ansi.d.mts +11 -5
  17. package/dist/core/help/ansi.mjs +14 -16
  18. package/dist/core/help/index.d.mts +22 -0
  19. package/dist/core/help/index.mjs +75 -25
  20. package/dist/core/json-schema/index.d.mts +20 -8
  21. package/dist/core/json-schema/index.mjs +285 -87
  22. package/dist/core/json-schema/meta-descriptions.generated.d.mts +40 -40
  23. package/dist/core/output/contracts.d.mts +5 -5
  24. package/dist/core/output/contracts.mjs +1 -1
  25. package/dist/core/output/index.d.mts +38 -1
  26. package/dist/core/output/index.mjs +37 -2
  27. package/dist/core/parse/index.mjs +9 -6
  28. package/dist/core/resolve/contracts.d.mts +7 -2
  29. package/dist/core/resolve/flags.d.mts +3 -1
  30. package/dist/core/resolve/flags.mjs +29 -12
  31. package/dist/core/resolve/index.mjs +6 -1
  32. package/dist/core/resolve/property.d.mts +1 -1
  33. package/dist/core/resolve/standard.d.mts +24 -0
  34. package/dist/core/resolve/standard.mjs +114 -0
  35. package/dist/core/schema/arg.d.mts +37 -2
  36. package/dist/core/schema/arg.mjs +5 -2
  37. package/dist/core/schema/command.d.mts +49 -7
  38. package/dist/core/schema/command.mjs +15 -5
  39. package/dist/core/schema/flag.d.mts +124 -19
  40. package/dist/core/schema/flag.mjs +7 -3
  41. package/dist/core/schema/index.d.mts +3 -2
  42. package/dist/core/schema/prompt.d.mts +1 -1
  43. package/dist/core/schema/run.d.mts +7 -0
  44. package/dist/core/schema/standard.d.mts +100 -0
  45. package/dist/core/schema/standard.mjs +15 -0
  46. package/dist/core/testkit/index.d.mts +7 -5
  47. package/dist/core/testkit/index.mjs +12 -7
  48. package/dist/index.d.mts +6 -5
  49. package/dist/index.mjs +5 -5
  50. package/dist/runtime/adapter.d.mts +33 -0
  51. package/dist/runtime/adapter.mjs +6 -1
  52. package/dist/runtime/deno.d.mts +4 -0
  53. package/dist/runtime/deno.mjs +4 -1
  54. package/dist/runtime/node.mjs +9 -1
  55. package/dist/version.mjs +2 -2
  56. package/dreamcli.schema.json +83 -1
  57. package/examples/basic.ts +2 -2
  58. package/examples/flag-types.ts +79 -0
  59. package/examples/gh/node_modules/typescript/LICENSE +55 -0
  60. package/examples/gh/node_modules/typescript/NOTICE.txt +436 -0
  61. package/examples/gh/node_modules/typescript/README.md +49 -0
  62. package/examples/gh/node_modules/typescript/bin/tsc +2 -0
  63. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts +529 -0
  64. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts.map +1 -0
  65. package/examples/gh/node_modules/typescript/dist/api/async/api.js +1657 -0
  66. package/examples/gh/node_modules/typescript/dist/api/async/api.js.map +1 -0
  67. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts +39 -0
  68. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts.map +1 -0
  69. package/examples/gh/node_modules/typescript/dist/api/async/client.js +211 -0
  70. package/examples/gh/node_modules/typescript/dist/api/async/client.js.map +1 -0
  71. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts +310 -0
  72. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts.map +1 -0
  73. package/examples/gh/node_modules/typescript/dist/api/async/types.js +2 -0
  74. package/examples/gh/node_modules/typescript/dist/api/async/types.js.map +1 -0
  75. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts +109 -0
  76. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts.map +1 -0
  77. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js +2 -0
  78. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js.map +1 -0
  79. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts +23 -0
  80. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts.map +1 -0
  81. package/examples/gh/node_modules/typescript/dist/api/fs.js +109 -0
  82. package/examples/gh/node_modules/typescript/dist/api/fs.js.map +1 -0
  83. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts +15 -0
  84. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts.map +1 -0
  85. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts +5 -0
  86. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +1 -0
  87. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js +74 -0
  88. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js.map +1 -0
  89. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js +287 -0
  90. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js.map +1 -0
  91. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts +32 -0
  92. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts.map +1 -0
  93. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js +213 -0
  94. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js.map +1 -0
  95. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts +76 -0
  96. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts.map +1 -0
  97. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts +182 -0
  98. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts.map +1 -0
  99. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js +835 -0
  100. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js.map +1 -0
  101. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +62 -0
  102. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +1 -0
  103. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js +122 -0
  104. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js.map +1 -0
  105. package/examples/gh/node_modules/typescript/dist/api/node/node.js +298 -0
  106. package/examples/gh/node_modules/typescript/dist/api/node/node.js.map +1 -0
  107. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts +29 -0
  108. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts.map +1 -0
  109. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts +4 -0
  110. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +1 -0
  111. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js +241 -0
  112. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js.map +1 -0
  113. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js +30 -0
  114. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js.map +1 -0
  115. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts +6 -0
  116. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts.map +1 -0
  117. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js +61 -0
  118. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js.map +1 -0
  119. package/examples/gh/node_modules/typescript/dist/api/options.d.ts +32 -0
  120. package/examples/gh/node_modules/typescript/dist/api/options.d.ts.map +1 -0
  121. package/examples/gh/node_modules/typescript/dist/api/options.js +11 -0
  122. package/examples/gh/node_modules/typescript/dist/api/options.js.map +1 -0
  123. package/examples/gh/node_modules/typescript/dist/api/path.d.ts +110 -0
  124. package/examples/gh/node_modules/typescript/dist/api/path.d.ts.map +1 -0
  125. package/examples/gh/node_modules/typescript/dist/api/path.js +508 -0
  126. package/examples/gh/node_modules/typescript/dist/api/path.js.map +1 -0
  127. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts +239 -0
  128. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts.map +1 -0
  129. package/examples/gh/node_modules/typescript/dist/api/proto.js +37 -0
  130. package/examples/gh/node_modules/typescript/dist/api/proto.js.map +1 -0
  131. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts +79 -0
  132. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +1 -0
  133. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js +169 -0
  134. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js.map +1 -0
  135. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts +529 -0
  136. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts.map +1 -0
  137. package/examples/gh/node_modules/typescript/dist/api/sync/api.js +1665 -0
  138. package/examples/gh/node_modules/typescript/dist/api/sync/api.js.map +1 -0
  139. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts +30 -0
  140. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts.map +1 -0
  141. package/examples/gh/node_modules/typescript/dist/api/sync/client.js +124 -0
  142. package/examples/gh/node_modules/typescript/dist/api/sync/client.js.map +1 -0
  143. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts +310 -0
  144. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts.map +1 -0
  145. package/examples/gh/node_modules/typescript/dist/api/sync/types.js +2 -0
  146. package/examples/gh/node_modules/typescript/dist/api/sync/types.js.map +1 -0
  147. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts +114 -0
  148. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts.map +1 -0
  149. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js +508 -0
  150. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js.map +1 -0
  151. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts +175 -0
  152. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts.map +1 -0
  153. package/examples/gh/node_modules/typescript/dist/api/timing.js +149 -0
  154. package/examples/gh/node_modules/typescript/dist/api/timing.js.map +1 -0
  155. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts +100 -0
  156. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts.map +1 -0
  157. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts +1161 -0
  158. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts.map +1 -0
  159. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js +4 -0
  160. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js.map +1 -0
  161. package/examples/gh/node_modules/typescript/dist/ast/ast.js +7 -0
  162. package/examples/gh/node_modules/typescript/dist/ast/ast.js.map +1 -0
  163. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts +19 -0
  164. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts.map +1 -0
  165. package/examples/gh/node_modules/typescript/dist/ast/astnav.js +596 -0
  166. package/examples/gh/node_modules/typescript/dist/ast/astnav.js.map +1 -0
  167. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts +16 -0
  168. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts.map +1 -0
  169. package/examples/gh/node_modules/typescript/dist/ast/clone.js +104 -0
  170. package/examples/gh/node_modules/typescript/dist/ast/clone.js.map +1 -0
  171. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts +520 -0
  172. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts.map +1 -0
  173. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js +3057 -0
  174. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js.map +1 -0
  175. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts +20 -0
  176. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts.map +1 -0
  177. package/examples/gh/node_modules/typescript/dist/ast/index.js +20 -0
  178. package/examples/gh/node_modules/typescript/dist/ast/index.js.map +1 -0
  179. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts +35 -0
  180. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts.map +1 -0
  181. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts +329 -0
  182. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts.map +1 -0
  183. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js +1103 -0
  184. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js.map +1 -0
  185. package/examples/gh/node_modules/typescript/dist/ast/is.js +233 -0
  186. package/examples/gh/node_modules/typescript/dist/ast/is.js.map +1 -0
  187. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts +11 -0
  188. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts.map +1 -0
  189. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js +202 -0
  190. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js.map +1 -0
  191. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts +97 -0
  192. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts.map +1 -0
  193. package/examples/gh/node_modules/typescript/dist/ast/scanner.js +2230 -0
  194. package/examples/gh/node_modules/typescript/dist/ast/scanner.js.map +1 -0
  195. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts +17 -0
  196. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts.map +1 -0
  197. package/examples/gh/node_modules/typescript/dist/ast/utils.js +67 -0
  198. package/examples/gh/node_modules/typescript/dist/ast/utils.js.map +1 -0
  199. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts +14 -0
  200. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts.map +1 -0
  201. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts +50 -0
  202. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +1 -0
  203. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js +978 -0
  204. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js.map +1 -0
  205. package/examples/gh/node_modules/typescript/dist/ast/visitor.js +47 -0
  206. package/examples/gh/node_modules/typescript/dist/ast/visitor.js.map +1 -0
  207. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts +2 -0
  208. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts.map +1 -0
  209. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +129 -0
  210. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +1 -0
  211. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js +132 -0
  212. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js.map +1 -0
  213. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js +130 -0
  214. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js.map +1 -0
  215. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +2 -0
  216. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +1 -0
  217. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +5 -0
  218. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +1 -0
  219. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +6 -0
  220. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +1 -0
  221. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js +6 -0
  222. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js.map +1 -0
  223. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts +2 -0
  224. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +1 -0
  225. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +28 -0
  226. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +1 -0
  227. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js +30 -0
  228. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +1 -0
  229. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js +30 -0
  230. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js.map +1 -0
  231. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +2 -0
  232. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +1 -0
  233. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +7 -0
  234. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +1 -0
  235. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +9 -0
  236. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +1 -0
  237. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js +9 -0
  238. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js.map +1 -0
  239. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts +2 -0
  240. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts.map +1 -0
  241. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +12 -0
  242. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +1 -0
  243. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js +14 -0
  244. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js.map +1 -0
  245. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js +14 -0
  246. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js.map +1 -0
  247. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts +2 -0
  248. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +1 -0
  249. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +23 -0
  250. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
  251. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js +25 -0
  252. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +1 -0
  253. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js +25 -0
  254. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js.map +1 -0
  255. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts +2 -0
  256. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +1 -0
  257. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +9 -0
  258. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +1 -0
  259. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js +11 -0
  260. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +1 -0
  261. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js +11 -0
  262. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js.map +1 -0
  263. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts +2 -0
  264. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts.map +1 -0
  265. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +5 -0
  266. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +1 -0
  267. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js +6 -0
  268. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js.map +1 -0
  269. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js +6 -0
  270. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js.map +1 -0
  271. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts +2 -0
  272. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +1 -0
  273. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +42 -0
  274. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +1 -0
  275. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js +44 -0
  276. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +1 -0
  277. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js +44 -0
  278. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js.map +1 -0
  279. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +2 -0
  280. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +1 -0
  281. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
  282. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
  283. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +9 -0
  284. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +1 -0
  285. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js +9 -0
  286. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +1 -0
  287. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts +2 -0
  288. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts.map +1 -0
  289. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +17 -0
  290. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +1 -0
  291. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js +19 -0
  292. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js.map +1 -0
  293. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js +19 -0
  294. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js.map +1 -0
  295. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +2 -0
  296. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +1 -0
  297. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
  298. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
  299. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +11 -0
  300. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +1 -0
  301. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js +11 -0
  302. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +1 -0
  303. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts +2 -0
  304. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts.map +1 -0
  305. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +6 -0
  306. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +1 -0
  307. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js +8 -0
  308. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js.map +1 -0
  309. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js +8 -0
  310. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js.map +1 -0
  311. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +2 -0
  312. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +1 -0
  313. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +36 -0
  314. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +1 -0
  315. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +38 -0
  316. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +1 -0
  317. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js +38 -0
  318. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +1 -0
  319. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts +2 -0
  320. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +1 -0
  321. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +44 -0
  322. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +1 -0
  323. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js +46 -0
  324. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +1 -0
  325. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js +46 -0
  326. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js.map +1 -0
  327. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts +2 -0
  328. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts.map +1 -0
  329. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +50 -0
  330. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +1 -0
  331. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js +52 -0
  332. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js.map +1 -0
  333. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js +52 -0
  334. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js.map +1 -0
  335. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +2 -0
  336. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +1 -0
  337. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +16 -0
  338. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -0
  339. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +18 -0
  340. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +1 -0
  341. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js +18 -0
  342. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +1 -0
  343. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +2 -0
  344. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +1 -0
  345. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +13 -0
  346. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +1 -0
  347. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +14 -0
  348. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +1 -0
  349. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js +14 -0
  350. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +1 -0
  351. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts +2 -0
  352. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts.map +1 -0
  353. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +11 -0
  354. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +1 -0
  355. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js +12 -0
  356. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js.map +1 -0
  357. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js +12 -0
  358. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js.map +1 -0
  359. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts +2 -0
  360. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +1 -0
  361. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +17 -0
  362. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +1 -0
  363. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js +18 -0
  364. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +1 -0
  365. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js +18 -0
  366. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js.map +1 -0
  367. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts +2 -0
  368. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +1 -0
  369. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +15 -0
  370. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +1 -0
  371. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js +17 -0
  372. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +1 -0
  373. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js +17 -0
  374. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js.map +1 -0
  375. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts +2 -0
  376. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts.map +1 -0
  377. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +5 -0
  378. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +1 -0
  379. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js +7 -0
  380. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js.map +1 -0
  381. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js +7 -0
  382. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js.map +1 -0
  383. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts +2 -0
  384. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +1 -0
  385. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +71 -0
  386. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +1 -0
  387. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js +73 -0
  388. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +1 -0
  389. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js +73 -0
  390. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js.map +1 -0
  391. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts +2 -0
  392. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +1 -0
  393. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +389 -0
  394. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +1 -0
  395. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js +391 -0
  396. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +1 -0
  397. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js +391 -0
  398. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js.map +1 -0
  399. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts +2 -0
  400. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +1 -0
  401. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +30 -0
  402. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +1 -0
  403. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js +32 -0
  404. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +1 -0
  405. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js +32 -0
  406. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js.map +1 -0
  407. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts +2 -0
  408. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts.map +1 -0
  409. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +76 -0
  410. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +1 -0
  411. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js +78 -0
  412. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js.map +1 -0
  413. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js +78 -0
  414. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js.map +1 -0
  415. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts +2 -0
  416. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +1 -0
  417. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +7 -0
  418. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +1 -0
  419. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js +9 -0
  420. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +1 -0
  421. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js +9 -0
  422. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js.map +1 -0
  423. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts +23 -0
  424. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts.map +1 -0
  425. package/examples/gh/node_modules/typescript/dist/internal/utils.js +25 -0
  426. package/examples/gh/node_modules/typescript/dist/internal/utils.js.map +1 -0
  427. package/examples/gh/node_modules/typescript/lib/getExePath.d.ts +2 -0
  428. package/examples/gh/node_modules/typescript/lib/getExePath.js +70 -0
  429. package/examples/gh/node_modules/typescript/lib/tsc.js +28 -0
  430. package/examples/gh/node_modules/typescript/lib/version.cjs +3 -0
  431. package/examples/gh/node_modules/typescript/lib/version.d.cts +2 -0
  432. package/examples/gh/node_modules/typescript/package.json +87 -0
  433. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +11 -0
  434. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/README.md +54 -0
  435. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
  436. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +83 -0
  437. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +22 -0
  438. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +210 -0
  439. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +14 -0
  440. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +87 -0
  441. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
  442. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +132 -0
  443. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +367 -0
  444. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +1271 -0
  445. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
  446. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +16 -0
  447. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
  448. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +70 -0
  449. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +39 -0
  450. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +135 -0
  451. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +7 -0
  452. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +34 -0
  453. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +55 -0
  454. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +412 -0
  455. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
  456. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +155 -0
  457. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
  458. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +246 -0
  459. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
  460. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +157 -0
  461. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
  462. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +436 -0
  463. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
  464. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +23 -0
  465. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
  466. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +74 -0
  467. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
  468. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +77 -0
  469. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +58 -0
  470. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +289 -0
  471. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +12 -0
  472. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +163 -0
  473. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/package.json +54 -0
  474. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +5 -0
  475. package/examples/gh/package.json +11 -5
  476. package/examples/gh/src/main.ts +10 -4
  477. package/examples/help-config.ts +43 -0
  478. package/examples/json-mode.ts +8 -4
  479. package/examples/middleware.ts +1 -1
  480. package/examples/output-extras.ts +46 -0
  481. package/examples/parser-control.ts +40 -0
  482. package/examples/pwsh-demo/package.json +1 -1
  483. package/examples/pwsh-demo/src/main.ts +1 -1
  484. package/examples/standard-schema.ts +45 -0
  485. package/examples/transport-launcher.ts +10 -10
  486. package/package.json +25 -31
  487. package/dist/core/schema-dsl/runtime.d.mts +0 -144
  488. package/dist/core/schema-dsl/runtime.mjs +0 -271
  489. package/dist/core/schema-dsl/to-json-schema.d.mts +0 -29
  490. package/dist/core/schema-dsl/to-json-schema.mjs +0 -74
@@ -1,10 +1,11 @@
1
1
  import { NumberConstraints } from "./number-constraints.mjs";
2
+ import { InferStandardOutput, StandardSchemaV1 } from "./standard.mjs";
2
3
  import { ConfirmPromptConfig, InputPromptConfig, MultiselectPromptConfig, PROMPT_KINDS, PromptConfig, PromptConfigBase, PromptKind, PromptResult, SelectChoice, SelectPromptConfig } from "./prompt.mjs";
3
4
  import { StringConstraintViolation, StringConstraints } from "./string-constraints.mjs";
4
5
  import { DateFlagOptions, UrlFlagOptions } from "./value-parsers.mjs";
5
6
  //#region src/core/schema/flag.d.ts
6
7
  /** All flag presence states as a runtime array. */
7
- declare const FLAG_PRESENCES: readonly ['optional', 'required', 'defaulted'];
8
+ declare const FLAG_PRESENCES: readonly ["optional", "required", "defaulted"];
8
9
  /**
9
10
  * Presence describes whether a flag value is guaranteed to exist when the
10
11
  * action handler runs:
@@ -37,6 +38,16 @@ interface FlagConfig {
37
38
  readonly optionalFallback: OptionalFallback;
38
39
  /** The runtime kind discriminator, mirroring {@link FlagKind}. */
39
40
  readonly flagKind: FlagKind;
41
+ /**
42
+ * Whether this builder may still be passed to `flag.array()` as the
43
+ * element schema.
44
+ *
45
+ * Factories producing element-meaningful kinds start `true`. Flag-level
46
+ * modifiers (`.alias()`, `.env()`, `.prompt()`, `.default()`, …) flip it
47
+ * to `false` — those settings describe the *flag*, are never read from an
48
+ * element schema, and would otherwise be silently ignored.
49
+ */
50
+ readonly elementEligible: boolean;
40
51
  }
41
52
  /**
42
53
  * Advanced type helper used by {@linkcode FlagBuilder} modifiers to replace presence.
@@ -47,6 +58,18 @@ type WithPresence<C extends FlagConfig, P extends FlagPresence> = {
47
58
  readonly presence: P;
48
59
  readonly optionalFallback: C['optionalFallback'];
49
60
  readonly flagKind: C['flagKind'];
61
+ readonly elementEligible: false;
62
+ };
63
+ /**
64
+ * Advanced type helper: marks a builder as no longer usable as an array
65
+ * element (returned by flag-level modifiers whose settings elements ignore).
66
+ */
67
+ type WithoutElementEligibility<C extends FlagConfig> = {
68
+ readonly valueType: C['valueType'];
69
+ readonly presence: C['presence'];
70
+ readonly optionalFallback: C['optionalFallback'];
71
+ readonly flagKind: C['flagKind'];
72
+ readonly elementEligible: false;
50
73
  };
51
74
  /**
52
75
  * Compute the final value type from config — this is what handlers receive.
@@ -87,9 +110,10 @@ type PromptConfigByFlagKind = {
87
110
  readonly count: never;
88
111
  readonly keyValue: never;
89
112
  };
113
+ /** Prompt configuration compatible with the kind carried by a {@link FlagConfig}. */
90
114
  type AllowedPromptConfig<C extends FlagConfig> = PromptConfigByFlagKind[C['flagKind']];
91
115
  /** All flag kind discriminators as a runtime array. */
92
- declare const FLAG_KINDS: readonly ['string', 'number', 'boolean', 'enum', 'array', 'custom', 'count', 'keyValue'];
116
+ declare const FLAG_KINDS: readonly ["string", "number", "boolean", "enum", "array", "custom", "count", "keyValue"];
93
117
  /** Discriminator for the kind of value a flag accepts. */
94
118
  type FlagKind = (typeof FLAG_KINDS)[number];
95
119
  /**
@@ -99,19 +123,45 @@ type FlagKind = (typeof FLAG_KINDS)[number];
99
123
  * value from config files. Narrow inside the function as needed.
100
124
  */
101
125
  type FlagParseFn<T> = (raw: unknown) => T;
102
- /** Options accepted by `flag.path()`. */
103
- interface PathFlagOptions {
126
+ /** Options accepted by `flag.path()` for any-kind or file paths. */
127
+ interface FilePathFlagOptions {
104
128
  /**
105
129
  * Reject the value if nothing exists at the path.
106
130
  * @defaultValue `false` (`true` when `type` is set)
107
131
  */
108
132
  readonly mustExist?: boolean;
109
133
  /**
110
- * Require the path to be a file or a directory. Implies existence.
134
+ * Require the path to be a file or a directory. Implies existence
135
+ * unless `mustExist` is explicitly `false`, in which case a missing
136
+ * path passes and only an existing path is type-checked.
111
137
  * @defaultValue `undefined` (any kind)
112
138
  */
113
- readonly type?: 'file' | 'directory';
139
+ readonly type?: 'file';
140
+ /** Directory creation is only available with `type: 'directory'`. */
141
+ readonly create?: never;
114
142
  }
143
+ /** Options accepted by `flag.path()` for directory paths. */
144
+ interface DirectoryPathFlagOptions {
145
+ /**
146
+ * Reject the value if nothing exists at the path.
147
+ * @defaultValue `false` (`true` when `type` is set)
148
+ */
149
+ readonly mustExist?: boolean;
150
+ /**
151
+ * Require the path to be a directory. Implies existence unless
152
+ * `mustExist` is explicitly `false`, in which case a missing path
153
+ * passes and only an existing path is type-checked.
154
+ */
155
+ readonly type: 'directory';
156
+ /**
157
+ * Create the directory (recursively) when nothing exists at the path.
158
+ * An existing non-directory path still fails the type check.
159
+ * @defaultValue `false`
160
+ */
161
+ readonly create?: boolean;
162
+ }
163
+ /** Options accepted by `flag.path()`. */
164
+ type PathFlagOptions = FilePathFlagOptions | DirectoryPathFlagOptions;
115
165
  /**
116
166
  * Filesystem expectations attached by `flag.path()`.
117
167
  *
@@ -124,9 +174,11 @@ interface PathChecks {
124
174
  readonly mustExist: boolean;
125
175
  /**
126
176
  * Require the existing path to be a file or a directory. Implies
127
- * existence when set.
177
+ * existence when set, unless `mustExist` is `false`.
128
178
  */
129
179
  readonly type: 'file' | 'directory' | undefined;
180
+ /** Create the directory (recursively) when nothing exists at the path. */
181
+ readonly create: boolean;
130
182
  }
131
183
  /** Runtime descriptor for a flag alias. */
132
184
  interface FlagAlias {
@@ -238,6 +290,15 @@ interface FlagSchema {
238
290
  readonly prompt: PromptConfig | undefined;
239
291
  /** Custom parse function (only when `kind === 'custom'`). */
240
292
  readonly parseFn: FlagParseFn<unknown> | undefined;
293
+ /**
294
+ * Standard Schema v1 validator applied to the resolved value.
295
+ *
296
+ * When set, the value from any source (CLI, env, config, prompt, default)
297
+ * is validated after resolution via `~standard.validate`. Sync and async
298
+ * validators are both awaited; issues surface as a `CONSTRAINT_VIOLATED`
299
+ * {@link ValidationError}. Only meaningful when `kind === 'custom'`.
300
+ */
301
+ readonly standard: StandardSchemaV1 | undefined;
241
302
  /**
242
303
  * Deprecation marker.
243
304
  *
@@ -427,7 +488,7 @@ declare class FlagBuilder<C extends FlagConfig> {
427
488
  */
428
489
  alias(name: string, options?: {
429
490
  hidden?: boolean;
430
- }): FlagBuilder<C>;
491
+ }): FlagBuilder<WithoutElementEligibility<C>>;
431
492
  /**
432
493
  * Bind to an environment variable (resolved in v0.2+).
433
494
  *
@@ -442,7 +503,7 @@ declare class FlagBuilder<C extends FlagConfig> {
442
503
  * // $ mycli request --api-key sk-456 → apiKey = 'sk-456' (CLI wins)
443
504
  * ```
444
505
  */
445
- env(varName: string): FlagBuilder<C>;
506
+ env(varName: string): FlagBuilder<WithoutElementEligibility<C>>;
446
507
  /**
447
508
  * Bind to a dotted config path (resolved in v0.2+).
448
509
  *
@@ -459,14 +520,14 @@ declare class FlagBuilder<C extends FlagConfig> {
459
520
  * // # → CLI flag wins
460
521
  * ```
461
522
  */
462
- config(path: string): FlagBuilder<C>;
523
+ config(path: string): FlagBuilder<WithoutElementEligibility<C>>;
463
524
  /**
464
525
  * Human-readable description shown in help output.
465
526
  *
466
527
  * @param description - Text displayed next to the flag in `--help`.
467
528
  * @returns The builder (for chaining).
468
529
  */
469
- describe(description: string): FlagBuilder<C>;
530
+ describe(description: string): FlagBuilder<WithoutElementEligibility<C>>;
470
531
  /**
471
532
  * Attach interactive prompt configuration for v0.3+ resolution.
472
533
  *
@@ -486,7 +547,7 @@ declare class FlagBuilder<C extends FlagConfig> {
486
547
  * // $ mycli init --name foo → skips prompt, uses CLI value
487
548
  * ```
488
549
  */
489
- prompt(config: AllowedPromptConfig<C>): FlagBuilder<C>;
550
+ prompt(config: AllowedPromptConfig<C>): FlagBuilder<WithoutElementEligibility<C>>;
490
551
  /**
491
552
  * Mark this flag as deprecated.
492
553
  *
@@ -506,7 +567,7 @@ declare class FlagBuilder<C extends FlagConfig> {
506
567
  * // ⚠ --dest is deprecated: Use --target instead
507
568
  * ```
508
569
  */
509
- deprecated(message?: string): FlagBuilder<C>;
570
+ deprecated(message?: string): FlagBuilder<WithoutElementEligibility<C>>;
510
571
  /**
511
572
  * Mark this flag as propagated to subcommands.
512
573
  *
@@ -528,7 +589,7 @@ declare class FlagBuilder<C extends FlagConfig> {
528
589
  * // # → same, inherited from parent
529
590
  * ```
530
591
  */
531
- propagate(): FlagBuilder<C>;
592
+ propagate(): FlagBuilder<WithoutElementEligibility<C>>;
532
593
  /**
533
594
  * Require an integer value. Composes with other numeric constraints.
534
595
  *
@@ -716,7 +777,7 @@ declare class FlagBuilder<C extends FlagConfig> {
716
777
  }>, options?: {
717
778
  alias?: string;
718
779
  hidden?: boolean;
719
- }): FlagBuilder<C>;
780
+ }): FlagBuilder<WithoutElementEligibility<C>>;
720
781
  /**
721
782
  * Set how repeated CLI occurrences of this flag combine.
722
783
  *
@@ -737,7 +798,7 @@ declare class FlagBuilder<C extends FlagConfig> {
737
798
  */
738
799
  duplicates(this: FlagBuilder<C & {
739
800
  readonly flagKind: 'boolean' | 'string' | 'number' | 'enum' | 'custom';
740
- }>, policy: DuplicatePolicy): FlagBuilder<C>;
801
+ }>, policy: DuplicatePolicy): FlagBuilder<WithoutElementEligibility<C>>;
741
802
  }
742
803
  /**
743
804
  * Factory that creates {@link FlagBuilder} instances seeded with the correct
@@ -768,6 +829,7 @@ interface FlagFactory {
768
829
  readonly presence: 'optional';
769
830
  readonly optionalFallback: 'undefined';
770
831
  readonly flagKind: 'string';
832
+ readonly elementEligible: true;
771
833
  }>;
772
834
  /**
773
835
  * Number-valued flag, with optional numeric constraints.
@@ -796,6 +858,7 @@ interface FlagFactory {
796
858
  readonly presence: 'optional';
797
859
  readonly optionalFallback: 'undefined';
798
860
  readonly flagKind: 'number';
861
+ readonly elementEligible: true;
799
862
  }>;
800
863
  /**
801
864
  * Boolean flag. Implicitly defaults to `false` — the only flag kind where
@@ -808,6 +871,7 @@ interface FlagFactory {
808
871
  readonly presence: 'defaulted';
809
872
  readonly optionalFallback: 'undefined';
810
873
  readonly flagKind: 'boolean';
874
+ readonly elementEligible: true;
811
875
  }>;
812
876
  /**
813
877
  * Enum flag with literal type inference.
@@ -829,6 +893,7 @@ interface FlagFactory {
829
893
  readonly presence: 'optional';
830
894
  readonly optionalFallback: 'undefined';
831
895
  readonly flagKind: 'enum';
896
+ readonly elementEligible: true;
832
897
  }>;
833
898
  /**
834
899
  * Array flag — collects multiple values of the same element type.
@@ -842,11 +907,39 @@ interface FlagFactory {
842
907
  * @param element - {@link FlagBuilder} describing the element type.
843
908
  * @returns A {@link FlagBuilder} for arrays of the element type.
844
909
  */
845
- array<E extends FlagConfig>(element: FlagBuilder<E>): FlagBuilder<{
910
+ array<E extends FlagConfig & {
911
+ readonly elementEligible: true;
912
+ }>(element: FlagBuilder<E>): FlagBuilder<{
846
913
  readonly valueType: E['valueType'][];
847
914
  readonly presence: 'optional';
848
915
  readonly optionalFallback: 'empty-array';
849
916
  readonly flagKind: 'array';
917
+ readonly elementEligible: false;
918
+ }>;
919
+ /**
920
+ * Custom flag validated by a Standard Schema v1 validator (zod, valibot,
921
+ * arktype, …). The resolved value from any source is validated after
922
+ * resolution; the flag's value type is the validator's output type.
923
+ *
924
+ * Sync and async validators are both supported. Validation issues surface
925
+ * as a `CONSTRAINT_VIOLATED` error naming the flag.
926
+ *
927
+ * @example
928
+ * ```ts
929
+ * import { z } from 'zod';
930
+ * flag.custom(z.string().url())
931
+ * // inferred type: string | undefined
932
+ * ```
933
+ *
934
+ * @param schema - A Standard Schema v1 validator.
935
+ * @returns A {@link FlagBuilder} whose value type is the validator's output.
936
+ */
937
+ custom<S extends StandardSchemaV1>(schema: S): FlagBuilder<{
938
+ readonly valueType: InferStandardOutput<S>;
939
+ readonly presence: 'optional';
940
+ readonly optionalFallback: 'undefined';
941
+ readonly flagKind: 'custom';
942
+ readonly elementEligible: true;
850
943
  }>;
851
944
  /**
852
945
  * Custom-parsed flag. The parse function receives the raw value and must
@@ -882,6 +975,7 @@ interface FlagFactory {
882
975
  readonly presence: 'optional';
883
976
  readonly optionalFallback: 'undefined';
884
977
  readonly flagKind: 'custom';
978
+ readonly elementEligible: true;
885
979
  }>;
886
980
  /**
887
981
  * URL-valued flag. Parses into a `URL`; invalid URLs are rejected with an
@@ -901,6 +995,7 @@ interface FlagFactory {
901
995
  readonly presence: 'optional';
902
996
  readonly optionalFallback: 'undefined';
903
997
  readonly flagKind: 'custom';
998
+ readonly elementEligible: true;
904
999
  }>;
905
1000
  /**
906
1001
  * Path-valued flag. The value stays a `string`; optional filesystem
@@ -908,7 +1003,7 @@ interface FlagFactory {
908
1003
  * env, and config values are validated identically.
909
1004
  *
910
1005
  * @param options - Optional existence/type checks. `type` implies
911
- * existence.
1006
+ * existence unless `mustExist` is explicitly `false`.
912
1007
  * @returns A {@link FlagBuilder} for path strings.
913
1008
  *
914
1009
  * @example
@@ -916,6 +1011,10 @@ interface FlagFactory {
916
1011
  * flag.path() // any string, help shows <path>
917
1012
  * flag.path({ mustExist: true }) // rejects missing paths
918
1013
  * flag.path({ type: 'directory' }) // must exist and be a directory
1014
+ * flag.path({ type: 'directory', mustExist: false })
1015
+ * // missing passes; existing must be a directory
1016
+ * flag.path({ type: 'directory', create: true })
1017
+ * // created recursively when missing
919
1018
  * ```
920
1019
  */
921
1020
  path(options?: PathFlagOptions): FlagBuilder<{
@@ -923,6 +1022,7 @@ interface FlagFactory {
923
1022
  readonly presence: 'optional';
924
1023
  readonly optionalFallback: 'undefined';
925
1024
  readonly flagKind: 'string';
1025
+ readonly elementEligible: false;
926
1026
  }>;
927
1027
  /**
928
1028
  * Date-valued flag. Accepts strict ISO-8601 (`2026-07-10`,
@@ -948,6 +1048,7 @@ interface FlagFactory {
948
1048
  readonly presence: 'optional';
949
1049
  readonly optionalFallback: 'undefined';
950
1050
  readonly flagKind: 'custom';
1051
+ readonly elementEligible: true;
951
1052
  }>;
952
1053
  /**
953
1054
  * Duration flag. Accepts `'30s'`, `'5m'`, `'1.5h'`, `'250ms'`, `'2d'`,
@@ -966,6 +1067,7 @@ interface FlagFactory {
966
1067
  readonly presence: 'optional';
967
1068
  readonly optionalFallback: 'undefined';
968
1069
  readonly flagKind: 'custom';
1070
+ readonly elementEligible: true;
969
1071
  }>;
970
1072
  /**
971
1073
  * Byte-size flag. Accepts `'512mb'`, `'1.5gb'`, `'64kb'`, `'100b'` or a
@@ -984,6 +1086,7 @@ interface FlagFactory {
984
1086
  readonly presence: 'optional';
985
1087
  readonly optionalFallback: 'undefined';
986
1088
  readonly flagKind: 'custom';
1089
+ readonly elementEligible: true;
987
1090
  }>;
988
1091
  /**
989
1092
  * Count flag — resolves to how many times the flag appears. `-vvv`,
@@ -1006,6 +1109,7 @@ interface FlagFactory {
1006
1109
  readonly presence: 'defaulted';
1007
1110
  readonly optionalFallback: 'undefined';
1008
1111
  readonly flagKind: 'count';
1112
+ readonly elementEligible: false;
1009
1113
  }>;
1010
1114
  /**
1011
1115
  * Key-value flag — repeated `KEY=VALUE` occurrences merge into a
@@ -1029,6 +1133,7 @@ interface FlagFactory {
1029
1133
  readonly presence: 'optional';
1030
1134
  readonly optionalFallback: 'empty-object';
1031
1135
  readonly flagKind: 'keyValue';
1136
+ readonly elementEligible: false;
1032
1137
  }>;
1033
1138
  }
1034
1139
  /**
@@ -1037,4 +1142,4 @@ interface FlagFactory {
1037
1142
  */
1038
1143
  declare const flag: FlagFactory;
1039
1144
  //#endregion
1040
- export { type AllowedPromptConfig, type ConfirmPromptConfig, type DateFlagOptions, type DuplicatePolicy, FLAG_KINDS, FLAG_PRESENCES, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferFlag, type InferFlags, type InputPromptConfig, type MultiselectPromptConfig, type OptionalFallback, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type PromptConfig, type PromptConfigBase, type PromptKind, type PromptResult, type ResolvedValue, type SelectChoice, type SelectPromptConfig, type StringConstraintViolation, type StringConstraints, type UrlFlagOptions, type WithPresence, createSchema, flag, getFlagAliasNames, getFlagNegatedName, normalizeFlagAlias, normalizeFlagAliases };
1145
+ export { type AllowedPromptConfig, type ConfirmPromptConfig, type DateFlagOptions, type DuplicatePolicy, FLAG_KINDS, FLAG_PRESENCES, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferFlag, type InferFlags, type InputPromptConfig, type MultiselectPromptConfig, type OptionalFallback, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type PromptConfig, type PromptConfigBase, type PromptConfigByFlagKind, type PromptKind, type PromptResult, type ResolvedValue, type SelectChoice, type SelectPromptConfig, type StringConstraintViolation, type StringConstraints, type UrlFlagOptions, type WithPresence, type WithoutElementEligibility, createSchema, flag, getFlagAliasNames, getFlagNegatedName, normalizeFlagAlias, normalizeFlagAliases };
@@ -1,4 +1,5 @@
1
1
  import { assertNumberConstraints } from "./number-constraints.mjs";
2
+ import { isStandardSchemaV1 } from "./standard.mjs";
2
3
  import { assertStringConstraints } from "./string-constraints.mjs";
3
4
  import { parseBytesValue, parseDateValue, parseDurationValue, parseUrlValue } from "./value-parsers.mjs";
4
5
  //#region src/core/schema/flag.ts
@@ -112,6 +113,7 @@ function createSchema(kind, overrides) {
112
113
  valueHint: void 0,
113
114
  prompt: void 0,
114
115
  parseFn: void 0,
116
+ standard: void 0,
115
117
  deprecated: void 0,
116
118
  propagate: false,
117
119
  negation: void 0,
@@ -655,8 +657,9 @@ const flag = {
655
657
  array(element) {
656
658
  return new FlagBuilder(createSchema("array", { elementSchema: element.schema }));
657
659
  },
658
- custom(parseFn) {
659
- return new FlagBuilder(createSchema("custom", { parseFn }));
660
+ custom(parseFnOrSchema) {
661
+ if (isStandardSchemaV1(parseFnOrSchema)) return new FlagBuilder(createSchema("custom", { standard: parseFnOrSchema }));
662
+ return new FlagBuilder(createSchema("custom", { parseFn: parseFnOrSchema }));
660
663
  },
661
664
  url(options) {
662
665
  return new FlagBuilder(createSchema("custom", {
@@ -668,7 +671,8 @@ const flag = {
668
671
  return new FlagBuilder(createSchema("string", {
669
672
  pathChecks: options?.mustExist === true || options?.type !== void 0 ? {
670
673
  mustExist: options.mustExist ?? true,
671
- type: options.type
674
+ type: options.type,
675
+ create: options.type === "directory" && options.create === true
672
676
  } : void 0,
673
677
  valueHint: "path"
674
678
  }));
@@ -1,5 +1,6 @@
1
1
  import { ActivityEvent, Fallback, ProgressHandle, ProgressOptions, SpinnerHandle, SpinnerOptions, TableColumn, TableFormat, TableOptions, TableStream } from "./activity.mjs";
2
2
  import { NumberConstraintViolation, NumberConstraints, describeNumberConstraintViolation, validateNumberConstraints } from "./number-constraints.mjs";
3
+ import { InferStandardInput, InferStandardOutput, StandardSchemaV1, StandardSchemaV1FailureResult, StandardSchemaV1Issue, StandardSchemaV1Options, StandardSchemaV1PathSegment, StandardSchemaV1Props, StandardSchemaV1Result, StandardSchemaV1SuccessResult, StandardSchemaV1Types } from "./standard.mjs";
3
4
  import { ARG_KINDS, ARG_PRESENCES, ArgBuilder, ArgConfig, ArgFactory, ArgKind, ArgParseFn, ArgPresence, ArgSchema, InferArg, InferArgs, ResolvedArgValue, WithArgPresence, WithVariadic, arg, createArgSchema } from "./arg.mjs";
4
5
  import { ConfirmPromptConfig, InputPromptConfig, MultiselectPromptConfig, PROMPT_KINDS, PromptConfig, PromptConfigBase, PromptKind, PromptResult, SelectChoice, SelectPromptConfig } from "./prompt.mjs";
5
6
  import { StringConstraintViolation, StringConstraints, describeStringConstraintViolation, validateStringConstraints } from "./string-constraints.mjs";
@@ -7,5 +8,5 @@ import { DateFlagOptions, UrlFlagOptions } from "./value-parsers.mjs";
7
8
  import { DuplicatePolicy, FLAG_KINDS, FLAG_PRESENCES, FlagAlias, FlagBuilder, FlagConfig, FlagFactory, FlagKind, FlagNegation, FlagParseFn, FlagPresence, FlagSchema, FlagSchemaOverrides, InferFlag, InferFlags, PathChecks, PathFlagOptions, ResolvedValue, WithPresence, createSchema, flag, getFlagNegatedName } from "./flag.mjs";
8
9
  import { ErasedMiddlewareHandler, Middleware, MiddlewareHandler, MiddlewareParams, middleware } from "./middleware.mjs";
9
10
  import { RunOptions, RunResult } from "./run.mjs";
10
- import { ActionHandler, ActionParams, AnyCommandBuilder, CommandArgEntry, CommandBuilder, CommandConfig, CommandExample, CommandMeta, CommandSchema, DeriveHandler, DeriveParams, ErasedCommand, ErasedDeriveHandler, ErasedInteractiveResolver, InteractiveParams, InteractiveResolver, InteractiveResult, Out, command, group } from "./command.mjs";
11
- export { ARG_KINDS, ARG_PRESENCES, type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type ConfirmPromptConfig, type DateFlagOptions, type DeriveHandler, type DeriveParams, type DuplicatePolicy, type ErasedCommand, type ErasedDeriveHandler, type ErasedInteractiveResolver, type ErasedMiddlewareHandler, FLAG_KINDS, FLAG_PRESENCES, type Fallback, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptKind, type PromptResult, type ResolvedArgValue, type ResolvedValue, type RunOptions, type RunResult, type SelectChoice, type SelectPromptConfig, type SpinnerHandle, type SpinnerOptions, type StringConstraintViolation, type StringConstraints, type TableColumn, type TableFormat, type TableOptions, type TableStream, type UrlFlagOptions, type WithArgPresence, type WithPresence, type WithVariadic, arg, command, createArgSchema, createSchema, describeNumberConstraintViolation, describeStringConstraintViolation, flag, getFlagNegatedName, group, middleware, validateNumberConstraints, validateStringConstraints };
11
+ import { ActionHandler, ActionParams, AnyCommandBuilder, CommandArgEntry, CommandBuilder, CommandConfig, CommandExample, CommandMeta, CommandSchema, DeriveHandler, DeriveParams, ErasedCommand, ErasedDeriveHandler, ErasedInteractiveResolver, ExampleCommand, ExampleMeta, InteractiveParams, InteractiveResolver, InteractiveResult, Out, command, group, resolveExampleCommand } from "./command.mjs";
12
+ export { ARG_KINDS, ARG_PRESENCES, type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type ConfirmPromptConfig, type DateFlagOptions, type DeriveHandler, type DeriveParams, type DuplicatePolicy, type ErasedCommand, type ErasedDeriveHandler, type ErasedInteractiveResolver, type ErasedMiddlewareHandler, type ExampleCommand, type ExampleMeta, FLAG_KINDS, FLAG_PRESENCES, type Fallback, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptKind, type PromptResult, type ResolvedArgValue, type ResolvedValue, type RunOptions, type RunResult, type SelectChoice, type SelectPromptConfig, type SpinnerHandle, type SpinnerOptions, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StringConstraintViolation, type StringConstraints, type TableColumn, type TableFormat, type TableOptions, type TableStream, type UrlFlagOptions, type WithArgPresence, type WithPresence, type WithVariadic, arg, command, createArgSchema, createSchema, describeNumberConstraintViolation, describeStringConstraintViolation, flag, getFlagNegatedName, group, middleware, resolveExampleCommand, validateNumberConstraints, validateStringConstraints };
@@ -10,7 +10,7 @@
10
10
  * @module dreamcli/core/schema/prompt
11
11
  */
12
12
  /** All prompt kind discriminators as a runtime array. */
13
- declare const PROMPT_KINDS: readonly ['confirm', 'input', 'select', 'multiselect'];
13
+ declare const PROMPT_KINDS: readonly ["confirm", "input", "select", "multiselect"];
14
14
  /**
15
15
  * The kind of interactive prompt to present.
16
16
  *
@@ -68,6 +68,13 @@ interface RunOptions {
68
68
  * override), path checks are skipped.
69
69
  */
70
70
  readonly stat?: (path: string) => Promise<'file' | 'directory' | null>;
71
+ /**
72
+ * Recursive directory creation for `flag.path()` `create` checks.
73
+ *
74
+ * `CLIBuilder.run()` supplies the runtime adapter's implementation
75
+ * automatically. When absent, missing paths are not created.
76
+ */
77
+ readonly mkdir?: (path: string) => Promise<void>;
71
78
  /**
72
79
  * Verbosity level for the output channel.
73
80
  * @defaultValue `'normal'`
@@ -0,0 +1,100 @@
1
+ //#region src/core/schema/standard.d.ts
2
+ /**
3
+ * The Standard Schema v1 interface, vendored as types only.
4
+ *
5
+ * Mirrors the specification at https://standardschema.dev so validators from
6
+ * zod, valibot, arktype, and any other conforming library can be passed to
7
+ * `flag.custom()` / `arg.custom()` without adding a runtime dependency.
8
+ *
9
+ * @module
10
+ */
11
+ /** A schema that conforms to the Standard Schema v1 specification. */
12
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
13
+ /** The Standard Schema properties, namespaced under a well-known key. */
14
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
15
+ }
16
+ /** Types copied from the Standard Schema v1 specification. */
17
+ declare namespace StandardSchemaV1 {
18
+ /** The properties exposed under a validator's `~standard` key. */
19
+ interface Props<Input = unknown, Output = Input> {
20
+ /** The version number of the specification. */
21
+ readonly version: 1;
22
+ /** The vendor name of the schema library. */
23
+ readonly vendor: string;
24
+ /** Validate an unknown value, returning its output or the issues found. */
25
+ readonly validate: (value: unknown, options?: Options | undefined) => Result<Output> | Promise<Result<Output>>;
26
+ /** Inferred input and output types, present only at the type level. */
27
+ readonly types?: Types<Input, Output> | undefined;
28
+ }
29
+ /** Optional parameters passed to a validator. */
30
+ interface Options {
31
+ /** Explicit support for vendor-specific validation parameters. */
32
+ readonly libraryOptions?: Record<string, unknown> | undefined;
33
+ }
34
+ /** The result of validating a value: either its output or a list of issues. */
35
+ type Result<Output> = SuccessResult<Output> | FailureResult;
36
+ /** A successful validation carrying the parsed output value. */
37
+ interface SuccessResult<Output> {
38
+ /** The validated (and possibly transformed) value. */
39
+ readonly value: Output;
40
+ /** Absent on success. */
41
+ readonly issues?: undefined;
42
+ }
43
+ /** A failed validation carrying validation issues. */
44
+ interface FailureResult {
45
+ /** The issues that caused validation to fail. */
46
+ readonly issues: ReadonlyArray<Issue>;
47
+ }
48
+ /** A single validation issue. */
49
+ interface Issue {
50
+ /** The human-readable error message. */
51
+ readonly message: string;
52
+ /** The path to the offending value, when the validator reports one. */
53
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
54
+ }
55
+ /** One segment of an issue path. */
56
+ interface PathSegment {
57
+ /** The key of this path segment. */
58
+ readonly key: PropertyKey;
59
+ }
60
+ /** The type-level input and output carried by a validator. */
61
+ interface Types<Input = unknown, Output = Input> {
62
+ /** The input type accepted by the validator. */
63
+ readonly input: Input;
64
+ /** The output type produced by the validator. */
65
+ readonly output: Output;
66
+ }
67
+ /** Infer the input type of a Standard Schema validator. */
68
+ type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
69
+ /** Infer the output type of a Standard Schema validator. */
70
+ type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
71
+ }
72
+ /** Backward-compatible flat alias for {@link StandardSchemaV1.Props}. */
73
+ type StandardSchemaV1Props<Input = unknown, Output = Input> = StandardSchemaV1.Props<Input, Output>;
74
+ /** Flat alias for {@link StandardSchemaV1.Options}. */
75
+ type StandardSchemaV1Options = StandardSchemaV1.Options;
76
+ /** Flat alias for {@link StandardSchemaV1.Result}. */
77
+ type StandardSchemaV1Result<Output> = StandardSchemaV1.Result<Output>;
78
+ /** Flat alias for {@link StandardSchemaV1.SuccessResult}. */
79
+ type StandardSchemaV1SuccessResult<Output> = StandardSchemaV1.SuccessResult<Output>;
80
+ /** Flat alias for {@link StandardSchemaV1.FailureResult}. */
81
+ type StandardSchemaV1FailureResult = StandardSchemaV1.FailureResult;
82
+ /** Flat alias for {@link StandardSchemaV1.Issue}. */
83
+ type StandardSchemaV1Issue = StandardSchemaV1.Issue;
84
+ /** Flat alias for {@link StandardSchemaV1.PathSegment}. */
85
+ type StandardSchemaV1PathSegment = StandardSchemaV1.PathSegment;
86
+ /** Backward-compatible flat alias for {@link StandardSchemaV1.Types}. */
87
+ type StandardSchemaV1Types<Input = unknown, Output = Input> = StandardSchemaV1.Types<Input, Output>;
88
+ /** Flat alias for {@link StandardSchemaV1.InferInput}. */
89
+ type InferStandardInput<Schema extends StandardSchemaV1> = StandardSchemaV1.InferInput<Schema>;
90
+ /** Flat alias for {@link StandardSchemaV1.InferOutput}. */
91
+ type InferStandardOutput<Schema extends StandardSchemaV1> = StandardSchemaV1.InferOutput<Schema>;
92
+ /**
93
+ * Detect a Standard Schema validator without assuming validators are plain
94
+ * objects. Some conforming libraries expose callable schema values.
95
+ *
96
+ * @internal
97
+ */
98
+ declare function isStandardSchemaV1(value: unknown): value is StandardSchemaV1;
99
+ //#endregion
100
+ export { InferStandardInput, InferStandardOutput, StandardSchemaV1, StandardSchemaV1FailureResult, StandardSchemaV1Issue, StandardSchemaV1Options, StandardSchemaV1PathSegment, StandardSchemaV1Props, StandardSchemaV1Result, StandardSchemaV1SuccessResult, StandardSchemaV1Types, isStandardSchemaV1 };
@@ -0,0 +1,15 @@
1
+ //#region src/core/schema/standard.ts
2
+ /**
3
+ * Detect a Standard Schema validator without assuming validators are plain
4
+ * objects. Some conforming libraries expose callable schema values.
5
+ *
6
+ * @internal
7
+ */
8
+ function isStandardSchemaV1(value) {
9
+ if (value === null || typeof value !== "object" && typeof value !== "function") return false;
10
+ if (!("~standard" in value)) return false;
11
+ const properties = value["~standard"];
12
+ return properties !== null && typeof properties === "object" && "version" in properties && properties.version === 1 && "validate" in properties && typeof properties.validate === "function";
13
+ }
14
+ //#endregion
15
+ export { isStandardSchemaV1 };
@@ -5,7 +5,8 @@ import { RunnableCommand } from "../schema/command.mjs";
5
5
  * Run a command builder against the given argv with injected options.
6
6
  *
7
7
  * This is the testkit wrapper around the shared executor:
8
- * 1. Apply the CLI root-flag layer (detect/strip `--json`) so copied real argv works
8
+ * 1. Apply the CLI root-flag layer (detect/strip `--json` and `--quiet`/`-q`) so
9
+ * copied real argv works
9
10
  * 2. Create or reuse capture output
10
11
  * 3. Build standalone schema/meta defaults when CLI dispatch did not
11
12
  * 4. Delegate parse -> resolve -> execute to the shared executor
@@ -15,10 +16,11 @@ import { RunnableCommand } from "../schema/command.mjs";
15
16
  * with appropriate exit codes. The function never throws.
16
17
  *
17
18
  * @param cmd - The command builder (must have an action handler)
18
- * @param argv - Raw argv strings (NOT including the command name itself). A
19
- * CLI-level `--json` before the `--` separator is honored and stripped here,
20
- * just like the real CLI root — so `['--json']` enables JSON mode rather than
21
- * failing as an unknown flag. Equivalent to passing `{ jsonMode: true }`.
19
+ * @param argv - Raw argv strings (NOT including the command name itself).
20
+ * CLI-level `--json` and `--quiet`/`-q` before the `--` separator are honored
21
+ * and stripped here, just like the real CLI root — so `['--json']` enables
22
+ * JSON mode and `['--quiet']` sets quiet verbosity rather than failing as
23
+ * unknown flags. Equivalent to `{ jsonMode: true }` / `{ verbosity: 'quiet' }`.
22
24
  * @param options - Injectable runtime state
23
25
  * @returns Structured run result with exit code and captured output
24
26
  */
@@ -21,7 +21,8 @@ import { buildRunResult, executeCommand } from "../execution/index.mjs";
21
21
  * Run a command builder against the given argv with injected options.
22
22
  *
23
23
  * This is the testkit wrapper around the shared executor:
24
- * 1. Apply the CLI root-flag layer (detect/strip `--json`) so copied real argv works
24
+ * 1. Apply the CLI root-flag layer (detect/strip `--json` and `--quiet`/`-q`) so
25
+ * copied real argv works
25
26
  * 2. Create or reuse capture output
26
27
  * 3. Build standalone schema/meta defaults when CLI dispatch did not
27
28
  * 4. Delegate parse -> resolve -> execute to the shared executor
@@ -31,17 +32,21 @@ import { buildRunResult, executeCommand } from "../execution/index.mjs";
31
32
  * with appropriate exit codes. The function never throws.
32
33
  *
33
34
  * @param cmd - The command builder (must have an action handler)
34
- * @param argv - Raw argv strings (NOT including the command name itself). A
35
- * CLI-level `--json` before the `--` separator is honored and stripped here,
36
- * just like the real CLI root — so `['--json']` enables JSON mode rather than
37
- * failing as an unknown flag. Equivalent to passing `{ jsonMode: true }`.
35
+ * @param argv - Raw argv strings (NOT including the command name itself).
36
+ * CLI-level `--json` and `--quiet`/`-q` before the `--` separator are honored
37
+ * and stripped here, just like the real CLI root — so `['--json']` enables
38
+ * JSON mode and `['--quiet']` sets quiet verbosity rather than failing as
39
+ * unknown flags. Equivalent to `{ jsonMode: true }` / `{ verbosity: 'quiet' }`.
38
40
  * @param options - Injectable runtime state
39
41
  * @returns Structured run result with exit code and captured output
40
42
  */
41
43
  async function runCommand(cmd, argv, options) {
42
44
  const hasJsonFlag = includesBeforeSeparator(argv, "--json");
43
45
  const jsonMode = hasJsonFlag || options?.jsonMode === true;
44
- const effectiveArgv = hasJsonFlag ? stripBeforeSeparator(argv, "--json") : argv;
46
+ const hasQuietFlag = includesBeforeSeparator(argv, "--quiet") || includesBeforeSeparator(argv, "-q");
47
+ const verbosity = hasQuietFlag ? "quiet" : options?.verbosity;
48
+ let effectiveArgv = hasJsonFlag ? stripBeforeSeparator(argv, "--json") : argv;
49
+ if (hasQuietFlag) effectiveArgv = stripBeforeSeparator(stripBeforeSeparator(effectiveArgv, "--quiet"), "-q");
45
50
  let out;
46
51
  let captured;
47
52
  if (options?.out !== void 0) {
@@ -53,7 +58,7 @@ async function runCommand(cmd, argv, options) {
53
58
  };
54
59
  } else {
55
60
  const captureOptions = {
56
- ...options?.verbosity !== void 0 ? { verbosity: options.verbosity } : {},
61
+ ...verbosity !== void 0 ? { verbosity } : {},
57
62
  ...jsonMode ? { jsonMode } : {},
58
63
  ...options?.isTTY !== void 0 ? { isTTY: options.isTTY } : {}
59
64
  };