@cartanova/qgrid-cli 2.10.10 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dist/_virtual/_rolldown/runtime.js +1 -10
- package/bundle/dist/application/monit/log-buffer.js +12 -6
- package/bundle/dist/application/monit/monit.frame.js +11 -3
- package/bundle/dist/application/monit/monit.types.js +1 -1
- package/bundle/dist/application/qgrid/conv-routing.js +9 -6
- package/bundle/dist/application/qgrid/expired-token-reminder.js +2 -2
- package/bundle/dist/application/qgrid/oauth.js +31 -4
- package/bundle/dist/application/qgrid/qgrid-image-generation.js +1 -1
- package/bundle/dist/application/qgrid/qgrid-response-format.js +21 -19
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +40 -33
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +128 -93
- package/bundle/dist/application/qgrid/qgrid.frame.js +930 -49
- package/bundle/dist/application/qgrid/qgrid.types.js +212 -5
- package/bundle/dist/application/qgrid/schema-prompt.js +75 -48
- package/bundle/dist/application/qgrid/slack-user-map.js +1 -1
- package/bundle/dist/application/qgrid/token-death.js +1 -1
- package/bundle/dist/application/qgrid/token-subscriber.js +83 -30
- package/bundle/dist/application/qgrid/token-trigger-setup.js +1 -1
- package/bundle/dist/application/qgrid/token-window-keepalive.js +8 -6
- package/bundle/dist/application/qgrid/tool-emulation-schema.js +13 -13
- package/bundle/dist/application/qgrid/tool-emulation.js +19 -15
- package/bundle/dist/application/request-log/json-schema-type-text.js +29 -12
- package/bundle/dist/application/request-log/request-log.model.js +83 -70
- package/bundle/dist/application/request-log/request-log.types.js +1 -1
- package/bundle/dist/application/request-log/zod-code-format.js +1 -1
- package/bundle/dist/application/request-log-step/request-log-step.model.js +1 -1
- package/bundle/dist/application/request-log-step/request-log-step.types.js +1 -1
- package/bundle/dist/application/setting/setting.constant.js +1 -1
- package/bundle/dist/application/setting/setting.model.js +2 -2
- package/bundle/dist/application/setting/setting.store.js +2 -2
- package/bundle/dist/application/setting/setting.types.js +1 -1
- package/bundle/dist/application/sonamu.generated.js +32 -16
- package/bundle/dist/application/sonamu.generated.sso.js +1 -1
- package/bundle/dist/application/token/token.model.js +26 -9
- package/bundle/dist/application/token/token.types.js +20 -3
- package/bundle/dist/i18n/en.js +15 -1
- package/bundle/dist/i18n/ko.js +15 -1
- package/bundle/dist/i18n/sd.generated.js +1 -1
- package/bundle/dist/migrations/20260807133553_manual__backfill_request_log_cost.js +8 -6
- package/bundle/dist/server-bootstrap.js +4 -2
- package/bundle/dist/server-error-handler.js +1 -1
- package/bundle/dist/sonamu.config.js +37 -8
- package/bundle/dist/startup-migrations.js +17 -7
- package/bundle/dist/testing/global.js +1 -1
- package/bundle/dist/testing/schema-bench.js +0 -0
- package/bundle/dist/testing/test-database-name.js +1 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-constants.js +1 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +11 -5
- package/bundle/dist/utils/providers/anthropic/anthropic-quota.js +4 -4
- package/bundle/dist/utils/providers/anthropic/anthropic-thinking.js +1 -1
- package/bundle/dist/utils/providers/anthropic/claude-session.js +20 -19
- package/bundle/dist/utils/providers/anthropic/fence-strip.js +1 -1
- package/bundle/dist/utils/providers/anthropic/stream-json-adapter.js +49 -23
- package/bundle/dist/utils/providers/common/credentials.js +5 -1
- package/bundle/dist/utils/providers/common/effort.js +3 -3
- package/bundle/dist/utils/providers/common/model-cost.js +69 -14
- package/bundle/dist/utils/providers/common/provider-types.js +29 -1
- package/bundle/dist/utils/providers/common/schema-validation.js +78 -40
- package/bundle/dist/utils/providers/common/smooth-weighted-round-robin.js +1 -1
- package/bundle/dist/utils/providers/common/strictifier.js +62 -43
- package/bundle/dist/utils/providers/common/thinking.js +3 -2
- package/bundle/dist/utils/providers/common/ttft.js +1 -1
- package/bundle/dist/utils/providers/grok/grok-backend-protocol.js +427 -0
- package/bundle/dist/utils/providers/grok/grok-constants.js +55 -0
- package/bundle/dist/utils/providers/grok/grok-direct-client.js +196 -0
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +1313 -0
- package/bundle/dist/utils/providers/grok/grok-headers.js +118 -0
- package/bundle/dist/utils/providers/grok/grok-media-client.js +420 -0
- package/bundle/dist/utils/providers/grok/grok-models.js +114 -0
- package/bundle/dist/utils/providers/grok/grok-oauth.js +455 -0
- package/bundle/dist/utils/providers/grok/grok-quota.js +119 -0
- package/bundle/dist/utils/providers/grok/grok-refresh.js +192 -0
- package/bundle/dist/utils/providers/grok/grok-types.js +186 -0
- package/bundle/dist/utils/providers/grok/grok-voice-client.js +199 -0
- package/bundle/dist/utils/providers/grok/index.js +11 -0
- package/bundle/dist/utils/providers/openai/openai-backend-protocol.js +111 -83
- package/bundle/dist/utils/providers/openai/openai-callback-relay.js +3 -2
- package/bundle/dist/utils/providers/openai/openai-constants.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-direct-client.js +23 -7
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +143 -106
- package/bundle/dist/utils/providers/openai/openai-image-generation.js +48 -33
- package/bundle/dist/utils/providers/openai/openai-oauth.js +28 -13
- package/bundle/dist/utils/providers/openai/openai-quota.js +38 -27
- package/bundle/dist/utils/providers/openai/openai-refresh.js +17 -9
- package/bundle/dist/utils/providers/openai/openai-sse.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-transport-config.js +1 -1
- package/bundle/dist/utils/quiet-hours.js +1 -1
- package/bundle/dist/utils/slack-notify.js +14 -8
- package/bundle/dist/utils/subset-loaders.js +4 -5
- package/bundle/src/application/monit/log-buffer.ts +23 -9
- package/bundle/src/application/monit/monit.frame.ts +22 -5
- package/bundle/src/application/monit/monit.types.ts +6 -0
- package/bundle/src/application/qgrid/conv-routing.test.ts +76 -4
- package/bundle/src/application/qgrid/conv-routing.ts +35 -9
- package/bundle/src/application/qgrid/expired-token-reminder.ts +9 -1
- package/bundle/src/application/qgrid/oauth.ts +51 -15
- package/bundle/src/application/qgrid/qgrid-image-generation.ts +9 -0
- package/bundle/src/application/qgrid/qgrid-response-format.ts +50 -25
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.test.ts +19 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +84 -40
- package/bundle/src/application/qgrid/qgrid.dispatcher.test.ts +97 -0
- package/bundle/src/application/qgrid/qgrid.dispatcher.ts +274 -126
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +1013 -3
- package/bundle/src/application/qgrid/qgrid.frame.ts +1415 -60
- package/bundle/src/application/qgrid/qgrid.types.ts +335 -0
- package/bundle/src/application/qgrid/schema-prompt.ts +105 -41
- package/bundle/src/application/qgrid/slack-user-map.ts +5 -0
- package/bundle/src/application/qgrid/token-death.ts +4 -0
- package/bundle/src/application/qgrid/token-subscriber.test.ts +21 -19
- package/bundle/src/application/qgrid/token-subscriber.ts +186 -53
- package/bundle/src/application/qgrid/token-trigger-setup.ts +2 -0
- package/bundle/src/application/qgrid/token-window-keepalive.ts +49 -6
- package/bundle/src/application/qgrid/tool-emulation-schema.ts +33 -29
- package/bundle/src/application/qgrid/tool-emulation.ts +52 -27
- package/bundle/src/application/request-log/json-schema-type-text.test.ts +5 -5
- package/bundle/src/application/request-log/json-schema-type-text.ts +81 -26
- package/bundle/src/application/request-log/request-log.model.test.ts +111 -4
- package/bundle/src/application/request-log/request-log.model.ts +277 -146
- package/bundle/src/application/request-log/request-log.types.ts +6 -0
- package/bundle/src/application/request-log/zod-code-format.ts +11 -0
- package/bundle/src/application/request-log-step/request-log-step.model.ts +1 -0
- package/bundle/src/application/request-log-step/request-log-step.types.ts +2 -0
- package/bundle/src/application/setting/setting.constant.ts +9 -0
- package/bundle/src/application/setting/setting.model.ts +12 -2
- package/bundle/src/application/setting/setting.store.ts +5 -1
- package/bundle/src/application/setting/setting.types.ts +8 -0
- package/bundle/src/application/sonamu.generated.http +133 -0
- package/bundle/src/application/sonamu.generated.sso.ts +2 -0
- package/bundle/src/application/sonamu.generated.ts +15 -0
- package/bundle/src/application/token/token.identity.test.ts +20 -0
- package/bundle/src/application/token/token.model.ts +66 -7
- package/bundle/src/application/token/token.types.ts +24 -1
- package/bundle/src/i18n/en.ts +19 -0
- package/bundle/src/i18n/ko.ts +21 -0
- package/bundle/src/i18n/sd.generated.ts +23 -2
- package/bundle/src/migrations/20260807133553_manual__backfill_request_log_cost.ts +16 -8
- package/bundle/src/server-bootstrap.ts +4 -2
- package/bundle/src/server-error-handler.ts +1 -0
- package/bundle/src/sonamu.config.ts +69 -7
- package/bundle/src/startup-migrations.ts +27 -9
- package/bundle/src/testing/global.ts +20 -0
- package/bundle/src/testing/schema-bench.ts +105 -30
- package/bundle/src/testing/test-database-name.ts +2 -0
- package/bundle/src/utils/providers/anthropic/anthropic-constants.ts +8 -0
- package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.ts +41 -6
- package/bundle/src/utils/providers/anthropic/anthropic-quota.ts +7 -3
- package/bundle/src/utils/providers/anthropic/anthropic-thinking.ts +6 -0
- package/bundle/src/utils/providers/anthropic/claude-session.ts +58 -24
- package/bundle/src/utils/providers/anthropic/fence-strip.ts +11 -0
- package/bundle/src/utils/providers/anthropic/stream-json-adapter.ts +110 -45
- package/bundle/src/utils/providers/common/credentials.ts +8 -0
- package/bundle/src/utils/providers/common/effort.ts +9 -2
- package/bundle/src/utils/providers/common/model-cost.test.ts +48 -1
- package/bundle/src/utils/providers/common/model-cost.ts +259 -158
- package/bundle/src/utils/providers/common/provider-dispatcher.ts +98 -2
- package/bundle/src/utils/providers/common/provider-types.ts +46 -3
- package/bundle/src/utils/providers/common/schema-validation.test.ts +5 -1
- package/bundle/src/utils/providers/common/schema-validation.ts +124 -56
- package/bundle/src/utils/providers/common/smooth-weighted-round-robin.ts +4 -0
- package/bundle/src/utils/providers/common/strictifier.ts +185 -59
- package/bundle/src/utils/providers/common/thinking.ts +2 -2
- package/bundle/src/utils/providers/common/ttft.ts +4 -2
- package/bundle/src/utils/providers/grok/__fixtures__/golden-responses-1.0.60.json +164 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.test.ts +325 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.ts +721 -0
- package/bundle/src/utils/providers/grok/grok-constants.ts +105 -0
- package/bundle/src/utils/providers/grok/grok-direct-client.test.ts +179 -0
- package/bundle/src/utils/providers/grok/grok-direct-client.ts +313 -0
- package/bundle/src/utils/providers/grok/grok-dispatcher.test.ts +1395 -0
- package/bundle/src/utils/providers/grok/grok-dispatcher.ts +2105 -0
- package/bundle/src/utils/providers/grok/grok-headers.test.ts +149 -0
- package/bundle/src/utils/providers/grok/grok-headers.ts +199 -0
- package/bundle/src/utils/providers/grok/grok-media-client.test.ts +446 -0
- package/bundle/src/utils/providers/grok/grok-media-client.ts +703 -0
- package/bundle/src/utils/providers/grok/grok-models.test.ts +96 -0
- package/bundle/src/utils/providers/grok/grok-models.ts +161 -0
- package/bundle/src/utils/providers/grok/grok-oauth.test.ts +406 -0
- package/bundle/src/utils/providers/grok/grok-oauth.ts +771 -0
- package/bundle/src/utils/providers/grok/grok-quota.test.ts +142 -0
- package/bundle/src/utils/providers/grok/grok-quota.ts +198 -0
- package/bundle/src/utils/providers/grok/grok-refresh.test.ts +239 -0
- package/bundle/src/utils/providers/grok/grok-refresh.ts +325 -0
- package/bundle/src/utils/providers/grok/grok-types.test.ts +252 -0
- package/bundle/src/utils/providers/grok/grok-types.ts +374 -0
- package/bundle/src/utils/providers/grok/grok-voice-client.test.ts +321 -0
- package/bundle/src/utils/providers/grok/grok-voice-client.ts +284 -0
- package/bundle/src/utils/providers/grok/index.ts +20 -0
- package/bundle/src/utils/providers/openai/openai-backend-protocol.ts +221 -137
- package/bundle/src/utils/providers/openai/openai-callback-relay.ts +12 -1
- package/bundle/src/utils/providers/openai/openai-constants.ts +2 -0
- package/bundle/src/utils/providers/openai/openai-direct-client.ts +111 -21
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +322 -169
- package/bundle/src/utils/providers/openai/openai-image-generation.ts +116 -36
- package/bundle/src/utils/providers/openai/openai-oauth.ts +48 -20
- package/bundle/src/utils/providers/openai/openai-quota.ts +77 -46
- package/bundle/src/utils/providers/openai/openai-refresh.ts +42 -18
- package/bundle/src/utils/providers/openai/openai-sse.ts +27 -3
- package/bundle/src/utils/providers/openai/openai-transport-config.ts +2 -0
- package/bundle/src/utils/quiet-hours.ts +12 -1
- package/bundle/src/utils/slack-notify.ts +44 -13
- package/bundle/src/utils/subset-loaders.ts +7 -7
- package/bundle/web-dist/client/assets/clsx-5XM_pHvN.js +1 -0
- package/bundle/web-dist/client/assets/index-Be2qCZmI.css +1 -0
- package/bundle/web-dist/client/assets/index-C96h3feE.js +32 -0
- package/bundle/web-dist/client/assets/logs-DBM6U0QD.js +1 -0
- package/bundle/web-dist/client/assets/monit-BBjXa7vB.js +1 -0
- package/bundle/web-dist/client/assets/routes-Crz_PQzi.js +5 -0
- package/bundle/web-dist/client/assets/{services.generated-NP-ValHd.js → services.generated-B5lc3aIC.js} +5 -5
- package/bundle/web-dist/client/assets/settings-Cdwm3OBB.js +1 -0
- package/bundle/web-dist/client/assets/show-DBUhALT1.js +2 -0
- package/bundle/web-dist/client/assets/tokens-CVQAVJTo.js +1 -0
- package/bundle/web-dist/client/assets/total-cost-MnfKU8IN.js +1 -0
- package/bundle/web-dist/client/assets/use-oauth-login-flow-BfxYI4Oh.js +1 -0
- package/bundle/web-dist/client/assets/use-update-token-mutation-qKBC2sn7.js +1 -0
- package/bundle/web-dist/client/assets/{vendor-tanstack-DJRQAbrY.js → vendor-tanstack-DRPs09ai.js} +1 -1
- package/bundle/web-dist/client/index.html +5 -5
- package/bundle/web-dist/server/assets/clsx-D_N5PN_2.js +16 -0
- package/bundle/web-dist/server/assets/{lazyRouteComponent-CgBdabgd.js → lazyRouteComponent-AKiHfZWp.js} +129 -2
- package/bundle/web-dist/server/assets/{logs-BMyR98rU.js → logs-B7QmGJq3.js} +18 -14
- package/bundle/web-dist/server/assets/{monit-ZPt66W5M.js → monit-DFt7x3bh.js} +13 -12
- package/bundle/web-dist/server/assets/{plus-BZ9I0VgC.js → plus-DaYQRpBt.js} +1 -1
- package/bundle/web-dist/server/assets/{react-dom-Ds75e4Jl.js → react-dom-Cv23mm1K.js} +2 -129
- package/bundle/web-dist/server/assets/{refresh-cw-CztCFis-.js → refresh-cw-BpXNsAy-.js} +1 -1
- package/bundle/web-dist/server/assets/{request-model-DjGldb-h.js → request-model-eHE6YbaF.js} +1 -1
- package/bundle/web-dist/server/assets/{routes-Ct-k7nBA.js → routes-_Y-PJfgO.js} +110 -39
- package/bundle/web-dist/server/assets/{services.generated-BA4AcAf5.js → services.generated-CMJ8AHbO.js} +582 -172
- package/bundle/web-dist/server/assets/{settings-CBUZ47Xx.js → settings-JwJKxn2e.js} +14 -14
- package/bundle/web-dist/server/assets/{show-LSFIzvO2.js → show-BEv6z1v_.js} +90 -60
- package/bundle/web-dist/server/assets/{tokens-DxrBW512.js → tokens-CNT4mI-f.js} +162 -50
- package/bundle/web-dist/server/assets/total-cost-fTE9Xy82.js +18 -0
- package/bundle/web-dist/server/assets/use-oauth-login-flow-jkAkT3X6.js +2345 -0
- package/bundle/web-dist/server/assets/{use-update-token-mutation-pkArIzCP.js → use-update-token-mutation-Sm6kh02m.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +1644 -21655
- package/dist/cli.js +9 -9
- package/package.json +4 -11
- package/postinstall.mjs +12 -0
- package/skills/qgrid/SKILL.md +1 -0
- package/skills/qgrid/references/cli-env-and-server-boot.md +4 -1
- package/skills/qgrid/references/decision-rationale.md +23 -0
- package/skills/qgrid/references/grok-runtime.md +89 -0
- package/skills/qgrid/references/provider-runtime-differences.md +30 -29
- package/skills/qgrid/references/repo-map.md +10 -0
- package/skills/qgrid/references/token-auth-quota-lifecycle.md +56 -3
- package/bundle/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +0 -406
- package/bundle/dist/node_modules/.pnpm/@vitest_expect@4.1.10/node_modules/@vitest/expect/dist/index.js +0 -1507
- package/bundle/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.10/node_modules/@vitest/pretty-format/dist/index.js +0 -887
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/chunk-artifact.js +0 -2756
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/index.js +0 -8
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/utils.js +0 -8
- package/bundle/dist/node_modules/.pnpm/@vitest_snapshot@4.1.10/node_modules/@vitest/snapshot/dist/index.js +0 -922
- package/bundle/dist/node_modules/.pnpm/@vitest_spy@4.1.10/node_modules/@vitest/spy/dist/index.js +0 -386
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +0 -121
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/constants.js +0 -51
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/diff.js +0 -1317
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/display.js +0 -561
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/error.js +0 -40
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/helpers.js +0 -272
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/offset.js +0 -27
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/serialize.js +0 -77
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/source-map.js +0 -381
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/timers.js +0 -51
- package/bundle/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.js +0 -2986
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.js +0 -109
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.js +0 -10
- package/bundle/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +0 -1126
- package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +0 -21
- package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -432
- package/bundle/dist/node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.js +0 -517
- package/bundle/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.js +0 -101
- package/bundle/dist/node_modules/.pnpm/vite@8.0.3_@emnapi_core@1.11.2_@emnapi_runtime@1.11.2_@types_node@25.0.7_esbuild@0.27.4_5b35fc1fb85d2af4d105e0d74f940f50/node_modules/vite/dist/node/module-runner.js +0 -1265
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +0 -9
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/benchmark.CX_oY03V.js +0 -41
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/evaluatedModules.Dg1zASAC.js +0 -19
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.Chj8NDwU.js +0 -202
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.DdgEv5B1.js +0 -46
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js +0 -119
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/test.DNmyFkvJ.js +0 -3044
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js +0 -59
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/index.js +0 -28
- package/bundle/dist/testing/setup-mocks.js +0 -16
- package/bundle/src/testing/setup-mocks.ts +0 -44
- package/bundle/web-dist/client/assets/index-Bw2s88Ot.css +0 -1
- package/bundle/web-dist/client/assets/index-DZwzUfI-.js +0 -106
- package/bundle/web-dist/client/assets/logs-Cog79DU5.js +0 -1
- package/bundle/web-dist/client/assets/monit-2auznBys.js +0 -1
- package/bundle/web-dist/client/assets/routes-B0lTeLK-.js +0 -5
- package/bundle/web-dist/client/assets/settings-D8ZxZGSJ.js +0 -1
- package/bundle/web-dist/client/assets/show-CFSERlnM.js +0 -2
- package/bundle/web-dist/client/assets/tokens-CZXUyI7O.js +0 -1
- package/bundle/web-dist/client/assets/use-oauth-login-flow-hboOs3wG.js +0 -1
- package/bundle/web-dist/client/assets/use-update-token-mutation-BQHS0byG.js +0 -1
- package/bundle/web-dist/server/assets/use-oauth-login-flow-Gn8flMK5.js +0 -178
- package/dist/cli.d.ts +0 -10
- /package/bundle/web-dist/client/assets/{cost-DH2jZbrw.js → cost-DB3HbU7T.js} +0 -0
- /package/bundle/web-dist/client/assets/{plus-B62CuqT8.js → plus-BsQdY7PS.js} +0 -0
- /package/bundle/web-dist/client/assets/{preload-helper-ca-nBW7U.js → preload-helper-DWTEM3RW.js} +0 -0
- /package/bundle/web-dist/client/assets/{refresh-cw-NNcU0Cmq.js → refresh-cw-D9IUmT23.js} +0 -0
- /package/bundle/web-dist/client/assets/{request-model-CojtinqK.js → request-model-Bpp_rkK8.js} +0 -0
- /package/bundle/web-dist/server/assets/{cost-eEHeTRT5.js → cost-BC9yzyA9.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as require_react_dom } from "./react-dom-
|
|
3
|
-
import { o as
|
|
4
|
-
import { i as formatUsd } from "./cost-
|
|
5
|
-
import { t as useUpdateTokenMutation } from "./use-update-token-mutation-
|
|
6
|
-
import { n as
|
|
1
|
+
import { $ as __toESM, M as require_jsx_runtime, N as require_react, j as useQueryClient, n as QgridService, o as TokenService } from "./services.generated-CMJ8AHbO.js";
|
|
2
|
+
import { t as require_react_dom } from "./react-dom-Cv23mm1K.js";
|
|
3
|
+
import { i as o, n as useOAuthLoginFlow, r as OAuthCodeEntry, t as isOAuthProvider } from "./use-oauth-login-flow-jkAkT3X6.js";
|
|
4
|
+
import { i as formatUsd } from "./cost-BC9yzyA9.js";
|
|
5
|
+
import { t as useUpdateTokenMutation } from "./use-update-token-mutation-Sm6kh02m.js";
|
|
6
|
+
import { n as unpricedRequestTitle, t as unpricedRequestLabel } from "./total-cost-fTE9Xy82.js";
|
|
7
7
|
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
8
8
|
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom());
|
|
9
9
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
@@ -2299,7 +2299,11 @@ var lucideGripVertical = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
|
2299
2299
|
});
|
|
2300
2300
|
//#endregion
|
|
2301
2301
|
//#region src/components/qgrid/UsageCard.tsx
|
|
2302
|
-
var QUOTA_THRESHOLD_PROVIDERS = new Set([
|
|
2302
|
+
var QUOTA_THRESHOLD_PROVIDERS = new Set([
|
|
2303
|
+
"anthropic",
|
|
2304
|
+
"openai",
|
|
2305
|
+
"grok"
|
|
2306
|
+
]);
|
|
2303
2307
|
function validateThreshold(raw) {
|
|
2304
2308
|
const trimmed = raw.trim();
|
|
2305
2309
|
if (trimmed === "") return {
|
|
@@ -2336,7 +2340,7 @@ function validateWeight(raw) {
|
|
|
2336
2340
|
value
|
|
2337
2341
|
};
|
|
2338
2342
|
}
|
|
2339
|
-
var PROVIDER_THEMES = {
|
|
2343
|
+
var PROVIDER_THEMES = new Map(Object.entries({
|
|
2340
2344
|
openai: {
|
|
2341
2345
|
stripe: "bg-openai-400",
|
|
2342
2346
|
bar: "bg-openai-bar",
|
|
@@ -2354,8 +2358,14 @@ var PROVIDER_THEMES = {
|
|
|
2354
2358
|
bar: "bg-google-400",
|
|
2355
2359
|
badge: "bg-google-50 text-google-600",
|
|
2356
2360
|
cost: "text-google-600"
|
|
2361
|
+
},
|
|
2362
|
+
grok: {
|
|
2363
|
+
stripe: "bg-sand-800",
|
|
2364
|
+
bar: "bg-sand-600",
|
|
2365
|
+
badge: "bg-sand-800 text-sand-50",
|
|
2366
|
+
cost: "text-sand-800"
|
|
2357
2367
|
}
|
|
2358
|
-
};
|
|
2368
|
+
}));
|
|
2359
2369
|
var DEFAULT_THEME = {
|
|
2360
2370
|
stripe: "bg-sand-400",
|
|
2361
2371
|
bar: "bg-sienna-400",
|
|
@@ -2363,7 +2373,7 @@ var DEFAULT_THEME = {
|
|
|
2363
2373
|
cost: "text-sienna-600"
|
|
2364
2374
|
};
|
|
2365
2375
|
function getProviderTheme(provider) {
|
|
2366
|
-
return PROVIDER_THEMES
|
|
2376
|
+
return PROVIDER_THEMES.get(provider) ?? DEFAULT_THEME;
|
|
2367
2377
|
}
|
|
2368
2378
|
function barColor(pct, theme) {
|
|
2369
2379
|
if (pct >= 95) return "bg-danger-400";
|
|
@@ -2384,6 +2394,44 @@ function formatWindowLabel(fallback, windowDurationMins) {
|
|
|
2384
2394
|
if (hours >= 24) return `${Math.round(hours / 24)}d`;
|
|
2385
2395
|
return `${Math.round(hours)}h`;
|
|
2386
2396
|
}
|
|
2397
|
+
function formatPeriodType(periodType) {
|
|
2398
|
+
if (!periodType) return null;
|
|
2399
|
+
const label = periodType.replace(/^USAGE_PERIOD_TYPE_/, "").toLowerCase();
|
|
2400
|
+
return label && label !== "unspecified" ? label : null;
|
|
2401
|
+
}
|
|
2402
|
+
/** Grok 등 provider별 상태 표시(on-demand 제외, ZDR 비디오 제외, keepalive 미적용, 과금 주기). */
|
|
2403
|
+
function UsageStateNotes({ usage }) {
|
|
2404
|
+
const period = formatPeriodType(usage.periodType);
|
|
2405
|
+
if (!(usage.onDemandExcluded === true || usage.zdrVideoExcluded === true || usage.keepaliveApplicable === false || period !== null || !!usage.tier)) return null;
|
|
2406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2407
|
+
className: "flex flex-wrap items-center gap-1 text-[10px]",
|
|
2408
|
+
children: [
|
|
2409
|
+
usage.onDemandExcluded === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2410
|
+
className: "px-1.5 py-0.5 rounded-full bg-amber-50 text-amber-700",
|
|
2411
|
+
title: "xAI에서 on-demand 과금을 끄면 다시 라우팅됩니다",
|
|
2412
|
+
children: "excluded: on-demand billing enabled"
|
|
2413
|
+
}),
|
|
2414
|
+
usage.zdrVideoExcluded === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2415
|
+
className: "px-1.5 py-0.5 rounded-full bg-amber-50 text-amber-700",
|
|
2416
|
+
title: "xAI에서 data-retention opt-out(Zero Data Retention)을 끄면 비디오가 다시 라우팅됩니다",
|
|
2417
|
+
children: "video unavailable: zero data retention"
|
|
2418
|
+
}),
|
|
2419
|
+
period !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2420
|
+
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-600",
|
|
2421
|
+
children: period
|
|
2422
|
+
}),
|
|
2423
|
+
usage.tier && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2424
|
+
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-600",
|
|
2425
|
+
children: usage.tier
|
|
2426
|
+
}),
|
|
2427
|
+
usage.keepaliveApplicable === false && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2428
|
+
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-400",
|
|
2429
|
+
title: "이 provider는 토큰 윈도 keepalive 대상이 아닙니다",
|
|
2430
|
+
children: "keepalive n/a"
|
|
2431
|
+
})
|
|
2432
|
+
]
|
|
2433
|
+
});
|
|
2434
|
+
}
|
|
2387
2435
|
function UsageRow({ label, utilization, resetsAt, windowDurationMins, theme, threshold }) {
|
|
2388
2436
|
const pct = utilization ?? 0;
|
|
2389
2437
|
const hasThreshold = threshold !== void 0 && threshold !== null;
|
|
@@ -2450,27 +2498,35 @@ function TokenUsage({ token, theme }) {
|
|
|
2450
2498
|
children: data.error
|
|
2451
2499
|
})]
|
|
2452
2500
|
});
|
|
2453
|
-
if (!data?.fiveHour && !data?.sevenDay) return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
2454
|
-
className: "
|
|
2455
|
-
children:
|
|
2501
|
+
if (!data?.fiveHour && !data?.sevenDay) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2502
|
+
className: "space-y-1.5 py-1",
|
|
2503
|
+
children: [data && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageStateNotes, { usage: data }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2504
|
+
className: "text-[11px] text-sand-400",
|
|
2505
|
+
children: "No usage data"
|
|
2506
|
+
})]
|
|
2456
2507
|
});
|
|
2457
2508
|
const thresholdForPrimary = QUOTA_THRESHOLD_PROVIDERS.has(token.provider) ? token.quota_threshold : null;
|
|
2458
2509
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2459
2510
|
className: "space-y-1.5 py-1",
|
|
2460
|
-
children: [
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2511
|
+
children: [
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageStateNotes, { usage: data }),
|
|
2513
|
+
data.fiveHour && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageRow, {
|
|
2514
|
+
label: "5h",
|
|
2515
|
+
utilization: data.fiveHour.utilization,
|
|
2516
|
+
resetsAt: data.fiveHour.resetsAt,
|
|
2517
|
+
windowDurationMins: data.fiveHour.windowDurationMins,
|
|
2518
|
+
theme,
|
|
2519
|
+
threshold: thresholdForPrimary
|
|
2520
|
+
}),
|
|
2521
|
+
data.sevenDay && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageRow, {
|
|
2522
|
+
label: formatPeriodType(data.periodType) === "monthly" ? "1mo" : "7d",
|
|
2523
|
+
utilization: data.sevenDay.utilization,
|
|
2524
|
+
resetsAt: data.sevenDay.resetsAt,
|
|
2525
|
+
windowDurationMins: data.sevenDay.windowDurationMins,
|
|
2526
|
+
theme,
|
|
2527
|
+
threshold: token.provider === "grok" ? thresholdForPrimary : void 0
|
|
2528
|
+
})
|
|
2529
|
+
]
|
|
2474
2530
|
});
|
|
2475
2531
|
}
|
|
2476
2532
|
function ThresholdControl({ token }) {
|
|
@@ -2551,7 +2607,7 @@ function ThresholdControl({ token }) {
|
|
|
2551
2607
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600 text-base leading-none hover:bg-sand-100 transition-colors duration-150",
|
|
2552
2608
|
children: "−"
|
|
2553
2609
|
}),
|
|
2554
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
2555
2611
|
id: `threshold-${token.id}`,
|
|
2556
2612
|
value,
|
|
2557
2613
|
onChange: (e) => setValue(e.target.value),
|
|
@@ -2663,7 +2719,7 @@ function WeightControl({ token }) {
|
|
|
2663
2719
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600",
|
|
2664
2720
|
children: "−"
|
|
2665
2721
|
}),
|
|
2666
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2722
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
2667
2723
|
id: `weight-${token.id}`,
|
|
2668
2724
|
value,
|
|
2669
2725
|
onChange: (event) => setValue(event.target.value),
|
|
@@ -2712,14 +2768,17 @@ function WeightControl({ token }) {
|
|
|
2712
2768
|
*/
|
|
2713
2769
|
function ReloginButton({ token }) {
|
|
2714
2770
|
const oauth = useOAuthLoginFlow();
|
|
2771
|
+
const provider = isOAuthProvider(token.provider) ? token.provider : null;
|
|
2715
2772
|
const submitCode = async (pastedCode) => {
|
|
2716
2773
|
if (await oauth.submitCode(pastedCode)) oauth.reset();
|
|
2717
2774
|
};
|
|
2718
2775
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2719
2776
|
type: "button",
|
|
2720
2777
|
title: "기존 이름으로 다시 로그인",
|
|
2721
|
-
disabled: oauth.loadingProvider !== null,
|
|
2722
|
-
onClick: () =>
|
|
2778
|
+
disabled: provider === null || oauth.loadingProvider !== null,
|
|
2779
|
+
onClick: () => {
|
|
2780
|
+
if (provider) oauth.start(provider, token.name ?? "");
|
|
2781
|
+
},
|
|
2723
2782
|
className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[10px] font-medium border border-sienna-300 text-sienna-600 hover:bg-sienna-50 disabled:opacity-50 transition-colors duration-150",
|
|
2724
2783
|
children: oauth.loadingProvider === token.provider ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "size-2.5 border-2 border-sienna-400 border-t-transparent rounded-full animate-spin" }), "로그인 대기"] }) : "재로그인"
|
|
2725
2784
|
}), oauth.codeEntryProvider && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -2757,11 +2816,12 @@ function SortableTokenCard({ token }) {
|
|
|
2757
2816
|
easing: "ease"
|
|
2758
2817
|
}
|
|
2759
2818
|
});
|
|
2760
|
-
const
|
|
2819
|
+
const totalCostParams = {
|
|
2761
2820
|
num: 0,
|
|
2762
|
-
page: 1
|
|
2763
|
-
|
|
2764
|
-
|
|
2821
|
+
page: 1
|
|
2822
|
+
};
|
|
2823
|
+
if (token.name) totalCostParams.token_name = token.name;
|
|
2824
|
+
const { data: costData } = QgridService.useTotalCost(totalCostParams, { enabled: !!token.name });
|
|
2765
2825
|
const theme = getProviderTheme(token.provider);
|
|
2766
2826
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2767
2827
|
ref: setNodeRef,
|
|
@@ -2790,9 +2850,13 @@ function SortableTokenCard({ token }) {
|
|
|
2790
2850
|
className: "text-[13px] font-medium text-sand-800 truncate select-none",
|
|
2791
2851
|
children: token.name ?? "Unnamed"
|
|
2792
2852
|
})]
|
|
2793
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.
|
|
2853
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
2794
2854
|
className: `text-[11px] tabular-nums font-medium shrink-0 ${theme.cost}`,
|
|
2795
|
-
children: formatUsd(costData?.usd ?? 0)
|
|
2855
|
+
children: [formatUsd(costData?.usd ?? 0), costData && unpricedRequestLabel(costData) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2856
|
+
className: "ml-1 font-normal text-sand-400",
|
|
2857
|
+
title: unpricedRequestTitle(costData) ?? void 0,
|
|
2858
|
+
children: unpricedRequestLabel(costData)
|
|
2859
|
+
}) : null]
|
|
2796
2860
|
})]
|
|
2797
2861
|
}),
|
|
2798
2862
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -2837,8 +2901,15 @@ function SortableTokenCard({ token }) {
|
|
|
2837
2901
|
var PROVIDERS = [
|
|
2838
2902
|
"all",
|
|
2839
2903
|
"openai",
|
|
2840
|
-
"anthropic"
|
|
2904
|
+
"anthropic",
|
|
2905
|
+
"grok"
|
|
2841
2906
|
];
|
|
2907
|
+
var PROVIDER_FILTER_LABELS = {
|
|
2908
|
+
all: "All",
|
|
2909
|
+
openai: "OpenAI",
|
|
2910
|
+
anthropic: "Anthropic",
|
|
2911
|
+
grok: "Grok"
|
|
2912
|
+
};
|
|
2842
2913
|
function UsageCard() {
|
|
2843
2914
|
const { data, isLoading } = TokenService.useTokens("A", { orderBy: "ord-asc" });
|
|
2844
2915
|
const queryClient = useQueryClient();
|
|
@@ -2907,7 +2978,7 @@ function UsageCard() {
|
|
|
2907
2978
|
"data-active": providerFilter === p,
|
|
2908
2979
|
className: `px-2.5 py-[3px] text-[11px] font-medium rounded-[6px] transition-all duration-150 ${providerFilter === p ? "text-sand-800" : "text-sand-500 hover:text-sand-700"}`,
|
|
2909
2980
|
onClick: () => setProviderFilter(p),
|
|
2910
|
-
children: p
|
|
2981
|
+
children: PROVIDER_FILTER_LABELS[p]
|
|
2911
2982
|
}, p))
|
|
2912
2983
|
})]
|
|
2913
2984
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|