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.
- package/README.md +31 -7
- package/bin/commands/capabilities.js +5 -0
- package/bin/commands/capabilities.ts +5 -0
- package/bin/commands/doctor.js +195 -0
- package/bin/commands/doctor.ts +202 -0
- package/bin/commands/edit.js +6 -6
- package/bin/commands/edit.ts +6 -6
- package/bin/commands/gen.js +6 -6
- package/bin/commands/gen.ts +6 -6
- package/bin/commands/grok.js +61 -0
- package/bin/commands/grok.ts +67 -0
- package/bin/commands/multimode.js +3 -3
- package/bin/commands/multimode.ts +3 -3
- package/bin/commands/node.js +4 -4
- package/bin/commands/node.ts +4 -4
- package/bin/ima2.js +5 -105
- package/bin/ima2.ts +5 -109
- package/config.js +17 -0
- package/config.ts +21 -0
- package/docs/API.md +77 -8
- package/docs/CLI.md +65 -3
- package/docs/FAQ.ko.md +82 -2
- package/docs/FAQ.md +85 -2
- package/docs/PROMPT_STUDIO.ko.md +111 -0
- package/docs/PROMPT_STUDIO.md +115 -0
- package/docs/README.ko.md +27 -7
- package/docs/grok-video-i2v-plan.md +419 -0
- package/docs/grok-video-i2v-research.md +204 -0
- package/docs/migration/runtime-test-inventory.md +12 -1
- package/lib/agentRuntime.js +88 -19
- package/lib/agentRuntime.ts +97 -29
- package/lib/agentSettings.js +1 -1
- package/lib/agentSettings.ts +1 -1
- package/lib/agentTypes.ts +1 -1
- package/lib/capabilities.js +10 -2
- package/lib/capabilities.ts +10 -2
- package/lib/configKeys.js +6 -0
- package/lib/configKeys.ts +6 -1
- package/lib/errorClassify.js +1 -1
- package/lib/errorClassify.ts +1 -1
- package/lib/generationErrors.js +121 -23
- package/lib/generationErrors.ts +100 -13
- package/lib/grokImageAdapter.js +364 -0
- package/lib/grokImageAdapter.ts +483 -0
- package/lib/grokMultimodeAdapter.js +54 -0
- package/lib/grokMultimodeAdapter.ts +84 -0
- package/lib/grokProxyLauncher.js +105 -0
- package/lib/grokProxyLauncher.ts +129 -0
- package/lib/grokRuntime.js +18 -0
- package/lib/grokRuntime.ts +23 -0
- package/lib/grokSizeMapper.js +63 -0
- package/lib/grokSizeMapper.ts +71 -0
- package/lib/grokVideoAdapter.js +374 -0
- package/lib/grokVideoAdapter.ts +438 -0
- package/lib/historyList.js +5 -1
- package/lib/historyList.ts +5 -1
- package/lib/imageMetadata.js +2 -0
- package/lib/imageMetadata.ts +2 -0
- package/lib/imageModels.js +101 -0
- package/lib/imageModels.ts +111 -0
- package/lib/providerOptions.js +15 -1
- package/lib/providerOptions.ts +15 -1
- package/lib/responsesDoctor.js +386 -0
- package/lib/responsesDoctor.ts +456 -0
- package/lib/responsesErrors.js +57 -0
- package/lib/responsesErrors.ts +83 -0
- package/lib/responsesFallback.js +72 -0
- package/lib/responsesFallback.ts +114 -0
- package/lib/responsesImageAdapter.js +121 -174
- package/lib/responsesImageAdapter.ts +136 -211
- package/lib/responsesParse.js +324 -0
- package/lib/responsesParse.ts +452 -0
- package/lib/responsesTools.js +15 -0
- package/lib/responsesTools.ts +28 -0
- package/lib/runtimeContext.js +12 -0
- package/lib/runtimeContext.ts +15 -0
- package/node_modules/array-flatten/LICENSE +21 -0
- package/node_modules/array-flatten/README.md +43 -0
- package/node_modules/array-flatten/array-flatten.js +64 -0
- package/node_modules/array-flatten/package.json +39 -0
- package/node_modules/bundle-name/index.js +5 -0
- package/node_modules/bundle-name/license +9 -0
- package/node_modules/bundle-name/package.json +45 -0
- package/node_modules/bundle-name/readme.md +23 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1149 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2662 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +709 -0
- package/node_modules/commander/lib/option.js +367 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +82 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +1045 -0
- package/node_modules/content-type/HISTORY.md +29 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +94 -0
- package/node_modules/content-type/index.js +225 -0
- package/node_modules/content-type/package.json +42 -0
- package/node_modules/cookie/LICENSE +24 -0
- package/node_modules/cookie/README.md +317 -0
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +335 -0
- package/node_modules/cookie/package.json +44 -0
- package/node_modules/default-browser/index.d.ts +29 -0
- package/node_modules/default-browser/index.js +34 -0
- package/node_modules/default-browser/license +9 -0
- package/node_modules/default-browser/package.json +54 -0
- package/node_modules/default-browser/readme.md +24 -0
- package/node_modules/default-browser/windows.js +57 -0
- package/node_modules/default-browser-id/index.js +25 -0
- package/node_modules/default-browser-id/license +9 -0
- package/node_modules/default-browser-id/package.json +41 -0
- package/node_modules/default-browser-id/readme.md +19 -0
- package/node_modules/define-lazy-prop/index.d.ts +31 -0
- package/node_modules/define-lazy-prop/index.js +18 -0
- package/node_modules/define-lazy-prop/license +9 -0
- package/node_modules/define-lazy-prop/package.json +51 -0
- package/node_modules/define-lazy-prop/readme.md +55 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/destroy/LICENSE +23 -0
- package/node_modules/destroy/README.md +63 -0
- package/node_modules/destroy/index.js +209 -0
- package/node_modules/destroy/package.json +48 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/ee-first/LICENSE +22 -0
- package/node_modules/ee-first/README.md +80 -0
- package/node_modules/ee-first/index.js +95 -0
- package/node_modules/ee-first/package.json +29 -0
- package/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/encodeurl/README.md +109 -0
- package/node_modules/encodeurl/index.js +60 -0
- package/node_modules/encodeurl/package.json +40 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/etag/HISTORY.md +83 -0
- package/node_modules/etag/LICENSE +22 -0
- package/node_modules/etag/README.md +159 -0
- package/node_modules/etag/index.js +131 -0
- package/node_modules/etag/package.json +47 -0
- package/node_modules/forwarded/HISTORY.md +21 -0
- package/node_modules/forwarded/LICENSE +22 -0
- package/node_modules/forwarded/README.md +57 -0
- package/node_modules/forwarded/index.js +90 -0
- package/node_modules/forwarded/package.json +45 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +51 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +4 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/http-errors/HISTORY.md +186 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +290 -0
- package/node_modules/http-errors/package.json +54 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/ipaddr.js/LICENSE +19 -0
- package/node_modules/ipaddr.js/README.md +233 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/node_modules/ipaddr.js/package.json +35 -0
- package/node_modules/is-docker/cli.js +5 -0
- package/node_modules/is-docker/index.d.ts +13 -0
- package/node_modules/is-docker/index.js +29 -0
- package/node_modules/is-docker/license +9 -0
- package/node_modules/is-docker/package.json +44 -0
- package/node_modules/is-docker/readme.md +27 -0
- package/node_modules/is-inside-container/cli.js +5 -0
- package/node_modules/is-inside-container/index.d.ts +13 -0
- package/node_modules/is-inside-container/index.js +23 -0
- package/node_modules/is-inside-container/license +9 -0
- package/node_modules/is-inside-container/package.json +51 -0
- package/node_modules/is-inside-container/readme.md +36 -0
- package/node_modules/is-wsl/index.d.ts +15 -0
- package/node_modules/is-wsl/index.js +36 -0
- package/node_modules/is-wsl/license +9 -0
- package/node_modules/is-wsl/package.json +58 -0
- package/node_modules/is-wsl/readme.md +21 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/methods/HISTORY.md +29 -0
- package/node_modules/methods/LICENSE +24 -0
- package/node_modules/methods/README.md +51 -0
- package/node_modules/methods/index.js +69 -0
- package/node_modules/methods/package.json +36 -0
- package/node_modules/mime/.npmignore +0 -0
- package/node_modules/mime/CHANGELOG.md +164 -0
- package/node_modules/mime/LICENSE +21 -0
- package/node_modules/mime/README.md +90 -0
- package/node_modules/mime/cli.js +8 -0
- package/node_modules/mime/mime.js +108 -0
- package/node_modules/mime/package.json +44 -0
- package/node_modules/mime/src/build.js +53 -0
- package/node_modules/mime/src/test.js +60 -0
- package/node_modules/mime/types.json +1 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +544 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +105 -0
- package/node_modules/object-inspect/readme.markdown +84 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +261 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +98 -0
- package/node_modules/on-finished/LICENSE +23 -0
- package/node_modules/on-finished/README.md +162 -0
- package/node_modules/on-finished/index.js +234 -0
- package/node_modules/on-finished/package.json +39 -0
- package/node_modules/open/index.d.ts +158 -0
- package/node_modules/open/index.js +366 -0
- package/node_modules/open/license +9 -0
- package/node_modules/open/node_modules/wsl-utils/index.d.ts +21 -0
- package/node_modules/open/node_modules/wsl-utils/index.js +57 -0
- package/node_modules/open/node_modules/wsl-utils/license +9 -0
- package/node_modules/open/node_modules/wsl-utils/package.json +46 -0
- package/node_modules/open/node_modules/wsl-utils/readme.md +50 -0
- package/node_modules/open/package.json +68 -0
- package/node_modules/open/readme.md +183 -0
- package/node_modules/open/xdg-open +1267 -0
- package/node_modules/parseurl/HISTORY.md +58 -0
- package/node_modules/parseurl/LICENSE +24 -0
- package/node_modules/parseurl/README.md +133 -0
- package/node_modules/parseurl/index.js +158 -0
- package/node_modules/parseurl/package.json +40 -0
- package/node_modules/progrok/LICENSE +21 -0
- package/node_modules/progrok/README.md +53 -0
- package/node_modules/progrok/THIRD_PARTY_NOTICES.md +13 -0
- package/node_modules/progrok/dist/index.js +1142 -0
- package/node_modules/progrok/dist/index.js.map +1 -0
- package/node_modules/progrok/dist/public/app.js +529 -0
- package/node_modules/progrok/dist/public/index.html +47 -0
- package/node_modules/progrok/dist/public/style.css +392 -0
- package/node_modules/progrok/node_modules/accepts/HISTORY.md +243 -0
- package/node_modules/progrok/node_modules/accepts/LICENSE +23 -0
- package/node_modules/progrok/node_modules/accepts/README.md +140 -0
- package/node_modules/progrok/node_modules/accepts/index.js +238 -0
- package/node_modules/progrok/node_modules/accepts/package.json +47 -0
- package/node_modules/progrok/node_modules/body-parser/HISTORY.md +686 -0
- package/node_modules/progrok/node_modules/body-parser/LICENSE +23 -0
- package/node_modules/progrok/node_modules/body-parser/README.md +476 -0
- package/node_modules/progrok/node_modules/body-parser/index.js +156 -0
- package/node_modules/progrok/node_modules/body-parser/lib/read.js +205 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/json.js +243 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/raw.js +101 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/text.js +121 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/urlencoded.js +299 -0
- package/node_modules/progrok/node_modules/body-parser/package.json +55 -0
- package/node_modules/progrok/node_modules/content-disposition/HISTORY.md +60 -0
- package/node_modules/progrok/node_modules/content-disposition/LICENSE +22 -0
- package/node_modules/progrok/node_modules/content-disposition/README.md +142 -0
- package/node_modules/progrok/node_modules/content-disposition/index.js +458 -0
- package/node_modules/progrok/node_modules/content-disposition/package.json +44 -0
- package/node_modules/progrok/node_modules/cookie-signature/History.md +42 -0
- package/node_modules/progrok/node_modules/cookie-signature/Readme.md +42 -0
- package/node_modules/progrok/node_modules/cookie-signature/index.js +51 -0
- package/node_modules/progrok/node_modules/cookie-signature/package.json +18 -0
- package/node_modules/progrok/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/progrok/node_modules/debug/.eslintrc +11 -0
- package/node_modules/progrok/node_modules/debug/.npmignore +9 -0
- package/node_modules/progrok/node_modules/debug/.travis.yml +14 -0
- package/node_modules/progrok/node_modules/debug/CHANGELOG.md +362 -0
- package/node_modules/progrok/node_modules/debug/LICENSE +19 -0
- package/node_modules/progrok/node_modules/debug/Makefile +50 -0
- package/node_modules/progrok/node_modules/debug/README.md +312 -0
- package/node_modules/progrok/node_modules/debug/component.json +19 -0
- package/node_modules/progrok/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/progrok/node_modules/debug/node.js +1 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/index.js +152 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/license.md +21 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/package.json +37 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/readme.md +51 -0
- package/node_modules/progrok/node_modules/debug/package.json +49 -0
- package/node_modules/progrok/node_modules/debug/src/browser.js +185 -0
- package/node_modules/progrok/node_modules/debug/src/debug.js +202 -0
- package/node_modules/progrok/node_modules/debug/src/index.js +10 -0
- package/node_modules/progrok/node_modules/debug/src/inspector-log.js +15 -0
- package/node_modules/progrok/node_modules/debug/src/node.js +248 -0
- package/node_modules/progrok/node_modules/express/History.md +3676 -0
- package/node_modules/progrok/node_modules/express/LICENSE +24 -0
- package/node_modules/progrok/node_modules/express/Readme.md +260 -0
- package/node_modules/progrok/node_modules/express/index.js +11 -0
- package/node_modules/progrok/node_modules/express/lib/application.js +661 -0
- package/node_modules/progrok/node_modules/express/lib/express.js +116 -0
- package/node_modules/progrok/node_modules/express/lib/middleware/init.js +43 -0
- package/node_modules/progrok/node_modules/express/lib/middleware/query.js +47 -0
- package/node_modules/progrok/node_modules/express/lib/request.js +525 -0
- package/node_modules/progrok/node_modules/express/lib/response.js +1179 -0
- package/node_modules/progrok/node_modules/express/lib/router/index.js +673 -0
- package/node_modules/progrok/node_modules/express/lib/router/layer.js +181 -0
- package/node_modules/progrok/node_modules/express/lib/router/route.js +230 -0
- package/node_modules/progrok/node_modules/express/lib/utils.js +304 -0
- package/node_modules/progrok/node_modules/express/lib/view.js +182 -0
- package/node_modules/progrok/node_modules/express/package.json +102 -0
- package/node_modules/progrok/node_modules/finalhandler/HISTORY.md +216 -0
- package/node_modules/progrok/node_modules/finalhandler/LICENSE +22 -0
- package/node_modules/progrok/node_modules/finalhandler/README.md +147 -0
- package/node_modules/progrok/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/progrok/node_modules/finalhandler/index.js +341 -0
- package/node_modules/progrok/node_modules/finalhandler/package.json +47 -0
- package/node_modules/progrok/node_modules/fresh/HISTORY.md +70 -0
- package/node_modules/progrok/node_modules/fresh/LICENSE +23 -0
- package/node_modules/progrok/node_modules/fresh/README.md +119 -0
- package/node_modules/progrok/node_modules/fresh/index.js +137 -0
- package/node_modules/progrok/node_modules/fresh/package.json +46 -0
- package/node_modules/progrok/node_modules/iconv-lite/Changelog.md +162 -0
- package/node_modules/progrok/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/progrok/node_modules/iconv-lite/README.md +156 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/index.js +22 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/index.js +153 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/streams.js +121 -0
- package/node_modules/progrok/node_modules/iconv-lite/package.json +46 -0
- package/node_modules/progrok/node_modules/media-typer/HISTORY.md +22 -0
- package/node_modules/progrok/node_modules/media-typer/LICENSE +22 -0
- package/node_modules/progrok/node_modules/media-typer/README.md +81 -0
- package/node_modules/progrok/node_modules/media-typer/index.js +270 -0
- package/node_modules/progrok/node_modules/media-typer/package.json +26 -0
- package/node_modules/progrok/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/node_modules/progrok/node_modules/merge-descriptors/LICENSE +23 -0
- package/node_modules/progrok/node_modules/merge-descriptors/README.md +49 -0
- package/node_modules/progrok/node_modules/merge-descriptors/index.js +60 -0
- package/node_modules/progrok/node_modules/merge-descriptors/package.json +39 -0
- package/node_modules/progrok/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/progrok/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/progrok/node_modules/mime-db/README.md +100 -0
- package/node_modules/progrok/node_modules/mime-db/db.json +8519 -0
- package/node_modules/progrok/node_modules/mime-db/index.js +12 -0
- package/node_modules/progrok/node_modules/mime-db/package.json +60 -0
- package/node_modules/progrok/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/progrok/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/progrok/node_modules/mime-types/README.md +113 -0
- package/node_modules/progrok/node_modules/mime-types/index.js +188 -0
- package/node_modules/progrok/node_modules/mime-types/package.json +44 -0
- package/node_modules/progrok/node_modules/negotiator/HISTORY.md +108 -0
- package/node_modules/progrok/node_modules/negotiator/LICENSE +24 -0
- package/node_modules/progrok/node_modules/negotiator/README.md +203 -0
- package/node_modules/progrok/node_modules/negotiator/index.js +82 -0
- package/node_modules/progrok/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/progrok/node_modules/negotiator/lib/encoding.js +184 -0
- package/node_modules/progrok/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/progrok/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/progrok/node_modules/negotiator/package.json +42 -0
- package/node_modules/progrok/node_modules/path-to-regexp/LICENSE +21 -0
- package/node_modules/progrok/node_modules/path-to-regexp/Readme.md +35 -0
- package/node_modules/progrok/node_modules/path-to-regexp/index.js +158 -0
- package/node_modules/progrok/node_modules/path-to-regexp/package.json +30 -0
- package/node_modules/progrok/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/progrok/node_modules/raw-body/README.md +223 -0
- package/node_modules/progrok/node_modules/raw-body/index.d.ts +87 -0
- package/node_modules/progrok/node_modules/raw-body/index.js +336 -0
- package/node_modules/progrok/node_modules/raw-body/package.json +47 -0
- package/node_modules/progrok/node_modules/send/HISTORY.md +538 -0
- package/node_modules/progrok/node_modules/send/LICENSE +23 -0
- package/node_modules/progrok/node_modules/send/README.md +327 -0
- package/node_modules/progrok/node_modules/send/SECURITY.md +24 -0
- package/node_modules/progrok/node_modules/send/index.js +1142 -0
- package/node_modules/progrok/node_modules/send/package.json +62 -0
- package/node_modules/progrok/node_modules/serve-static/HISTORY.md +493 -0
- package/node_modules/progrok/node_modules/serve-static/LICENSE +25 -0
- package/node_modules/progrok/node_modules/serve-static/README.md +257 -0
- package/node_modules/progrok/node_modules/serve-static/index.js +209 -0
- package/node_modules/progrok/node_modules/serve-static/package.json +42 -0
- package/node_modules/progrok/node_modules/type-is/HISTORY.md +259 -0
- package/node_modules/progrok/node_modules/type-is/LICENSE +23 -0
- package/node_modules/progrok/node_modules/type-is/README.md +170 -0
- package/node_modules/progrok/node_modules/type-is/index.js +266 -0
- package/node_modules/progrok/node_modules/type-is/package.json +45 -0
- package/node_modules/progrok/package.json +52 -0
- package/node_modules/progrok/skills/progrok/SKILL.md +228 -0
- package/node_modules/proxy-addr/HISTORY.md +161 -0
- package/node_modules/proxy-addr/LICENSE +22 -0
- package/node_modules/proxy-addr/README.md +139 -0
- package/node_modules/proxy-addr/index.js +327 -0
- package/node_modules/proxy-addr/package.json +47 -0
- package/node_modules/qs/.editorconfig +46 -0
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +812 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +758 -0
- package/node_modules/qs/dist/qs.js +141 -0
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/formats.js +23 -0
- package/node_modules/qs/lib/index.js +11 -0
- package/node_modules/qs/lib/parse.js +373 -0
- package/node_modules/qs/lib/stringify.js +356 -0
- package/node_modules/qs/lib/utils.js +342 -0
- package/node_modules/qs/package.json +94 -0
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +1654 -0
- package/node_modules/qs/test/stringify.js +1319 -0
- package/node_modules/qs/test/utils.js +432 -0
- package/node_modules/range-parser/HISTORY.md +56 -0
- package/node_modules/range-parser/LICENSE +23 -0
- package/node_modules/range-parser/README.md +84 -0
- package/node_modules/range-parser/index.js +162 -0
- package/node_modules/range-parser/package.json +44 -0
- package/node_modules/run-applescript/index.d.ts +66 -0
- package/node_modules/run-applescript/index.js +37 -0
- package/node_modules/run-applescript/license +9 -0
- package/node_modules/run-applescript/package.json +42 -0
- package/node_modules/run-applescript/readme.md +78 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/side-channel/.editorconfig +9 -0
- package/node_modules/side-channel/.eslintrc +12 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +110 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +61 -0
- package/node_modules/side-channel/index.d.ts +14 -0
- package/node_modules/side-channel/index.js +43 -0
- package/node_modules/side-channel/package.json +85 -0
- package/node_modules/side-channel/test/index.js +104 -0
- package/node_modules/side-channel/tsconfig.json +9 -0
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +36 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +111 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +154 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/statuses/HISTORY.md +87 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +139 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/node_modules/utils-merge/.npmignore +9 -0
- package/node_modules/utils-merge/LICENSE +20 -0
- package/node_modules/utils-merge/README.md +34 -0
- package/node_modules/utils-merge/index.js +23 -0
- package/node_modules/utils-merge/package.json +40 -0
- package/node_modules/vary/HISTORY.md +39 -0
- package/node_modules/vary/LICENSE +22 -0
- package/node_modules/vary/README.md +101 -0
- package/node_modules/vary/index.js +149 -0
- package/node_modules/vary/package.json +43 -0
- package/package.json +7 -2
- package/routes/edit.js +85 -13
- package/routes/edit.ts +94 -23
- package/routes/generate.js +118 -11
- package/routes/generate.ts +127 -10
- package/routes/grok.js +22 -0
- package/routes/grok.ts +24 -0
- package/routes/health.js +5 -0
- package/routes/health.ts +5 -0
- package/routes/index.js +4 -0
- package/routes/index.ts +4 -0
- package/routes/multimode.js +71 -26
- package/routes/multimode.ts +80 -39
- package/routes/nodes.js +88 -33
- package/routes/nodes.ts +97 -42
- package/routes/video.js +197 -0
- package/routes/video.ts +216 -0
- package/server.js +42 -1
- package/server.ts +34 -1
- package/skills/ima2/SKILL.md +27 -0
- package/ui/dist/.vite/manifest.json +12 -12
- package/ui/dist/assets/AgentWorkspace-c1_kEfFN.js +3 -0
- package/ui/dist/assets/{CardNewsWorkspace-BBLdwzYU.js → CardNewsWorkspace-CTBT3MbP.js} +2 -2
- package/ui/dist/assets/NodeCanvas-D3ecSAEi.js +7 -0
- package/ui/dist/assets/{PromptBuilderPanel-Y2VygFc0.js → PromptBuilderPanel-CqepukCN.js} +2 -2
- package/ui/dist/assets/{PromptImportDialog-C6lFV-LL.js → PromptImportDialog-Bvr8Q8P2.js} +2 -2
- package/ui/dist/assets/{PromptImportDiscoverySection-D8YJFhND.js → PromptImportDiscoverySection-CyZEXyWP.js} +1 -1
- package/ui/dist/assets/{PromptImportFolderSection-ywfcQolW.js → PromptImportFolderSection-CIl-_pyV.js} +1 -1
- package/ui/dist/assets/{PromptLibraryPanel-fk4KmrGy.js → PromptLibraryPanel-Bj23Q6l9.js} +2 -2
- package/ui/dist/assets/SettingsWorkspace-D_GqtEsP.js +1 -0
- package/ui/dist/assets/index-DMjgFXdO.css +1 -0
- package/ui/dist/assets/index-DQ6jg4Ui.js +32 -0
- package/ui/dist/assets/index-DtSBvfgp.js +1 -0
- package/ui/dist/index.html +2 -2
- package/vendor/progrok-0.1.0.tgz +0 -0
- package/ui/dist/assets/AgentWorkspace-BJe9yxPA.js +0 -3
- package/ui/dist/assets/NodeCanvas-BSZ527J4.js +0 -7
- package/ui/dist/assets/SettingsWorkspace-DL5vhAHQ.js +0 -1
- package/ui/dist/assets/index-BLx55BOg.js +0 -1
- package/ui/dist/assets/index-ByViUJfx.css +0 -1
- 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
|
|
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
|

|
|
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
|
|
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
|
-
|
|
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
|

|
|
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
|

|
|
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` | `
|
|
197
|
-
| `IMA2_INFLIGHT_TERMINAL_TTL_MS` | `
|
|
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
|
+
}
|
package/bin/commands/edit.js
CHANGED
|
@@ -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>
|
|
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"]))) {
|
package/bin/commands/edit.ts
CHANGED
|
@@ -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>
|
|
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"]))) {
|
package/bin/commands/gen.js
CHANGED
|
@@ -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>
|
|
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"]))) {
|