ima2-gen 1.1.13 → 1.1.16

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 (807) hide show
  1. package/README.md +31 -7
  2. package/bin/commands/capabilities.js +5 -0
  3. package/bin/commands/capabilities.ts +5 -0
  4. package/bin/commands/doctor.js +195 -0
  5. package/bin/commands/doctor.ts +202 -0
  6. package/bin/commands/edit.js +6 -6
  7. package/bin/commands/edit.ts +6 -6
  8. package/bin/commands/gen.js +6 -6
  9. package/bin/commands/gen.ts +6 -6
  10. package/bin/commands/grok.js +61 -0
  11. package/bin/commands/grok.ts +67 -0
  12. package/bin/commands/multimode.js +3 -3
  13. package/bin/commands/multimode.ts +3 -3
  14. package/bin/commands/node.js +4 -4
  15. package/bin/commands/node.ts +4 -4
  16. package/bin/ima2.js +5 -105
  17. package/bin/ima2.ts +5 -109
  18. package/config.js +17 -0
  19. package/config.ts +21 -0
  20. package/docs/API.md +77 -8
  21. package/docs/CLI.md +65 -3
  22. package/docs/FAQ.ko.md +82 -2
  23. package/docs/FAQ.md +85 -2
  24. package/docs/PROMPT_STUDIO.ko.md +111 -0
  25. package/docs/PROMPT_STUDIO.md +115 -0
  26. package/docs/README.ko.md +27 -7
  27. package/docs/grok-video-i2v-plan.md +419 -0
  28. package/docs/grok-video-i2v-research.md +204 -0
  29. package/docs/migration/runtime-test-inventory.md +12 -1
  30. package/lib/agentRuntime.js +88 -19
  31. package/lib/agentRuntime.ts +97 -29
  32. package/lib/agentSettings.js +1 -1
  33. package/lib/agentSettings.ts +1 -1
  34. package/lib/agentTypes.ts +1 -1
  35. package/lib/capabilities.js +10 -2
  36. package/lib/capabilities.ts +10 -2
  37. package/lib/configKeys.js +6 -0
  38. package/lib/configKeys.ts +6 -1
  39. package/lib/errorClassify.js +1 -1
  40. package/lib/errorClassify.ts +1 -1
  41. package/lib/generationErrors.js +121 -23
  42. package/lib/generationErrors.ts +100 -13
  43. package/lib/grokImageAdapter.js +364 -0
  44. package/lib/grokImageAdapter.ts +483 -0
  45. package/lib/grokMultimodeAdapter.js +54 -0
  46. package/lib/grokMultimodeAdapter.ts +84 -0
  47. package/lib/grokProxyLauncher.js +105 -0
  48. package/lib/grokProxyLauncher.ts +129 -0
  49. package/lib/grokRuntime.js +18 -0
  50. package/lib/grokRuntime.ts +23 -0
  51. package/lib/grokSizeMapper.js +63 -0
  52. package/lib/grokSizeMapper.ts +71 -0
  53. package/lib/grokVideoAdapter.js +374 -0
  54. package/lib/grokVideoAdapter.ts +438 -0
  55. package/lib/historyList.js +5 -1
  56. package/lib/historyList.ts +5 -1
  57. package/lib/imageMetadata.js +2 -0
  58. package/lib/imageMetadata.ts +2 -0
  59. package/lib/imageModels.js +101 -0
  60. package/lib/imageModels.ts +111 -0
  61. package/lib/providerOptions.js +15 -1
  62. package/lib/providerOptions.ts +15 -1
  63. package/lib/responsesDoctor.js +386 -0
  64. package/lib/responsesDoctor.ts +456 -0
  65. package/lib/responsesErrors.js +57 -0
  66. package/lib/responsesErrors.ts +83 -0
  67. package/lib/responsesFallback.js +72 -0
  68. package/lib/responsesFallback.ts +114 -0
  69. package/lib/responsesImageAdapter.js +121 -174
  70. package/lib/responsesImageAdapter.ts +136 -211
  71. package/lib/responsesParse.js +324 -0
  72. package/lib/responsesParse.ts +452 -0
  73. package/lib/responsesTools.js +15 -0
  74. package/lib/responsesTools.ts +28 -0
  75. package/lib/runtimeContext.js +12 -0
  76. package/lib/runtimeContext.ts +15 -0
  77. package/node_modules/array-flatten/LICENSE +21 -0
  78. package/node_modules/array-flatten/README.md +43 -0
  79. package/node_modules/array-flatten/array-flatten.js +64 -0
  80. package/node_modules/array-flatten/package.json +39 -0
  81. package/node_modules/bundle-name/index.js +5 -0
  82. package/node_modules/bundle-name/license +9 -0
  83. package/node_modules/bundle-name/package.json +45 -0
  84. package/node_modules/bundle-name/readme.md +23 -0
  85. package/node_modules/bytes/History.md +97 -0
  86. package/node_modules/bytes/LICENSE +23 -0
  87. package/node_modules/bytes/Readme.md +152 -0
  88. package/node_modules/bytes/index.js +170 -0
  89. package/node_modules/bytes/package.json +42 -0
  90. package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  91. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  92. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  93. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  94. package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  95. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  96. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  97. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  98. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  99. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  100. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  101. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  102. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  103. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  104. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  105. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  106. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  107. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  108. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  109. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  110. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  111. package/node_modules/call-bound/.eslintrc +13 -0
  112. package/node_modules/call-bound/.github/FUNDING.yml +12 -0
  113. package/node_modules/call-bound/.nycrc +9 -0
  114. package/node_modules/call-bound/CHANGELOG.md +42 -0
  115. package/node_modules/call-bound/LICENSE +21 -0
  116. package/node_modules/call-bound/README.md +53 -0
  117. package/node_modules/call-bound/index.d.ts +94 -0
  118. package/node_modules/call-bound/index.js +19 -0
  119. package/node_modules/call-bound/package.json +99 -0
  120. package/node_modules/call-bound/test/index.js +61 -0
  121. package/node_modules/call-bound/tsconfig.json +10 -0
  122. package/node_modules/commander/LICENSE +22 -0
  123. package/node_modules/commander/Readme.md +1149 -0
  124. package/node_modules/commander/esm.mjs +16 -0
  125. package/node_modules/commander/index.js +24 -0
  126. package/node_modules/commander/lib/argument.js +149 -0
  127. package/node_modules/commander/lib/command.js +2662 -0
  128. package/node_modules/commander/lib/error.js +39 -0
  129. package/node_modules/commander/lib/help.js +709 -0
  130. package/node_modules/commander/lib/option.js +367 -0
  131. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  132. package/node_modules/commander/package-support.json +16 -0
  133. package/node_modules/commander/package.json +82 -0
  134. package/node_modules/commander/typings/esm.d.mts +3 -0
  135. package/node_modules/commander/typings/index.d.ts +1045 -0
  136. package/node_modules/content-type/HISTORY.md +29 -0
  137. package/node_modules/content-type/LICENSE +22 -0
  138. package/node_modules/content-type/README.md +94 -0
  139. package/node_modules/content-type/index.js +225 -0
  140. package/node_modules/content-type/package.json +42 -0
  141. package/node_modules/cookie/LICENSE +24 -0
  142. package/node_modules/cookie/README.md +317 -0
  143. package/node_modules/cookie/SECURITY.md +25 -0
  144. package/node_modules/cookie/index.js +335 -0
  145. package/node_modules/cookie/package.json +44 -0
  146. package/node_modules/default-browser/index.d.ts +29 -0
  147. package/node_modules/default-browser/index.js +34 -0
  148. package/node_modules/default-browser/license +9 -0
  149. package/node_modules/default-browser/package.json +54 -0
  150. package/node_modules/default-browser/readme.md +24 -0
  151. package/node_modules/default-browser/windows.js +57 -0
  152. package/node_modules/default-browser-id/index.js +25 -0
  153. package/node_modules/default-browser-id/license +9 -0
  154. package/node_modules/default-browser-id/package.json +41 -0
  155. package/node_modules/default-browser-id/readme.md +19 -0
  156. package/node_modules/define-lazy-prop/index.d.ts +31 -0
  157. package/node_modules/define-lazy-prop/index.js +18 -0
  158. package/node_modules/define-lazy-prop/license +9 -0
  159. package/node_modules/define-lazy-prop/package.json +51 -0
  160. package/node_modules/define-lazy-prop/readme.md +55 -0
  161. package/node_modules/depd/History.md +103 -0
  162. package/node_modules/depd/LICENSE +22 -0
  163. package/node_modules/depd/Readme.md +280 -0
  164. package/node_modules/depd/index.js +538 -0
  165. package/node_modules/depd/lib/browser/index.js +77 -0
  166. package/node_modules/depd/package.json +45 -0
  167. package/node_modules/destroy/LICENSE +23 -0
  168. package/node_modules/destroy/README.md +63 -0
  169. package/node_modules/destroy/index.js +209 -0
  170. package/node_modules/destroy/package.json +48 -0
  171. package/node_modules/dunder-proto/.eslintrc +5 -0
  172. package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  173. package/node_modules/dunder-proto/.nycrc +13 -0
  174. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  175. package/node_modules/dunder-proto/LICENSE +21 -0
  176. package/node_modules/dunder-proto/README.md +54 -0
  177. package/node_modules/dunder-proto/get.d.ts +5 -0
  178. package/node_modules/dunder-proto/get.js +30 -0
  179. package/node_modules/dunder-proto/package.json +76 -0
  180. package/node_modules/dunder-proto/set.d.ts +5 -0
  181. package/node_modules/dunder-proto/set.js +35 -0
  182. package/node_modules/dunder-proto/test/get.js +34 -0
  183. package/node_modules/dunder-proto/test/index.js +4 -0
  184. package/node_modules/dunder-proto/test/set.js +50 -0
  185. package/node_modules/dunder-proto/tsconfig.json +9 -0
  186. package/node_modules/ee-first/LICENSE +22 -0
  187. package/node_modules/ee-first/README.md +80 -0
  188. package/node_modules/ee-first/index.js +95 -0
  189. package/node_modules/ee-first/package.json +29 -0
  190. package/node_modules/encodeurl/LICENSE +22 -0
  191. package/node_modules/encodeurl/README.md +109 -0
  192. package/node_modules/encodeurl/index.js +60 -0
  193. package/node_modules/encodeurl/package.json +40 -0
  194. package/node_modules/es-define-property/.eslintrc +13 -0
  195. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  196. package/node_modules/es-define-property/.nycrc +9 -0
  197. package/node_modules/es-define-property/CHANGELOG.md +29 -0
  198. package/node_modules/es-define-property/LICENSE +21 -0
  199. package/node_modules/es-define-property/README.md +49 -0
  200. package/node_modules/es-define-property/index.d.ts +3 -0
  201. package/node_modules/es-define-property/index.js +14 -0
  202. package/node_modules/es-define-property/package.json +81 -0
  203. package/node_modules/es-define-property/test/index.js +56 -0
  204. package/node_modules/es-define-property/tsconfig.json +10 -0
  205. package/node_modules/es-errors/.eslintrc +5 -0
  206. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  207. package/node_modules/es-errors/CHANGELOG.md +40 -0
  208. package/node_modules/es-errors/LICENSE +21 -0
  209. package/node_modules/es-errors/README.md +55 -0
  210. package/node_modules/es-errors/eval.d.ts +3 -0
  211. package/node_modules/es-errors/eval.js +4 -0
  212. package/node_modules/es-errors/index.d.ts +3 -0
  213. package/node_modules/es-errors/index.js +4 -0
  214. package/node_modules/es-errors/package.json +80 -0
  215. package/node_modules/es-errors/range.d.ts +3 -0
  216. package/node_modules/es-errors/range.js +4 -0
  217. package/node_modules/es-errors/ref.d.ts +3 -0
  218. package/node_modules/es-errors/ref.js +4 -0
  219. package/node_modules/es-errors/syntax.d.ts +3 -0
  220. package/node_modules/es-errors/syntax.js +4 -0
  221. package/node_modules/es-errors/test/index.js +19 -0
  222. package/node_modules/es-errors/tsconfig.json +49 -0
  223. package/node_modules/es-errors/type.d.ts +3 -0
  224. package/node_modules/es-errors/type.js +4 -0
  225. package/node_modules/es-errors/uri.d.ts +3 -0
  226. package/node_modules/es-errors/uri.js +4 -0
  227. package/node_modules/es-object-atoms/.eslintrc +16 -0
  228. package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  229. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  230. package/node_modules/es-object-atoms/LICENSE +21 -0
  231. package/node_modules/es-object-atoms/README.md +63 -0
  232. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  233. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  234. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  235. package/node_modules/es-object-atoms/ToObject.js +10 -0
  236. package/node_modules/es-object-atoms/index.d.ts +3 -0
  237. package/node_modules/es-object-atoms/index.js +4 -0
  238. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  239. package/node_modules/es-object-atoms/isObject.js +6 -0
  240. package/node_modules/es-object-atoms/package.json +80 -0
  241. package/node_modules/es-object-atoms/test/index.js +38 -0
  242. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  243. package/node_modules/escape-html/LICENSE +24 -0
  244. package/node_modules/escape-html/Readme.md +43 -0
  245. package/node_modules/escape-html/index.js +78 -0
  246. package/node_modules/escape-html/package.json +24 -0
  247. package/node_modules/etag/HISTORY.md +83 -0
  248. package/node_modules/etag/LICENSE +22 -0
  249. package/node_modules/etag/README.md +159 -0
  250. package/node_modules/etag/index.js +131 -0
  251. package/node_modules/etag/package.json +47 -0
  252. package/node_modules/forwarded/HISTORY.md +21 -0
  253. package/node_modules/forwarded/LICENSE +22 -0
  254. package/node_modules/forwarded/README.md +57 -0
  255. package/node_modules/forwarded/index.js +90 -0
  256. package/node_modules/forwarded/package.json +45 -0
  257. package/node_modules/function-bind/.eslintrc +21 -0
  258. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  259. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  260. package/node_modules/function-bind/.nycrc +13 -0
  261. package/node_modules/function-bind/CHANGELOG.md +136 -0
  262. package/node_modules/function-bind/LICENSE +20 -0
  263. package/node_modules/function-bind/README.md +46 -0
  264. package/node_modules/function-bind/implementation.js +84 -0
  265. package/node_modules/function-bind/index.js +5 -0
  266. package/node_modules/function-bind/package.json +87 -0
  267. package/node_modules/function-bind/test/.eslintrc +9 -0
  268. package/node_modules/function-bind/test/index.js +252 -0
  269. package/node_modules/get-intrinsic/.eslintrc +42 -0
  270. package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  271. package/node_modules/get-intrinsic/.nycrc +9 -0
  272. package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
  273. package/node_modules/get-intrinsic/LICENSE +21 -0
  274. package/node_modules/get-intrinsic/README.md +71 -0
  275. package/node_modules/get-intrinsic/index.js +378 -0
  276. package/node_modules/get-intrinsic/package.json +97 -0
  277. package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  278. package/node_modules/get-proto/.eslintrc +10 -0
  279. package/node_modules/get-proto/.github/FUNDING.yml +12 -0
  280. package/node_modules/get-proto/.nycrc +9 -0
  281. package/node_modules/get-proto/CHANGELOG.md +21 -0
  282. package/node_modules/get-proto/LICENSE +21 -0
  283. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  284. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  285. package/node_modules/get-proto/README.md +50 -0
  286. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  287. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  288. package/node_modules/get-proto/index.d.ts +5 -0
  289. package/node_modules/get-proto/index.js +27 -0
  290. package/node_modules/get-proto/package.json +81 -0
  291. package/node_modules/get-proto/test/index.js +68 -0
  292. package/node_modules/get-proto/tsconfig.json +9 -0
  293. package/node_modules/gopd/.eslintrc +16 -0
  294. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  295. package/node_modules/gopd/CHANGELOG.md +45 -0
  296. package/node_modules/gopd/LICENSE +21 -0
  297. package/node_modules/gopd/README.md +40 -0
  298. package/node_modules/gopd/gOPD.d.ts +1 -0
  299. package/node_modules/gopd/gOPD.js +4 -0
  300. package/node_modules/gopd/index.d.ts +5 -0
  301. package/node_modules/gopd/index.js +15 -0
  302. package/node_modules/gopd/package.json +77 -0
  303. package/node_modules/gopd/test/index.js +36 -0
  304. package/node_modules/gopd/tsconfig.json +9 -0
  305. package/node_modules/has-symbols/.eslintrc +11 -0
  306. package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  307. package/node_modules/has-symbols/.nycrc +9 -0
  308. package/node_modules/has-symbols/CHANGELOG.md +91 -0
  309. package/node_modules/has-symbols/LICENSE +21 -0
  310. package/node_modules/has-symbols/README.md +46 -0
  311. package/node_modules/has-symbols/index.d.ts +3 -0
  312. package/node_modules/has-symbols/index.js +14 -0
  313. package/node_modules/has-symbols/package.json +111 -0
  314. package/node_modules/has-symbols/shams.d.ts +3 -0
  315. package/node_modules/has-symbols/shams.js +45 -0
  316. package/node_modules/has-symbols/test/index.js +22 -0
  317. package/node_modules/has-symbols/test/shams/core-js.js +29 -0
  318. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  319. package/node_modules/has-symbols/test/tests.js +58 -0
  320. package/node_modules/has-symbols/tsconfig.json +10 -0
  321. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  322. package/node_modules/hasown/.nycrc +13 -0
  323. package/node_modules/hasown/CHANGELOG.md +51 -0
  324. package/node_modules/hasown/LICENSE +21 -0
  325. package/node_modules/hasown/README.md +40 -0
  326. package/node_modules/hasown/eslint.config.mjs +6 -0
  327. package/node_modules/hasown/index.d.ts +4 -0
  328. package/node_modules/hasown/index.js +8 -0
  329. package/node_modules/hasown/package.json +92 -0
  330. package/node_modules/hasown/tsconfig.json +6 -0
  331. package/node_modules/http-errors/HISTORY.md +186 -0
  332. package/node_modules/http-errors/LICENSE +23 -0
  333. package/node_modules/http-errors/README.md +169 -0
  334. package/node_modules/http-errors/index.js +290 -0
  335. package/node_modules/http-errors/package.json +54 -0
  336. package/node_modules/inherits/LICENSE +16 -0
  337. package/node_modules/inherits/README.md +42 -0
  338. package/node_modules/inherits/inherits.js +9 -0
  339. package/node_modules/inherits/inherits_browser.js +27 -0
  340. package/node_modules/inherits/package.json +29 -0
  341. package/node_modules/ipaddr.js/LICENSE +19 -0
  342. package/node_modules/ipaddr.js/README.md +233 -0
  343. package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
  344. package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
  345. package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
  346. package/node_modules/ipaddr.js/package.json +35 -0
  347. package/node_modules/is-docker/cli.js +5 -0
  348. package/node_modules/is-docker/index.d.ts +13 -0
  349. package/node_modules/is-docker/index.js +29 -0
  350. package/node_modules/is-docker/license +9 -0
  351. package/node_modules/is-docker/package.json +44 -0
  352. package/node_modules/is-docker/readme.md +27 -0
  353. package/node_modules/is-inside-container/cli.js +5 -0
  354. package/node_modules/is-inside-container/index.d.ts +13 -0
  355. package/node_modules/is-inside-container/index.js +23 -0
  356. package/node_modules/is-inside-container/license +9 -0
  357. package/node_modules/is-inside-container/package.json +51 -0
  358. package/node_modules/is-inside-container/readme.md +36 -0
  359. package/node_modules/is-wsl/index.d.ts +15 -0
  360. package/node_modules/is-wsl/index.js +36 -0
  361. package/node_modules/is-wsl/license +9 -0
  362. package/node_modules/is-wsl/package.json +58 -0
  363. package/node_modules/is-wsl/readme.md +21 -0
  364. package/node_modules/math-intrinsics/.eslintrc +16 -0
  365. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  366. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  367. package/node_modules/math-intrinsics/LICENSE +21 -0
  368. package/node_modules/math-intrinsics/README.md +50 -0
  369. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  370. package/node_modules/math-intrinsics/abs.js +4 -0
  371. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  372. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  373. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  374. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  375. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  376. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  377. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  378. package/node_modules/math-intrinsics/floor.js +4 -0
  379. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  380. package/node_modules/math-intrinsics/isFinite.js +12 -0
  381. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  382. package/node_modules/math-intrinsics/isInteger.js +16 -0
  383. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  384. package/node_modules/math-intrinsics/isNaN.js +6 -0
  385. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  386. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  387. package/node_modules/math-intrinsics/max.d.ts +1 -0
  388. package/node_modules/math-intrinsics/max.js +4 -0
  389. package/node_modules/math-intrinsics/min.d.ts +1 -0
  390. package/node_modules/math-intrinsics/min.js +4 -0
  391. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  392. package/node_modules/math-intrinsics/mod.js +9 -0
  393. package/node_modules/math-intrinsics/package.json +86 -0
  394. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  395. package/node_modules/math-intrinsics/pow.js +4 -0
  396. package/node_modules/math-intrinsics/round.d.ts +1 -0
  397. package/node_modules/math-intrinsics/round.js +4 -0
  398. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  399. package/node_modules/math-intrinsics/sign.js +11 -0
  400. package/node_modules/math-intrinsics/test/index.js +192 -0
  401. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  402. package/node_modules/methods/HISTORY.md +29 -0
  403. package/node_modules/methods/LICENSE +24 -0
  404. package/node_modules/methods/README.md +51 -0
  405. package/node_modules/methods/index.js +69 -0
  406. package/node_modules/methods/package.json +36 -0
  407. package/node_modules/mime/.npmignore +0 -0
  408. package/node_modules/mime/CHANGELOG.md +164 -0
  409. package/node_modules/mime/LICENSE +21 -0
  410. package/node_modules/mime/README.md +90 -0
  411. package/node_modules/mime/cli.js +8 -0
  412. package/node_modules/mime/mime.js +108 -0
  413. package/node_modules/mime/package.json +44 -0
  414. package/node_modules/mime/src/build.js +53 -0
  415. package/node_modules/mime/src/test.js +60 -0
  416. package/node_modules/mime/types.json +1 -0
  417. package/node_modules/ms/index.js +162 -0
  418. package/node_modules/ms/license.md +21 -0
  419. package/node_modules/ms/package.json +38 -0
  420. package/node_modules/ms/readme.md +59 -0
  421. package/node_modules/object-inspect/.eslintrc +53 -0
  422. package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
  423. package/node_modules/object-inspect/.nycrc +13 -0
  424. package/node_modules/object-inspect/CHANGELOG.md +424 -0
  425. package/node_modules/object-inspect/LICENSE +21 -0
  426. package/node_modules/object-inspect/example/all.js +23 -0
  427. package/node_modules/object-inspect/example/circular.js +6 -0
  428. package/node_modules/object-inspect/example/fn.js +5 -0
  429. package/node_modules/object-inspect/example/inspect.js +10 -0
  430. package/node_modules/object-inspect/index.js +544 -0
  431. package/node_modules/object-inspect/package-support.json +20 -0
  432. package/node_modules/object-inspect/package.json +105 -0
  433. package/node_modules/object-inspect/readme.markdown +84 -0
  434. package/node_modules/object-inspect/test/bigint.js +58 -0
  435. package/node_modules/object-inspect/test/browser/dom.js +15 -0
  436. package/node_modules/object-inspect/test/circular.js +16 -0
  437. package/node_modules/object-inspect/test/deep.js +12 -0
  438. package/node_modules/object-inspect/test/element.js +53 -0
  439. package/node_modules/object-inspect/test/err.js +48 -0
  440. package/node_modules/object-inspect/test/fakes.js +29 -0
  441. package/node_modules/object-inspect/test/fn.js +76 -0
  442. package/node_modules/object-inspect/test/global.js +17 -0
  443. package/node_modules/object-inspect/test/has.js +15 -0
  444. package/node_modules/object-inspect/test/holes.js +15 -0
  445. package/node_modules/object-inspect/test/indent-option.js +271 -0
  446. package/node_modules/object-inspect/test/inspect.js +139 -0
  447. package/node_modules/object-inspect/test/lowbyte.js +12 -0
  448. package/node_modules/object-inspect/test/number.js +58 -0
  449. package/node_modules/object-inspect/test/quoteStyle.js +26 -0
  450. package/node_modules/object-inspect/test/toStringTag.js +40 -0
  451. package/node_modules/object-inspect/test/undef.js +12 -0
  452. package/node_modules/object-inspect/test/values.js +261 -0
  453. package/node_modules/object-inspect/test-core-js.js +26 -0
  454. package/node_modules/object-inspect/util.inspect.js +1 -0
  455. package/node_modules/on-finished/HISTORY.md +98 -0
  456. package/node_modules/on-finished/LICENSE +23 -0
  457. package/node_modules/on-finished/README.md +162 -0
  458. package/node_modules/on-finished/index.js +234 -0
  459. package/node_modules/on-finished/package.json +39 -0
  460. package/node_modules/open/index.d.ts +158 -0
  461. package/node_modules/open/index.js +366 -0
  462. package/node_modules/open/license +9 -0
  463. package/node_modules/open/node_modules/wsl-utils/index.d.ts +21 -0
  464. package/node_modules/open/node_modules/wsl-utils/index.js +57 -0
  465. package/node_modules/open/node_modules/wsl-utils/license +9 -0
  466. package/node_modules/open/node_modules/wsl-utils/package.json +46 -0
  467. package/node_modules/open/node_modules/wsl-utils/readme.md +50 -0
  468. package/node_modules/open/package.json +68 -0
  469. package/node_modules/open/readme.md +183 -0
  470. package/node_modules/open/xdg-open +1267 -0
  471. package/node_modules/parseurl/HISTORY.md +58 -0
  472. package/node_modules/parseurl/LICENSE +24 -0
  473. package/node_modules/parseurl/README.md +133 -0
  474. package/node_modules/parseurl/index.js +158 -0
  475. package/node_modules/parseurl/package.json +40 -0
  476. package/node_modules/progrok/LICENSE +21 -0
  477. package/node_modules/progrok/README.md +53 -0
  478. package/node_modules/progrok/THIRD_PARTY_NOTICES.md +13 -0
  479. package/node_modules/progrok/dist/index.js +1142 -0
  480. package/node_modules/progrok/dist/index.js.map +1 -0
  481. package/node_modules/progrok/dist/public/app.js +529 -0
  482. package/node_modules/progrok/dist/public/index.html +47 -0
  483. package/node_modules/progrok/dist/public/style.css +392 -0
  484. package/node_modules/progrok/node_modules/accepts/HISTORY.md +243 -0
  485. package/node_modules/progrok/node_modules/accepts/LICENSE +23 -0
  486. package/node_modules/progrok/node_modules/accepts/README.md +140 -0
  487. package/node_modules/progrok/node_modules/accepts/index.js +238 -0
  488. package/node_modules/progrok/node_modules/accepts/package.json +47 -0
  489. package/node_modules/progrok/node_modules/body-parser/HISTORY.md +686 -0
  490. package/node_modules/progrok/node_modules/body-parser/LICENSE +23 -0
  491. package/node_modules/progrok/node_modules/body-parser/README.md +476 -0
  492. package/node_modules/progrok/node_modules/body-parser/index.js +156 -0
  493. package/node_modules/progrok/node_modules/body-parser/lib/read.js +205 -0
  494. package/node_modules/progrok/node_modules/body-parser/lib/types/json.js +243 -0
  495. package/node_modules/progrok/node_modules/body-parser/lib/types/raw.js +101 -0
  496. package/node_modules/progrok/node_modules/body-parser/lib/types/text.js +121 -0
  497. package/node_modules/progrok/node_modules/body-parser/lib/types/urlencoded.js +299 -0
  498. package/node_modules/progrok/node_modules/body-parser/package.json +55 -0
  499. package/node_modules/progrok/node_modules/content-disposition/HISTORY.md +60 -0
  500. package/node_modules/progrok/node_modules/content-disposition/LICENSE +22 -0
  501. package/node_modules/progrok/node_modules/content-disposition/README.md +142 -0
  502. package/node_modules/progrok/node_modules/content-disposition/index.js +458 -0
  503. package/node_modules/progrok/node_modules/content-disposition/package.json +44 -0
  504. package/node_modules/progrok/node_modules/cookie-signature/History.md +42 -0
  505. package/node_modules/progrok/node_modules/cookie-signature/Readme.md +42 -0
  506. package/node_modules/progrok/node_modules/cookie-signature/index.js +51 -0
  507. package/node_modules/progrok/node_modules/cookie-signature/package.json +18 -0
  508. package/node_modules/progrok/node_modules/debug/.coveralls.yml +1 -0
  509. package/node_modules/progrok/node_modules/debug/.eslintrc +11 -0
  510. package/node_modules/progrok/node_modules/debug/.npmignore +9 -0
  511. package/node_modules/progrok/node_modules/debug/.travis.yml +14 -0
  512. package/node_modules/progrok/node_modules/debug/CHANGELOG.md +362 -0
  513. package/node_modules/progrok/node_modules/debug/LICENSE +19 -0
  514. package/node_modules/progrok/node_modules/debug/Makefile +50 -0
  515. package/node_modules/progrok/node_modules/debug/README.md +312 -0
  516. package/node_modules/progrok/node_modules/debug/component.json +19 -0
  517. package/node_modules/progrok/node_modules/debug/karma.conf.js +70 -0
  518. package/node_modules/progrok/node_modules/debug/node.js +1 -0
  519. package/node_modules/progrok/node_modules/debug/node_modules/ms/index.js +152 -0
  520. package/node_modules/progrok/node_modules/debug/node_modules/ms/license.md +21 -0
  521. package/node_modules/progrok/node_modules/debug/node_modules/ms/package.json +37 -0
  522. package/node_modules/progrok/node_modules/debug/node_modules/ms/readme.md +51 -0
  523. package/node_modules/progrok/node_modules/debug/package.json +49 -0
  524. package/node_modules/progrok/node_modules/debug/src/browser.js +185 -0
  525. package/node_modules/progrok/node_modules/debug/src/debug.js +202 -0
  526. package/node_modules/progrok/node_modules/debug/src/index.js +10 -0
  527. package/node_modules/progrok/node_modules/debug/src/inspector-log.js +15 -0
  528. package/node_modules/progrok/node_modules/debug/src/node.js +248 -0
  529. package/node_modules/progrok/node_modules/express/History.md +3676 -0
  530. package/node_modules/progrok/node_modules/express/LICENSE +24 -0
  531. package/node_modules/progrok/node_modules/express/Readme.md +260 -0
  532. package/node_modules/progrok/node_modules/express/index.js +11 -0
  533. package/node_modules/progrok/node_modules/express/lib/application.js +661 -0
  534. package/node_modules/progrok/node_modules/express/lib/express.js +116 -0
  535. package/node_modules/progrok/node_modules/express/lib/middleware/init.js +43 -0
  536. package/node_modules/progrok/node_modules/express/lib/middleware/query.js +47 -0
  537. package/node_modules/progrok/node_modules/express/lib/request.js +525 -0
  538. package/node_modules/progrok/node_modules/express/lib/response.js +1179 -0
  539. package/node_modules/progrok/node_modules/express/lib/router/index.js +673 -0
  540. package/node_modules/progrok/node_modules/express/lib/router/layer.js +181 -0
  541. package/node_modules/progrok/node_modules/express/lib/router/route.js +230 -0
  542. package/node_modules/progrok/node_modules/express/lib/utils.js +304 -0
  543. package/node_modules/progrok/node_modules/express/lib/view.js +182 -0
  544. package/node_modules/progrok/node_modules/express/package.json +102 -0
  545. package/node_modules/progrok/node_modules/finalhandler/HISTORY.md +216 -0
  546. package/node_modules/progrok/node_modules/finalhandler/LICENSE +22 -0
  547. package/node_modules/progrok/node_modules/finalhandler/README.md +147 -0
  548. package/node_modules/progrok/node_modules/finalhandler/SECURITY.md +25 -0
  549. package/node_modules/progrok/node_modules/finalhandler/index.js +341 -0
  550. package/node_modules/progrok/node_modules/finalhandler/package.json +47 -0
  551. package/node_modules/progrok/node_modules/fresh/HISTORY.md +70 -0
  552. package/node_modules/progrok/node_modules/fresh/LICENSE +23 -0
  553. package/node_modules/progrok/node_modules/fresh/README.md +119 -0
  554. package/node_modules/progrok/node_modules/fresh/index.js +137 -0
  555. package/node_modules/progrok/node_modules/fresh/package.json +46 -0
  556. package/node_modules/progrok/node_modules/iconv-lite/Changelog.md +162 -0
  557. package/node_modules/progrok/node_modules/iconv-lite/LICENSE +21 -0
  558. package/node_modules/progrok/node_modules/iconv-lite/README.md +156 -0
  559. package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
  560. package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
  561. package/node_modules/progrok/node_modules/iconv-lite/encodings/index.js +22 -0
  562. package/node_modules/progrok/node_modules/iconv-lite/encodings/internal.js +188 -0
  563. package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
  564. package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  565. package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
  566. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  567. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  568. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  569. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  570. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  571. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  572. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
  573. package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  574. package/node_modules/progrok/node_modules/iconv-lite/encodings/utf16.js +177 -0
  575. package/node_modules/progrok/node_modules/iconv-lite/encodings/utf7.js +290 -0
  576. package/node_modules/progrok/node_modules/iconv-lite/lib/bom-handling.js +52 -0
  577. package/node_modules/progrok/node_modules/iconv-lite/lib/extend-node.js +217 -0
  578. package/node_modules/progrok/node_modules/iconv-lite/lib/index.d.ts +24 -0
  579. package/node_modules/progrok/node_modules/iconv-lite/lib/index.js +153 -0
  580. package/node_modules/progrok/node_modules/iconv-lite/lib/streams.js +121 -0
  581. package/node_modules/progrok/node_modules/iconv-lite/package.json +46 -0
  582. package/node_modules/progrok/node_modules/media-typer/HISTORY.md +22 -0
  583. package/node_modules/progrok/node_modules/media-typer/LICENSE +22 -0
  584. package/node_modules/progrok/node_modules/media-typer/README.md +81 -0
  585. package/node_modules/progrok/node_modules/media-typer/index.js +270 -0
  586. package/node_modules/progrok/node_modules/media-typer/package.json +26 -0
  587. package/node_modules/progrok/node_modules/merge-descriptors/HISTORY.md +21 -0
  588. package/node_modules/progrok/node_modules/merge-descriptors/LICENSE +23 -0
  589. package/node_modules/progrok/node_modules/merge-descriptors/README.md +49 -0
  590. package/node_modules/progrok/node_modules/merge-descriptors/index.js +60 -0
  591. package/node_modules/progrok/node_modules/merge-descriptors/package.json +39 -0
  592. package/node_modules/progrok/node_modules/mime-db/HISTORY.md +507 -0
  593. package/node_modules/progrok/node_modules/mime-db/LICENSE +23 -0
  594. package/node_modules/progrok/node_modules/mime-db/README.md +100 -0
  595. package/node_modules/progrok/node_modules/mime-db/db.json +8519 -0
  596. package/node_modules/progrok/node_modules/mime-db/index.js +12 -0
  597. package/node_modules/progrok/node_modules/mime-db/package.json +60 -0
  598. package/node_modules/progrok/node_modules/mime-types/HISTORY.md +397 -0
  599. package/node_modules/progrok/node_modules/mime-types/LICENSE +23 -0
  600. package/node_modules/progrok/node_modules/mime-types/README.md +113 -0
  601. package/node_modules/progrok/node_modules/mime-types/index.js +188 -0
  602. package/node_modules/progrok/node_modules/mime-types/package.json +44 -0
  603. package/node_modules/progrok/node_modules/negotiator/HISTORY.md +108 -0
  604. package/node_modules/progrok/node_modules/negotiator/LICENSE +24 -0
  605. package/node_modules/progrok/node_modules/negotiator/README.md +203 -0
  606. package/node_modules/progrok/node_modules/negotiator/index.js +82 -0
  607. package/node_modules/progrok/node_modules/negotiator/lib/charset.js +169 -0
  608. package/node_modules/progrok/node_modules/negotiator/lib/encoding.js +184 -0
  609. package/node_modules/progrok/node_modules/negotiator/lib/language.js +179 -0
  610. package/node_modules/progrok/node_modules/negotiator/lib/mediaType.js +294 -0
  611. package/node_modules/progrok/node_modules/negotiator/package.json +42 -0
  612. package/node_modules/progrok/node_modules/path-to-regexp/LICENSE +21 -0
  613. package/node_modules/progrok/node_modules/path-to-regexp/Readme.md +35 -0
  614. package/node_modules/progrok/node_modules/path-to-regexp/index.js +158 -0
  615. package/node_modules/progrok/node_modules/path-to-regexp/package.json +30 -0
  616. package/node_modules/progrok/node_modules/raw-body/LICENSE +22 -0
  617. package/node_modules/progrok/node_modules/raw-body/README.md +223 -0
  618. package/node_modules/progrok/node_modules/raw-body/index.d.ts +87 -0
  619. package/node_modules/progrok/node_modules/raw-body/index.js +336 -0
  620. package/node_modules/progrok/node_modules/raw-body/package.json +47 -0
  621. package/node_modules/progrok/node_modules/send/HISTORY.md +538 -0
  622. package/node_modules/progrok/node_modules/send/LICENSE +23 -0
  623. package/node_modules/progrok/node_modules/send/README.md +327 -0
  624. package/node_modules/progrok/node_modules/send/SECURITY.md +24 -0
  625. package/node_modules/progrok/node_modules/send/index.js +1142 -0
  626. package/node_modules/progrok/node_modules/send/package.json +62 -0
  627. package/node_modules/progrok/node_modules/serve-static/HISTORY.md +493 -0
  628. package/node_modules/progrok/node_modules/serve-static/LICENSE +25 -0
  629. package/node_modules/progrok/node_modules/serve-static/README.md +257 -0
  630. package/node_modules/progrok/node_modules/serve-static/index.js +209 -0
  631. package/node_modules/progrok/node_modules/serve-static/package.json +42 -0
  632. package/node_modules/progrok/node_modules/type-is/HISTORY.md +259 -0
  633. package/node_modules/progrok/node_modules/type-is/LICENSE +23 -0
  634. package/node_modules/progrok/node_modules/type-is/README.md +170 -0
  635. package/node_modules/progrok/node_modules/type-is/index.js +266 -0
  636. package/node_modules/progrok/node_modules/type-is/package.json +45 -0
  637. package/node_modules/progrok/package.json +52 -0
  638. package/node_modules/progrok/skills/progrok/SKILL.md +228 -0
  639. package/node_modules/proxy-addr/HISTORY.md +161 -0
  640. package/node_modules/proxy-addr/LICENSE +22 -0
  641. package/node_modules/proxy-addr/README.md +139 -0
  642. package/node_modules/proxy-addr/index.js +327 -0
  643. package/node_modules/proxy-addr/package.json +47 -0
  644. package/node_modules/qs/.editorconfig +46 -0
  645. package/node_modules/qs/.github/FUNDING.yml +12 -0
  646. package/node_modules/qs/.github/SECURITY.md +11 -0
  647. package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
  648. package/node_modules/qs/.nycrc +13 -0
  649. package/node_modules/qs/CHANGELOG.md +812 -0
  650. package/node_modules/qs/LICENSE.md +29 -0
  651. package/node_modules/qs/README.md +758 -0
  652. package/node_modules/qs/dist/qs.js +141 -0
  653. package/node_modules/qs/eslint.config.mjs +56 -0
  654. package/node_modules/qs/lib/formats.js +23 -0
  655. package/node_modules/qs/lib/index.js +11 -0
  656. package/node_modules/qs/lib/parse.js +373 -0
  657. package/node_modules/qs/lib/stringify.js +356 -0
  658. package/node_modules/qs/lib/utils.js +342 -0
  659. package/node_modules/qs/package.json +94 -0
  660. package/node_modules/qs/test/empty-keys-cases.js +267 -0
  661. package/node_modules/qs/test/parse.js +1654 -0
  662. package/node_modules/qs/test/stringify.js +1319 -0
  663. package/node_modules/qs/test/utils.js +432 -0
  664. package/node_modules/range-parser/HISTORY.md +56 -0
  665. package/node_modules/range-parser/LICENSE +23 -0
  666. package/node_modules/range-parser/README.md +84 -0
  667. package/node_modules/range-parser/index.js +162 -0
  668. package/node_modules/range-parser/package.json +44 -0
  669. package/node_modules/run-applescript/index.d.ts +66 -0
  670. package/node_modules/run-applescript/index.js +37 -0
  671. package/node_modules/run-applescript/license +9 -0
  672. package/node_modules/run-applescript/package.json +42 -0
  673. package/node_modules/run-applescript/readme.md +78 -0
  674. package/node_modules/safe-buffer/LICENSE +21 -0
  675. package/node_modules/safe-buffer/README.md +584 -0
  676. package/node_modules/safe-buffer/index.d.ts +187 -0
  677. package/node_modules/safe-buffer/index.js +65 -0
  678. package/node_modules/safe-buffer/package.json +51 -0
  679. package/node_modules/safer-buffer/LICENSE +21 -0
  680. package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  681. package/node_modules/safer-buffer/Readme.md +156 -0
  682. package/node_modules/safer-buffer/dangerous.js +58 -0
  683. package/node_modules/safer-buffer/package.json +34 -0
  684. package/node_modules/safer-buffer/safer.js +77 -0
  685. package/node_modules/safer-buffer/tests.js +406 -0
  686. package/node_modules/setprototypeof/LICENSE +13 -0
  687. package/node_modules/setprototypeof/README.md +31 -0
  688. package/node_modules/setprototypeof/index.d.ts +2 -0
  689. package/node_modules/setprototypeof/index.js +17 -0
  690. package/node_modules/setprototypeof/package.json +38 -0
  691. package/node_modules/setprototypeof/test/index.js +24 -0
  692. package/node_modules/side-channel/.editorconfig +9 -0
  693. package/node_modules/side-channel/.eslintrc +12 -0
  694. package/node_modules/side-channel/.github/FUNDING.yml +12 -0
  695. package/node_modules/side-channel/.nycrc +13 -0
  696. package/node_modules/side-channel/CHANGELOG.md +110 -0
  697. package/node_modules/side-channel/LICENSE +21 -0
  698. package/node_modules/side-channel/README.md +61 -0
  699. package/node_modules/side-channel/index.d.ts +14 -0
  700. package/node_modules/side-channel/index.js +43 -0
  701. package/node_modules/side-channel/package.json +85 -0
  702. package/node_modules/side-channel/test/index.js +104 -0
  703. package/node_modules/side-channel/tsconfig.json +9 -0
  704. package/node_modules/side-channel-list/.editorconfig +9 -0
  705. package/node_modules/side-channel-list/.eslintrc +11 -0
  706. package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  707. package/node_modules/side-channel-list/.nycrc +13 -0
  708. package/node_modules/side-channel-list/CHANGELOG.md +36 -0
  709. package/node_modules/side-channel-list/LICENSE +21 -0
  710. package/node_modules/side-channel-list/README.md +62 -0
  711. package/node_modules/side-channel-list/index.d.ts +13 -0
  712. package/node_modules/side-channel-list/index.js +111 -0
  713. package/node_modules/side-channel-list/list.d.ts +14 -0
  714. package/node_modules/side-channel-list/package.json +77 -0
  715. package/node_modules/side-channel-list/test/index.js +154 -0
  716. package/node_modules/side-channel-list/tsconfig.json +9 -0
  717. package/node_modules/side-channel-map/.editorconfig +9 -0
  718. package/node_modules/side-channel-map/.eslintrc +11 -0
  719. package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  720. package/node_modules/side-channel-map/.nycrc +13 -0
  721. package/node_modules/side-channel-map/CHANGELOG.md +22 -0
  722. package/node_modules/side-channel-map/LICENSE +21 -0
  723. package/node_modules/side-channel-map/README.md +62 -0
  724. package/node_modules/side-channel-map/index.d.ts +15 -0
  725. package/node_modules/side-channel-map/index.js +68 -0
  726. package/node_modules/side-channel-map/package.json +80 -0
  727. package/node_modules/side-channel-map/test/index.js +114 -0
  728. package/node_modules/side-channel-map/tsconfig.json +9 -0
  729. package/node_modules/side-channel-weakmap/.editorconfig +9 -0
  730. package/node_modules/side-channel-weakmap/.eslintrc +12 -0
  731. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  732. package/node_modules/side-channel-weakmap/.nycrc +13 -0
  733. package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  734. package/node_modules/side-channel-weakmap/LICENSE +21 -0
  735. package/node_modules/side-channel-weakmap/README.md +62 -0
  736. package/node_modules/side-channel-weakmap/index.d.ts +15 -0
  737. package/node_modules/side-channel-weakmap/index.js +84 -0
  738. package/node_modules/side-channel-weakmap/package.json +87 -0
  739. package/node_modules/side-channel-weakmap/test/index.js +114 -0
  740. package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  741. package/node_modules/statuses/HISTORY.md +87 -0
  742. package/node_modules/statuses/LICENSE +23 -0
  743. package/node_modules/statuses/README.md +139 -0
  744. package/node_modules/statuses/codes.json +65 -0
  745. package/node_modules/statuses/index.js +146 -0
  746. package/node_modules/statuses/package.json +49 -0
  747. package/node_modules/toidentifier/HISTORY.md +9 -0
  748. package/node_modules/toidentifier/LICENSE +21 -0
  749. package/node_modules/toidentifier/README.md +61 -0
  750. package/node_modules/toidentifier/index.js +32 -0
  751. package/node_modules/toidentifier/package.json +38 -0
  752. package/node_modules/unpipe/HISTORY.md +4 -0
  753. package/node_modules/unpipe/LICENSE +22 -0
  754. package/node_modules/unpipe/README.md +43 -0
  755. package/node_modules/unpipe/index.js +69 -0
  756. package/node_modules/unpipe/package.json +27 -0
  757. package/node_modules/utils-merge/.npmignore +9 -0
  758. package/node_modules/utils-merge/LICENSE +20 -0
  759. package/node_modules/utils-merge/README.md +34 -0
  760. package/node_modules/utils-merge/index.js +23 -0
  761. package/node_modules/utils-merge/package.json +40 -0
  762. package/node_modules/vary/HISTORY.md +39 -0
  763. package/node_modules/vary/LICENSE +22 -0
  764. package/node_modules/vary/README.md +101 -0
  765. package/node_modules/vary/index.js +149 -0
  766. package/node_modules/vary/package.json +43 -0
  767. package/package.json +7 -2
  768. package/routes/edit.js +85 -13
  769. package/routes/edit.ts +94 -23
  770. package/routes/generate.js +118 -11
  771. package/routes/generate.ts +127 -10
  772. package/routes/grok.js +22 -0
  773. package/routes/grok.ts +24 -0
  774. package/routes/health.js +5 -0
  775. package/routes/health.ts +5 -0
  776. package/routes/index.js +4 -0
  777. package/routes/index.ts +4 -0
  778. package/routes/multimode.js +71 -26
  779. package/routes/multimode.ts +80 -39
  780. package/routes/nodes.js +88 -33
  781. package/routes/nodes.ts +97 -42
  782. package/routes/video.js +197 -0
  783. package/routes/video.ts +216 -0
  784. package/server.js +42 -1
  785. package/server.ts +34 -1
  786. package/skills/ima2/SKILL.md +27 -0
  787. package/ui/dist/.vite/manifest.json +12 -12
  788. package/ui/dist/assets/AgentWorkspace-c1_kEfFN.js +3 -0
  789. package/ui/dist/assets/{CardNewsWorkspace-BBLdwzYU.js → CardNewsWorkspace-CTBT3MbP.js} +2 -2
  790. package/ui/dist/assets/NodeCanvas-D3ecSAEi.js +7 -0
  791. package/ui/dist/assets/{PromptBuilderPanel-Y2VygFc0.js → PromptBuilderPanel-CqepukCN.js} +2 -2
  792. package/ui/dist/assets/{PromptImportDialog-C6lFV-LL.js → PromptImportDialog-Bvr8Q8P2.js} +2 -2
  793. package/ui/dist/assets/{PromptImportDiscoverySection-D8YJFhND.js → PromptImportDiscoverySection-CyZEXyWP.js} +1 -1
  794. package/ui/dist/assets/{PromptImportFolderSection-ywfcQolW.js → PromptImportFolderSection-CIl-_pyV.js} +1 -1
  795. package/ui/dist/assets/{PromptLibraryPanel-fk4KmrGy.js → PromptLibraryPanel-Bj23Q6l9.js} +2 -2
  796. package/ui/dist/assets/SettingsWorkspace-D_GqtEsP.js +1 -0
  797. package/ui/dist/assets/index-DMjgFXdO.css +1 -0
  798. package/ui/dist/assets/index-DQ6jg4Ui.js +32 -0
  799. package/ui/dist/assets/index-DtSBvfgp.js +1 -0
  800. package/ui/dist/index.html +2 -2
  801. package/vendor/progrok-0.1.0.tgz +0 -0
  802. package/ui/dist/assets/AgentWorkspace-BJe9yxPA.js +0 -3
  803. package/ui/dist/assets/NodeCanvas-BSZ527J4.js +0 -7
  804. package/ui/dist/assets/SettingsWorkspace-DL5vhAHQ.js +0 -1
  805. package/ui/dist/assets/index-BLx55BOg.js +0 -1
  806. package/ui/dist/assets/index-ByViUJfx.css +0 -1
  807. package/ui/dist/assets/index-Ci36vcFD.js +0 -28
package/README.md CHANGED
@@ -10,11 +10,13 @@
10
10
 
11
11
  > 🌐 **Live site**: [lidge-jun.github.io/ima2-gen](https://lidge-jun.github.io/ima2-gen/) · [한국어](https://lidge-jun.github.io/ima2-gen/ko/)
12
12
  >
13
+ > 📖 **Developer docs**: [Documentation site](https://lidge-jun.github.io/ima2-gen/docs) · [한국어](https://lidge-jun.github.io/ima2-gen/ko/docs)
14
+ >
13
15
  > **Read in other languages**: [한국어](docs/README.ko.md) · [日本語](docs/README.ja.md) · [简体中文](docs/README.zh-CN.md)
14
16
 
15
17
  `ima2-gen` is a local image generation studio for people who want the ChatGPT/Codex image workflow in a small desktop-like web app.
16
18
 
17
- Run it with `npx`, sign in with Codex OAuth, type a prompt, and keep iterating with history, references, node branches, multimode batches, and Canvas Mode cleanup. No OpenAI API key is required for the default path, but API-key generation is also supported when configured.
19
+ Run it with `npx`, sign in with Codex OAuth, type a prompt, and keep iterating with history, references, node branches, multimode batches, and Canvas Mode cleanup. No OpenAI API key is required for the default path, but API-key generation and bundled Grok generation are also supported when configured.
18
20
 
19
21
  ![ima2-gen classic generation screen with prompt composer, generated image, compact model label, and result metadata.](assets/screenshots/classic-generate-light.png)
20
22
 
@@ -53,7 +55,7 @@ persists, reboot and run the update before starting ima2 again.
53
55
  - **Node mode**: branch a good image into multiple directions without losing the original.
54
56
  - **Multimode batches**: launch several Classic outputs from one prompt, watch slot-by-slot progress, and continue from the best result.
55
57
  - **Canvas Mode**: zoom, pan, annotate, erase, clean backgrounds, keep transparent previews, and export either alpha or matte-backed versions.
56
- - **Local gallery**: keep generated assets on your machine with session-aware history. By default the gallery shows the current session and an All Images toggle reveals the full history; the default scope is sticky across sessions.
58
+ - **Local gallery**: keep generated assets on your machine with session-aware history. By default the gallery shows the current session and an All Images toggle reveals the full history; the default scope is sticky across sessions. Each image records its generation time and reasoning effort in the result metadata, so they persist across reloads.
57
59
  - **Reference images**: drag, drop, paste, and attach up to 5 references; large images are compressed before upload.
58
60
  - **Prompt library imports**: import local prompt packs, GitHub folders, and curated GPT-image prompt hints into the built-in prompt library.
59
61
  - **Mobile shell**: use the app bar, compose sheet, and compact settings toggle on smaller screens.
@@ -61,13 +63,17 @@ persists, reboot and run the update before starting ima2 again.
61
63
 
62
64
  ## Provider Paths
63
65
 
64
- Image generation can run through either the local Codex/ChatGPT OAuth path or a configured OpenAI API key.
66
+ Image generation can run through the local Codex/ChatGPT OAuth path, a configured OpenAI API key, or the bundled Grok provider.
65
67
 
66
68
  - `provider: "oauth"` uses the local Codex OAuth proxy.
67
69
  - `provider: "api"` calls the OpenAI Responses API with the hosted `image_generation` tool.
70
+ - `provider: "grok"` starts bundled `progrok` on `127.0.0.1:18645`, runs mandatory xAI Web Search plus a `grok-4.3` planner pass, then calls xAI Images API through the local proxy.
68
71
  - API-key generation supports classic generate, edit, mask-guided edit, multimode, and node generation.
72
+ - Grok generation supports Classic, Node, and Agent flows. If a Classic reference, Node parent image, or Agent current image is present, ima2 switches the final Grok call to xAI image edit so image-to-image context is preserved.
73
+
74
+ If no provider is specified, the app keeps the current OAuth/default behavior. API-key generation defaults to `gpt-5.4-mini`, `low` reasoning, and `1024x1024` unless the request passes validated model, reasoning, size, or web-search options. Grok defaults to `grok-imagine-image`; `quality: "high"` promotes the final image call to `grok-imagine-image-quality`.
69
75
 
70
- If no provider is specified, the app keeps the current OAuth/default behavior. API-key generation defaults to `gpt-5.4-mini`, `low` reasoning, and `1024x1024` unless the request passes validated model, reasoning, size, or web-search options.
76
+ Grok video generation (T2V/I2V) is not shipped in `1.1.15`. The video files in `docs/grok-video-i2v-plan.md` and `docs/grok-video-i2v-research.md` are implementation planning and research notes only; the published runtime remains image-only.
71
77
 
72
78
  ![Settings workspace showing OAuth active and API key provider available.](assets/screenshots/settings-oauth-generation.png)
73
79
 
@@ -93,6 +99,10 @@ Use Classic when you want one strong result quickly.
93
99
  4. Generate one image, or enable multimode to fan out several candidate slots from the same prompt.
94
100
  5. Copy, download, continue from the result, or send it into Canvas Mode.
95
101
 
102
+ For a control-by-control guide to Prompt Studio, multimode recipes, Direct mode,
103
+ reasoning effort, and gallery favorite behavior, see the
104
+ [Prompt Studio manual](docs/PROMPT_STUDIO.md).
105
+
96
106
  ![Multimode sequence with four candidate slots generating from one prompt and active job history in the sidebar.](assets/screenshots/multimode-sequence.png)
97
107
 
98
108
  ### Node Mode
@@ -143,6 +153,7 @@ The settings workspace keeps account, model, appearance, and language controls a
143
153
  | `ima2 setup` | Reconfigure saved auth |
144
154
  | `ima2 status` | Show config and OAuth status |
145
155
  | `ima2 doctor` | Diagnose Node, package, config, and auth |
156
+ | `ima2 doctor image-probe [--json]` | Run sanitized image probes for no-image diagnostics |
146
157
  | `ima2 open` | Open the web UI |
147
158
  | `ima2 reset` | Remove saved config |
148
159
 
@@ -192,14 +203,22 @@ environment variables > ~/.ima2/config.json > built-in defaults
192
203
  | `IMA2_ADVERTISE_FILE` | `~/.ima2/server.json` | Runtime discovery file |
193
204
  | `IMA2_GENERATED_DIR` | `~/.ima2/generated` | Generated image directory |
194
205
  | `IMA2_IMAGE_MODEL_DEFAULT` | `gpt-5.4-mini` | Server fallback image model |
206
+ | `IMA2_REASONING_EFFORT` | `medium` | Default reasoning effort for the default (OAuth) path; one of `none`, `low`, `medium`, `high`, `xhigh` |
195
207
  | `IMA2_NO_OAUTH_PROXY` | — | Set `1` to disable the auto-started OAuth proxy |
196
- | `IMA2_LOG_LEVEL` | `warn` | Normal serve defaults to `warn`; dev mode defaults to `debug`; supports `debug`, `info`, `warn`, `error`, or `silent` |
197
- | `IMA2_INFLIGHT_TERMINAL_TTL_MS` | `30000` | Recent terminal job retention for debug views |
208
+ | `IMA2_LOG_LEVEL` | `info` | Normal serve defaults to `info`; dev mode defaults to `debug`; supports `debug`, `info`, `warn`, `error`, or `silent` |
209
+ | `IMA2_INFLIGHT_TERMINAL_TTL_MS` | `300000` | Recent terminal job retention for debug views |
198
210
  | `OPENAI_API_KEY` | — | API key for the `provider: "api"` Responses API image path and auxiliary API-key features |
199
211
  | `IMA2_API_IMAGE_MODEL_DEFAULT` | `gpt-5.4-mini` | Default image model for `provider: "api"` |
200
212
  | `IMA2_API_REASONING_EFFORT` | `low` | Default reasoning effort for `provider: "api"` |
201
213
  | `IMA2_API_IMAGE_SIZE` | `1024x1024` | Default size for `provider: "api"` |
202
214
  | `IMA2_API_ALLOW_WEB_SEARCH` | `true` | Toggle web search for `provider: "api"` |
215
+ | `IMA2_GROK_PROXY_HOST` | `127.0.0.1` | Host for the bundled progrok proxy |
216
+ | `IMA2_GROK_PROXY_PORT` | `18645` | Port for the bundled progrok proxy |
217
+ | `IMA2_NO_GROK_PROXY` | — | Set `1` to disable automatic progrok startup |
218
+ | `IMA2_GROK_PLANNER_MODEL` | `grok-4.3` | Grok search/planner model before the final Images API call |
219
+ | `IMA2_GROK_PLANNER_TIMEOUT_MS` | `60000` | Timeout for Grok search and planner calls |
220
+ | `IMA2_GROK_IMAGE_MODEL_DEFAULT` | `grok-imagine-image` | Default final Grok image model |
221
+ | `IMA2_GROK_GENERATION_TIMEOUT_MS` | `120000` | Timeout for the final Grok Images API call |
203
222
  | `IMA2_OAUTH_MASKED_EDIT_ENABLED` | `false` | Opt-in feature flag for masked-edit requests on the OAuth path (#31, groundwork only) |
204
223
 
205
224
  ### Logging modes
@@ -214,8 +233,10 @@ The endpoint list moved to [docs/API.md](docs/API.md) so this README can stay fo
214
233
 
215
234
  Useful references:
216
235
 
236
+ - [Developer documentation site](https://lidge-jun.github.io/ima2-gen/docs) — Overview, Quickstart, Architecture, Modes, Providers, CLI, Config, and Server API
217
237
  - [CLI Reference](docs/CLI.md)
218
238
  - [API Reference](docs/API.md)
239
+ - [Prompt Studio manual](docs/PROMPT_STUDIO.md)
219
240
  - [FAQ](docs/FAQ.md)
220
241
  - [Recover old images](docs/RECOVER_OLD_IMAGES.md)
221
242
  - [Korean README](docs/README.ko.md)
@@ -231,11 +252,14 @@ Start `ima2 serve`, then check `~/.ima2/server.json`. You can also run `ima2 pin
231
252
  Run `npx @openai/codex login`, confirm `ima2 status`, then restart `ima2 serve`.
232
253
 
233
254
  **`fetch failed` repeats on a proxy/VPN network**
234
- Check that the local OAuth proxy is reachable. On networks that require a proxy, enable your proxy client's TUN/TURN-style mode, then retry `npx openai-oauth --port 10531`. If it still fails, set `HTTP_PROXY` and `HTTPS_PROXY` in the same terminal that runs `ima2 serve` or `openai-oauth`.
255
+ Check that the local OAuth proxy is reachable. On networks that require a proxy, enable your proxy client's TUN/TURN-style mode, then retry `npx openai-oauth --port 10531`. If it still fails, set `HTTP_PROXY` and `HTTPS_PROXY` in the same terminal that runs `ima2 serve` or `openai-oauth`. On Windows, also check for auto-start network interception tools, including DNS/fragmentation bypass tools such as SecretDNS, because they can break OAuth or streaming image responses even when the browser appears connected.
235
256
 
236
257
  **Images fail with `API_KEY_REQUIRED`**
237
258
  Set `OPENAI_API_KEY` or configure an API key before using `provider: "api"`. The default OAuth path still works without an API key.
238
259
 
260
+ **Image generation returns `EMPTY_RESPONSE` or no image data**
261
+ Run `ima2 doctor image-probe --json > ima2-image-probe.json` and attach the safe JSON when opening an issue. For OAuth cases, also capture `ima2 gen "고양이" --no-web-search --json` and `ima2 gen "고양이" --json` while `ima2 serve` is running. Do not share ChatGPT cookies, OAuth token files, API keys, raw upstream responses, prompt history, or generated base64. See the [FAQ support bundle](docs/FAQ.md#what-should-i-share-when-oauth-image-generation-returns-no-image).
262
+
239
263
  **A large reference image fails**
240
264
  The app compresses large JPEG/PNG references before upload. If a file still fails, convert it to JPEG or PNG at a lower resolution and try again. HEIC/HEIF files are not supported by the browser path.
241
265
 
@@ -62,9 +62,14 @@ function printText(capabilities) {
62
62
  out(` oauth reasoning: ${capabilities.defaults?.oauth?.reasoningEffort}`);
63
63
  out(` api model: ${capabilities.defaults?.api?.model}`);
64
64
  out(` api reasoning: ${capabilities.defaults?.api?.reasoningEffort}`);
65
+ out(` grok model: ${capabilities.defaults?.grok?.model}`);
66
+ out(` grok planner: ${capabilities.defaults?.grok?.plannerModel}`);
65
67
  out("");
66
68
  out("valid:");
67
69
  out(` models: ${capabilities.valid?.imageModels?.supported?.join(", ")}`);
70
+ if (capabilities.valid?.imageModels?.grokSupported?.length) {
71
+ out(` grok models: ${capabilities.valid.imageModels.grokSupported.join(", ")}`);
72
+ }
68
73
  out(` reasoning: ${capabilities.valid?.reasoningEfforts?.join(", ")}`);
69
74
  out(` quality: ${capabilities.valid?.quality?.join(", ")}`);
70
75
  out(` modes: ${capabilities.valid?.modes?.join(", ")}`);
@@ -66,9 +66,14 @@ function printText(capabilities: any): void {
66
66
  out(` oauth reasoning: ${capabilities.defaults?.oauth?.reasoningEffort}`);
67
67
  out(` api model: ${capabilities.defaults?.api?.model}`);
68
68
  out(` api reasoning: ${capabilities.defaults?.api?.reasoningEffort}`);
69
+ out(` grok model: ${capabilities.defaults?.grok?.model}`);
70
+ out(` grok planner: ${capabilities.defaults?.grok?.plannerModel}`);
69
71
  out("");
70
72
  out("valid:");
71
73
  out(` models: ${capabilities.valid?.imageModels?.supported?.join(", ")}`);
74
+ if (capabilities.valid?.imageModels?.grokSupported?.length) {
75
+ out(` grok models: ${capabilities.valid.imageModels.grokSupported.join(", ")}`);
76
+ }
72
77
  out(` reasoning: ${capabilities.valid?.reasoningEfforts?.join(", ")}`);
73
78
  out(` quality: ${capabilities.valid?.quality?.join(", ")}`);
74
79
  out(` modes: ${capabilities.valid?.modes?.join(", ")}`);
@@ -0,0 +1,195 @@
1
+ import { createRequire } from "module";
2
+ import { existsSync, readFileSync } from "fs";
3
+ import { dirname, join } from "path";
4
+ import { fileURLToPath } from "url";
5
+ import { buildHardeningDoctorLines } from "../lib/doctor-checks.js";
6
+ import { buildStorageDoctorLines } from "../lib/storage-doctor.js";
7
+ import { detectCodexAuth } from "../../lib/codexDetect.js";
8
+ import { runImageDoctorProbe } from "../../lib/responsesDoctor.js";
9
+ import { config as runtimeConfig } from "../../config.js";
10
+ const __dirname = dirname(fileURLToPath(import.meta.url));
11
+ const ROOT = join(__dirname, "../..");
12
+ const requireFromRoot = createRequire(join(ROOT, "package.json"));
13
+ const CONFIG_FILE = runtimeConfig.storage.configFile;
14
+ const LEGACY_CONFIG_FILE = join(ROOT, ".ima2", "config.json");
15
+ let pkg = { version: "?", name: "ima2-gen" };
16
+ try {
17
+ pkg = JSON.parse(readFileSync(join(ROOT, "package.json"), "utf-8"));
18
+ }
19
+ catch { }
20
+ function loadConfig() {
21
+ if (existsSync(CONFIG_FILE)) {
22
+ return JSON.parse(readFileSync(CONFIG_FILE, "utf-8"));
23
+ }
24
+ if (existsSync(LEGACY_CONFIG_FILE)) {
25
+ try {
26
+ return JSON.parse(readFileSync(LEGACY_CONFIG_FILE, "utf-8"));
27
+ }
28
+ catch { }
29
+ }
30
+ return {};
31
+ }
32
+ function missingRuntimeDeps() {
33
+ const deps = ["express", "better-sqlite3", "openai", "openai-oauth", "progrok/package.json"];
34
+ return deps.filter((dep) => {
35
+ try {
36
+ requireFromRoot.resolve(dep);
37
+ return false;
38
+ }
39
+ catch {
40
+ return true;
41
+ }
42
+ }).map((dep) => dep === "progrok/package.json" ? "progrok" : dep);
43
+ }
44
+ function valueAfter(args, name) {
45
+ const index = args.indexOf(name);
46
+ if (index === -1)
47
+ return null;
48
+ return args[index + 1] || null;
49
+ }
50
+ function showImageProbeHelp() {
51
+ console.log(`
52
+ Usage: ima2 doctor image-probe [options]
53
+
54
+ Runs live, sanitized Responses probes for EMPTY_RESPONSE diagnosis.
55
+ The output never includes prompt text, auth tokens, URLs with credentials, or base64 image data.
56
+
57
+ Options:
58
+ --json Emit machine-readable JSON
59
+ --matrix Add current-payload web_search/tool_choice probes
60
+ --provider <api|oauth> Override configured provider
61
+ --model <model> Override image-capable Responses model
62
+ --size <size> Default: 1024x1024
63
+ --quality <quality> Default: low
64
+ --moderation <value> Default: low
65
+ --prompt <text> Override built-in cat prompt
66
+ --oauth-url <url> Override OAuth proxy URL
67
+ --timeout-ms <ms> Per-probe timeout
68
+ `);
69
+ }
70
+ async function imageProbe(args) {
71
+ if (args.includes("-h") || args.includes("--help")) {
72
+ showImageProbeHelp();
73
+ return;
74
+ }
75
+ const fileConfig = loadConfig();
76
+ const result = await runImageDoctorProbe({
77
+ provider: valueAfter(args, "--provider") || fileConfig.provider || "oauth",
78
+ apiKey: typeof fileConfig.apiKey === "string" ? fileConfig.apiKey : undefined,
79
+ oauthUrl: valueAfter(args, "--oauth-url") || undefined,
80
+ model: valueAfter(args, "--model") || runtimeConfig.imageModels?.default || "gpt-5.4-mini",
81
+ size: valueAfter(args, "--size") || "1024x1024",
82
+ quality: valueAfter(args, "--quality") || "low",
83
+ moderation: valueAfter(args, "--moderation") || "low",
84
+ prompt: valueAfter(args, "--prompt") || undefined,
85
+ matrix: args.includes("--matrix"),
86
+ timeoutMs: Number(valueAfter(args, "--timeout-ms")) || undefined,
87
+ ctx: { config: runtimeConfig },
88
+ });
89
+ if (args.includes("--json")) {
90
+ console.log(JSON.stringify(result, null, 2));
91
+ process.exit(result.summary.ok ? 0 : 1);
92
+ }
93
+ console.log(`\n ${pkg.name} v${pkg.version} — Image Probe\n`);
94
+ console.log(` Provider: ${result.provider}`);
95
+ console.log(` Model: ${result.model}`);
96
+ console.log(` Prompt: ${result.promptId} (${result.promptChars} chars, redacted)`);
97
+ for (const probe of result.probes) {
98
+ const mark = probe.ok ? "✓" : "✗";
99
+ const reason = probe.diagnosticReason ? ` — ${probe.diagnosticReason}` : "";
100
+ console.log(` ${mark} ${probe.id}${reason}`);
101
+ console.log(` status=${probe.response.httpStatus ?? "n/a"} events=${probe.response.eventCount} images=${probe.response.imageResultCount} textChars=${probe.response.textOutputChars}`);
102
+ }
103
+ console.log(`\n ${result.summary.passed} passed, ${result.summary.failed} failed\n`);
104
+ process.exit(result.summary.ok ? 0 : 1);
105
+ }
106
+ async function standardDoctor() {
107
+ console.log(`\n ${pkg.name} v${pkg.version} — Doctor\n`);
108
+ let ok = 0;
109
+ let fail = 0;
110
+ const nodeVersion = process.version;
111
+ const nodeMajor = parseInt(nodeVersion.slice(1).split(".")[0]);
112
+ if (nodeMajor >= 20) {
113
+ console.log(` ✓ Node.js ${nodeVersion} (>= 20)`);
114
+ ok++;
115
+ }
116
+ else {
117
+ console.log(` ✗ Node.js ${nodeVersion} (requires >= 20)`);
118
+ fail++;
119
+ }
120
+ if (existsSync(join(ROOT, "package.json"))) {
121
+ console.log(" ✓ package.json found");
122
+ ok++;
123
+ }
124
+ else {
125
+ console.log(" ✗ package.json missing");
126
+ fail++;
127
+ }
128
+ const missingDeps = missingRuntimeDeps();
129
+ if (missingDeps.length === 0) {
130
+ console.log(" ✓ runtime dependencies resolvable");
131
+ ok++;
132
+ }
133
+ else {
134
+ console.log(` ✗ missing runtime dependencies: ${missingDeps.join(", ")}`);
135
+ fail++;
136
+ }
137
+ if (existsSync(join(ROOT, ".env"))) {
138
+ console.log(" ✓ .env file exists");
139
+ ok++;
140
+ }
141
+ else {
142
+ console.log(" ⚠ .env file not found (optional — copy from .env.example)");
143
+ }
144
+ const fileConfig = loadConfig();
145
+ if (fileConfig.provider) {
146
+ console.log(` ✓ Configured: ${fileConfig.provider}`);
147
+ ok++;
148
+ }
149
+ else {
150
+ console.log(" ⚠ Not configured — run 'ima2 setup'");
151
+ }
152
+ const advPath = runtimeConfig.storage.advertiseFile;
153
+ const adv = existsSync(advPath) ? JSON.parse(readFileSync(advPath, "utf-8")) : null;
154
+ console.log(` ℹ Preferred backend port: ${runtimeConfig.server.port}`);
155
+ if (adv?.backend || adv?.port) {
156
+ console.log(` ℹ Backend actual URL: ${adv?.backend?.url || adv?.url || `http://localhost:${adv.port}`}`);
157
+ if (adv?.oauth)
158
+ console.log(` ℹ OAuth actual URL: ${adv.oauth.url} (${adv.oauth.status || "unknown"})`);
159
+ }
160
+ const hardeningLines = await buildHardeningDoctorLines({
161
+ root: ROOT,
162
+ configFile: CONFIG_FILE,
163
+ fileConfig,
164
+ });
165
+ for (const line of hardeningLines) {
166
+ const prefix = line.kind === "pass" ? "✓"
167
+ : line.kind === "fail" ? "✗"
168
+ : line.kind === "warn" ? "⚠"
169
+ : "ℹ";
170
+ console.log(` ${prefix} ${line.text}`);
171
+ if (line.kind === "pass")
172
+ ok++;
173
+ if (line.kind === "fail")
174
+ fail++;
175
+ }
176
+ const storageLines = await buildStorageDoctorLines({
177
+ rootDir: ROOT,
178
+ config: runtimeConfig,
179
+ });
180
+ console.log("");
181
+ for (const line of storageLines)
182
+ console.log(line);
183
+ const auth = detectCodexAuth();
184
+ if (auth.platform === "win32")
185
+ console.log(" ℹ Windows OAuth note: use WSL2 for Codex login.");
186
+ console.log(`\n ${ok} passed, ${fail} failed\n`);
187
+ process.exit(fail > 0 ? 1 : 0);
188
+ }
189
+ export async function doctor(args = []) {
190
+ if (args[0] === "image-probe") {
191
+ await imageProbe(args.slice(1));
192
+ return;
193
+ }
194
+ await standardDoctor();
195
+ }
@@ -0,0 +1,202 @@
1
+ import { createRequire } from "module";
2
+ import { existsSync, readFileSync } from "fs";
3
+ import { dirname, join } from "path";
4
+ import { fileURLToPath } from "url";
5
+ import { buildHardeningDoctorLines } from "../lib/doctor-checks.js";
6
+ import { buildStorageDoctorLines } from "../lib/storage-doctor.js";
7
+ import { detectCodexAuth } from "../../lib/codexDetect.js";
8
+ import { runImageDoctorProbe } from "../../lib/responsesDoctor.js";
9
+ import { config as runtimeConfig } from "../../config.js";
10
+
11
+ const __dirname = dirname(fileURLToPath(import.meta.url));
12
+ const ROOT = join(__dirname, "../..");
13
+ const requireFromRoot = createRequire(join(ROOT, "package.json"));
14
+ const CONFIG_FILE = runtimeConfig.storage.configFile;
15
+ const LEGACY_CONFIG_FILE = join(ROOT, ".ima2", "config.json");
16
+
17
+ let pkg = { version: "?", name: "ima2-gen" };
18
+ try {
19
+ pkg = JSON.parse(readFileSync(join(ROOT, "package.json"), "utf-8"));
20
+ } catch {}
21
+
22
+ function loadConfig() {
23
+ if (existsSync(CONFIG_FILE)) {
24
+ return JSON.parse(readFileSync(CONFIG_FILE, "utf-8"));
25
+ }
26
+ if (existsSync(LEGACY_CONFIG_FILE)) {
27
+ try { return JSON.parse(readFileSync(LEGACY_CONFIG_FILE, "utf-8")); } catch {}
28
+ }
29
+ return {};
30
+ }
31
+
32
+ function missingRuntimeDeps() {
33
+ const deps = ["express", "better-sqlite3", "openai", "openai-oauth", "progrok/package.json"];
34
+ return deps.filter((dep) => {
35
+ try {
36
+ requireFromRoot.resolve(dep);
37
+ return false;
38
+ } catch {
39
+ return true;
40
+ }
41
+ }).map((dep) => dep === "progrok/package.json" ? "progrok" : dep);
42
+ }
43
+
44
+ function valueAfter(args: string[], name: string) {
45
+ const index = args.indexOf(name);
46
+ if (index === -1) return null;
47
+ return args[index + 1] || null;
48
+ }
49
+
50
+ function showImageProbeHelp() {
51
+ console.log(`
52
+ Usage: ima2 doctor image-probe [options]
53
+
54
+ Runs live, sanitized Responses probes for EMPTY_RESPONSE diagnosis.
55
+ The output never includes prompt text, auth tokens, URLs with credentials, or base64 image data.
56
+
57
+ Options:
58
+ --json Emit machine-readable JSON
59
+ --matrix Add current-payload web_search/tool_choice probes
60
+ --provider <api|oauth> Override configured provider
61
+ --model <model> Override image-capable Responses model
62
+ --size <size> Default: 1024x1024
63
+ --quality <quality> Default: low
64
+ --moderation <value> Default: low
65
+ --prompt <text> Override built-in cat prompt
66
+ --oauth-url <url> Override OAuth proxy URL
67
+ --timeout-ms <ms> Per-probe timeout
68
+ `);
69
+ }
70
+
71
+ async function imageProbe(args: string[]) {
72
+ if (args.includes("-h") || args.includes("--help")) {
73
+ showImageProbeHelp();
74
+ return;
75
+ }
76
+ const fileConfig = loadConfig();
77
+ const result = await runImageDoctorProbe({
78
+ provider: valueAfter(args, "--provider") || fileConfig.provider || "oauth",
79
+ apiKey: typeof fileConfig.apiKey === "string" ? fileConfig.apiKey : undefined,
80
+ oauthUrl: valueAfter(args, "--oauth-url") || undefined,
81
+ model: valueAfter(args, "--model") || runtimeConfig.imageModels?.default || "gpt-5.4-mini",
82
+ size: valueAfter(args, "--size") || "1024x1024",
83
+ quality: valueAfter(args, "--quality") || "low",
84
+ moderation: valueAfter(args, "--moderation") || "low",
85
+ prompt: valueAfter(args, "--prompt") || undefined,
86
+ matrix: args.includes("--matrix"),
87
+ timeoutMs: Number(valueAfter(args, "--timeout-ms")) || undefined,
88
+ ctx: { config: runtimeConfig },
89
+ });
90
+ if (args.includes("--json")) {
91
+ console.log(JSON.stringify(result, null, 2));
92
+ process.exit(result.summary.ok ? 0 : 1);
93
+ }
94
+ console.log(`\n ${pkg.name} v${pkg.version} — Image Probe\n`);
95
+ console.log(` Provider: ${result.provider}`);
96
+ console.log(` Model: ${result.model}`);
97
+ console.log(` Prompt: ${result.promptId} (${result.promptChars} chars, redacted)`);
98
+ for (const probe of result.probes) {
99
+ const mark = probe.ok ? "✓" : "✗";
100
+ const reason = probe.diagnosticReason ? ` — ${probe.diagnosticReason}` : "";
101
+ console.log(` ${mark} ${probe.id}${reason}`);
102
+ console.log(
103
+ ` status=${probe.response.httpStatus ?? "n/a"} events=${probe.response.eventCount} images=${probe.response.imageResultCount} textChars=${probe.response.textOutputChars}`,
104
+ );
105
+ }
106
+ console.log(`\n ${result.summary.passed} passed, ${result.summary.failed} failed\n`);
107
+ process.exit(result.summary.ok ? 0 : 1);
108
+ }
109
+
110
+ async function standardDoctor() {
111
+ console.log(`\n ${pkg.name} v${pkg.version} — Doctor\n`);
112
+
113
+ let ok = 0;
114
+ let fail = 0;
115
+
116
+ const nodeVersion = process.version;
117
+ const nodeMajor = parseInt(nodeVersion.slice(1).split(".")[0]);
118
+ if (nodeMajor >= 20) {
119
+ console.log(` ✓ Node.js ${nodeVersion} (>= 20)`);
120
+ ok++;
121
+ } else {
122
+ console.log(` ✗ Node.js ${nodeVersion} (requires >= 20)`);
123
+ fail++;
124
+ }
125
+
126
+ if (existsSync(join(ROOT, "package.json"))) {
127
+ console.log(" ✓ package.json found");
128
+ ok++;
129
+ } else {
130
+ console.log(" ✗ package.json missing");
131
+ fail++;
132
+ }
133
+
134
+ const missingDeps = missingRuntimeDeps();
135
+ if (missingDeps.length === 0) {
136
+ console.log(" ✓ runtime dependencies resolvable");
137
+ ok++;
138
+ } else {
139
+ console.log(` ✗ missing runtime dependencies: ${missingDeps.join(", ")}`);
140
+ fail++;
141
+ }
142
+
143
+ if (existsSync(join(ROOT, ".env"))) {
144
+ console.log(" ✓ .env file exists");
145
+ ok++;
146
+ } else {
147
+ console.log(" ⚠ .env file not found (optional — copy from .env.example)");
148
+ }
149
+
150
+ const fileConfig = loadConfig();
151
+ if (fileConfig.provider) {
152
+ console.log(` ✓ Configured: ${fileConfig.provider}`);
153
+ ok++;
154
+ } else {
155
+ console.log(" ⚠ Not configured — run 'ima2 setup'");
156
+ }
157
+
158
+ const advPath = runtimeConfig.storage.advertiseFile;
159
+ const adv = existsSync(advPath) ? JSON.parse(readFileSync(advPath, "utf-8")) : null;
160
+ console.log(` ℹ Preferred backend port: ${runtimeConfig.server.port}`);
161
+ if (adv?.backend || adv?.port) {
162
+ console.log(` ℹ Backend actual URL: ${adv?.backend?.url || adv?.url || `http://localhost:${adv.port}`}`);
163
+ if (adv?.oauth) console.log(` ℹ OAuth actual URL: ${adv.oauth.url} (${adv.oauth.status || "unknown"})`);
164
+ }
165
+
166
+ const hardeningLines = await buildHardeningDoctorLines({
167
+ root: ROOT,
168
+ configFile: CONFIG_FILE,
169
+ fileConfig,
170
+ });
171
+ for (const line of hardeningLines) {
172
+ const prefix =
173
+ line.kind === "pass" ? "✓"
174
+ : line.kind === "fail" ? "✗"
175
+ : line.kind === "warn" ? "⚠"
176
+ : "ℹ";
177
+ console.log(` ${prefix} ${line.text}`);
178
+ if (line.kind === "pass") ok++;
179
+ if (line.kind === "fail") fail++;
180
+ }
181
+
182
+ const storageLines = await buildStorageDoctorLines({
183
+ rootDir: ROOT,
184
+ config: runtimeConfig,
185
+ });
186
+ console.log("");
187
+ for (const line of storageLines) console.log(line);
188
+
189
+ const auth = detectCodexAuth();
190
+ if (auth.platform === "win32") console.log(" ℹ Windows OAuth note: use WSL2 for Codex login.");
191
+
192
+ console.log(`\n ${ok} passed, ${fail} failed\n`);
193
+ process.exit(fail > 0 ? 1 : 0);
194
+ }
195
+
196
+ export async function doctor(args: string[] = []) {
197
+ if (args[0] === "image-probe") {
198
+ await imageProbe(args.slice(1));
199
+ return;
200
+ }
201
+ await standardDoctor();
202
+ }
@@ -7,8 +7,8 @@ import { createCliRequestId, recoverGeneratedOutputs, formatRecoveryHint } from
7
7
  import { errInfo } from "../../lib/errInfo.js";
8
8
  const VALID_MODES = new Set(["auto", "direct"]);
9
9
  const VALID_MODERATION = new Set(["auto", "low"]);
10
- const VALID_PROVIDERS = new Set(["auto", "oauth", "api"]);
11
- const KNOWN_IMAGE_MODELS = new Set(["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex-spark"]);
10
+ const VALID_PROVIDERS = new Set(["auto", "oauth", "api", "grok"]);
11
+ const KNOWN_IMAGE_MODELS = new Set(["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex-spark", "grok-imagine-image", "grok-imagine-image-quality"]);
12
12
  const SPEC = {
13
13
  flags: {
14
14
  prompt: { short: "p", type: "string" },
@@ -40,8 +40,8 @@ const HELP = `
40
40
  -s, --size <WxH>
41
41
  -o, --out <file>
42
42
  --json
43
- --model <gpt-5.5|gpt-5.4|gpt-5.4-mini>
44
- --provider <auto|oauth|api> Provider for this request; api requires a configured API key
43
+ --model <gpt-5.5|gpt-5.4|gpt-5.4-mini|grok-imagine-image|grok-imagine-image-quality>
44
+ --provider <auto|oauth|api|grok> Provider for this request; grok uses progrok proxy
45
45
  --mode <auto|direct> Prompt handling mode. Default: auto
46
46
  --moderation <auto|low> Default: low
47
47
  --session <id> Apply session style sheet if enabled
@@ -64,10 +64,10 @@ export default async function editCmd(argv) {
64
64
  if (!VALID_MODERATION.has(String(args.moderation)))
65
65
  die(2, "--moderation must be one of: auto, low");
66
66
  if (args.provider && !VALID_PROVIDERS.has(String(args.provider))) {
67
- die(2, "--provider must be one of: auto, oauth, api");
67
+ die(2, "--provider must be one of: auto, oauth, api, grok");
68
68
  }
69
69
  if (args.model && !KNOWN_IMAGE_MODELS.has(String(args.model))) {
70
- die(2, "--model must be one of: gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark");
70
+ die(2, "--model must be one of: gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark, grok-imagine-image, grok-imagine-image-quality");
71
71
  }
72
72
  const VALID_REASONING = new Set(["none", "low", "medium", "high", "xhigh"]);
73
73
  if (args["reasoning-effort"] && !VALID_REASONING.has(String(args["reasoning-effort"]))) {
@@ -8,8 +8,8 @@ import { createCliRequestId, recoverGeneratedOutputs, formatRecoveryHint } from
8
8
  import { errInfo } from "../../lib/errInfo.js";
9
9
  const VALID_MODES = new Set(["auto", "direct"]);
10
10
  const VALID_MODERATION = new Set(["auto", "low"]);
11
- const VALID_PROVIDERS = new Set(["auto", "oauth", "api"]);
12
- const KNOWN_IMAGE_MODELS = new Set(["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex-spark"]);
11
+ const VALID_PROVIDERS = new Set(["auto", "oauth", "api", "grok"]);
12
+ const KNOWN_IMAGE_MODELS = new Set(["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex-spark", "grok-imagine-image", "grok-imagine-image-quality"]);
13
13
 
14
14
  const SPEC = {
15
15
  flags: {
@@ -43,8 +43,8 @@ const HELP = `
43
43
  -s, --size <WxH>
44
44
  -o, --out <file>
45
45
  --json
46
- --model <gpt-5.5|gpt-5.4|gpt-5.4-mini>
47
- --provider <auto|oauth|api> Provider for this request; api requires a configured API key
46
+ --model <gpt-5.5|gpt-5.4|gpt-5.4-mini|grok-imagine-image|grok-imagine-image-quality>
47
+ --provider <auto|oauth|api|grok> Provider for this request; grok uses progrok proxy
48
48
  --mode <auto|direct> Prompt handling mode. Default: auto
49
49
  --moderation <auto|low> Default: low
50
50
  --session <id> Apply session style sheet if enabled
@@ -61,10 +61,10 @@ export default async function editCmd(argv: string[]) {
61
61
  if (!VALID_MODES.has(String(args.mode))) die(2, "--mode must be one of: auto, direct");
62
62
  if (!VALID_MODERATION.has(String(args.moderation))) die(2, "--moderation must be one of: auto, low");
63
63
  if (args.provider && !VALID_PROVIDERS.has(String(args.provider))) {
64
- die(2, "--provider must be one of: auto, oauth, api");
64
+ die(2, "--provider must be one of: auto, oauth, api, grok");
65
65
  }
66
66
  if (args.model && !KNOWN_IMAGE_MODELS.has(String(args.model))) {
67
- die(2, "--model must be one of: gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark");
67
+ die(2, "--model must be one of: gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark, grok-imagine-image, grok-imagine-image-quality");
68
68
  }
69
69
  const VALID_REASONING = new Set(["none", "low", "medium", "high", "xhigh"]);
70
70
  if (args["reasoning-effort"] && !VALID_REASONING.has(String(args["reasoning-effort"]))) {
@@ -7,8 +7,8 @@ import { createCliRequestId, recoverGeneratedOutputs, formatRecoveryHint } from
7
7
  import { errInfo } from "../../lib/errInfo.js";
8
8
  const VALID_MODES = new Set(["auto", "direct"]);
9
9
  const VALID_MODERATION = new Set(["auto", "low"]);
10
- const VALID_PROVIDERS = new Set(["auto", "oauth", "api"]);
11
- const KNOWN_IMAGE_MODELS = new Set(["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex-spark"]);
10
+ const VALID_PROVIDERS = new Set(["auto", "oauth", "api", "grok"]);
11
+ const KNOWN_IMAGE_MODELS = new Set(["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex-spark", "grok-imagine-image", "grok-imagine-image-quality"]);
12
12
  const SPEC = {
13
13
  flags: {
14
14
  quality: { short: "q", type: "string", default: "low" },
@@ -51,8 +51,8 @@ const HELP = `
51
51
  --stdin Read prompt from stdin
52
52
  --timeout <sec> Default: 180
53
53
  --server <url> Override server URL
54
- --model <gpt-5.5|gpt-5.4|gpt-5.4-mini>
55
- --provider <auto|oauth|api> Provider for this request; api requires a configured API key
54
+ --model <gpt-5.5|gpt-5.4|gpt-5.4-mini|grok-imagine-image|grok-imagine-image-quality>
55
+ --provider <auto|oauth|api|grok> Provider for this request; grok uses progrok proxy
56
56
  --mode <auto|direct> Prompt handling mode. Default: auto
57
57
  --moderation <auto|low> Default: low
58
58
  --session <id> Apply session style sheet if enabled
@@ -88,10 +88,10 @@ export default async function genCmd(argv) {
88
88
  if (!VALID_MODERATION.has(String(args.moderation)))
89
89
  die(2, "--moderation must be one of: auto, low");
90
90
  if (args.provider && !VALID_PROVIDERS.has(String(args.provider))) {
91
- die(2, "--provider must be one of: auto, oauth, api");
91
+ die(2, "--provider must be one of: auto, oauth, api, grok");
92
92
  }
93
93
  if (args.model && !KNOWN_IMAGE_MODELS.has(String(args.model))) {
94
- die(2, "--model must be one of: gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark");
94
+ die(2, "--model must be one of: gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark, grok-imagine-image, grok-imagine-image-quality");
95
95
  }
96
96
  const VALID_REASONING = new Set(["none", "low", "medium", "high", "xhigh"]);
97
97
  if (args["reasoning-effort"] && !VALID_REASONING.has(String(args["reasoning-effort"]))) {