@kjanat/dreamcli 3.0.0-rc.9 → 3.0.1

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 (502) hide show
  1. package/CHANGELOG.md +262 -1
  2. package/README.md +32 -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 +108 -21
  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 +6 -2
  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 +7 -8
  21. package/dist/core/json-schema/index.mjs +271 -88
  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 +77 -9
  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 +5 -4
  49. package/dist/index.mjs +4 -4
  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 +82 -0
  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 +26 -31
  487. package/skills/cli-creation/SKILL.md +140 -0
  488. package/skills/cli-creation/agents/openai.yaml +4 -0
  489. package/skills/cli-creation/assets/templates/multi-command.bun-test.ts.tpl +20 -0
  490. package/skills/cli-creation/assets/templates/multi-command.test.ts.tpl +20 -0
  491. package/skills/cli-creation/assets/templates/multi-command.ts.tpl +89 -0
  492. package/skills/cli-creation/assets/templates/single-command.bun-test.ts.tpl +29 -0
  493. package/skills/cli-creation/assets/templates/single-command.test.ts.tpl +29 -0
  494. package/skills/cli-creation/assets/templates/single-command.ts.tpl +47 -0
  495. package/skills/cli-creation/references/consumer-workflow.md +65 -0
  496. package/skills/cli-creation/references/pattern-cookbook.md +293 -0
  497. package/skills/cli-creation/references/runtime-notes.md +29 -0
  498. package/skills/cli-creation/scripts/scaffold_cli.py +360 -0
  499. package/dist/core/schema-dsl/runtime.d.mts +0 -144
  500. package/dist/core/schema-dsl/runtime.mjs +0 -271
  501. package/dist/core/schema-dsl/to-json-schema.d.mts +0 -29
  502. package/dist/core/schema-dsl/to-json-schema.mjs +0 -74
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { CLIError, ParseError, ValidationError, isCLIError, isParseError, isValidationError } from "./core/errors/index.mjs";
2
2
  import { FlagBuilder, createSchema, flag, getFlagNegatedName } from "./core/schema/flag.mjs";
3
3
  import { ArgBuilder, arg, createArgSchema } from "./core/schema/arg.mjs";
4
- import { CommandBuilder, command, group } from "./core/schema/command.mjs";
4
+ import { CommandBuilder, command, group, resolveExampleCommand } from "./core/schema/command.mjs";
5
5
  import { middleware } from "./core/schema/middleware.mjs";
6
- import { parse, tokenize } from "./core/parse/index.mjs";
6
+ import { includesBeforeSeparator, parse, stripBeforeSeparator, tokenize } from "./core/parse/index.mjs";
7
7
  import { generateBashCompletion } from "./core/completion/shells/bash.mjs";
8
8
  import { generateFishCompletion } from "./core/completion/shells/fish.mjs";
9
9
  import { generatePowerShellCompletion } from "./core/completion/shells/powershell.mjs";
@@ -18,5 +18,5 @@ import { resolve } from "./core/resolve/index.mjs";
18
18
  import { discoverManifest, discoverPackageJson, inferCliName, packageRepositoryUrl } from "./core/config/package-json.mjs";
19
19
  import { plugin } from "./core/cli/plugin.mjs";
20
20
  import { buildConfigSearchPaths, configFormat, discoverConfig } from "./core/config/index.mjs";
21
- import { CLIBuilder, cli } from "./core/cli/index.mjs";
22
- export { ArgBuilder, CLIBuilder, CLIError, CommandBuilder, FlagBuilder, ParseError, SHELLS, ValidationError, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createOutput, createSchema, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, discoverPackageJson, flag, formatHelp, generateBashCompletion, generateCommandSchema, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, getFlagNegatedName, group, inferCliName, isCLIError, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, resolve, resolvePromptConfig, tokenize, visibleWidth };
21
+ import { CLIBuilder, cli, isMainModule, resolveRenderContext } from "./core/cli/index.mjs";
22
+ export { ArgBuilder, CLIBuilder, CLIError, CommandBuilder, FlagBuilder, ParseError, SHELLS, ValidationError, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createOutput, createSchema, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, discoverPackageJson, flag, formatHelp, generateBashCompletion, generateCommandSchema, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, getFlagNegatedName, group, includesBeforeSeparator, inferCliName, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth };
@@ -91,6 +91,15 @@ interface RuntimeAdapter {
91
91
  * Used by `flag.path()` existence/type checks after resolution.
92
92
  */
93
93
  readonly stat: (path: string) => Promise<'file' | 'directory' | null>;
94
+ /**
95
+ * Create a directory, including missing parents.
96
+ *
97
+ * Succeeds when the directory already exists. Throws on other I/O errors
98
+ * (permission denied, existing file at the path, etc.).
99
+ *
100
+ * Used by `flag.path()` `create` checks after resolution.
101
+ */
102
+ readonly mkdir: (path: string) => Promise<void>;
94
103
  /**
95
104
  * User home directory (absolute path).
96
105
  *
@@ -107,6 +116,21 @@ interface RuntimeAdapter {
107
116
  * Config discovery appends the app-specific subdirectory.
108
117
  */
109
118
  readonly configDir: string;
119
+ /**
120
+ * User-scope config roots for discovery, highest priority first.
121
+ *
122
+ * - Unix: `[configDir]`
123
+ * - macOS: `[configDir, ~/Library/Application Support]`
124
+ * - Windows: `[configDir]`
125
+ *
126
+ * When absent, discovery falls back to `[configDir]`.
127
+ */
128
+ readonly userConfigDirs?: readonly string[];
129
+ /**
130
+ * System-scope config roots for discovery (`['/etc']` on Linux and
131
+ * macOS, `[]` on Windows). When absent, discovery probes none.
132
+ */
133
+ readonly systemConfigDirs?: readonly string[];
110
134
  }
111
135
  /** Current terminal dimensions in columns and rows. */
112
136
  interface TerminalSize {
@@ -194,10 +218,19 @@ interface TestAdapterOptions {
194
218
  * ```
195
219
  */
196
220
  readonly stat?: (path: string) => Promise<'file' | 'directory' | null>;
221
+ /**
222
+ * Directory creation stub for `flag.path()` `create` checks (defaults to
223
+ * a noop that resolves without creating anything).
224
+ */
225
+ readonly mkdir?: (path: string) => Promise<void>;
197
226
  /** Home directory (defaults to `'/home/test'`). */
198
227
  readonly homedir?: string;
199
228
  /** Config directory (defaults to `'/home/test/.config'`). */
200
229
  readonly configDir?: string;
230
+ /** User-scope config roots for discovery (defaults to `[configDir]`). */
231
+ readonly userConfigDirs?: readonly string[];
232
+ /** System-scope config roots for discovery (defaults to `[]`). */
233
+ readonly systemConfigDirs?: readonly string[];
201
234
  }
202
235
  /**
203
236
  * Error thrown by adapter implementations that model process exit as an
@@ -34,6 +34,8 @@ const eofRead = () => Promise.resolve(null);
34
34
  const noopReadFile = () => Promise.resolve(null);
35
35
  /** Noop stat — reports `null` (nothing exists) for all paths. */
36
36
  const noopStat = () => Promise.resolve(null);
37
+ /** Noop mkdir — resolves without creating anything. */
38
+ const noopMkdir = () => Promise.resolve();
37
39
  /**
38
40
  * Create a test runtime adapter with injectable process state.
39
41
  *
@@ -79,8 +81,11 @@ function createTestAdapter(options) {
79
81
  }),
80
82
  readFile: options?.readFile ?? noopReadFile,
81
83
  stat: options?.stat ?? noopStat,
84
+ mkdir: options?.mkdir ?? noopMkdir,
82
85
  homedir: options?.homedir ?? "/home/test",
83
- configDir: options?.configDir ?? "/home/test/.config"
86
+ configDir: options?.configDir ?? "/home/test/.config",
87
+ userConfigDirs: options?.userConfigDirs ?? [options?.configDir ?? "/home/test/.config"],
88
+ systemConfigDirs: options?.systemConfigDirs ?? []
84
89
  };
85
90
  }
86
91
  //#endregion
@@ -66,6 +66,10 @@ interface DenoNamespace {
66
66
  stat(path: string): Promise<{
67
67
  readonly isDirectory: boolean;
68
68
  }>;
69
+ /** Create a directory (requires `--allow-write`). */
70
+ mkdir(path: string, options?: {
71
+ readonly recursive?: boolean;
72
+ }): Promise<void>;
69
73
  }
70
74
  /**
71
75
  * Create a runtime adapter backed by the Deno namespace.
@@ -113,8 +113,11 @@ function createDenoAdapter(ns) {
113
113
  exit: (code) => d.exit(code),
114
114
  readFile,
115
115
  stat,
116
+ mkdir: (path) => d.mkdir(path, { recursive: true }),
116
117
  homedir,
117
- configDir
118
+ configDir,
119
+ userConfigDirs: d.build.os === "darwin" ? [configDir, `${homedir}/Library/Application Support`] : [configDir],
120
+ systemConfigDirs: d.build.os === "windows" ? [] : ["/etc"]
118
121
  };
119
122
  }
120
123
  /** Normalize terminal dimensions and discard unusable values. @internal */
@@ -99,8 +99,13 @@ function createNodeAdapter(proc) {
99
99
  throw err;
100
100
  }
101
101
  };
102
+ const mkdir = async (path) => {
103
+ await (await import("node:fs/promises")).mkdir(path, { recursive: true });
104
+ };
102
105
  const homedir = resolveHomedir(p.env, p.platform);
103
106
  const configDir = resolveConfigDir(p.env, p.platform, homedir);
107
+ const userConfigDirs = p.platform === "darwin" ? [configDir, `${homedir}/Library/Application Support`] : [configDir];
108
+ const systemConfigDirs = p.platform === "win32" ? [] : ["/etc"];
104
109
  const stdinIsTTY = p.stdin.isTTY === true;
105
110
  return {
106
111
  argv: p.argv,
@@ -117,8 +122,11 @@ function createNodeAdapter(proc) {
117
122
  exit: (code) => p.exit(code),
118
123
  readFile,
119
124
  stat,
125
+ mkdir,
120
126
  homedir,
121
- configDir
127
+ configDir,
128
+ userConfigDirs,
129
+ systemConfigDirs
122
130
  };
123
131
  }
124
132
  /** Normalize terminal dimensions and discard unusable values. @internal */
package/dist/version.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  //#region src/version.ts
2
2
  /** Package version (e.g. `"0.9.1"`). `"dev"` when running unbundled. */
3
- const DREAMCLI_VERSION = "3.0.0-rc.9";
3
+ const DREAMCLI_VERSION = "3.0.1";
4
4
  /** Git short SHA (e.g. `"f9b5f1a"`). `"dev"` when running unbundled. */
5
- const DREAMCLI_REVISION = "6a62e80";
5
+ const DREAMCLI_REVISION = "7379236";
6
6
  //#endregion
7
7
  export { DREAMCLI_REVISION, DREAMCLI_VERSION };
@@ -153,10 +153,92 @@
153
153
  },
154
154
  "description": "Allowed literal values when `kind === 'enum'`."
155
155
  },
156
+ "numberConstraints": {
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "properties": {
160
+ "min": {
161
+ "type": "number"
162
+ },
163
+ "max": {
164
+ "type": "number"
165
+ },
166
+ "int": {
167
+ "type": "boolean"
168
+ },
169
+ "finite": {
170
+ "type": "boolean"
171
+ }
172
+ }
173
+ },
174
+ "stringConstraints": {
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "properties": {
178
+ "nonEmpty": {
179
+ "type": "boolean"
180
+ },
181
+ "minLength": {
182
+ "type": "integer",
183
+ "minimum": 0
184
+ },
185
+ "maxLength": {
186
+ "type": "integer",
187
+ "minimum": 0
188
+ },
189
+ "pattern": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "properties": {
193
+ "source": {
194
+ "type": "string"
195
+ },
196
+ "flags": {
197
+ "type": "string"
198
+ }
199
+ },
200
+ "required": [
201
+ "source",
202
+ "flags"
203
+ ]
204
+ }
205
+ }
206
+ },
156
207
  "elementSchema": {
157
208
  "$ref": "#/$defs/flag",
158
209
  "description": "Element schema when `kind === 'array'`."
159
210
  },
211
+ "separator": {
212
+ "type": "string",
213
+ "minLength": 1
214
+ },
215
+ "unique": {
216
+ "type": "boolean"
217
+ },
218
+ "pathChecks": {
219
+ "type": "object",
220
+ "additionalProperties": false,
221
+ "properties": {
222
+ "mustExist": {
223
+ "type": "boolean"
224
+ },
225
+ "type": {
226
+ "enum": [
227
+ "file",
228
+ "directory"
229
+ ]
230
+ },
231
+ "create": {
232
+ "type": "boolean"
233
+ }
234
+ },
235
+ "required": [
236
+ "mustExist"
237
+ ]
238
+ },
239
+ "valueHint": {
240
+ "type": "string"
241
+ },
160
242
  "prompt": {
161
243
  "$ref": "#/$defs/prompt",
162
244
  "description": "Interactive prompt configuration for v0.3+ resolution."
package/examples/basic.ts CHANGED
@@ -15,8 +15,8 @@ import { arg, cli, command, flag } from '@kjanat/dreamcli';
15
15
 
16
16
  const greet = command('greet')
17
17
  .description('Greet someone')
18
- .example('greet Alice', 'Greet Alice once')
19
- .example('greet Alice --loud --times 3', 'Shout the greeting three times')
18
+ .example(({ name }) => `${name} greet Alice`, 'Greet Alice once')
19
+ .example(({ name }) => `${name} greet Alice --loud --times 3`, 'Shout the greeting three times')
20
20
  .arg('name', arg.string().describe('Who to greet'))
21
21
  .flag('loud', flag.boolean().alias('l').describe('Shout the greeting'))
22
22
  .flag('times', flag.number().default(1).alias('t').describe('Repeat count'))
@@ -0,0 +1,79 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * The v3 flag-type family in one command.
4
+ *
5
+ * Demonstrates: `flag.url()`, `flag.path()` with directory creation,
6
+ * `flag.date()`, `flag.duration()`, `flag.bytes()`, `flag.count()`,
7
+ * `flag.keyValue()`, string constraints, and array `.separator()`/`.unique()`.
8
+ *
9
+ * Usage:
10
+ * npx tsx examples/flag-types.ts --endpoint https://api.example.com --name backup
11
+ * npx tsx examples/flag-types.ts --name backup --out ./artifacts --timeout 1h30m --max-size 512mb
12
+ * npx tsx examples/flag-types.ts --name backup --since 2026-01-01 --region us,eu --region us
13
+ * npx tsx examples/flag-types.ts --name backup --label env=prod --label team=core -vvv
14
+ * npx tsx examples/flag-types.ts --help
15
+ */
16
+
17
+ import { cli, command, flag } from '@kjanat/dreamcli';
18
+
19
+ const snapshot = command('snapshot')
20
+ .description('Create a snapshot with richly typed inputs')
21
+ // URL — parses into a `URL`, protocol allowlist optional.
22
+ .flag('endpoint', flag.url({ protocols: ['https'] }).describe('Upload endpoint'))
23
+ // String constraints — checked at parse AND env/config/prompt resolution.
24
+ .flag(
25
+ 'name',
26
+ flag
27
+ .string({ nonEmpty: true, pattern: /^[a-z][a-z0-9-]*$/ })
28
+ .required()
29
+ .describe('Snapshot name (lowercase, kebab)'),
30
+ )
31
+ // Path — missing directory is created (mkdir -p) at resolution time.
32
+ .flag(
33
+ 'out',
34
+ flag
35
+ .path({ type: 'directory', create: true })
36
+ .default('./snapshots')
37
+ .describe('Output directory, created when missing'),
38
+ )
39
+ // Date — strict ISO-8601 into a `Date`; lenient Date.parse inputs rejected.
40
+ .flag('since', flag.date().describe('Only include changes since this date'))
41
+ // Duration — '90s', '1h30m', '250ms', or bare milliseconds → milliseconds.
42
+ .flag('timeout', flag.duration().default(30_000).describe('Upload timeout'))
43
+ // Bytes — '512mb', '1.5gb' (binary units) or bare bytes → bytes.
44
+ .flag(
45
+ 'max-size',
46
+ flag
47
+ .bytes()
48
+ .default(256 * 1024 ** 2)
49
+ .describe('Maximum snapshot size'),
50
+ )
51
+ // Count — occurrence counter: -v -vv -vvv → 1, 2, 3.
52
+ .flag('verbose', flag.count().alias('v').describe('Increase verbosity'))
53
+ // KeyValue — repeated KEY=VALUE merges into Record<string, string>.
54
+ .flag('label', flag.keyValue().describe('Attach metadata labels'))
55
+ // Array — separator splits each occurrence, unique dedupes the result.
56
+ .flag(
57
+ 'region',
58
+ flag
59
+ .array(flag.enum(['us', 'eu', 'ap']))
60
+ .separator(',')
61
+ .unique()
62
+ .describe('Target regions'),
63
+ )
64
+ .action(({ flags, out }) => {
65
+ out.status(`snapshot '${flags.name}' -> ${flags.out}`);
66
+ out.json({
67
+ name: flags.name,
68
+ endpoint: flags.endpoint?.href,
69
+ out: flags.out,
70
+ since: flags.since?.toISOString(),
71
+ timeoutMs: flags.timeout,
72
+ maxSizeBytes: flags['max-size'],
73
+ verbosity: flags.verbose,
74
+ labels: flags.label,
75
+ regions: flags.region,
76
+ });
77
+ });
78
+
79
+ void cli('snapshot').version('1.0.0').default(snapshot).run();
@@ -0,0 +1,55 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004
4
+
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
+
17
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
+
19
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
+
21
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
+
23
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
+
25
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
+
27
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
+
29
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
+
31
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
+
33
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
+
35
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
+
37
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
+
39
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
40
+
41
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
+
43
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS