ima2-gen 3.15.1 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1
- package/README.md +7 -6
- package/bin/commands/grok.js +150 -64
- package/bin/commands/service.js +5 -4
- package/bin/ima2.js +3 -3
- package/bin/lib/doctor-providers.js +6 -1
- package/bin/lib/doctor-runtime.js +1 -1
- package/config.js +0 -9
- package/docs/API.md +7 -7
- package/docs/API.zh-CN.md +7 -7
- package/docs/API.zh-TW.md +7 -7
- package/docs/CLI.md +9 -8
- package/docs/CLI.zh-CN.md +8 -8
- package/docs/CLI.zh-TW.md +8 -8
- package/docs/README.ko.md +5 -6
- package/docs/README.zh-CN.md +6 -5
- package/docs/README.zh-TW.md +6 -5
- package/docs/migration/runtime-test-inventory.md +4 -6
- package/lib/agentPlannerModel.js +17 -16
- package/lib/capabilities.js +3 -2
- package/lib/errors/providerMap.js +13 -0
- package/lib/grokImageCore.js +9 -16
- package/lib/grokImagePlanner.js +15 -3
- package/lib/grokRuntime.js +47 -16
- package/lib/grokVideoAdapter.js +23 -7
- package/lib/grokVideoPoll.js +3 -3
- package/lib/grokVideoShared.js +6 -13
- package/lib/promptBuilder/router.js +22 -6
- package/lib/providers/adapters/grokExecution.js +15 -14
- package/lib/providers/adapters/grokMultimodeOperations.js +9 -7
- package/lib/providers/adapters/grokOperations.js +19 -12
- package/lib/providers/execution/admission.js +20 -4
- package/lib/providers/registry.js +1 -1
- package/lib/runtimeContext.js +0 -12
- package/lib/videoExtendI2vOperation.js +5 -1
- package/lib/xaiAuth.js +369 -0
- package/lib/xaiDeviceLogin.js +157 -0
- package/package.json +2 -4
- package/routes/auth.js +18 -26
- package/routes/grok.js +25 -19
- package/routes/health.js +4 -5
- package/routes/models.js +12 -26
- package/routes/quota.js +2 -1
- package/routes/video.js +7 -2
- package/routes/videoExtended.js +37 -24
- package/server.js +7 -58
- package/skills/ima2/SKILL.md +2 -2
- package/ui/dist/.vite/manifest.json +56 -56
- package/ui/dist/assets/{AgentWorkspace-CLJDCRMQ.js → AgentWorkspace-DlLaTsPK.js} +1 -1
- package/ui/dist/assets/{App-DkvU6Sex.js → App-BfpvLzSs.js} +4 -4
- package/ui/dist/assets/{AssetGenWorkspace-BepUrz23.js → AssetGenWorkspace-C8eIs-bS.js} +2 -2
- package/ui/dist/assets/{AssetsWorkspace-IipC1FdD.js → AssetsWorkspace-BcbAM8uC.js} +1 -1
- package/ui/dist/assets/{CardNewsWorkspace-ZXDwYz4l.js → CardNewsWorkspace-CM5hwbRV.js} +1 -1
- package/ui/dist/assets/{GenerationRequestLogPanel-BL2C0DcW.js → GenerationRequestLogPanel-CTs8OymS.js} +1 -1
- package/ui/dist/assets/{HomeWorkspace-DFfrwS9a.js → HomeWorkspace-KGUtIZyG.js} +1 -1
- package/ui/dist/assets/{KeyingPanel-BQkEMTe9.js → KeyingPanel-D8ZHmWcC.js} +1 -1
- package/ui/dist/assets/{NodeCanvas-5u8IO1MA.js → NodeCanvas-D2N3m-1s.js} +1 -1
- package/ui/dist/assets/{PromptBuilderPanel-DNt7LHMi.js → PromptBuilderPanel-BolZnOa7.js} +1 -1
- package/ui/dist/assets/{PromptImportDialog-Bl-SB4mK.js → PromptImportDialog-DBpe7Vkj.js} +2 -2
- package/ui/dist/assets/{PromptImportDiscoverySection-DdZAdRMW.js → PromptImportDiscoverySection-Dk6v6lUZ.js} +1 -1
- package/ui/dist/assets/{PromptImportFolderSection-DLHQKl9T.js → PromptImportFolderSection-BE7Nfq9Y.js} +1 -1
- package/ui/dist/assets/{PromptLibraryPanel-PLWyvEz1.js → PromptLibraryPanel-Qdujpb4L.js} +2 -2
- package/ui/dist/assets/{SettingsWorkspace-Etfeu2IF.js → SettingsWorkspace-Dm4wezu_.js} +1 -1
- package/ui/dist/assets/{SpriteRecipeWorkspace-D7H5seOM.js → SpriteRecipeWorkspace-D9do9V7F.js} +1 -1
- package/ui/dist/assets/index-CfGRmfFv.js +22 -0
- package/ui/dist/assets/{index-BAkbTbUC.js → index-CfrOcJIe.js} +3 -3
- package/ui/dist/assets/{pptxgen.es-Apxh5DQ9.js → pptxgen.es-BLI_YKez.js} +1 -1
- package/ui/dist/assets/{promptBuilderStore-prvdLIUP.js → promptBuilderStore-BMiudG9n.js} +1 -1
- package/ui/dist/assets/useAgentDialogFocus-CCj5EYE9.js +1 -0
- package/ui/dist/index.html +1 -1
- package/lib/grokProxyLauncher.js +0 -279
- package/node_modules/array-flatten/LICENSE +0 -21
- package/node_modules/array-flatten/README.md +0 -43
- package/node_modules/array-flatten/array-flatten.js +0 -64
- package/node_modules/array-flatten/package.json +0 -39
- package/node_modules/bundle-name/index.js +0 -5
- package/node_modules/bundle-name/license +0 -9
- package/node_modules/bundle-name/package.json +0 -45
- package/node_modules/bundle-name/readme.md +0 -23
- package/node_modules/bytes/History.md +0 -97
- package/node_modules/bytes/LICENSE +0 -23
- package/node_modules/bytes/Readme.md +0 -152
- package/node_modules/bytes/index.js +0 -170
- package/node_modules/bytes/package.json +0 -42
- package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
- package/node_modules/call-bind-apply-helpers/LICENSE +0 -21
- package/node_modules/call-bind-apply-helpers/README.md +0 -62
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
- package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
- package/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/node_modules/call-bind-apply-helpers/package.json +0 -85
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
- package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
- package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
- package/node_modules/call-bound/.eslintrc +0 -13
- package/node_modules/call-bound/.github/FUNDING.yml +0 -12
- package/node_modules/call-bound/.nycrc +0 -9
- package/node_modules/call-bound/CHANGELOG.md +0 -42
- package/node_modules/call-bound/LICENSE +0 -21
- package/node_modules/call-bound/README.md +0 -53
- package/node_modules/call-bound/index.d.ts +0 -94
- package/node_modules/call-bound/index.js +0 -19
- package/node_modules/call-bound/package.json +0 -99
- package/node_modules/call-bound/test/index.js +0 -61
- package/node_modules/call-bound/tsconfig.json +0 -10
- package/node_modules/commander/LICENSE +0 -22
- package/node_modules/commander/Readme.md +0 -1149
- package/node_modules/commander/esm.mjs +0 -16
- package/node_modules/commander/index.js +0 -24
- package/node_modules/commander/lib/argument.js +0 -149
- package/node_modules/commander/lib/command.js +0 -2662
- package/node_modules/commander/lib/error.js +0 -39
- package/node_modules/commander/lib/help.js +0 -709
- package/node_modules/commander/lib/option.js +0 -367
- package/node_modules/commander/lib/suggestSimilar.js +0 -101
- package/node_modules/commander/package-support.json +0 -16
- package/node_modules/commander/package.json +0 -82
- package/node_modules/commander/typings/esm.d.mts +0 -3
- package/node_modules/commander/typings/index.d.ts +0 -1045
- package/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/content-type/LICENSE +0 -22
- package/node_modules/content-type/README.md +0 -94
- package/node_modules/content-type/index.js +0 -225
- package/node_modules/content-type/package.json +0 -42
- package/node_modules/cookie/LICENSE +0 -24
- package/node_modules/cookie/README.md +0 -317
- package/node_modules/cookie/SECURITY.md +0 -25
- package/node_modules/cookie/index.js +0 -335
- package/node_modules/cookie/package.json +0 -44
- package/node_modules/default-browser/index.d.ts +0 -29
- package/node_modules/default-browser/index.js +0 -34
- package/node_modules/default-browser/license +0 -9
- package/node_modules/default-browser/package.json +0 -54
- package/node_modules/default-browser/readme.md +0 -24
- package/node_modules/default-browser/windows.js +0 -57
- package/node_modules/default-browser-id/index.js +0 -25
- package/node_modules/default-browser-id/license +0 -9
- package/node_modules/default-browser-id/package.json +0 -41
- package/node_modules/default-browser-id/readme.md +0 -19
- package/node_modules/define-lazy-prop/index.d.ts +0 -31
- package/node_modules/define-lazy-prop/index.js +0 -18
- package/node_modules/define-lazy-prop/license +0 -9
- package/node_modules/define-lazy-prop/package.json +0 -51
- package/node_modules/define-lazy-prop/readme.md +0 -55
- package/node_modules/depd/History.md +0 -103
- package/node_modules/depd/LICENSE +0 -22
- package/node_modules/depd/Readme.md +0 -280
- package/node_modules/depd/index.js +0 -538
- package/node_modules/depd/lib/browser/index.js +0 -77
- package/node_modules/depd/package.json +0 -45
- package/node_modules/destroy/LICENSE +0 -23
- package/node_modules/destroy/README.md +0 -63
- package/node_modules/destroy/index.js +0 -209
- package/node_modules/destroy/package.json +0 -48
- package/node_modules/dunder-proto/.eslintrc +0 -5
- package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
- package/node_modules/dunder-proto/.nycrc +0 -13
- package/node_modules/dunder-proto/CHANGELOG.md +0 -24
- package/node_modules/dunder-proto/LICENSE +0 -21
- package/node_modules/dunder-proto/README.md +0 -54
- package/node_modules/dunder-proto/get.d.ts +0 -5
- package/node_modules/dunder-proto/get.js +0 -30
- package/node_modules/dunder-proto/package.json +0 -76
- package/node_modules/dunder-proto/set.d.ts +0 -5
- package/node_modules/dunder-proto/set.js +0 -35
- package/node_modules/dunder-proto/test/get.js +0 -34
- package/node_modules/dunder-proto/test/index.js +0 -4
- package/node_modules/dunder-proto/test/set.js +0 -50
- package/node_modules/dunder-proto/tsconfig.json +0 -9
- package/node_modules/ee-first/LICENSE +0 -22
- package/node_modules/ee-first/README.md +0 -80
- package/node_modules/ee-first/index.js +0 -95
- package/node_modules/ee-first/package.json +0 -29
- package/node_modules/encodeurl/LICENSE +0 -22
- package/node_modules/encodeurl/README.md +0 -109
- package/node_modules/encodeurl/index.js +0 -60
- package/node_modules/encodeurl/package.json +0 -40
- package/node_modules/es-define-property/.eslintrc +0 -13
- package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
- package/node_modules/es-define-property/.nycrc +0 -9
- package/node_modules/es-define-property/CHANGELOG.md +0 -29
- package/node_modules/es-define-property/LICENSE +0 -21
- package/node_modules/es-define-property/README.md +0 -49
- package/node_modules/es-define-property/index.d.ts +0 -3
- package/node_modules/es-define-property/index.js +0 -14
- package/node_modules/es-define-property/package.json +0 -81
- package/node_modules/es-define-property/test/index.js +0 -56
- package/node_modules/es-define-property/tsconfig.json +0 -10
- package/node_modules/es-errors/.eslintrc +0 -5
- package/node_modules/es-errors/.github/FUNDING.yml +0 -12
- package/node_modules/es-errors/CHANGELOG.md +0 -40
- package/node_modules/es-errors/LICENSE +0 -21
- package/node_modules/es-errors/README.md +0 -55
- package/node_modules/es-errors/eval.d.ts +0 -3
- package/node_modules/es-errors/eval.js +0 -4
- package/node_modules/es-errors/index.d.ts +0 -3
- package/node_modules/es-errors/index.js +0 -4
- package/node_modules/es-errors/package.json +0 -80
- package/node_modules/es-errors/range.d.ts +0 -3
- package/node_modules/es-errors/range.js +0 -4
- package/node_modules/es-errors/ref.d.ts +0 -3
- package/node_modules/es-errors/ref.js +0 -4
- package/node_modules/es-errors/syntax.d.ts +0 -3
- package/node_modules/es-errors/syntax.js +0 -4
- package/node_modules/es-errors/test/index.js +0 -19
- package/node_modules/es-errors/tsconfig.json +0 -49
- package/node_modules/es-errors/type.d.ts +0 -3
- package/node_modules/es-errors/type.js +0 -4
- package/node_modules/es-errors/uri.d.ts +0 -3
- package/node_modules/es-errors/uri.js +0 -4
- package/node_modules/es-object-atoms/.eslintrc +0 -16
- package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
- package/node_modules/es-object-atoms/CHANGELOG.md +0 -37
- package/node_modules/es-object-atoms/LICENSE +0 -21
- package/node_modules/es-object-atoms/README.md +0 -63
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
- package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
- package/node_modules/es-object-atoms/ToObject.js +0 -10
- package/node_modules/es-object-atoms/index.d.ts +0 -3
- package/node_modules/es-object-atoms/index.js +0 -4
- package/node_modules/es-object-atoms/isObject.d.ts +0 -3
- package/node_modules/es-object-atoms/isObject.js +0 -6
- package/node_modules/es-object-atoms/package.json +0 -80
- package/node_modules/es-object-atoms/test/index.js +0 -38
- package/node_modules/es-object-atoms/tsconfig.json +0 -6
- package/node_modules/escape-html/LICENSE +0 -24
- package/node_modules/escape-html/Readme.md +0 -43
- package/node_modules/escape-html/index.js +0 -78
- package/node_modules/escape-html/package.json +0 -24
- package/node_modules/etag/HISTORY.md +0 -83
- package/node_modules/etag/LICENSE +0 -22
- package/node_modules/etag/README.md +0 -159
- package/node_modules/etag/index.js +0 -131
- package/node_modules/etag/package.json +0 -47
- package/node_modules/forwarded/HISTORY.md +0 -21
- package/node_modules/forwarded/LICENSE +0 -22
- package/node_modules/forwarded/README.md +0 -57
- package/node_modules/forwarded/index.js +0 -90
- package/node_modules/forwarded/package.json +0 -45
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/get-intrinsic/.eslintrc +0 -42
- package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
- package/node_modules/get-intrinsic/.nycrc +0 -9
- package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
- package/node_modules/get-intrinsic/LICENSE +0 -21
- package/node_modules/get-intrinsic/README.md +0 -71
- package/node_modules/get-intrinsic/index.js +0 -378
- package/node_modules/get-intrinsic/package.json +0 -97
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/node_modules/get-proto/.eslintrc +0 -10
- package/node_modules/get-proto/.github/FUNDING.yml +0 -12
- package/node_modules/get-proto/.nycrc +0 -9
- package/node_modules/get-proto/CHANGELOG.md +0 -21
- package/node_modules/get-proto/LICENSE +0 -21
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
- package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/node_modules/get-proto/README.md +0 -50
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/node_modules/get-proto/index.d.ts +0 -5
- package/node_modules/get-proto/index.js +0 -27
- package/node_modules/get-proto/package.json +0 -81
- package/node_modules/get-proto/test/index.js +0 -68
- package/node_modules/get-proto/tsconfig.json +0 -9
- package/node_modules/gopd/.eslintrc +0 -16
- package/node_modules/gopd/.github/FUNDING.yml +0 -12
- package/node_modules/gopd/CHANGELOG.md +0 -45
- package/node_modules/gopd/LICENSE +0 -21
- package/node_modules/gopd/README.md +0 -40
- package/node_modules/gopd/gOPD.d.ts +0 -1
- package/node_modules/gopd/gOPD.js +0 -4
- package/node_modules/gopd/index.d.ts +0 -5
- package/node_modules/gopd/index.js +0 -15
- package/node_modules/gopd/package.json +0 -77
- package/node_modules/gopd/test/index.js +0 -36
- package/node_modules/gopd/tsconfig.json +0 -9
- package/node_modules/has-symbols/.eslintrc +0 -11
- package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
- package/node_modules/has-symbols/.nycrc +0 -9
- package/node_modules/has-symbols/CHANGELOG.md +0 -91
- package/node_modules/has-symbols/LICENSE +0 -21
- package/node_modules/has-symbols/README.md +0 -46
- package/node_modules/has-symbols/index.d.ts +0 -3
- package/node_modules/has-symbols/index.js +0 -14
- package/node_modules/has-symbols/package.json +0 -111
- package/node_modules/has-symbols/shams.d.ts +0 -3
- package/node_modules/has-symbols/shams.js +0 -45
- package/node_modules/has-symbols/test/index.js +0 -22
- package/node_modules/has-symbols/test/shams/core-js.js +0 -29
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
- package/node_modules/has-symbols/test/tests.js +0 -58
- package/node_modules/has-symbols/tsconfig.json +0 -10
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -51
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/eslint.config.mjs +0 -6
- package/node_modules/hasown/index.d.ts +0 -4
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -92
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/http-errors/HISTORY.md +0 -186
- package/node_modules/http-errors/LICENSE +0 -23
- package/node_modules/http-errors/README.md +0 -169
- package/node_modules/http-errors/index.js +0 -290
- package/node_modules/http-errors/package.json +0 -54
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/ipaddr.js/LICENSE +0 -19
- package/node_modules/ipaddr.js/README.md +0 -233
- package/node_modules/ipaddr.js/ipaddr.min.js +0 -1
- package/node_modules/ipaddr.js/lib/ipaddr.js +0 -673
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +0 -68
- package/node_modules/ipaddr.js/package.json +0 -35
- package/node_modules/is-docker/cli.js +0 -5
- package/node_modules/is-docker/index.d.ts +0 -13
- package/node_modules/is-docker/index.js +0 -29
- package/node_modules/is-docker/license +0 -9
- package/node_modules/is-docker/package.json +0 -44
- package/node_modules/is-docker/readme.md +0 -27
- package/node_modules/is-inside-container/cli.js +0 -5
- package/node_modules/is-inside-container/index.d.ts +0 -13
- package/node_modules/is-inside-container/index.js +0 -23
- package/node_modules/is-inside-container/license +0 -9
- package/node_modules/is-inside-container/package.json +0 -51
- package/node_modules/is-inside-container/readme.md +0 -36
- package/node_modules/is-wsl/index.d.ts +0 -15
- package/node_modules/is-wsl/index.js +0 -36
- package/node_modules/is-wsl/license +0 -9
- package/node_modules/is-wsl/package.json +0 -58
- package/node_modules/is-wsl/readme.md +0 -21
- package/node_modules/math-intrinsics/.eslintrc +0 -16
- package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
- package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
- package/node_modules/math-intrinsics/LICENSE +0 -21
- package/node_modules/math-intrinsics/README.md +0 -50
- package/node_modules/math-intrinsics/abs.d.ts +0 -1
- package/node_modules/math-intrinsics/abs.js +0 -4
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
- package/node_modules/math-intrinsics/floor.d.ts +0 -1
- package/node_modules/math-intrinsics/floor.js +0 -4
- package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
- package/node_modules/math-intrinsics/isFinite.js +0 -12
- package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/isInteger.js +0 -16
- package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
- package/node_modules/math-intrinsics/isNaN.js +0 -6
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
- package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
- package/node_modules/math-intrinsics/max.d.ts +0 -1
- package/node_modules/math-intrinsics/max.js +0 -4
- package/node_modules/math-intrinsics/min.d.ts +0 -1
- package/node_modules/math-intrinsics/min.js +0 -4
- package/node_modules/math-intrinsics/mod.d.ts +0 -3
- package/node_modules/math-intrinsics/mod.js +0 -9
- package/node_modules/math-intrinsics/package.json +0 -86
- package/node_modules/math-intrinsics/pow.d.ts +0 -1
- package/node_modules/math-intrinsics/pow.js +0 -4
- package/node_modules/math-intrinsics/round.d.ts +0 -1
- package/node_modules/math-intrinsics/round.js +0 -4
- package/node_modules/math-intrinsics/sign.d.ts +0 -3
- package/node_modules/math-intrinsics/sign.js +0 -11
- package/node_modules/math-intrinsics/test/index.js +0 -192
- package/node_modules/math-intrinsics/tsconfig.json +0 -3
- package/node_modules/methods/HISTORY.md +0 -29
- package/node_modules/methods/LICENSE +0 -24
- package/node_modules/methods/README.md +0 -51
- package/node_modules/methods/index.js +0 -69
- package/node_modules/methods/package.json +0 -36
- package/node_modules/mime/.npmignore +0 -0
- package/node_modules/mime/CHANGELOG.md +0 -164
- package/node_modules/mime/LICENSE +0 -21
- package/node_modules/mime/README.md +0 -90
- package/node_modules/mime/cli.js +0 -8
- package/node_modules/mime/mime.js +0 -108
- package/node_modules/mime/package.json +0 -44
- package/node_modules/mime/src/build.js +0 -53
- package/node_modules/mime/src/test.js +0 -60
- package/node_modules/mime/types.json +0 -1
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -38
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/object-inspect/.eslintrc +0 -53
- package/node_modules/object-inspect/.github/FUNDING.yml +0 -12
- package/node_modules/object-inspect/.nycrc +0 -13
- package/node_modules/object-inspect/CHANGELOG.md +0 -424
- package/node_modules/object-inspect/LICENSE +0 -21
- package/node_modules/object-inspect/example/all.js +0 -23
- package/node_modules/object-inspect/example/circular.js +0 -6
- package/node_modules/object-inspect/example/fn.js +0 -5
- package/node_modules/object-inspect/example/inspect.js +0 -10
- package/node_modules/object-inspect/index.js +0 -544
- package/node_modules/object-inspect/package-support.json +0 -20
- package/node_modules/object-inspect/package.json +0 -105
- package/node_modules/object-inspect/readme.markdown +0 -84
- package/node_modules/object-inspect/test/bigint.js +0 -58
- package/node_modules/object-inspect/test/browser/dom.js +0 -15
- package/node_modules/object-inspect/test/circular.js +0 -16
- package/node_modules/object-inspect/test/deep.js +0 -12
- package/node_modules/object-inspect/test/element.js +0 -53
- package/node_modules/object-inspect/test/err.js +0 -48
- package/node_modules/object-inspect/test/fakes.js +0 -29
- package/node_modules/object-inspect/test/fn.js +0 -76
- package/node_modules/object-inspect/test/global.js +0 -17
- package/node_modules/object-inspect/test/has.js +0 -15
- package/node_modules/object-inspect/test/holes.js +0 -15
- package/node_modules/object-inspect/test/indent-option.js +0 -271
- package/node_modules/object-inspect/test/inspect.js +0 -139
- package/node_modules/object-inspect/test/lowbyte.js +0 -12
- package/node_modules/object-inspect/test/number.js +0 -58
- package/node_modules/object-inspect/test/quoteStyle.js +0 -26
- package/node_modules/object-inspect/test/toStringTag.js +0 -40
- package/node_modules/object-inspect/test/undef.js +0 -12
- package/node_modules/object-inspect/test/values.js +0 -261
- package/node_modules/object-inspect/test-core-js.js +0 -26
- package/node_modules/object-inspect/util.inspect.js +0 -1
- package/node_modules/on-finished/HISTORY.md +0 -98
- package/node_modules/on-finished/LICENSE +0 -23
- package/node_modules/on-finished/README.md +0 -162
- package/node_modules/on-finished/index.js +0 -234
- package/node_modules/on-finished/package.json +0 -39
- package/node_modules/open/index.d.ts +0 -158
- package/node_modules/open/index.js +0 -366
- package/node_modules/open/license +0 -9
- package/node_modules/open/node_modules/wsl-utils/index.d.ts +0 -21
- package/node_modules/open/node_modules/wsl-utils/index.js +0 -57
- package/node_modules/open/node_modules/wsl-utils/license +0 -9
- package/node_modules/open/node_modules/wsl-utils/package.json +0 -46
- package/node_modules/open/node_modules/wsl-utils/readme.md +0 -50
- package/node_modules/open/package.json +0 -68
- package/node_modules/open/readme.md +0 -183
- package/node_modules/open/xdg-open +0 -1267
- package/node_modules/parseurl/HISTORY.md +0 -58
- package/node_modules/parseurl/LICENSE +0 -24
- package/node_modules/parseurl/README.md +0 -133
- package/node_modules/parseurl/index.js +0 -158
- package/node_modules/parseurl/package.json +0 -40
- package/node_modules/progrok/LICENSE +0 -21
- package/node_modules/progrok/README.md +0 -331
- package/node_modules/progrok/THIRD_PARTY_NOTICES.md +0 -13
- package/node_modules/progrok/dist/index.js +0 -1626
- package/node_modules/progrok/dist/index.js.map +0 -1
- package/node_modules/progrok/dist/public/app.js +0 -529
- package/node_modules/progrok/dist/public/index.html +0 -47
- package/node_modules/progrok/dist/public/style.css +0 -392
- package/node_modules/progrok/node_modules/accepts/HISTORY.md +0 -243
- package/node_modules/progrok/node_modules/accepts/LICENSE +0 -23
- package/node_modules/progrok/node_modules/accepts/README.md +0 -140
- package/node_modules/progrok/node_modules/accepts/index.js +0 -238
- package/node_modules/progrok/node_modules/accepts/package.json +0 -47
- package/node_modules/progrok/node_modules/body-parser/HISTORY.md +0 -686
- package/node_modules/progrok/node_modules/body-parser/LICENSE +0 -23
- package/node_modules/progrok/node_modules/body-parser/README.md +0 -476
- package/node_modules/progrok/node_modules/body-parser/index.js +0 -156
- package/node_modules/progrok/node_modules/body-parser/lib/read.js +0 -205
- package/node_modules/progrok/node_modules/body-parser/lib/types/json.js +0 -243
- package/node_modules/progrok/node_modules/body-parser/lib/types/raw.js +0 -101
- package/node_modules/progrok/node_modules/body-parser/lib/types/text.js +0 -121
- package/node_modules/progrok/node_modules/body-parser/lib/types/urlencoded.js +0 -299
- package/node_modules/progrok/node_modules/body-parser/package.json +0 -55
- package/node_modules/progrok/node_modules/content-disposition/HISTORY.md +0 -60
- package/node_modules/progrok/node_modules/content-disposition/LICENSE +0 -22
- package/node_modules/progrok/node_modules/content-disposition/README.md +0 -142
- package/node_modules/progrok/node_modules/content-disposition/index.js +0 -458
- package/node_modules/progrok/node_modules/content-disposition/package.json +0 -44
- package/node_modules/progrok/node_modules/cookie-signature/History.md +0 -42
- package/node_modules/progrok/node_modules/cookie-signature/Readme.md +0 -42
- package/node_modules/progrok/node_modules/cookie-signature/index.js +0 -51
- package/node_modules/progrok/node_modules/cookie-signature/package.json +0 -18
- package/node_modules/progrok/node_modules/debug/.coveralls.yml +0 -1
- package/node_modules/progrok/node_modules/debug/.eslintrc +0 -11
- package/node_modules/progrok/node_modules/debug/.npmignore +0 -9
- package/node_modules/progrok/node_modules/debug/.travis.yml +0 -14
- package/node_modules/progrok/node_modules/debug/CHANGELOG.md +0 -362
- package/node_modules/progrok/node_modules/debug/LICENSE +0 -19
- package/node_modules/progrok/node_modules/debug/Makefile +0 -50
- package/node_modules/progrok/node_modules/debug/README.md +0 -312
- package/node_modules/progrok/node_modules/debug/component.json +0 -19
- package/node_modules/progrok/node_modules/debug/karma.conf.js +0 -70
- package/node_modules/progrok/node_modules/debug/node.js +0 -1
- package/node_modules/progrok/node_modules/debug/node_modules/ms/index.js +0 -152
- package/node_modules/progrok/node_modules/debug/node_modules/ms/license.md +0 -21
- package/node_modules/progrok/node_modules/debug/node_modules/ms/package.json +0 -37
- package/node_modules/progrok/node_modules/debug/node_modules/ms/readme.md +0 -51
- package/node_modules/progrok/node_modules/debug/package.json +0 -49
- package/node_modules/progrok/node_modules/debug/src/browser.js +0 -185
- package/node_modules/progrok/node_modules/debug/src/debug.js +0 -202
- package/node_modules/progrok/node_modules/debug/src/index.js +0 -10
- package/node_modules/progrok/node_modules/debug/src/inspector-log.js +0 -15
- package/node_modules/progrok/node_modules/debug/src/node.js +0 -248
- package/node_modules/progrok/node_modules/express/History.md +0 -3676
- package/node_modules/progrok/node_modules/express/LICENSE +0 -24
- package/node_modules/progrok/node_modules/express/Readme.md +0 -260
- package/node_modules/progrok/node_modules/express/index.js +0 -11
- package/node_modules/progrok/node_modules/express/lib/application.js +0 -661
- package/node_modules/progrok/node_modules/express/lib/express.js +0 -116
- package/node_modules/progrok/node_modules/express/lib/middleware/init.js +0 -43
- package/node_modules/progrok/node_modules/express/lib/middleware/query.js +0 -47
- package/node_modules/progrok/node_modules/express/lib/request.js +0 -525
- package/node_modules/progrok/node_modules/express/lib/response.js +0 -1179
- package/node_modules/progrok/node_modules/express/lib/router/index.js +0 -673
- package/node_modules/progrok/node_modules/express/lib/router/layer.js +0 -181
- package/node_modules/progrok/node_modules/express/lib/router/route.js +0 -230
- package/node_modules/progrok/node_modules/express/lib/utils.js +0 -304
- package/node_modules/progrok/node_modules/express/lib/view.js +0 -182
- package/node_modules/progrok/node_modules/express/package.json +0 -102
- package/node_modules/progrok/node_modules/finalhandler/HISTORY.md +0 -216
- package/node_modules/progrok/node_modules/finalhandler/LICENSE +0 -22
- package/node_modules/progrok/node_modules/finalhandler/README.md +0 -147
- package/node_modules/progrok/node_modules/finalhandler/SECURITY.md +0 -25
- package/node_modules/progrok/node_modules/finalhandler/index.js +0 -341
- package/node_modules/progrok/node_modules/finalhandler/package.json +0 -47
- package/node_modules/progrok/node_modules/fresh/HISTORY.md +0 -70
- package/node_modules/progrok/node_modules/fresh/LICENSE +0 -23
- package/node_modules/progrok/node_modules/fresh/README.md +0 -119
- package/node_modules/progrok/node_modules/fresh/index.js +0 -137
- package/node_modules/progrok/node_modules/fresh/package.json +0 -46
- package/node_modules/progrok/node_modules/iconv-lite/Changelog.md +0 -162
- package/node_modules/progrok/node_modules/iconv-lite/LICENSE +0 -21
- package/node_modules/progrok/node_modules/iconv-lite/README.md +0 -156
- package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -555
- package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-data.js +0 -176
- package/node_modules/progrok/node_modules/iconv-lite/encodings/index.js +0 -22
- package/node_modules/progrok/node_modules/iconv-lite/encodings/internal.js +0 -188
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data.js +0 -174
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -55
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
- package/node_modules/progrok/node_modules/iconv-lite/encodings/utf16.js +0 -177
- package/node_modules/progrok/node_modules/iconv-lite/encodings/utf7.js +0 -290
- package/node_modules/progrok/node_modules/iconv-lite/lib/bom-handling.js +0 -52
- package/node_modules/progrok/node_modules/iconv-lite/lib/extend-node.js +0 -217
- package/node_modules/progrok/node_modules/iconv-lite/lib/index.d.ts +0 -24
- package/node_modules/progrok/node_modules/iconv-lite/lib/index.js +0 -153
- package/node_modules/progrok/node_modules/iconv-lite/lib/streams.js +0 -121
- package/node_modules/progrok/node_modules/iconv-lite/package.json +0 -46
- package/node_modules/progrok/node_modules/media-typer/HISTORY.md +0 -22
- package/node_modules/progrok/node_modules/media-typer/LICENSE +0 -22
- package/node_modules/progrok/node_modules/media-typer/README.md +0 -81
- package/node_modules/progrok/node_modules/media-typer/index.js +0 -270
- package/node_modules/progrok/node_modules/media-typer/package.json +0 -26
- package/node_modules/progrok/node_modules/merge-descriptors/HISTORY.md +0 -21
- package/node_modules/progrok/node_modules/merge-descriptors/LICENSE +0 -23
- package/node_modules/progrok/node_modules/merge-descriptors/README.md +0 -49
- package/node_modules/progrok/node_modules/merge-descriptors/index.js +0 -60
- package/node_modules/progrok/node_modules/merge-descriptors/package.json +0 -39
- package/node_modules/progrok/node_modules/mime-db/HISTORY.md +0 -507
- package/node_modules/progrok/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/progrok/node_modules/mime-db/README.md +0 -100
- package/node_modules/progrok/node_modules/mime-db/db.json +0 -8519
- package/node_modules/progrok/node_modules/mime-db/index.js +0 -12
- package/node_modules/progrok/node_modules/mime-db/package.json +0 -60
- package/node_modules/progrok/node_modules/mime-types/HISTORY.md +0 -397
- package/node_modules/progrok/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/progrok/node_modules/mime-types/README.md +0 -113
- package/node_modules/progrok/node_modules/mime-types/index.js +0 -188
- package/node_modules/progrok/node_modules/mime-types/package.json +0 -44
- package/node_modules/progrok/node_modules/negotiator/HISTORY.md +0 -108
- package/node_modules/progrok/node_modules/negotiator/LICENSE +0 -24
- package/node_modules/progrok/node_modules/negotiator/README.md +0 -203
- package/node_modules/progrok/node_modules/negotiator/index.js +0 -82
- package/node_modules/progrok/node_modules/negotiator/lib/charset.js +0 -169
- package/node_modules/progrok/node_modules/negotiator/lib/encoding.js +0 -184
- package/node_modules/progrok/node_modules/negotiator/lib/language.js +0 -179
- package/node_modules/progrok/node_modules/negotiator/lib/mediaType.js +0 -294
- package/node_modules/progrok/node_modules/negotiator/package.json +0 -42
- package/node_modules/progrok/node_modules/path-to-regexp/LICENSE +0 -21
- package/node_modules/progrok/node_modules/path-to-regexp/Readme.md +0 -35
- package/node_modules/progrok/node_modules/path-to-regexp/index.js +0 -158
- package/node_modules/progrok/node_modules/path-to-regexp/package.json +0 -30
- package/node_modules/progrok/node_modules/raw-body/LICENSE +0 -22
- package/node_modules/progrok/node_modules/raw-body/README.md +0 -223
- package/node_modules/progrok/node_modules/raw-body/index.d.ts +0 -87
- package/node_modules/progrok/node_modules/raw-body/index.js +0 -336
- package/node_modules/progrok/node_modules/raw-body/package.json +0 -47
- package/node_modules/progrok/node_modules/send/HISTORY.md +0 -538
- package/node_modules/progrok/node_modules/send/LICENSE +0 -23
- package/node_modules/progrok/node_modules/send/README.md +0 -327
- package/node_modules/progrok/node_modules/send/SECURITY.md +0 -24
- package/node_modules/progrok/node_modules/send/index.js +0 -1142
- package/node_modules/progrok/node_modules/send/package.json +0 -62
- package/node_modules/progrok/node_modules/serve-static/HISTORY.md +0 -493
- package/node_modules/progrok/node_modules/serve-static/LICENSE +0 -25
- package/node_modules/progrok/node_modules/serve-static/README.md +0 -257
- package/node_modules/progrok/node_modules/serve-static/index.js +0 -209
- package/node_modules/progrok/node_modules/serve-static/package.json +0 -42
- package/node_modules/progrok/node_modules/type-is/HISTORY.md +0 -259
- package/node_modules/progrok/node_modules/type-is/LICENSE +0 -23
- package/node_modules/progrok/node_modules/type-is/README.md +0 -170
- package/node_modules/progrok/node_modules/type-is/index.js +0 -266
- package/node_modules/progrok/node_modules/type-is/package.json +0 -45
- package/node_modules/progrok/package.json +0 -52
- package/node_modules/progrok/skills/progrok/SKILL.md +0 -293
- package/node_modules/proxy-addr/HISTORY.md +0 -161
- package/node_modules/proxy-addr/LICENSE +0 -22
- package/node_modules/proxy-addr/README.md +0 -139
- package/node_modules/proxy-addr/index.js +0 -327
- package/node_modules/proxy-addr/package.json +0 -47
- package/node_modules/qs/.editorconfig +0 -46
- package/node_modules/qs/.github/FUNDING.yml +0 -12
- package/node_modules/qs/.github/SECURITY.md +0 -11
- package/node_modules/qs/.github/THREAT_MODEL.md +0 -78
- package/node_modules/qs/.nycrc +0 -13
- package/node_modules/qs/CHANGELOG.md +0 -822
- package/node_modules/qs/LICENSE.md +0 -29
- package/node_modules/qs/README.md +0 -758
- package/node_modules/qs/dist/qs.js +0 -141
- package/node_modules/qs/eslint.config.mjs +0 -57
- package/node_modules/qs/lib/formats.js +0 -23
- package/node_modules/qs/lib/index.js +0 -11
- package/node_modules/qs/lib/parse.js +0 -403
- package/node_modules/qs/lib/stringify.js +0 -363
- package/node_modules/qs/lib/utils.js +0 -342
- package/node_modules/qs/package.json +0 -94
- package/node_modules/qs/test/empty-keys-cases.js +0 -267
- package/node_modules/qs/test/parse.js +0 -1703
- package/node_modules/qs/test/stringify.js +0 -1448
- package/node_modules/qs/test/utils.js +0 -432
- package/node_modules/range-parser/HISTORY.md +0 -56
- package/node_modules/range-parser/LICENSE +0 -23
- package/node_modules/range-parser/README.md +0 -84
- package/node_modules/range-parser/index.js +0 -162
- package/node_modules/range-parser/package.json +0 -44
- package/node_modules/run-applescript/index.d.ts +0 -66
- package/node_modules/run-applescript/index.js +0 -37
- package/node_modules/run-applescript/license +0 -9
- package/node_modules/run-applescript/package.json +0 -42
- package/node_modules/run-applescript/readme.md +0 -78
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/safer-buffer/LICENSE +0 -21
- package/node_modules/safer-buffer/Porting-Buffer.md +0 -268
- package/node_modules/safer-buffer/Readme.md +0 -156
- package/node_modules/safer-buffer/dangerous.js +0 -58
- package/node_modules/safer-buffer/package.json +0 -34
- package/node_modules/safer-buffer/safer.js +0 -77
- package/node_modules/safer-buffer/tests.js +0 -406
- package/node_modules/setprototypeof/LICENSE +0 -13
- package/node_modules/setprototypeof/README.md +0 -31
- package/node_modules/setprototypeof/index.d.ts +0 -2
- package/node_modules/setprototypeof/index.js +0 -17
- package/node_modules/setprototypeof/package.json +0 -38
- package/node_modules/setprototypeof/test/index.js +0 -24
- package/node_modules/side-channel/.editorconfig +0 -9
- package/node_modules/side-channel/.eslintrc +0 -12
- package/node_modules/side-channel/.github/FUNDING.yml +0 -12
- package/node_modules/side-channel/.nycrc +0 -13
- package/node_modules/side-channel/CHANGELOG.md +0 -110
- package/node_modules/side-channel/LICENSE +0 -21
- package/node_modules/side-channel/README.md +0 -61
- package/node_modules/side-channel/index.d.ts +0 -14
- package/node_modules/side-channel/index.js +0 -43
- package/node_modules/side-channel/package.json +0 -85
- package/node_modules/side-channel/test/index.js +0 -104
- package/node_modules/side-channel/tsconfig.json +0 -9
- package/node_modules/side-channel-list/.editorconfig +0 -9
- package/node_modules/side-channel-list/.eslintrc +0 -11
- package/node_modules/side-channel-list/.github/FUNDING.yml +0 -12
- package/node_modules/side-channel-list/.nycrc +0 -13
- package/node_modules/side-channel-list/CHANGELOG.md +0 -36
- package/node_modules/side-channel-list/LICENSE +0 -21
- package/node_modules/side-channel-list/README.md +0 -62
- package/node_modules/side-channel-list/index.d.ts +0 -13
- package/node_modules/side-channel-list/index.js +0 -111
- package/node_modules/side-channel-list/list.d.ts +0 -14
- package/node_modules/side-channel-list/package.json +0 -77
- package/node_modules/side-channel-list/test/index.js +0 -154
- package/node_modules/side-channel-list/tsconfig.json +0 -9
- package/node_modules/side-channel-map/.editorconfig +0 -9
- package/node_modules/side-channel-map/.eslintrc +0 -11
- package/node_modules/side-channel-map/.github/FUNDING.yml +0 -12
- package/node_modules/side-channel-map/.nycrc +0 -13
- package/node_modules/side-channel-map/CHANGELOG.md +0 -22
- package/node_modules/side-channel-map/LICENSE +0 -21
- package/node_modules/side-channel-map/README.md +0 -62
- package/node_modules/side-channel-map/index.d.ts +0 -15
- package/node_modules/side-channel-map/index.js +0 -68
- package/node_modules/side-channel-map/package.json +0 -80
- package/node_modules/side-channel-map/test/index.js +0 -114
- package/node_modules/side-channel-map/tsconfig.json +0 -9
- package/node_modules/side-channel-weakmap/.editorconfig +0 -9
- package/node_modules/side-channel-weakmap/.eslintrc +0 -12
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +0 -12
- package/node_modules/side-channel-weakmap/.nycrc +0 -13
- package/node_modules/side-channel-weakmap/CHANGELOG.md +0 -28
- package/node_modules/side-channel-weakmap/LICENSE +0 -21
- package/node_modules/side-channel-weakmap/README.md +0 -62
- package/node_modules/side-channel-weakmap/index.d.ts +0 -15
- package/node_modules/side-channel-weakmap/index.js +0 -84
- package/node_modules/side-channel-weakmap/package.json +0 -87
- package/node_modules/side-channel-weakmap/test/index.js +0 -114
- package/node_modules/side-channel-weakmap/tsconfig.json +0 -9
- package/node_modules/statuses/HISTORY.md +0 -87
- package/node_modules/statuses/LICENSE +0 -23
- package/node_modules/statuses/README.md +0 -139
- package/node_modules/statuses/codes.json +0 -65
- package/node_modules/statuses/index.js +0 -146
- package/node_modules/statuses/package.json +0 -49
- package/node_modules/toidentifier/HISTORY.md +0 -9
- package/node_modules/toidentifier/LICENSE +0 -21
- package/node_modules/toidentifier/README.md +0 -61
- package/node_modules/toidentifier/index.js +0 -32
- package/node_modules/toidentifier/package.json +0 -38
- package/node_modules/unpipe/HISTORY.md +0 -4
- package/node_modules/unpipe/LICENSE +0 -22
- package/node_modules/unpipe/README.md +0 -43
- package/node_modules/unpipe/index.js +0 -69
- package/node_modules/unpipe/package.json +0 -27
- package/node_modules/utils-merge/.npmignore +0 -9
- package/node_modules/utils-merge/LICENSE +0 -20
- package/node_modules/utils-merge/README.md +0 -34
- package/node_modules/utils-merge/index.js +0 -23
- package/node_modules/utils-merge/package.json +0 -40
- package/node_modules/vary/HISTORY.md +0 -39
- package/node_modules/vary/LICENSE +0 -22
- package/node_modules/vary/README.md +0 -101
- package/node_modules/vary/index.js +0 -149
- package/node_modules/vary/package.json +0 -43
- package/ui/dist/assets/index-DYtUJ4t0.js +0 -22
- package/ui/dist/assets/useAgentDialogFocus-B2snKbzK.js +0 -1
- package/vendor/progrok-0.2.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -26,7 +26,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
26
26
|
|
|
27
27
|
- **Windows installer npm handling** — compose global npm lockfile path with nested `Join-Path` calls for PowerShell 5.1 compatibility; wrap npm invocations in `Invoke-Npm` with `Continue` error action preference so stderr warnings do not abort the installer (#110, #111).
|
|
28
28
|
|
|
29
|
-
## [
|
|
29
|
+
## [3.16.0] - 2026-09-09
|
|
30
|
+
|
|
31
|
+
### Removed
|
|
32
|
+
|
|
33
|
+
- **Bundled progrok proxy** — the `grok` lane no longer bundles or spawns the progrok child process, and there is no local Grok proxy or port 18645. `IMA2_GROK_PROXY_HOST`, `IMA2_GROK_PROXY_PORT`, `IMA2_NO_GROK_PROXY`, and `IMA2_GROK_RESTART_*` are no longer read; setting them is harmless.
|
|
34
|
+
- **`ima2 grok models` and `ima2 grok proxy`** — the subcommand surface is now `login`, `status [--json] [--probe]`, and `logout`.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- **Native xAI OAuth on the `grok` lane** — image and video requests call `https://api.x.ai` directly with the OAuth session stored in `~/.progrok/auth.json`, obtained through `ima2 grok login` or the web UI and refreshed automatically two minutes before expiry. The credential file keeps its path and schema, so existing users are not asked to log in again, and it is still shared with the progrok CLI for anyone who has that installed. `grok-api` continues to use `XAI_API_KEY` directly. xAI documents only `/v1/me` as accepting OAuth tokens, so this path carries no compatibility promise; `grok-api` remains the documented one.
|
|
39
|
+
- **Grok readiness reporting** — `/api/grok/status` returns `ready`, `no_image_model`, `error`, or `offline` with `reason: "login_required"` when no session is stored, and `/api/health` plus `~/.ima2/server.json` publish `grok: { auth: "oauth" | "none" }`.
|
|
30
40
|
|
|
31
41
|
## [3.15.0] - 2026-09-08
|
|
32
42
|
|
package/README.md
CHANGED
|
@@ -166,12 +166,12 @@ The web UI uses a single `GET /api/events` Server-Sent Events connection for all
|
|
|
166
166
|
|
|
167
167
|
## Provider Paths
|
|
168
168
|
|
|
169
|
-
Image generation can run through the local Codex/ChatGPT OAuth path, a configured OpenAI API key, the
|
|
169
|
+
Image generation can run through the local Codex/ChatGPT OAuth path, a configured OpenAI API key, the Grok provider, or the Gemini provider via Antigravity CLI.
|
|
170
170
|
|
|
171
171
|
- `provider: "oauth"` uses the local Codex OAuth proxy.
|
|
172
172
|
- `provider: "api"` calls the OpenAI Responses API with the hosted `image_generation` tool.
|
|
173
|
-
- `provider: "grok"`
|
|
174
|
-
- `provider: "grok-api"` calls the xAI Images API directly with `XAI_API_KEY` (no
|
|
173
|
+
- `provider: "grok"` calls `https://api.x.ai` directly with the xAI OAuth session stored in `~/.progrok/auth.json`, running mandatory xAI Web Search plus a planner pass (default: `grok-4.5`, configurable in settings or via `--planner-model`) before the xAI Images API call. `grok-4.3` remains available as an explicit compatibility override. Log in once with `ima2 grok login` or the Settings **Switch Account** button; the session refreshes itself two minutes before expiry.
|
|
174
|
+
- `provider: "grok-api"` calls the xAI Images API directly with `XAI_API_KEY` (no OAuth session involved).
|
|
175
175
|
- `provider: "nai"` calls the NovelAI image API with a persistent API token (saved in Settings > API Keys or `NOVELAI_API_KEY`; no fixed token prefix is required). Four models: `nai-diffusion-5-full`, `nai-diffusion-5-curated`, `nai-diffusion-4-5-full`, `nai-diffusion-4-5-curated`. Responses arrive as a ZIP archive that ima2 decodes to PNG. Text-to-image only — reference images, edits, and masks are refused rather than silently dropped. Browser and CLI surfaces expose negative prompt, sampler/schedule, steps/guidance/CFG rescale, seed, presets, Auto SMEA, Decrisper, Variety+, and V5 alpha.
|
|
176
176
|
- `provider: "agy"` spawns the Antigravity CLI (`agy -p`) to generate images via Google Gemini's `default_api:generate_image` tool (model: `nano-banana-2`). Output is fixed at 1024×1024 JPEG, max 3 reference images. No web search, quality, or size controls.
|
|
177
177
|
- `provider: "gemini-api"` calls the Google Generative Language API directly. Supports two models: `nano-banana-2` (Gemini 3.1 Flash Image) and `nano-banana-pro` (Gemini 3 Pro Image). Auth is via `GEMINI_API_KEY` env var, web UI key management, or a Vertex AI service account JSON (`VERTEX_SERVICE_ACCOUNT_JSON`). When both an API key and Vertex credentials are configured, Vertex takes priority. Supports variable aspect ratios (1:1 through 21:9) and four resolution tiers (512px, 1K, 2K, 4K); these controls are only honored on the direct API path — the Vertex AI endpoint ignores aspect/size because it does not accept the `response_format` field. Per-model cost differs: `nano-banana-2` (Flash): 512=$0.001, 1K=$0.003, 2K=$0.004, 4K=$0.006; `nano-banana-pro`: 1K=$0.007, 2K=$0.007, 4K=$0.013. No web search or mask controls.
|
|
@@ -180,6 +180,8 @@ Image generation can run through the local Codex/ChatGPT OAuth path, a configure
|
|
|
180
180
|
|
|
181
181
|
If no provider is specified, the app keeps the current GPT OAuth/default behavior. GPT OAuth and API-key generation default to `gpt-5.6-luna`; the API-key path also defaults to `low` reasoning and `1024x1024` unless the request passes validated options. Grok image generation defaults to `grok-imagine-image-quality`.
|
|
182
182
|
|
|
183
|
+
One caveat on the OAuth Grok lane: xAI documents only `/v1/me` as accepting an OAuth token, so image and video calls to `api.x.ai` with that token ride an undocumented path. It works today — progrok relied on the same path — but it carries no compatibility promise. If xAI closes it, `provider: "grok-api"` with `XAI_API_KEY` is the documented route and stays unaffected.
|
|
184
|
+
|
|
183
185
|
Grok image generation exposes a model picker (`grok-imagine-image` / `grok-imagine-image-quality`) and a size picker (aspect ratio + 1k/2k resolution). The Settings page prefers the Grok Build weekly credits percentage and reset time from `GET /v1/billing?format=credits`; if that source is unavailable, it falls back to the legacy monthly billing window and `$used/$limit`. A **Switch Account** button starts a device-code OAuth flow (`POST /api/auth/switch`) for re-authenticating without leaving the app.
|
|
184
186
|
|
|
185
187
|
Grok video generation defaults to canonical `grok-imagine-video-1.5`; `grok-imagine-video` remains available for base-model-only Ref2V, V2V edit, and extension paths, and the legacy `grok-imagine-video-1.5-preview` string is accepted as an alias. Three modes are auto-detected from reference count: text-to-video (0 refs), image-to-video (1 ref), and reference-to-video (2-14 refs; up to 15s on grok-imagine-video-1.5, 10s on grok-imagine-video). 1080p is available for `grok-imagine-video-1.5` prompt-only text-to-video and single image/frame image-to-video; prompt-only 1.5 uses the internal white-canvas I2V shim before the upstream request. Video controls include duration (1-15s), resolution (480p, 720p, 1080p when supported), and aspect ratio (1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, auto).
|
|
@@ -352,9 +354,6 @@ environment variables > ~/.ima2/config.json > built-in defaults
|
|
|
352
354
|
| `IMA2_API_REASONING_EFFORT` | `low` | Default reasoning effort for `provider: "api"` |
|
|
353
355
|
| `IMA2_API_IMAGE_SIZE` | `1024x1024` | Default size for `provider: "api"` |
|
|
354
356
|
| `IMA2_API_ALLOW_WEB_SEARCH` | `true` | Toggle web search for `provider: "api"` |
|
|
355
|
-
| `IMA2_GROK_PROXY_HOST` | `127.0.0.1` | Host for the bundled progrok proxy |
|
|
356
|
-
| `IMA2_GROK_PROXY_PORT` | `18645` | Port for the bundled progrok proxy |
|
|
357
|
-
| `IMA2_NO_GROK_PROXY` | — | Set `1` to disable automatic progrok startup |
|
|
358
357
|
| `IMA2_GROK_PLANNER_MODEL` | `grok-4.5` | Grok search/planner model (also configurable via settings UI or `--planner-model` CLI flag) |
|
|
359
358
|
| `IMA2_GROK_PLANNER_TIMEOUT_MS` | `900000` | Timeout for the Grok planner call |
|
|
360
359
|
| `IMA2_GROK_SEARCH_TIMEOUT_MS` | `300000` | Timeout for the Grok web-search brief (degrades instead of failing) |
|
|
@@ -368,6 +367,8 @@ environment variables > ~/.ima2/config.json > built-in defaults
|
|
|
368
367
|
| `IMA2_AGY_BIN` | `agy` on PATH | Explicit path to the Antigravity CLI binary for `provider: "agy"` |
|
|
369
368
|
| `IMA2_MAX_PARALLEL` | `24` | Server-wide parallel generation cap |
|
|
370
369
|
|
|
370
|
+
`IMA2_GROK_PROXY_HOST`, `IMA2_GROK_PROXY_PORT`, `IMA2_NO_GROK_PROXY`, and `IMA2_GROK_RESTART_*` were removed in 3.16 together with the local Grok proxy; they are no longer read, and setting them is harmless.
|
|
371
|
+
|
|
371
372
|
### Logging modes
|
|
372
373
|
|
|
373
374
|
`ima2 serve` keeps terminal output intentionally quiet: startup URLs, warnings, and errors stay visible, while request/node/OAuth structured logs are hidden by default.
|
package/bin/commands/grok.js
CHANGED
|
@@ -1,55 +1,154 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ima2 grok — xAI OAuth session management.
|
|
3
|
+
*
|
|
4
|
+
* There is no proxy left to manage: the Grok lanes call https://api.x.ai directly with the
|
|
5
|
+
* session in ~/.progrok/auth.json (lib/xaiAuth.ts). `login` prefers a running ima2 server so
|
|
6
|
+
* the CLI and the web UI drive the same device-code session, and falls back to running the
|
|
7
|
+
* flow in-process when no server answers.
|
|
8
|
+
*/
|
|
9
|
+
import { parseArgs } from "../lib/args.js";
|
|
10
|
+
import { findRunningServer, request } from "../lib/client.js";
|
|
11
|
+
import { color, die, json, out } from "../lib/output.js";
|
|
12
|
+
import { clearGrokCredentials, grokAuthFilePath, loadGrokCredentials, } from "../../lib/xaiAuth.js";
|
|
13
|
+
import { runXaiDeviceLogin } from "../../lib/xaiDeviceLogin.js";
|
|
14
|
+
import { fetchWithGrokAuth, getGrokEndpoint } from "../../lib/grokRuntime.js";
|
|
8
15
|
const HELP = `
|
|
9
16
|
ima2 grok <subcommand> [options]
|
|
10
17
|
|
|
11
|
-
Manage the
|
|
12
|
-
|
|
18
|
+
Manage the xAI (Grok) OAuth session used by the grok image and video lanes.
|
|
19
|
+
Requests go straight to https://api.x.ai; no local proxy is involved.
|
|
13
20
|
|
|
14
21
|
Subcommands:
|
|
15
|
-
login
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
models List available Grok models
|
|
19
|
-
proxy [options] Start the bundled proxy directly
|
|
22
|
+
login Log in to xAI with the OAuth device-code flow
|
|
23
|
+
status [--json] Show the stored session (add --probe to call /v1/models)
|
|
24
|
+
logout Remove the stored xAI session
|
|
20
25
|
|
|
21
26
|
Notes:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
The session is stored in ~/.progrok/auth.json and is shared with the
|
|
28
|
+
progrok CLI if you have it installed.
|
|
29
|
+
ima2 grok login uses a running 'ima2 serve' when one is available so the
|
|
30
|
+
CLI and the web UI share one login; otherwise it runs the flow directly.
|
|
25
31
|
`;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
const SPEC = {
|
|
33
|
+
flags: {
|
|
34
|
+
json: { type: "boolean" },
|
|
35
|
+
probe: { type: "boolean" },
|
|
36
|
+
help: { short: "h", type: "boolean" },
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const POLL_INTERVAL_MS = 3_000;
|
|
40
|
+
function sleep(ms) {
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
setTimeout(resolve, ms);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function printUserCode(info) {
|
|
46
|
+
out("");
|
|
47
|
+
out(` Open ${color.cyan(info.verificationUrl)}`);
|
|
48
|
+
out(` and enter the code ${color.bold(info.userCode)}`);
|
|
49
|
+
out(color.dim(` The code expires in ${Math.round(info.expiresIn / 60)} minutes.`));
|
|
50
|
+
out("");
|
|
51
|
+
}
|
|
52
|
+
/** Relative rendering of an absolute epoch-ms expiry, e.g. "in 58m" or "expired 2h ago". */
|
|
53
|
+
function relativeTime(epochMs) {
|
|
54
|
+
const deltaMs = epochMs - Date.now();
|
|
55
|
+
const minutes = Math.round(Math.abs(deltaMs) / 60_000);
|
|
56
|
+
const span = minutes < 60 ? `${minutes}m` : minutes < 1440 ? `${Math.round(minutes / 60)}h` : `${Math.round(minutes / 1440)}d`;
|
|
57
|
+
return deltaMs >= 0 ? `in ${span}` : `expired ${span} ago`;
|
|
58
|
+
}
|
|
59
|
+
function statusJson(creds) {
|
|
60
|
+
if (!creds)
|
|
61
|
+
return { auth: "none", refreshable: false };
|
|
62
|
+
return {
|
|
63
|
+
auth: "oauth",
|
|
64
|
+
...(creds.email !== undefined ? { email: creds.email } : {}),
|
|
65
|
+
...(creds.expiresAt !== undefined ? { expiresAt: new Date(creds.expiresAt).toISOString() } : {}),
|
|
66
|
+
refreshable: typeof creds.refreshToken === "string" && creds.refreshToken.length > 0,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** Drives the server-side device-code session so the CLI and web UI share one login. */
|
|
70
|
+
async function loginViaServer(base) {
|
|
71
|
+
const start = await request(base, "/api/auth/switch", { method: "POST", body: { provider: "grok" } });
|
|
72
|
+
printUserCode({ userCode: start.userCode, verificationUrl: start.verificationUrl, expiresIn: start.expiresIn });
|
|
73
|
+
const deadline = Date.now() + start.expiresIn * 1000;
|
|
74
|
+
while (Date.now() < deadline) {
|
|
75
|
+
await sleep(POLL_INTERVAL_MS);
|
|
76
|
+
const poll = await request(base, `/api/auth/switch/${encodeURIComponent(start.sessionId)}`);
|
|
77
|
+
if (poll.status === "complete")
|
|
78
|
+
return;
|
|
79
|
+
if (poll.status === "error")
|
|
80
|
+
throw new Error(poll.error || "xAI device login failed");
|
|
81
|
+
if (poll.status === "expired")
|
|
82
|
+
throw new Error("xAI device login expired before it was approved");
|
|
83
|
+
}
|
|
84
|
+
throw new Error("xAI device login expired before it was approved");
|
|
30
85
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
86
|
+
async function loginCmd() {
|
|
87
|
+
let server = null;
|
|
88
|
+
try {
|
|
89
|
+
server = await findRunningServer({ includeEnv: false });
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
// An unreachable or misconfigured server is not a login failure; run the flow locally.
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
if (server)
|
|
96
|
+
await loginViaServer(server.base);
|
|
97
|
+
else
|
|
98
|
+
await runXaiDeviceLogin({ onUserCode: printUserCode });
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
die(1, `Grok login failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
102
|
+
}
|
|
103
|
+
out(color.green("✓ ") + `Grok OAuth session saved to ${grokAuthFilePath()}`);
|
|
104
|
+
}
|
|
105
|
+
/** Lists the grok-imagine model ids the stored session can actually see. */
|
|
106
|
+
async function probeImagineModels() {
|
|
107
|
+
// The grok lane reads only grokAuthHomeDir off the context, and the CLI always wants the
|
|
108
|
+
// real ~/.progrok session, so an empty context is the whole dependency here.
|
|
109
|
+
const ctx = {};
|
|
110
|
+
const response = await fetchWithGrokAuth(ctx, "grok", (credential) => {
|
|
111
|
+
const endpoint = getGrokEndpoint("/v1/models", credential);
|
|
112
|
+
return fetch(endpoint.url, { headers: endpoint.headers, signal: AbortSignal.timeout(20_000) });
|
|
43
113
|
});
|
|
114
|
+
if (!response.ok)
|
|
115
|
+
throw new Error(`xAI /v1/models failed: HTTP ${response.status}`);
|
|
116
|
+
const body = await response.json();
|
|
117
|
+
return (body.data ?? [])
|
|
118
|
+
.map((entry) => entry.id)
|
|
119
|
+
.filter((id) => typeof id === "string" && id.includes("imagine"));
|
|
44
120
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
|
|
121
|
+
/** A probe failure is reported, never thrown, so --json still emits one parseable object. */
|
|
122
|
+
async function probeResult() {
|
|
123
|
+
try {
|
|
124
|
+
return { imagineModels: await probeImagineModels() };
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
return { probeError: error instanceof Error ? error.message : String(error) };
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async function statusCmd(argv) {
|
|
131
|
+
const args = parseArgs(argv, SPEC);
|
|
132
|
+
const creds = loadGrokCredentials();
|
|
133
|
+
const probe = args.probe === true && creds !== null ? await probeResult() : undefined;
|
|
134
|
+
if (args.json) {
|
|
135
|
+
json({ ...statusJson(creds), ...(probe ?? {}) });
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (!creds) {
|
|
139
|
+
out(color.yellow("○ ") + "Not logged in to Grok. Run: ima2 grok login");
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
out(color.green("✓ ") + `Grok OAuth session (${creds.email ?? "email unknown"})`);
|
|
143
|
+
out(` expires: ${creds.expiresAt === undefined ? "unknown" : relativeTime(creds.expiresAt)}`);
|
|
144
|
+
out(` refresh token: ${creds.refreshToken ? "present" : "absent"}`);
|
|
145
|
+
out(color.dim(` file: ${grokAuthFilePath()}`));
|
|
146
|
+
if (!probe)
|
|
147
|
+
return;
|
|
148
|
+
if (probe.probeError !== undefined)
|
|
149
|
+
die(1, `Grok model probe failed: ${probe.probeError}`);
|
|
150
|
+
const ids = probe.imagineModels ?? [];
|
|
151
|
+
out(ids.length ? ` imagine models: ${ids.join(", ")}` : color.yellow(" no grok-imagine model is visible to this session"));
|
|
53
152
|
}
|
|
54
153
|
export default async function grokCmd(argv) {
|
|
55
154
|
const sub = argv[0];
|
|
@@ -57,28 +156,15 @@ export default async function grokCmd(argv) {
|
|
|
57
156
|
out(HELP);
|
|
58
157
|
return;
|
|
59
158
|
}
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
out(color.yellow("⚠ ") + "Login failed. Try again with:\n");
|
|
70
|
-
out(" ima2 grok login\n");
|
|
71
|
-
die(code, "bundled Grok OAuth login failed");
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
die(code, `bundled progrok exited with code ${code}`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (err) {
|
|
79
|
-
die(1, `bundled progrok failed to start: ${err.message}`);
|
|
80
|
-
}
|
|
81
|
-
if (sub === "login") {
|
|
82
|
-
out(color.green("✓ ") + "Grok OAuth is ready for ima2 serve");
|
|
159
|
+
const rest = argv.slice(1);
|
|
160
|
+
if (sub === "login")
|
|
161
|
+
return loginCmd();
|
|
162
|
+
if (sub === "status")
|
|
163
|
+
return statusCmd(rest);
|
|
164
|
+
if (sub === "logout") {
|
|
165
|
+
clearGrokCredentials();
|
|
166
|
+
out(color.green("✓ ") + "Removed the stored Grok OAuth session");
|
|
167
|
+
return;
|
|
83
168
|
}
|
|
169
|
+
die(2, `unknown subcommand '${sub}'. Run 'ima2 grok --help'.`);
|
|
84
170
|
}
|
package/bin/commands/service.js
CHANGED
|
@@ -123,10 +123,11 @@ function reportProviderLiveness(entry) {
|
|
|
123
123
|
if (oauth?.status && oauth.status !== "ready" && oauth.status !== "disabled") {
|
|
124
124
|
console.log(` Warning: GPT OAuth proxy status is "${oauth.status}" — check 'ima2 service logs'.`);
|
|
125
125
|
}
|
|
126
|
-
//
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
console.log("
|
|
126
|
+
// The service runs under its own HOME, so it can read a different
|
|
127
|
+
// ~/.progrok/auth.json than the terminal the user logged in from.
|
|
128
|
+
if (grok?.auth === "none") {
|
|
129
|
+
console.log(" Warning: Grok is not logged in under the service environment.");
|
|
130
|
+
console.log(" Run: ima2 grok login");
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
// ── macOS (launchd) ──
|
package/bin/ima2.js
CHANGED
|
@@ -115,7 +115,7 @@ async function setup() {
|
|
|
115
115
|
saveConfig(config);
|
|
116
116
|
console.log("\n Starting Grok OAuth login...\n");
|
|
117
117
|
try {
|
|
118
|
-
runSelf(["grok", "login"
|
|
118
|
+
runSelf(["grok", "login"]);
|
|
119
119
|
}
|
|
120
120
|
catch {
|
|
121
121
|
console.log("\n Grok login failed or cancelled. You can retry with 'ima2 grok login'.\n");
|
|
@@ -151,7 +151,7 @@ async function setup() {
|
|
|
151
151
|
// Grok OAuth
|
|
152
152
|
console.log(" Running Grok OAuth login...\n");
|
|
153
153
|
try {
|
|
154
|
-
runSelf(["grok", "login"
|
|
154
|
+
runSelf(["grok", "login"]);
|
|
155
155
|
}
|
|
156
156
|
catch {
|
|
157
157
|
console.log("\n Grok login failed. You can retry with 'ima2 grok login'.\n");
|
|
@@ -353,7 +353,7 @@ function showHelp() {
|
|
|
353
353
|
billing API usage / quota
|
|
354
354
|
providers Configured providers
|
|
355
355
|
oauth <sub> GPT OAuth proxy status (ima2 oauth --help)
|
|
356
|
-
grok <sub>
|
|
356
|
+
grok <sub> xAI OAuth login/status/logout (ima2 grok --help)
|
|
357
357
|
config <sub> Config get/set/ls/path/rm (ima2 config --help)
|
|
358
358
|
defaults <sub> Inspect/change model defaults (ima2 defaults --help)
|
|
359
359
|
models List available lane models (ima2 models --help)
|
|
@@ -43,6 +43,9 @@ function inspectOauth(lane) {
|
|
|
43
43
|
}
|
|
44
44
|
if (lane === "grok") {
|
|
45
45
|
const home = homedir();
|
|
46
|
+
// First path is the ima2 session (lib/xaiAuth.ts grokAuthFilePath; spelled out here so
|
|
47
|
+
// the doctor bundle stays free of node:crypto). ~/.grok/auth.json is the xAI CLI file
|
|
48
|
+
// that routes/quota.ts still reads; different schema, never a lib/xaiAuth.ts source.
|
|
46
49
|
const files = [join(home, ".progrok", "auth.json"), join(home, ".grok", "auth.json")];
|
|
47
50
|
if (files.some((path) => existsSync(path))) {
|
|
48
51
|
return { code: "CREDENTIAL_PRESENT", lane, kind: "pass", text: `${lane}: local Grok auth file present` };
|
|
@@ -98,7 +101,9 @@ export function inspectProviderLane(provider, fileConfig) {
|
|
|
98
101
|
return provider.credentials.map((credential) => {
|
|
99
102
|
if (credential.kind === "api-key")
|
|
100
103
|
return inspectApiKey(provider.id, credential, fileConfig);
|
|
101
|
-
|
|
104
|
+
// "oauth" (grok, first-party session) and "oauth-proxy" (a separate local
|
|
105
|
+
// process holds the session) both land on the same per-lane file checks.
|
|
106
|
+
if (credential.kind === "oauth-proxy" || credential.kind === "oauth")
|
|
102
107
|
return inspectOauth(provider.id);
|
|
103
108
|
if (credential.kind === "service-account")
|
|
104
109
|
return inspectServiceAccount(provider.id, credential, fileConfig);
|
|
@@ -2,7 +2,7 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join, resolve } from "node:path";
|
|
4
4
|
import { getUiDistBuildStatus } from "./ui-build.js";
|
|
5
|
-
const RUNTIME_DEPENDENCIES = ["express", "better-sqlite3", "openai", "openai-oauth", "
|
|
5
|
+
const RUNTIME_DEPENDENCIES = ["express", "better-sqlite3", "openai", "openai-oauth", "@openai/codex/package.json", "zod"];
|
|
6
6
|
const REQUIRED_BINS = [["openai-oauth", "openai-oauth"], ["@openai/codex", "codex"]];
|
|
7
7
|
const line = (code, kind, text) => ({ code, kind, text, evidence: "local" });
|
|
8
8
|
export function parseMinimumNodeMajor(engine) {
|
package/config.js
CHANGED
|
@@ -247,15 +247,6 @@ export const config = {
|
|
|
247
247
|
allowWebSearch: pickBool(env.IMA2_API_ALLOW_WEB_SEARCH, fileCfg.apiProvider?.allowWebSearch, true),
|
|
248
248
|
},
|
|
249
249
|
grokProvider: {
|
|
250
|
-
proxyPort: pickInt(env.IMA2_GROK_PROXY_PORT, fileCfg.grokProvider?.proxyPort, 18645),
|
|
251
|
-
proxyHost: pickStr(env.IMA2_GROK_PROXY_HOST, fileCfg.grokProvider?.proxyHost, "127.0.0.1"),
|
|
252
|
-
autoStart: !pickBool(env.IMA2_NO_GROK_PROXY, fileCfg.grokProvider?.disableAutoStart, false),
|
|
253
|
-
restartDelayMs: pickInt(env.IMA2_GROK_RESTART_DELAY_MS, fileCfg.grokProvider?.restartDelayMs, 2000),
|
|
254
|
-
// 6 attempts at 2s doubling to a 60s cap is roughly two minutes: enough to ride out a
|
|
255
|
-
// transient port conflict, short of spinning forever on a broken binary.
|
|
256
|
-
restartMaxAttempts: pickInt(env.IMA2_GROK_RESTART_MAX_ATTEMPTS, fileCfg.grokProvider?.restartMaxAttempts, 6),
|
|
257
|
-
restartMaxDelayMs: pickInt(env.IMA2_GROK_RESTART_MAX_DELAY_MS, fileCfg.grokProvider?.restartMaxDelayMs, 60_000),
|
|
258
|
-
restartHealthyMs: pickInt(env.IMA2_GROK_RESTART_HEALTHY_MS, fileCfg.grokProvider?.restartHealthyMs, 60_000),
|
|
259
250
|
plannerModel: pickStr(env.IMA2_GROK_PLANNER_MODEL, fileCfg.grokProvider?.plannerModel, DEFAULT_GROK_PLANNER_MODEL),
|
|
260
251
|
// Measured 260817: the forced web_search brief takes 70-73 s idle / 44-79 s concurrent,
|
|
261
252
|
// and the planner tool call 9-32 s idle / 28-41 s concurrent. But the reported failure
|
package/docs/API.md
CHANGED
|
@@ -62,9 +62,9 @@ Image generation supports OAuth, API-key, Grok, and Gemini (`agy` and `gemini-ap
|
|
|
62
62
|
|
|
63
63
|
- `provider: "oauth"` uses the local Codex OAuth proxy.
|
|
64
64
|
- `provider: "api"` uses the OpenAI Responses API with the hosted `image_generation` tool.
|
|
65
|
-
- `provider: "grok"`
|
|
65
|
+
- `provider: "grok"` calls `https://api.x.ai` directly with the xAI OAuth session in `~/.progrok/auth.json`. Classic, Node and multimode image generation honor `webSearchEnabled: false` (Node also honors `searchMode: "off"`): this skips `/v1/responses` search, not the configured planner's forced `generate_image` call. Planner default is `grok-4.3`; `grok-4.6` and `grok-4.5` remain selectable overrides. References select `/v1/images/edits` instead of `/v1/images/generations`. Agent's omitted-option search default is unchanged.
|
|
66
66
|
- `provider: "agy"` spawns the Antigravity CLI (`agy -p`) to generate images via Google Gemini's `default_api:generate_image` tool. Model is `nano-banana-2`. Output is fixed at 1024×1024 JPEG. Max 3 reference images (i2i). No web search, quality, size, or mask controls. Multimode returns a single image. Video is unsupported (`AGY_VIDEO_UNSUPPORTED`).
|
|
67
|
-
- `provider: "grok-api"` uses a direct xAI API key with the same image search/planner/image semantics. Missing or blank image credentials are refused with `GROK_API_KEY_MISSING` before admission, never changed to the
|
|
67
|
+
- `provider: "grok-api"` uses a direct xAI API key with the same image search/planner/image semantics. Missing or blank image credentials are refused with `GROK_API_KEY_MISSING` before admission, never changed to the OAuth lane. Video remains a separate path. Configure the key in Settings or `XAI_API_KEY`.
|
|
68
68
|
- `provider: "gemini-api"` calls the Google Generative Language API directly (or Vertex AI with a service account JSON). Supports models `nano-banana-2` (Gemini 3.1 Flash Image) and `nano-banana-pro` (Gemini 3 Pro Image). Supports variable aspect ratios (1:1 through 21:9) and four resolution tiers (512px, 1K, 2K, 4K) on both auth paths — the direct API path sends `generation_config.response_format.image` (snake_case) while the Vertex AI endpoint (`aiplatform.googleapis.com`) sends `generationConfig.imageConfig` (camelCase). With `size: "auto"` the image config is omitted entirely and the model decides ratio/size. Auth: `GEMINI_API_KEY` env var, web UI key management (`/api/keys/gemini`), or a Vertex AI service account JSON (`VERTEX_SERVICE_ACCOUNT_JSON` or `/api/keys/vertex`). When both Vertex credentials and an API key are configured, Vertex takes priority. The chosen auth mode (`apikey` or `vertex`) persists to `~/.ima2/config.json` as `geminiAuthMode` and is restored on server startup. Per-model cost: `nano-banana-2` (Flash): 512=$0.001, 1K=$0.003, 2K=$0.004, 4K=$0.006; `nano-banana-pro`: 1K=$0.007, 2K=$0.007, 4K=$0.013. No web search or mask controls.
|
|
69
69
|
- `provider: "nai"` calls NovelAI text-to-image generation with one of `nai-diffusion-5-full`, `nai-diffusion-5-curated`, `nai-diffusion-4-5-full`, or `nai-diffusion-4-5-curated`. It accepts the provider-native request fields documented below and returns a ZIP that ima2 decodes to PNG. References, edits, and masks are explicitly refused.
|
|
70
70
|
- API-key generation covers classic generate, edit, mask-guided edit, multimode, and node generation.
|
|
@@ -148,11 +148,11 @@ inventing a runtime `lanes` availability result.
|
|
|
148
148
|
|
|
149
149
|
| Method | Path | Notes |
|
|
150
150
|
|---|---|---|
|
|
151
|
-
| `GET` | `/api/health` | Server health, version, paths, provider policy |
|
|
151
|
+
| `GET` | `/api/health` | Server health, version, paths, provider policy; includes `grok: { auth: "oauth" \| "none" }`, mirrored in `~/.ima2/server.json` |
|
|
152
152
|
| `POST` | `/api/admin/stop` | Clean shutdown (local admin only): requires the boot-generated `X-Ima2-Admin-Nonce` from `~/.ima2/server.json`; any request with an `Origin` header is refused (browser drive-by protection). Responds `202` then self-signals SIGTERM |
|
|
153
153
|
| `GET` | `/api/providers` | Provider availability and runtime ports |
|
|
154
154
|
| `GET` | `/api/oauth/status` | OAuth proxy status and visible models |
|
|
155
|
-
| `GET` | `/api/grok/status` |
|
|
155
|
+
| `GET` | `/api/grok/status` | xAI OAuth session state and visible xAI image models: `ready`, `no_image_model`, `error`, or `offline` with `reason: "login_required"` when no session is stored |
|
|
156
156
|
| `GET` | `/api/billing` | Billing/status probe, including API key source when configured |
|
|
157
157
|
| `GET` | `/api/quota` | Provider quota: returns `{ codex, grok, nai }`. Codex windows are `5h` and `7d`. NovelAI returns a `v5-battery` remaining-charge window when available (`resetsAt` is the ISO ETA for +1%, not full recharge), with Anlas balances in `nai.anlasFixed` / `nai.anlasPurchased`; a missing meter has no window. NovelAI account email is always null. Eligible Grok Build xAI OIDC/external auth returns a `weekly` percentage/reset window from `GET /v1/billing?format=credits`. If unavailable, the legacy endpoint may return a `monthly` window plus `billing: { usedUsd, limitUsd }`. |
|
|
158
158
|
|
|
@@ -394,7 +394,7 @@ Image edit / image-to-image generation.
|
|
|
394
394
|
The request includes a prompt and image payload. `provider: "api"` sends the prompt and image through the shared Responses image adapter. Optional masks are forwarded as mask guidance, not a pixel-perfect edit guarantee.
|
|
395
395
|
|
|
396
396
|
With `provider: "grok"`, edit requests are sent to xAI `/v1/images/edits`
|
|
397
|
-
|
|
397
|
+
with the stored OAuth session. Masked Grok edits are rejected before
|
|
398
398
|
upstream with `GROK_MASK_UNSUPPORTED`.
|
|
399
399
|
|
|
400
400
|
Grok multimode plans each attempted image in order and performs search only when
|
|
@@ -879,8 +879,8 @@ Registered only when `config.features.cardNews` is true (`routes/cardNews.ts`).
|
|
|
879
879
|
| `GRAPH_TOO_LARGE` | Graph exceeds node/edge limits |
|
|
880
880
|
| `NODE_NOT_FOUND` | Node metadata was not found |
|
|
881
881
|
| `INVALID_GROK_IMAGE_MODEL` | A Grok request used a model outside `grok-imagine-image` or `grok-imagine-image-quality` |
|
|
882
|
-
| `GROK_RATE_LIMITED` | xAI returned a rate-limit response
|
|
883
|
-
| `GROK_AUTH_FAILED` |
|
|
882
|
+
| `GROK_RATE_LIMITED` | xAI returned a rate-limit response |
|
|
883
|
+
| `GROK_AUTH_FAILED` | The xAI request could not be authenticated |
|
|
884
884
|
| `GROK_SEARCH_TIMEOUT` / `GROK_PLANNER_TIMEOUT` / `GROK_IMAGE_TIMEOUT` | The Grok search, planner, or image API step exceeded its timeout budget |
|
|
885
885
|
| `AGY_GENERATION_FAILED` | Gemini (agy) image generation failed |
|
|
886
886
|
| `AGY_TIMEOUT` | Agy CLI process exceeded its 360-second timeout |
|
package/docs/API.zh-CN.md
CHANGED
|
@@ -14,9 +14,9 @@ http://localhost:3333
|
|
|
14
14
|
|
|
15
15
|
- `provider: "oauth"`使用本地的Codex OAuth代理人。
|
|
16
16
|
- `provider: "api"`使用OpenAI回应API与托管的`image_generation`工具。
|
|
17
|
-
- `provider: "grok"
|
|
17
|
+
- `provider: "grok"`使用保存在`~/.progrok/auth.json`的xAI OAuth会话直接调用`https://api.x.ai`,不再有本地代理进程。经典、节点和代理生成强制运行xAI网页搜索通过`/v1/responses`,然后运行`grok-4.5`计划员与强制本地人通话`generate_image`函数,那么ima2执行xAI `/v1/images/generations`. `grok-4.3`仍然可以作为显式兼容性覆盖使用。如果附加了参考图像、节点父图像或代理当前图像,则最后一步将切换到xAI `/v1/images/edits`因此图像到图像的上下文被保留。
|
|
18
18
|
- `provider: "agy"`产生Antigravity CLI (`agy -p`)通过Google生成图像Gemini's `default_api:generate_image`工具。型号是`nano-banana-2`。输出固定为1024×1024JPEG。最多 3 个参考图像 (i2i)。没有网络搜索、质量、尺寸或遮罩控制。多模式返回单个图像。不支持视频(`AGY_VIDEO_UNSUPPORTED`).
|
|
19
|
-
- `provider: "grok-api"`使用直接xAI API
|
|
19
|
+
- `provider: "grok-api"`使用直接xAI API密钥而不是OAuth会话;缺少或为空的图像凭证会在准入前以`GROK_API_KEY_MISSING`拒绝,绝不改走OAuth通道。与相同的管道`grok`(网页搜索 → 策划 →`/v1/images/generations`),相同的宽高比和分辨率选项。需要一个xAI API通过网络配置的密钥UI密钥管理或`XAI_API_KEY`环境变量。还支持视频生成。
|
|
20
20
|
- `provider: "gemini-api"`调用 Google 生成语言API直接(或Vertex AI使用服务帐户JSON)。支持型号`nano-banana-2` (Gemini3.1 Flash 图像)和`nano-banana-pro` (Gemini3 专业图像)。在两个身份验证路径上支持可变宽高比(1:1 到 21:9)和四个分辨率层(512px、1K、2K、4K)——直接API路径发送`generation_config.response_format.image`(蛇_情况)而Vertex AI端点(`aiplatform.googleapis.com`) 发送`generationConfig.imageConfig`(驼峰式)。和`size: "auto"`图像配置被完全省略,模型决定比率/大小。授权:`GEMINI_API_KEY`环境变量、网络UI密钥管理(`/api/keys/gemini`),或一个Vertex AI服务帐户JSON (`VERTEX_SERVICE_ACCOUNT_JSON`或者`/api/keys/vertex`)。当 Vertex 凭证和APIkey 已配置,Vertex 优先。选择的身份验证模式(`apikey`或者`vertex`)坚持`~/.ima2/config.json`作为`geminiAuthMode`并在服务器启动时恢复。每个模型的成本:`nano-banana-2`(闪存):512=0.001 美元、1K=0.003 美元、2K=0.004 美元、4K=0.006 美元;`nano-banana-pro`:1K=0.007 美元,2K=0.007 美元,4K=0.013 美元。没有网络搜索或掩码控制。
|
|
21
21
|
- API-密钥生成涵盖经典生成、编辑、掩模引导编辑、多模式和节点生成。
|
|
22
22
|
- 如果`provider: "api"`请求时没有API关键,路由在上游之前失败`401`和`API_KEY_REQUIRED`.
|
|
@@ -30,10 +30,10 @@ Grok视频生成用途`POST /api/video/generate` (SSE)。看视频
|
|
|
30
30
|
|
|
31
31
|
|方法|小路|笔记|
|
|
32
32
|
|---|---|---|
|
|
33
|
-
| `GET` | `/api/health`
|
|
33
|
+
| `GET` | `/api/health` |服务器健康状况、版本、路径、提供商策略;包含`grok: { auth: "oauth" \| "none" }`,同样写入`~/.ima2/server.json`|
|
|
34
34
|
| `GET` | `/api/providers` |提供者可用性和运行时端口|
|
|
35
35
|
| `GET` | `/api/oauth/status` | OAuth代理状态和可见模型|
|
|
36
|
-
| `GET` | `/api/grok/status`
|
|
36
|
+
| `GET` | `/api/grok/status` | xAI OAuth会话状态和可见xAI图像模型。返回`ready`、`no_image_model`、`error`或`offline`;没有会话时原因是`login_required`|
|
|
37
37
|
| `GET` | `/api/billing` |计费/状态探测,包括API配置时的密钥源|
|
|
38
38
|
| `GET` | `/api/quota` |供应商配额:回报`{ codex, grok }`。有资格的Grok建造xAIOIDC/外部身份验证返回`weekly`百分比/重置窗口`GET /v1/billing?format=credits`。如果不可用,旧端点可能会返回`monthly`窗口加`billing: { usedUsd, limitUsd }`. |
|
|
39
39
|
|
|
@@ -262,7 +262,7 @@ Grok尺寸映射:
|
|
|
262
262
|
该请求包括提示和图像负载。`provider: "api"`通过共享响应图像适配器发送提示和图像。可选蒙版作为蒙版指导转发,而不是像素完美的编辑保证。
|
|
263
263
|
|
|
264
264
|
和`provider: "grok"`,编辑请求发送至xAI `/v1/images/edits`
|
|
265
|
-
|
|
265
|
+
使用OAuth会话直接发送。蒙面Grok之前编辑被拒绝
|
|
266
266
|
上游与`GROK_MASK_UNSUPPORTED`.
|
|
267
267
|
|
|
268
268
|
Grokmultimode 目前将每个图像请求直接发送到xAI图片API
|
|
@@ -727,8 +727,8 @@ X-Ima2-Tab-Id
|
|
|
727
727
|
| `GRAPH_TOO_LARGE` |图超出节点/边限制|
|
|
728
728
|
| `NODE_NOT_FOUND` |未找到节点元数据|
|
|
729
729
|
| `INVALID_GROK_IMAGE_MODEL` | A Grok请求使用外部模型`grok-imagine-image`或者`grok-imagine-image-quality` |
|
|
730
|
-
| `GROK_RATE_LIMITED` | xAI
|
|
731
|
-
| `GROK_AUTH_FAILED` |
|
|
730
|
+
| `GROK_RATE_LIMITED` | xAI返回了速率限制响应|
|
|
731
|
+
| `GROK_AUTH_FAILED` | xAI请求鉴权失败(OAuth会话无效或已过期,需要重新`ima2 grok login`)|
|
|
732
732
|
| `GROK_SEARCH_TIMEOUT` / `GROK_PLANNER_TIMEOUT` / `GROK_IMAGE_TIMEOUT` |这Grok搜索、规划器或图像API步骤超出了其超时预算|
|
|
733
733
|
| `AGY_GENERATION_FAILED` | Gemini(agy) 图像生成失败|
|
|
734
734
|
| `AGY_TIMEOUT` |阿吉CLI进程超过 360 秒超时|
|
package/docs/API.zh-TW.md
CHANGED
|
@@ -14,9 +14,9 @@ http://localhost:3333
|
|
|
14
14
|
|
|
15
15
|
- `provider: "oauth"`使用本地的Codex OAuth代理人。
|
|
16
16
|
- `provider: "api"`使用OpenAI回應API與託管的`image_generation`工具。
|
|
17
|
-
- `provider: "grok"
|
|
17
|
+
- `provider: "grok"`使用儲存在`~/.progrok/auth.json`的xAI OAuth工作階段直接呼叫`https://api.x.ai`,不再有本機代理程式。經典、節點和代理生成強制運行xAI網頁搜尋透過`/v1/responses`,然後運行`grok-4.5`計劃員與強製本地人通話`generate_image`函數,那麼ima2執行xAI `/v1/images/generations`. `grok-4.3`仍然可以作為顯式相容性覆蓋使用。如果附加了參考影像、節點父映像或代理目前影像,則最後一步將切換到xAI `/v1/images/edits`因此圖像到圖像的上下文被保留。
|
|
18
18
|
- `provider: "agy"`產生Antigravity CLI (`agy -p`)透過Google生成圖像Gemini's `default_api:generate_image`工具。型號是`nano-banana-2`。輸出固定為1024×1024JPEG。最多 3 個參考影像 (i2i)。沒有網路搜尋、品質、尺寸或遮罩控制。多模式返回單一影像。不支援影片(`AGY_VIDEO_UNSUPPORTED`).
|
|
19
|
-
- `provider: "grok-api"`使用直接xAI API
|
|
19
|
+
- `provider: "grok-api"`使用直接xAI API密鑰而不是OAuth工作階段;缺少或為空的影像憑證會在准入前以`GROK_API_KEY_MISSING`拒絕,絕不改走OAuth通道。與相同的管道`grok`(網頁搜尋 → 策劃 →`/v1/images/generations`),相同的寬高比和解析度選項。需要一個xAI API透過網路配置的密鑰UI密鑰管理或`XAI_API_KEY`環境變數。也支援視頻生成。
|
|
20
20
|
- `provider: "gemini-api"`呼叫 Google 生成語言API直接(或Vertex AI使用服務帳戶JSON)。支援型號`nano-banana-2` (Gemini3.1 Flash 影像)和`nano-banana-pro` (Gemini3 專業圖像)。在兩個身份驗證路徑上支援可變寬高比(1:1 到 21:9)和四個解析度層(512px、1K、2K、4K)—直接API路徑發送`generation_config.response_format.image`(蛇_情況)而Vertex AI端點(`aiplatform.googleapis.com`) 發送`generationConfig.imageConfig`(駝峰式)。和`size: "auto"`影像配置被完全省略,模型決定比率/大小。授權:`GEMINI_API_KEY`環境變數、網絡UI密鑰管理(`/api/keys/gemini`),或一個Vertex AI服務帳戶JSON (`VERTEX_SERVICE_ACCOUNT_JSON`或者`/api/keys/vertex`)。當 Vertex 憑證和APIkey 已配置,Vertex 優先。選擇的身份驗證模式(`apikey`或者`vertex`)堅持`~/.ima2/config.json`作為`geminiAuthMode`並在伺服器啟動時恢復。每個模型的成本:`nano-banana-2`(快閃記憶體):512=0.001 美元、1K=0.003 美元、2K=0.004 美元、4K=0.006 美元;`nano-banana-pro`:1K=0.007 美元,2K=0.007 美元,4K=0.013 美元。沒有網路搜尋或遮罩控制。
|
|
21
21
|
- API-金鑰產生涵蓋經典生成、編輯、掩模引導編輯、多模式和節點生成。
|
|
22
22
|
- 如果`provider: "api"`請求時沒有API關鍵,路由在上游之前失敗`401`和`API_KEY_REQUIRED`.
|
|
@@ -30,10 +30,10 @@ Grok影片生成用途`POST /api/video/generate` (SSE)。看影片
|
|
|
30
30
|
|
|
31
31
|
|方法|小路|筆記|
|
|
32
32
|
|---|---|---|
|
|
33
|
-
| `GET` | `/api/health`
|
|
33
|
+
| `GET` | `/api/health` |伺服器健康狀況、版本、路徑、提供者策略;包含`grok: { auth: "oauth" \| "none" }`,同樣寫入`~/.ima2/server.json`|
|
|
34
34
|
| `GET` | `/api/providers` |提供者可用性和運行時端口|
|
|
35
35
|
| `GET` | `/api/oauth/status` | OAuth代理狀態和可見模型|
|
|
36
|
-
| `GET` | `/api/grok/status`
|
|
36
|
+
| `GET` | `/api/grok/status` | xAI OAuth工作階段狀態和可見xAI影像模型。回傳`ready`、`no_image_model`、`error`或`offline`;沒有工作階段時原因是`login_required`|
|
|
37
37
|
| `GET` | `/api/billing` |計費/狀態探測,包括API配置時的密鑰來源|
|
|
38
38
|
| `GET` | `/api/quota` |供應商配額:回報`{ codex, grok }`。有資格的Grok建造xAIOIDC/外部身份驗證返回`weekly`百分比/重置視窗`GET /v1/billing?format=credits`。如果不可用,舊端點可能會返回`monthly`視窗加`billing: { usedUsd, limitUsd }`. |
|
|
39
39
|
|
|
@@ -262,7 +262,7 @@ Grok尺寸映射:
|
|
|
262
262
|
該請求包括提示和圖像負載。`provider: "api"`透過共享響應圖像適配器發送提示和圖像。可選蒙版作為蒙版指導轉發,而不是像素完美的編輯保證。
|
|
263
263
|
|
|
264
264
|
和`provider: "grok"`,編輯請求發送至xAI `/v1/images/edits`
|
|
265
|
-
|
|
265
|
+
使用OAuth工作階段直接傳送。蒙面Grok之前編輯被拒絕
|
|
266
266
|
上游與`GROK_MASK_UNSUPPORTED`.
|
|
267
267
|
|
|
268
268
|
Grokmultimode 目前將每個圖像請求直接發送到xAI圖片API
|
|
@@ -727,8 +727,8 @@ X-Ima2-Tab-Id
|
|
|
727
727
|
| `GRAPH_TOO_LARGE` |圖超出節點/邊限制|
|
|
728
728
|
| `NODE_NOT_FOUND` |未找到節點元數據|
|
|
729
729
|
| `INVALID_GROK_IMAGE_MODEL` | A Grok請求使用外部模型`grok-imagine-image`或者`grok-imagine-image-quality` |
|
|
730
|
-
| `GROK_RATE_LIMITED` | xAI
|
|
731
|
-
| `GROK_AUTH_FAILED` |
|
|
730
|
+
| `GROK_RATE_LIMITED` | xAI回傳了速率限制回應|
|
|
731
|
+
| `GROK_AUTH_FAILED` | xAI請求驗證失敗(OAuth工作階段無效或已過期,需要重新`ima2 grok login`)|
|
|
732
732
|
| `GROK_SEARCH_TIMEOUT` / `GROK_PLANNER_TIMEOUT` / `GROK_IMAGE_TIMEOUT` |這Grok搜尋、規劃器或圖片API步驟超出了其超時預算|
|
|
733
733
|
| `AGY_GENERATION_FAILED` | Gemini(agy) 影像生成失敗|
|
|
734
734
|
| `AGY_TIMEOUT` |阿吉CLI進程超過 360 秒逾時|
|
package/docs/CLI.md
CHANGED
|
@@ -15,7 +15,7 @@ For a quick start, see the [main README](../README.md). For endpoint mapping, se
|
|
|
15
15
|
| `ima2 doctor --installation --json` | Offline package checks without config, account or network access |
|
|
16
16
|
| `ima2 doctor image-probe [--json]` | Run live sanitized Responses image probes for `EMPTY_RESPONSE` support |
|
|
17
17
|
| `ima2 open` | Open the web UI in a browser |
|
|
18
|
-
| `ima2 grok login/status/
|
|
18
|
+
| `ima2 grok login/status/logout` | Manage the xAI OAuth session used by the Grok provider |
|
|
19
19
|
| `ima2 reset` | Remove saved config |
|
|
20
20
|
| `ima2 backfill-thumbs` | Generate missing gallery thumbnails for images and videos (offline, no running server needed) |
|
|
21
21
|
|
|
@@ -113,7 +113,7 @@ Provider override semantics:
|
|
|
113
113
|
|
|
114
114
|
- `api` forces the API-key Responses path and requires a configured API key.
|
|
115
115
|
- `oauth` forces the local OAuth proxy path.
|
|
116
|
-
- `grok`
|
|
116
|
+
- `grok` calls `https://api.x.ai` directly with the xAI OAuth session in `~/.progrok/auth.json`. Classic generation first runs mandatory xAI Web Search through Responses API, then asks `grok-4.5` to call ima2's local `generate_image` tool, then ima2 executes xAI `/v1/images/generations`. `grok-4.3` remains available as an explicit compatibility override. If `--ref` images are attached, the final step uses xAI `/v1/images/edits` instead so image-to-image/reference context is preserved. Models: `grok-imagine-image`, `grok-imagine-image-quality`. Size is mapped to xAI `aspect_ratio` and `resolution`; the UI web-search toggle is OpenAI-provider-only because Grok search is always on in this path.
|
|
117
117
|
- `agy` spawns the Antigravity CLI to generate via Google Gemini (`nano-banana-2`). Fixed 1024×1024 JPEG output, max 3 refs. No web search, quality, size, or mask controls. If `agy` is not on the server process PATH, ima2 also checks common user-local installs such as `~/.local/bin/agy`; set `IMA2_AGY_BIN=/absolute/path/to/agy` to force a specific binary.
|
|
118
118
|
- `gemini-api` calls the Google Generative Language API directly. Models: `nano-banana-2` (Gemini 3.1 Flash Image) and `nano-banana-pro` (Gemini 3 Pro Image). Use `--model nano-banana-2` or `--model nano-banana-pro` to select. Supports `--size` for aspect ratio and resolution (512px–4K) on the direct API path; Vertex AI ignores aspect/size. Requires `GEMINI_API_KEY` or a Vertex AI service account (`VERTEX_SERVICE_ACCOUNT_JSON`). Switching from `agy` or `gemini-api` provider auto-selects the corresponding Gemini model; switching away resets to the GPT default.
|
|
119
119
|
- `atlascloud` calls Atlas Cloud's Media API directly. Models: `openai/gpt-image-2/text-to-image` for text-to-image and `openai/gpt-image-2/edit` when references are attached. Requires `ATLASCLOUD_API_KEY`; web search, reasoning, mask, and video controls are ignored.
|
|
@@ -162,11 +162,12 @@ ima2 node generate "portrait" --provider nai --model nai-diffusion-5-curated \
|
|
|
162
162
|
--nai-uc-preset light --nai-quality-preset light
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
The Grok lane needs no local proxy and no separate install. Use `ima2 grok login`
|
|
166
|
+
once to authorize xAI OAuth; the device-code flow prints a URL and a code, and the
|
|
167
|
+
stored session refreshes itself two minutes before it expires. The session lives in
|
|
168
|
+
`~/.progrok/auth.json` and is shared with the progrok CLI if you happen to have it
|
|
169
|
+
installed. `ima2 grok status --probe` checks it against xAI, and `ima2 grok logout`
|
|
170
|
+
removes it.
|
|
170
171
|
|
|
171
172
|
Grok size mapping follows xAI's image API, not OpenAI's `size` field. ima2
|
|
172
173
|
keeps the requested size in local metadata, but sends `aspect_ratio` such as
|
|
@@ -465,7 +466,7 @@ Card News requires the server to be started with `IMA2_CARD_NEWS=1` (or `feature
|
|
|
465
466
|
| `ima2 billing` | API usage probe via `/api/billing` (OpenAI/API-key credits when configured). Grok and NovelAI quota are web-UI only via `GET /api/quota`: weekly percentage/reset for current Grok Build xAI auth, with legacy monthly `usedUsd`/`limitUsd` fallback. |
|
|
466
467
|
| `ima2 providers` | Configured providers |
|
|
467
468
|
| `ima2 oauth status` | OAuth proxy state |
|
|
468
|
-
| `ima2 grok status` |
|
|
469
|
+
| `ima2 grok status` | Stored xAI OAuth session, with `--probe` for image-model visibility |
|
|
469
470
|
| `ima2 ping` | Health-check the running server |
|
|
470
471
|
|
|
471
472
|
## Config
|