@bolt-foundry/gambit 0.8.3 → 0.8.5-rc.4

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 (289) hide show
  1. package/CHANGELOG.md +34 -2
  2. package/README.md +79 -16
  3. package/esm/_dnt.polyfills.d.ts +17 -0
  4. package/esm/_dnt.polyfills.d.ts.map +1 -1
  5. package/esm/_dnt.polyfills.js +122 -0
  6. package/esm/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts +322 -0
  7. package/esm/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts.map +1 -0
  8. package/esm/deps/jsr.io/@std/collections/1.1.5/deep_merge.js +105 -0
  9. package/esm/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts +14 -0
  10. package/esm/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.js +34 -0
  12. package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts +13 -0
  13. package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts.map +1 -0
  14. package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.js +18 -0
  15. package/esm/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts +10 -0
  16. package/esm/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts.map +1 -0
  17. package/esm/deps/jsr.io/@std/fs/1.0.22/_is_same_path.js +17 -0
  18. package/esm/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts +12 -0
  19. package/esm/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@std/fs/1.0.22/_is_subdir.js +25 -0
  21. package/esm/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts +9 -0
  22. package/esm/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts.map +1 -0
  23. package/esm/deps/jsr.io/@std/fs/1.0.22/_to_path_string.js +13 -0
  24. package/esm/deps/jsr.io/@std/fs/1.0.22/copy.d.ts +117 -0
  25. package/esm/deps/jsr.io/@std/fs/1.0.22/copy.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@std/fs/1.0.22/copy.js +313 -0
  27. package/esm/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts +48 -0
  28. package/esm/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@std/fs/1.0.22/empty_dir.js +87 -0
  30. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts +49 -0
  31. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.js +102 -0
  33. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts +47 -0
  34. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_file.js +90 -0
  36. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts +49 -0
  37. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_link.js +61 -0
  39. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts +70 -0
  40. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.js +156 -0
  42. package/esm/deps/jsr.io/@std/fs/1.0.22/eol.d.ts +52 -0
  43. package/esm/deps/jsr.io/@std/fs/1.0.22/eol.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/fs/1.0.22/eol.js +67 -0
  45. package/esm/deps/jsr.io/@std/fs/1.0.22/exists.d.ts +218 -0
  46. package/esm/deps/jsr.io/@std/fs/1.0.22/exists.d.ts.map +1 -0
  47. package/esm/deps/jsr.io/@std/fs/1.0.22/exists.js +271 -0
  48. package/esm/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts +267 -0
  49. package/esm/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts.map +1 -0
  50. package/esm/deps/jsr.io/@std/fs/1.0.22/expand_glob.js +442 -0
  51. package/esm/deps/jsr.io/@std/fs/1.0.22/mod.d.ts +29 -0
  52. package/esm/deps/jsr.io/@std/fs/1.0.22/mod.d.ts.map +1 -0
  53. package/esm/deps/jsr.io/@std/fs/1.0.22/mod.js +29 -0
  54. package/esm/deps/jsr.io/@std/fs/1.0.22/move.d.ts +86 -0
  55. package/esm/deps/jsr.io/@std/fs/1.0.22/move.d.ts.map +1 -0
  56. package/esm/deps/jsr.io/@std/fs/1.0.22/move.js +142 -0
  57. package/esm/deps/jsr.io/@std/fs/1.0.22/walk.d.ts +777 -0
  58. package/esm/deps/jsr.io/@std/fs/1.0.22/walk.d.ts.map +1 -0
  59. package/esm/deps/jsr.io/@std/fs/1.0.22/walk.js +846 -0
  60. package/esm/deps/jsr.io/@std/json/1.0.2/types.d.ts +5 -0
  61. package/esm/deps/jsr.io/@std/json/1.0.2/types.d.ts.map +1 -0
  62. package/esm/deps/jsr.io/@std/json/1.0.2/types.js +3 -0
  63. package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts +20 -0
  64. package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts.map +1 -0
  65. package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.js +21 -0
  66. package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts +21 -0
  67. package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts.map +1 -0
  68. package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.js +320 -0
  69. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
  70. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
  71. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.js +753 -0
  72. package/esm/deps/jsr.io/@std/toml/1.0.11/mod.d.ts +109 -0
  73. package/esm/deps/jsr.io/@std/toml/1.0.11/mod.d.ts.map +1 -0
  74. package/esm/deps/jsr.io/@std/toml/1.0.11/mod.js +110 -0
  75. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
  76. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
  77. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.js +25 -0
  78. package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts +35 -0
  79. package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts.map +1 -0
  80. package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.js +283 -0
  81. package/esm/gambit/simulator-ui/dist/bundle.js +10647 -4637
  82. package/esm/gambit/simulator-ui/dist/bundle.js.map +4 -4
  83. package/esm/mod.d.ts +13 -3
  84. package/esm/mod.d.ts.map +1 -1
  85. package/esm/mod.js +8 -2
  86. package/esm/src/cli_utils.d.ts +1 -0
  87. package/esm/src/cli_utils.d.ts.map +1 -1
  88. package/esm/src/cli_utils.js +13 -1
  89. package/esm/src/default_runtime.d.ts +46 -0
  90. package/esm/src/default_runtime.d.ts.map +1 -0
  91. package/esm/src/default_runtime.js +415 -0
  92. package/esm/src/durable_streams.js +26 -1
  93. package/esm/src/model_matchers.d.ts +10 -0
  94. package/esm/src/model_matchers.d.ts.map +1 -0
  95. package/esm/src/model_matchers.js +26 -0
  96. package/esm/src/openai_compat.d.ts +12 -1
  97. package/esm/src/openai_compat.d.ts.map +1 -1
  98. package/esm/src/openai_compat.js +53 -1
  99. package/esm/src/project_config.d.ts +47 -0
  100. package/esm/src/project_config.d.ts.map +1 -0
  101. package/esm/src/project_config.js +134 -0
  102. package/esm/src/providers/codex.d.ts +37 -0
  103. package/esm/src/providers/codex.d.ts.map +1 -0
  104. package/esm/src/providers/codex.js +810 -0
  105. package/esm/src/providers/google.d.ts +3 -1
  106. package/esm/src/providers/google.d.ts.map +1 -1
  107. package/esm/src/providers/google.js +82 -6
  108. package/esm/src/providers/ollama.d.ts +3 -1
  109. package/esm/src/providers/ollama.d.ts.map +1 -1
  110. package/esm/src/providers/ollama.js +238 -15
  111. package/esm/src/providers/openrouter.d.ts +6 -2
  112. package/esm/src/providers/openrouter.d.ts.map +1 -1
  113. package/esm/src/providers/openrouter.js +260 -23
  114. package/esm/src/providers/router.d.ts +19 -0
  115. package/esm/src/providers/router.d.ts.map +1 -0
  116. package/esm/src/providers/router.js +93 -0
  117. package/esm/src/server.d.ts +9 -0
  118. package/esm/src/server.d.ts.map +1 -1
  119. package/esm/src/server.js +3186 -652
  120. package/esm/src/server_feedback_grading_routes.d.ts +32 -0
  121. package/esm/src/server_feedback_grading_routes.d.ts.map +1 -0
  122. package/esm/src/server_feedback_grading_routes.js +305 -0
  123. package/esm/src/server_helpers.d.ts +4 -0
  124. package/esm/src/server_helpers.d.ts.map +1 -0
  125. package/esm/src/server_helpers.js +46 -0
  126. package/esm/src/server_session_store.d.ts +87 -0
  127. package/esm/src/server_session_store.d.ts.map +1 -0
  128. package/esm/src/server_session_store.js +873 -0
  129. package/esm/src/server_types.d.ts +110 -0
  130. package/esm/src/server_types.d.ts.map +1 -0
  131. package/esm/src/server_types.js +1 -0
  132. package/esm/src/server_ui_routes.d.ts +33 -0
  133. package/esm/src/server_ui_routes.d.ts.map +1 -0
  134. package/esm/src/server_ui_routes.js +135 -0
  135. package/esm/src/session_artifacts.d.ts +22 -0
  136. package/esm/src/session_artifacts.d.ts.map +1 -0
  137. package/esm/src/session_artifacts.js +243 -0
  138. package/esm/src/trace.d.ts.map +1 -1
  139. package/esm/src/trace.js +6 -3
  140. package/esm/src/workspace.d.ts +19 -0
  141. package/esm/src/workspace.d.ts.map +1 -0
  142. package/esm/src/workspace.js +164 -0
  143. package/esm/src/workspace_contract.d.ts +76 -0
  144. package/esm/src/workspace_contract.d.ts.map +1 -0
  145. package/esm/src/workspace_contract.js +74 -0
  146. package/package.json +2 -2
  147. package/script/_dnt.polyfills.d.ts +17 -0
  148. package/script/_dnt.polyfills.d.ts.map +1 -1
  149. package/script/_dnt.polyfills.js +122 -0
  150. package/script/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts +322 -0
  151. package/script/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts.map +1 -0
  152. package/script/deps/jsr.io/@std/collections/1.1.5/deep_merge.js +108 -0
  153. package/script/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts +14 -0
  154. package/script/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts.map +1 -0
  155. package/script/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.js +71 -0
  156. package/script/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts +13 -0
  157. package/script/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts.map +1 -0
  158. package/script/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.js +21 -0
  159. package/script/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts +10 -0
  160. package/script/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts.map +1 -0
  161. package/script/deps/jsr.io/@std/fs/1.0.22/_is_same_path.js +20 -0
  162. package/script/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts +12 -0
  163. package/script/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts.map +1 -0
  164. package/script/deps/jsr.io/@std/fs/1.0.22/_is_subdir.js +28 -0
  165. package/script/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts +9 -0
  166. package/script/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts.map +1 -0
  167. package/script/deps/jsr.io/@std/fs/1.0.22/_to_path_string.js +16 -0
  168. package/script/deps/jsr.io/@std/fs/1.0.22/copy.d.ts +117 -0
  169. package/script/deps/jsr.io/@std/fs/1.0.22/copy.d.ts.map +1 -0
  170. package/script/deps/jsr.io/@std/fs/1.0.22/copy.js +350 -0
  171. package/script/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts +48 -0
  172. package/script/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts.map +1 -0
  173. package/script/deps/jsr.io/@std/fs/1.0.22/empty_dir.js +124 -0
  174. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts +49 -0
  175. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts.map +1 -0
  176. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_dir.js +139 -0
  177. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts +47 -0
  178. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts.map +1 -0
  179. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_file.js +127 -0
  180. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts +49 -0
  181. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts.map +1 -0
  182. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_link.js +98 -0
  183. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts +70 -0
  184. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts.map +1 -0
  185. package/script/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.js +193 -0
  186. package/script/deps/jsr.io/@std/fs/1.0.22/eol.d.ts +52 -0
  187. package/script/deps/jsr.io/@std/fs/1.0.22/eol.d.ts.map +1 -0
  188. package/script/deps/jsr.io/@std/fs/1.0.22/eol.js +105 -0
  189. package/script/deps/jsr.io/@std/fs/1.0.22/exists.d.ts +218 -0
  190. package/script/deps/jsr.io/@std/fs/1.0.22/exists.d.ts.map +1 -0
  191. package/script/deps/jsr.io/@std/fs/1.0.22/exists.js +308 -0
  192. package/script/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts +267 -0
  193. package/script/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts.map +1 -0
  194. package/script/deps/jsr.io/@std/fs/1.0.22/expand_glob.js +479 -0
  195. package/script/deps/jsr.io/@std/fs/1.0.22/mod.d.ts +29 -0
  196. package/script/deps/jsr.io/@std/fs/1.0.22/mod.d.ts.map +1 -0
  197. package/script/deps/jsr.io/@std/fs/1.0.22/mod.js +45 -0
  198. package/script/deps/jsr.io/@std/fs/1.0.22/move.d.ts +86 -0
  199. package/script/deps/jsr.io/@std/fs/1.0.22/move.d.ts.map +1 -0
  200. package/script/deps/jsr.io/@std/fs/1.0.22/move.js +179 -0
  201. package/script/deps/jsr.io/@std/fs/1.0.22/walk.d.ts +777 -0
  202. package/script/deps/jsr.io/@std/fs/1.0.22/walk.d.ts.map +1 -0
  203. package/script/deps/jsr.io/@std/fs/1.0.22/walk.js +883 -0
  204. package/script/deps/jsr.io/@std/json/1.0.2/types.d.ts +5 -0
  205. package/script/deps/jsr.io/@std/json/1.0.2/types.d.ts.map +1 -0
  206. package/script/deps/jsr.io/@std/json/1.0.2/types.js +4 -0
  207. package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts +20 -0
  208. package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts.map +1 -0
  209. package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.js +37 -0
  210. package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts +21 -0
  211. package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts.map +1 -0
  212. package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.js +323 -0
  213. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
  214. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
  215. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.js +781 -0
  216. package/script/deps/jsr.io/@std/toml/1.0.11/mod.d.ts +109 -0
  217. package/script/deps/jsr.io/@std/toml/1.0.11/mod.d.ts.map +1 -0
  218. package/script/deps/jsr.io/@std/toml/1.0.11/mod.js +126 -0
  219. package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
  220. package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
  221. package/script/deps/jsr.io/@std/toml/1.0.11/parse.js +28 -0
  222. package/script/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts +35 -0
  223. package/script/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts.map +1 -0
  224. package/script/deps/jsr.io/@std/toml/1.0.11/stringify.js +286 -0
  225. package/script/gambit/simulator-ui/dist/bundle.js +10647 -4637
  226. package/script/gambit/simulator-ui/dist/bundle.js.map +4 -4
  227. package/script/mod.d.ts +13 -3
  228. package/script/mod.d.ts.map +1 -1
  229. package/script/mod.js +14 -5
  230. package/script/src/cli_utils.d.ts +1 -0
  231. package/script/src/cli_utils.d.ts.map +1 -1
  232. package/script/src/cli_utils.js +14 -1
  233. package/script/src/default_runtime.d.ts +46 -0
  234. package/script/src/default_runtime.d.ts.map +1 -0
  235. package/script/src/default_runtime.js +452 -0
  236. package/script/src/durable_streams.js +26 -1
  237. package/script/src/model_matchers.d.ts +10 -0
  238. package/script/src/model_matchers.d.ts.map +1 -0
  239. package/script/src/model_matchers.js +29 -0
  240. package/script/src/openai_compat.d.ts +12 -1
  241. package/script/src/openai_compat.d.ts.map +1 -1
  242. package/script/src/openai_compat.js +85 -0
  243. package/script/src/project_config.d.ts +47 -0
  244. package/script/src/project_config.d.ts.map +1 -0
  245. package/script/src/project_config.js +173 -0
  246. package/script/src/providers/codex.d.ts +37 -0
  247. package/script/src/providers/codex.d.ts.map +1 -0
  248. package/script/src/providers/codex.js +850 -0
  249. package/script/src/providers/google.d.ts +3 -1
  250. package/script/src/providers/google.d.ts.map +1 -1
  251. package/script/src/providers/google.js +82 -6
  252. package/script/src/providers/ollama.d.ts +3 -1
  253. package/script/src/providers/ollama.d.ts.map +1 -1
  254. package/script/src/providers/ollama.js +238 -15
  255. package/script/src/providers/openrouter.d.ts +6 -2
  256. package/script/src/providers/openrouter.d.ts.map +1 -1
  257. package/script/src/providers/openrouter.js +260 -23
  258. package/script/src/providers/router.d.ts +19 -0
  259. package/script/src/providers/router.d.ts.map +1 -0
  260. package/script/src/providers/router.js +96 -0
  261. package/script/src/server.d.ts +9 -0
  262. package/script/src/server.d.ts.map +1 -1
  263. package/script/src/server.js +3193 -659
  264. package/script/src/server_feedback_grading_routes.d.ts +32 -0
  265. package/script/src/server_feedback_grading_routes.d.ts.map +1 -0
  266. package/script/src/server_feedback_grading_routes.js +343 -0
  267. package/script/src/server_helpers.d.ts +4 -0
  268. package/script/src/server_helpers.d.ts.map +1 -0
  269. package/script/src/server_helpers.js +84 -0
  270. package/script/src/server_session_store.d.ts +87 -0
  271. package/script/src/server_session_store.d.ts.map +1 -0
  272. package/script/src/server_session_store.js +910 -0
  273. package/script/src/server_types.d.ts +110 -0
  274. package/script/src/server_types.d.ts.map +1 -0
  275. package/script/src/server_types.js +2 -0
  276. package/script/src/server_ui_routes.d.ts +33 -0
  277. package/script/src/server_ui_routes.d.ts.map +1 -0
  278. package/script/src/server_ui_routes.js +172 -0
  279. package/script/src/session_artifacts.d.ts +22 -0
  280. package/script/src/session_artifacts.d.ts.map +1 -0
  281. package/script/src/session_artifacts.js +279 -0
  282. package/script/src/trace.d.ts.map +1 -1
  283. package/script/src/trace.js +6 -3
  284. package/script/src/workspace.d.ts +19 -0
  285. package/script/src/workspace.d.ts.map +1 -0
  286. package/script/src/workspace.js +201 -0
  287. package/script/src/workspace_contract.d.ts +76 -0
  288. package/script/src/workspace_contract.d.ts.map +1 -0
  289. package/script/src/workspace_contract.js +82 -0
@@ -0,0 +1,777 @@
1
+ import { type WalkEntry } from "./_create_walk_entry.js";
2
+ /** Options for {@linkcode walk} and {@linkcode walkSync}. */
3
+ export interface WalkOptions {
4
+ /**
5
+ * The maximum depth of the file tree to be walked recursively.
6
+ *
7
+ * @default {Infinity}
8
+ */
9
+ maxDepth?: number;
10
+ /**
11
+ * Indicates whether file entries should be included or not.
12
+ *
13
+ * @default {true}
14
+ */
15
+ includeFiles?: boolean;
16
+ /**
17
+ * Indicates whether directory entries should be included or not.
18
+ *
19
+ * @default {true}
20
+ */
21
+ includeDirs?: boolean;
22
+ /**
23
+ * Indicates whether symlink entries should be included or not.
24
+ * This option is meaningful only if `followSymlinks` is set to `false`.
25
+ *
26
+ * @default {true}
27
+ */
28
+ includeSymlinks?: boolean;
29
+ /**
30
+ * Indicates whether symlinks should be resolved or not.
31
+ *
32
+ * @default {false}
33
+ */
34
+ followSymlinks?: boolean;
35
+ /**
36
+ * Indicates whether the followed symlink's path should be canonicalized.
37
+ * This option works only if `followSymlinks` is not `false`.
38
+ *
39
+ * @default {true}
40
+ */
41
+ canonicalize?: boolean;
42
+ /**
43
+ * List of file extensions used to filter entries.
44
+ * If specified, entries without the file extension specified by this option
45
+ * are excluded.
46
+ *
47
+ * File extensions with or without a leading period are accepted.
48
+ *
49
+ * @default {[]}
50
+ */
51
+ exts?: string[];
52
+ /**
53
+ * List of regular expression patterns used to filter entries.
54
+ * If specified, entries that do not match the patterns specified by this
55
+ * option are excluded.
56
+ */
57
+ match?: RegExp[];
58
+ /**
59
+ * List of regular expression patterns used to filter entries.
60
+ * If specified, entries matching the patterns specified by this option are
61
+ * excluded.
62
+ */
63
+ skip?: RegExp[];
64
+ }
65
+ export type { WalkEntry };
66
+ /**
67
+ * Recursively walks through a directory and yields information about each file
68
+ * and directory encountered.
69
+ *
70
+ * The root path determines whether the file paths are relative or absolute.
71
+ * The root directory is included in the yielded entries.
72
+ *
73
+ * Requires `--allow-read` permission.
74
+ *
75
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
76
+ * for more information on Deno's permissions system.
77
+ *
78
+ * @param root The root directory to start the walk from, as a string or URL.
79
+ * @param options The options for the walk.
80
+ * @throws {Deno.errors.NotFound} If the root directory does not exist.
81
+ *
82
+ * @returns An async iterable iterator that yields the walk entry objects.
83
+ *
84
+ * @example Basic usage
85
+ *
86
+ * File structure:
87
+ * ```
88
+ * folder
89
+ * ├── script.ts
90
+ * └── foo.ts
91
+ * ```
92
+ *
93
+ * ```ts ignore
94
+ * import { walk } from "@std/fs/walk";
95
+ *
96
+ * await Array.fromAsync(walk("."));
97
+ * // [
98
+ * // {
99
+ * // path: ".",
100
+ * // name: ".",
101
+ * // isFile: false,
102
+ * // isDirectory: true,
103
+ * // isSymlink: false
104
+ * // },
105
+ * // {
106
+ * // path: "script.ts",
107
+ * // name: "script.ts",
108
+ * // isFile: true,
109
+ * // isDirectory: false,
110
+ * // isSymlink: false
111
+ * // },
112
+ * // {
113
+ * // path: "foo.ts",
114
+ * // name: "foo.ts",
115
+ * // isFile: true,
116
+ * // isDirectory: false,
117
+ * // isSymlink: false
118
+ * // },
119
+ * // ]
120
+ * ```
121
+ *
122
+ * @example Maximum file depth
123
+ *
124
+ * Setting the `maxDepth` option to `1` will only include the root directory and
125
+ * its immediate children.
126
+ *
127
+ * File structure:
128
+ * ```
129
+ * folder
130
+ * ├── script.ts
131
+ * └── foo
132
+ * └── bar.ts
133
+ * ```
134
+ *
135
+ * ```ts ignore
136
+ * import { walk } from "@std/fs/walk";
137
+ *
138
+ * await Array.fromAsync(walk(".", { maxDepth: 1 }));
139
+ * // [
140
+ * // {
141
+ * // path: ".",
142
+ * // name: ".",
143
+ * // isFile: false,
144
+ * // isDirectory: true,
145
+ * // isSymlink: false
146
+ * // },
147
+ * // {
148
+ * // path: "script.ts",
149
+ * // name: "script.ts",
150
+ * // isFile: true,
151
+ * // isDirectory: false,
152
+ * // isSymlink: false
153
+ * // },
154
+ * // {
155
+ * // path: "foo",
156
+ * // name: "foo",
157
+ * // isFile: false,
158
+ * // isDirectory: true,
159
+ * // isSymlink: false
160
+ * // },
161
+ * // ]
162
+ * ```
163
+ *
164
+ * @example Exclude files
165
+ *
166
+ * Setting the `includeFiles` option to `false` will exclude files.
167
+ *
168
+ * File structure:
169
+ * ```
170
+ * folder
171
+ * ├── script.ts
172
+ * └── foo
173
+ * ```
174
+ *
175
+ * ```ts ignore
176
+ * import { walk } from "@std/fs/walk";
177
+ *
178
+ * await Array.fromAsync(walk(".", { includeFiles: false }));
179
+ * // [
180
+ * // {
181
+ * // path: ".",
182
+ * // name: ".",
183
+ * // isFile: false,
184
+ * // isDirectory: true,
185
+ * // isSymlink: false
186
+ * // },
187
+ * // {
188
+ * // path: "foo",
189
+ * // name: "foo",
190
+ * // isFile: false,
191
+ * // isDirectory: true,
192
+ * // isSymlink: false,
193
+ * // },
194
+ * // ]
195
+ * ```
196
+ *
197
+ * @example Exclude directories
198
+ *
199
+ * Setting the `includeDirs` option to `false` will exclude directories.
200
+ *
201
+ * File structure:
202
+ * ```
203
+ * folder
204
+ * ├── script.ts
205
+ * └── foo
206
+ * ```
207
+ *
208
+ * ```ts ignore
209
+ * import { walk } from "@std/fs/walk";
210
+ *
211
+ * await Array.fromAsync(walk(".", { includeDirs: false }));
212
+ * // [
213
+ * // {
214
+ * // path: "script.ts",
215
+ * // name: "script.ts",
216
+ * // isFile: true,
217
+ * // isDirectory: false,
218
+ * // isSymlink: false
219
+ * // },
220
+ * // ]
221
+ * ```
222
+ *
223
+ * @example Exclude symbolic links
224
+ *
225
+ * Setting the `includeSymlinks` option to `false` will exclude symbolic links.
226
+ *
227
+ * File structure:
228
+ * ```
229
+ * folder
230
+ * ├── script.ts
231
+ * ├── foo
232
+ * └── link -> script.ts (symbolic link)
233
+ * ```
234
+ *
235
+ * ```ts ignore
236
+ * import { walk } from "@std/fs/walk";
237
+ *
238
+ * await Array.fromAsync(walk(".", { includeSymlinks: false }));
239
+ * // [
240
+ * // {
241
+ * // path: ".",
242
+ * // name: ".",
243
+ * // isFile: false,
244
+ * // isDirectory: true,
245
+ * // isSymlink: false
246
+ * // },
247
+ * // {
248
+ * // path: "script.ts",
249
+ * // name: "script.ts",
250
+ * // isFile: true,
251
+ * // isDirectory: false,
252
+ * // isSymlink: false
253
+ * // },
254
+ * // ]
255
+ * ```
256
+ *
257
+ * @example Follow symbolic links
258
+ *
259
+ * Setting the `followSymlinks` option to `true` will follow symbolic links,
260
+ * affecting the `path` property of the walk entry.
261
+ *
262
+ * File structure:
263
+ * ```
264
+ * folder
265
+ * ├── script.ts
266
+ * └── link -> script.ts (symbolic link)
267
+ * ```
268
+ *
269
+ * ```ts ignore
270
+ * import { walk } from "@std/fs/walk";
271
+ *
272
+ * await Array.fromAsync(walk(".", { followSymlinks: true }));
273
+ * // [
274
+ * // {
275
+ * // path: ".",
276
+ * // name: ".",
277
+ * // isFile: false,
278
+ * // isDirectory: true,
279
+ * // isSymlink: false
280
+ * // },
281
+ * // {
282
+ * // path: "script.ts",
283
+ * // name: "script.ts",
284
+ * // isFile: true,
285
+ * // isDirectory: false,
286
+ * // isSymlink: false
287
+ * // },
288
+ * // {
289
+ * // path: "script.ts",
290
+ * // name: "link",
291
+ * // isFile: true,
292
+ * // isDirectory: false,
293
+ * // isSymlink: true
294
+ * // },
295
+ * // ]
296
+ * ```
297
+ *
298
+ * @example Canonicalize symbolic links
299
+ *
300
+ * Setting the `canonicalize` option to `false` will canonicalize the path of
301
+ * the followed symbolic link. Meaning, the `path` property of the walk entry
302
+ * will be the path of the symbolic link itself.
303
+ *
304
+ * File structure:
305
+ * ```
306
+ * folder
307
+ * ├── script.ts
308
+ * └── link -> script.ts (symbolic link)
309
+ * ```
310
+ *
311
+ * ```ts ignore
312
+ * import { walk } from "@std/fs/walk";
313
+ *
314
+ * await Array.fromAsync(walk(".", { followSymlinks: true, canonicalize: true }));
315
+ * // [
316
+ * // {
317
+ * // path: ".",
318
+ * // name: ".",
319
+ * // isFile: false,
320
+ * // isDirectory: true,
321
+ * // isSymlink: false
322
+ * // },
323
+ * // {
324
+ * // path: "script.ts",
325
+ * // name: "script.ts",
326
+ * // isFile: true,
327
+ * // isDirectory: false,
328
+ * // isSymlink: false
329
+ * // },
330
+ * // {
331
+ * // path: "link",
332
+ * // name: "link",
333
+ * // isFile: true,
334
+ * // isDirectory: false,
335
+ * // isSymlink: true
336
+ * // },
337
+ * // ]
338
+ * ```
339
+ *
340
+ * @example Filter by file extensions
341
+ *
342
+ * Setting the `exts` option to `[".ts"]` or `["ts"]` will only include entries
343
+ * with the `.ts` file extension.
344
+ *
345
+ * File structure:
346
+ * ```
347
+ * folder
348
+ * ├── script.ts
349
+ * └── foo.js
350
+ * ```
351
+ *
352
+ * ```ts ignore
353
+ * import { walk } from "@std/fs/walk";
354
+ *
355
+ * await Array.fromAsync(walk(".", { exts: [".ts"] }));
356
+ * // [
357
+ * // {
358
+ * // path: "script.ts",
359
+ * // name: "script.ts",
360
+ * // isFile: true,
361
+ * // isDirectory: false,
362
+ * // isSymlink: false
363
+ * // },
364
+ * // ]
365
+ * ```
366
+ *
367
+ * @example Filter by regular expressions
368
+ *
369
+ * Setting the `match` option to `[/s/]` will only include entries with the
370
+ * letter `s` in their name.
371
+ *
372
+ * File structure:
373
+ * ```
374
+ * folder
375
+ * ├── script.ts
376
+ * └── README.md
377
+ * ```
378
+ *
379
+ * ```ts ignore
380
+ * import { walk } from "@std/fs/walk";
381
+ *
382
+ * await Array.fromAsync(walk(".", { match: [/s/] }));
383
+ * // [
384
+ * // {
385
+ * // path: "script.ts",
386
+ * // name: "script.ts",
387
+ * // isFile: true,
388
+ * // isDirectory: false,
389
+ * // isSymlink: false
390
+ * // },
391
+ * // ]
392
+ * ```
393
+ *
394
+ * @example Exclude by regular expressions
395
+ *
396
+ * Setting the `skip` option to `[/s/]` will exclude entries with the letter
397
+ * `s` in their name.
398
+ *
399
+ * File structure:
400
+ * ```
401
+ * folder
402
+ * ├── script.ts
403
+ * └── README.md
404
+ * ```
405
+ *
406
+ * ```ts ignore
407
+ * import { walk } from "@std/fs/walk";
408
+ *
409
+ * await Array.fromAsync(walk(".", { skip: [/s/] }));
410
+ * // [
411
+ * // {
412
+ * // path: "README.md",
413
+ * // name: "README.md",
414
+ * // isFile: true,
415
+ * // isDirectory: false,
416
+ * // isSymlink: false
417
+ * // },
418
+ * // ]
419
+ * ```
420
+ */
421
+ export declare function walk(root: string | URL, options?: WalkOptions): AsyncIterableIterator<WalkEntry>;
422
+ /**
423
+ * Recursively walks through a directory and yields information about each file
424
+ * and directory encountered.
425
+ *
426
+ * The root path determines whether the file paths is relative or absolute.
427
+ * The root directory is included in the yielded entries.
428
+ *
429
+ * Requires `--allow-read` permission.
430
+ *
431
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
432
+ * for more information on Deno's permissions system.
433
+ *
434
+ * @param root The root directory to start the walk from, as a string or URL.
435
+ * @param options The options for the walk.
436
+ *
437
+ * @returns A synchronous iterable iterator that yields the walk entry objects.
438
+ *
439
+ * @example Basic usage
440
+ *
441
+ * File structure:
442
+ * ```
443
+ * folder
444
+ * ├── script.ts
445
+ * └── foo.ts
446
+ * ```
447
+ *
448
+ * ```ts ignore
449
+ * import { walkSync } from "@std/fs/walk";
450
+ *
451
+ * Array.from(walkSync("."));
452
+ * // [
453
+ * // {
454
+ * // path: ".",
455
+ * // name: ".",
456
+ * // isFile: false,
457
+ * // isDirectory: true,
458
+ * // isSymlink: false
459
+ * // },
460
+ * // {
461
+ * // path: "script.ts",
462
+ * // name: "script.ts",
463
+ * // isFile: true,
464
+ * // isDirectory: false,
465
+ * // isSymlink: false
466
+ * // },
467
+ * // {
468
+ * // path: "foo.ts",
469
+ * // name: "foo.ts",
470
+ * // isFile: true,
471
+ * // isDirectory: false,
472
+ * // isSymlink: false
473
+ * // },
474
+ * // ]
475
+ * ```
476
+ *
477
+ * @example Maximum file depth
478
+ *
479
+ * Setting the `maxDepth` option to `1` will only include the root directory and
480
+ * its immediate children.
481
+ *
482
+ * File structure:
483
+ * ```
484
+ * folder
485
+ * ├── script.ts
486
+ * └── foo
487
+ * └── bar.ts
488
+ * ```
489
+ *
490
+ * ```ts ignore
491
+ * import { walkSync } from "@std/fs/walk";
492
+ *
493
+ * Array.from(walkSync(".", { maxDepth: 1 }));
494
+ * // [
495
+ * // {
496
+ * // path: ".",
497
+ * // name: ".",
498
+ * // isFile: false,
499
+ * // isDirectory: true,
500
+ * // isSymlink: false
501
+ * // },
502
+ * // {
503
+ * // path: "script.ts",
504
+ * // name: "script.ts",
505
+ * // isFile: true,
506
+ * // isDirectory: false,
507
+ * // isSymlink: false
508
+ * // },
509
+ * // {
510
+ * // path: "foo",
511
+ * // name: "foo",
512
+ * // isFile: false,
513
+ * // isDirectory: true,
514
+ * // isSymlink: false
515
+ * // },
516
+ * // ]
517
+ * ```
518
+ *
519
+ * @example Exclude files
520
+ *
521
+ * Setting the `includeFiles` option to `false` will exclude files.
522
+ *
523
+ * File structure:
524
+ * ```
525
+ * folder
526
+ * ├── script.ts
527
+ * └── foo
528
+ * ```
529
+ *
530
+ * ```ts ignore
531
+ * import { walkSync } from "@std/fs/walk";
532
+ *
533
+ * Array.from(walkSync(".", { includeFiles: false }));
534
+ * // [
535
+ * // {
536
+ * // path: ".",
537
+ * // name: ".",
538
+ * // isFile: false,
539
+ * // isDirectory: true,
540
+ * // isSymlink: false
541
+ * // },
542
+ * // {
543
+ * // path: "foo",
544
+ * // name: "foo",
545
+ * // isFile: false,
546
+ * // isDirectory: true,
547
+ * // isSymlink: false,
548
+ * // },
549
+ * // ]
550
+ * ```
551
+ *
552
+ * @example Exclude directories
553
+ *
554
+ * Setting the `includeDirs` option to `false` will exclude directories.
555
+ *
556
+ * File structure:
557
+ * ```
558
+ * folder
559
+ * ├── script.ts
560
+ * └── foo
561
+ * ```
562
+ *
563
+ * ```ts ignore
564
+ * import { walkSync } from "@std/fs/walk";
565
+ *
566
+ * Array.from(walkSync(".", { includeDirs: false }));
567
+ * // [
568
+ * // {
569
+ * // path: "script.ts",
570
+ * // name: "script.ts",
571
+ * // isFile: true,
572
+ * // isDirectory: false,
573
+ * // isSymlink: false
574
+ * // },
575
+ * // ]
576
+ * ```
577
+ *
578
+ * @example Exclude symbolic links
579
+ *
580
+ * Setting the `includeSymlinks` option to `false` will exclude symbolic links.
581
+ *
582
+ * File structure:
583
+ * ```
584
+ * folder
585
+ * ├── script.ts
586
+ * ├── foo
587
+ * └── link -> script.ts (symbolic link)
588
+ * ```
589
+ *
590
+ * ```ts ignore
591
+ * import { walkSync } from "@std/fs/walk";
592
+ *
593
+ * Array.from(walkSync(".", { includeSymlinks: false }));
594
+ * // [
595
+ * // {
596
+ * // path: ".",
597
+ * // name: ".",
598
+ * // isFile: false,
599
+ * // isDirectory: true,
600
+ * // isSymlink: false
601
+ * // },
602
+ * // {
603
+ * // path: "script.ts",
604
+ * // name: "script.ts",
605
+ * // isFile: true,
606
+ * // isDirectory: false,
607
+ * // isSymlink: false
608
+ * // },
609
+ * // ]
610
+ * ```
611
+ *
612
+ * @example Follow symbolic links
613
+ *
614
+ * Setting the `followSymlinks` option to `true` will follow symbolic links,
615
+ * affecting the `path` property of the walk entry.
616
+ *
617
+ * File structure:
618
+ * ```
619
+ * folder
620
+ * ├── script.ts
621
+ * └── link -> script.ts (symbolic link)
622
+ * ```
623
+ *
624
+ * ```ts ignore
625
+ * import { walkSync } from "@std/fs/walk";
626
+ *
627
+ * Array.from(walkSync(".", { followSymlinks: true }));
628
+ * // [
629
+ * // {
630
+ * // path: ".",
631
+ * // name: ".",
632
+ * // isFile: false,
633
+ * // isDirectory: true,
634
+ * // isSymlink: false
635
+ * // },
636
+ * // {
637
+ * // path: "script.ts",
638
+ * // name: "script.ts",
639
+ * // isFile: true,
640
+ * // isDirectory: false,
641
+ * // isSymlink: false
642
+ * // },
643
+ * // {
644
+ * // path: "script.ts",
645
+ * // name: "link",
646
+ * // isFile: true,
647
+ * // isDirectory: false,
648
+ * // isSymlink: true
649
+ * // },
650
+ * // ]
651
+ * ```
652
+ *
653
+ * @example Canonicalize symbolic links
654
+ *
655
+ * Setting the `canonicalize` option to `false` will canonicalize the path of
656
+ * the followed symbolic link. Meaning, the `path` property of the walk entry
657
+ * will be the path of the symbolic link itself.
658
+ *
659
+ * File structure:
660
+ * ```
661
+ * folder
662
+ * ├── script.ts
663
+ * └── link -> script.ts (symbolic link)
664
+ * ```
665
+ *
666
+ * ```ts ignore
667
+ * import { walkSync } from "@std/fs/walk";
668
+ *
669
+ * Array.from(walkSync(".", { followSymlinks: true, canonicalize: true }));
670
+ * // [
671
+ * // {
672
+ * // path: ".",
673
+ * // name: ".",
674
+ * // isFile: false,
675
+ * // isDirectory: true,
676
+ * // isSymlink: false
677
+ * // },
678
+ * // {
679
+ * // path: "script.ts",
680
+ * // name: "script.ts",
681
+ * // isFile: true,
682
+ * // isDirectory: false,
683
+ * // isSymlink: false
684
+ * // },
685
+ * // {
686
+ * // path: "link",
687
+ * // name: "link",
688
+ * // isFile: true,
689
+ * // isDirectory: false,
690
+ * // isSymlink: true
691
+ * // },
692
+ * // ]
693
+ * ```
694
+ *
695
+ * @example Filter by file extensions
696
+ *
697
+ * Setting the `exts` option to `[".ts"]` or `["ts"]` will only include entries
698
+ * with the `.ts` file extension.
699
+ *
700
+ * File structure:
701
+ * ```
702
+ * folder
703
+ * ├── script.ts
704
+ * └── foo.js
705
+ * ```
706
+ *
707
+ * ```ts ignore
708
+ * import { walkSync } from "@std/fs/walk";
709
+ *
710
+ * Array.from(walkSync(".", { exts: [".ts"] }));
711
+ * // [
712
+ * // {
713
+ * // path: "script.ts",
714
+ * // name: "script.ts",
715
+ * // isFile: true,
716
+ * // isDirectory: false,
717
+ * // isSymlink: false
718
+ * // },
719
+ * // ]
720
+ * ```
721
+ *
722
+ * @example Filter by regular expressions
723
+ *
724
+ * Setting the `match` option to `[/s/]` will only include entries with the
725
+ * letter `s` in their name.
726
+ *
727
+ * File structure:
728
+ * ```
729
+ * folder
730
+ * ├── script.ts
731
+ * └── README.md
732
+ * ```
733
+ *
734
+ * ```ts ignore
735
+ * import { walkSync } from "@std/fs/walk";
736
+ *
737
+ * Array.from(walkSync(".", { match: [/s/] }));
738
+ * // [
739
+ * // {
740
+ * // path: "script.ts",
741
+ * // name: "script.ts",
742
+ * // isFile: true,
743
+ * // isDirectory: false,
744
+ * // isSymlink: false
745
+ * // },
746
+ * // ]
747
+ * ```
748
+ *
749
+ * @example Exclude by regular expressions
750
+ *
751
+ * Setting the `skip` option to `[/s/]` will exclude entries with the letter
752
+ * `s` in their name.
753
+ *
754
+ * File structure:
755
+ * ```
756
+ * folder
757
+ * ├── script.ts
758
+ * └── README.md
759
+ * ```
760
+ *
761
+ * ```ts ignore
762
+ * import { walkSync } from "@std/fs/walk";
763
+ *
764
+ * Array.from(walkSync(".", { skip: [/s/] }));
765
+ * // [
766
+ * // {
767
+ * // path: "README.md",
768
+ * // name: "README.md",
769
+ * // isFile: true,
770
+ * // isDirectory: false,
771
+ * // isSymlink: false
772
+ * // },
773
+ * // ]
774
+ * ```
775
+ */
776
+ export declare function walkSync(root: string | URL, options?: WalkOptions): IterableIterator<WalkEntry>;
777
+ //# sourceMappingURL=walk.d.ts.map