@cartanova/qgrid-cli 2.10.10 → 2.11.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/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-BA7uQ-6c.js +31 -0
- package/bundle/web-dist/client/assets/index-Be2qCZmI.css +1 -0
- package/bundle/web-dist/client/assets/logs-C47OJGEI.js +1 -0
- package/bundle/web-dist/client/assets/monit-BS9no0dU.js +4 -0
- package/bundle/web-dist/client/assets/plus-sdACTfH0.js +1 -0
- package/bundle/web-dist/client/assets/refresh-cw-CY8o_1cT.js +1 -0
- package/bundle/web-dist/client/assets/request-model-BRtFuZvj.js +1 -0
- package/bundle/web-dist/client/assets/routes-kqgkUxE8.js +5 -0
- package/bundle/web-dist/client/assets/{services.generated-NP-ValHd.js → services.generated-CefiDXEv.js} +5 -5
- package/bundle/web-dist/client/assets/settings-DNDvFGSw.js +1 -0
- package/bundle/web-dist/client/assets/show-u8Np69q3.js +2 -0
- package/bundle/web-dist/client/assets/tokens-QvP410NW.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-Bzdh28Ws.js +1 -0
- package/bundle/web-dist/client/assets/use-update-token-mutation-CfJKaxmR.js +1 -0
- package/bundle/web-dist/client/assets/vendor-react-CUFFrVN9.js +244 -0
- package/bundle/web-dist/client/assets/vendor-tanstack-Bf_jag9G.js +1 -0
- package/bundle/web-dist/client/index.html +6 -6
- package/bundle/web-dist/server/assets/clsx-D_N5PN_2.js +16 -0
- package/bundle/web-dist/server/assets/{lazyRouteComponent-CgBdabgd.js → lazyRouteComponent-D8iTIHyn.js} +129 -2
- package/bundle/web-dist/server/assets/logs-B3OTd9hy.js +825 -0
- package/bundle/web-dist/server/assets/{monit-ZPt66W5M.js → monit-B2hqorPe.js} +385 -126
- package/bundle/web-dist/server/assets/plus-DwG7h9kq.js +28 -0
- package/bundle/web-dist/server/assets/{react-dom-Ds75e4Jl.js → react-dom-BIYQzBqG.js} +2 -129
- package/bundle/web-dist/server/assets/refresh-cw-mMBkwOq0.js +44 -0
- package/bundle/web-dist/server/assets/{request-model-DjGldb-h.js → request-model-I6OdODSH.js} +15 -6
- package/bundle/web-dist/server/assets/{routes-Ct-k7nBA.js → routes-B95YlUv2.js} +760 -213
- package/bundle/web-dist/server/assets/{services.generated-BA4AcAf5.js → services.generated-DQATJ6qf.js} +12820 -12194
- package/bundle/web-dist/server/assets/settings-C3gbGk0m.js +830 -0
- package/bundle/web-dist/server/assets/{show-LSFIzvO2.js → show-Bxaj3rhH.js} +1350 -418
- package/bundle/web-dist/server/assets/tokens-CZjH3cB7.js +1038 -0
- package/bundle/web-dist/server/assets/total-cost-fTE9Xy82.js +18 -0
- package/bundle/web-dist/server/assets/use-oauth-login-flow-CKDHgc3U.js +2379 -0
- package/bundle/web-dist/server/assets/{use-update-token-mutation-pkArIzCP.js → use-update-token-mutation-BEbgOzaa.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +4295 -22810
- 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/plus-B62CuqT8.js +0 -1
- package/bundle/web-dist/client/assets/refresh-cw-NNcU0Cmq.js +0 -1
- package/bundle/web-dist/client/assets/request-model-CojtinqK.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/client/assets/vendor-react-DH4kUfK2.js +0 -9
- package/bundle/web-dist/client/assets/vendor-tanstack-DJRQAbrY.js +0 -1
- package/bundle/web-dist/server/assets/logs-BMyR98rU.js +0 -509
- package/bundle/web-dist/server/assets/plus-BZ9I0VgC.js +0 -19
- package/bundle/web-dist/server/assets/refresh-cw-CztCFis-.js +0 -23
- package/bundle/web-dist/server/assets/settings-CBUZ47Xx.js +0 -461
- package/bundle/web-dist/server/assets/tokens-DxrBW512.js +0 -448
- 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/{preload-helper-ca-nBW7U.js → preload-helper-DWTEM3RW.js} +0 -0
- /package/bundle/web-dist/server/assets/{cost-eEHeTRT5.js → cost-BC9yzyA9.js} +0 -0
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
import { A as require_react, O as useQueryClient, X as __toESM, k as require_jsx_runtime, n as QgridService, o as TokenService } from "./services.generated-BA4AcAf5.js";
|
|
2
|
-
import { f as lucideKeyRound, o as Q } from "../entry-server.generated.js";
|
|
3
|
-
import { t as useUpdateTokenMutation } from "./use-update-token-mutation-pkArIzCP.js";
|
|
4
|
-
import { n as OAuthCodeEntry, t as useOAuthLoginFlow } from "./use-oauth-login-flow-Gn8flMK5.js";
|
|
5
|
-
import { t as lucidePlus } from "./plus-BZ9I0VgC.js";
|
|
6
|
-
//#region src/components/qgrid/AddTokenModal.tsx
|
|
7
|
-
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
8
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
9
|
-
function AddTokenModal() {
|
|
10
|
-
const [open, setOpen] = (0, import_react.useState)(false);
|
|
11
|
-
const [name, setName] = (0, import_react.useState)("");
|
|
12
|
-
const oauth = useOAuthLoginFlow();
|
|
13
|
-
const close = () => {
|
|
14
|
-
setOpen(false);
|
|
15
|
-
setName("");
|
|
16
|
-
oauth.reset();
|
|
17
|
-
};
|
|
18
|
-
const submitPastedCode = async (pastedCode) => {
|
|
19
|
-
if (await oauth.submitCode(pastedCode)) close();
|
|
20
|
-
};
|
|
21
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
22
|
-
type: "button",
|
|
23
|
-
className: "px-3.5 py-1.5 text-[12px] font-medium rounded-lg bg-sienna-500 text-white hover:bg-sienna-600 disabled:opacity-50 transition-all duration-150 active:scale-[0.97] flex items-center gap-1.5 shadow-sm",
|
|
24
|
-
onClick: () => setOpen(true),
|
|
25
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucidePlus, { className: "size-3.5" }), "Add Token"]
|
|
26
|
-
}), open && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
27
|
-
className: "fixed inset-0 z-50 flex items-start justify-center pt-[15vh]",
|
|
28
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
29
|
-
className: "absolute inset-0 bg-sand-900/8 backdrop-blur-sm",
|
|
30
|
-
onClick: close,
|
|
31
|
-
onKeyDown: () => {}
|
|
32
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
33
|
-
className: "relative panel shadow-xl w-full max-w-md mx-4",
|
|
34
|
-
children: [
|
|
35
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
36
|
-
className: "px-5 py-4 border-b border-sand-100/50",
|
|
37
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
38
|
-
className: "text-base font-medium text-sand-900",
|
|
39
|
-
children: "Add Token"
|
|
40
|
-
})
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
43
|
-
className: "px-5 py-4 space-y-4",
|
|
44
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
45
|
-
htmlFor: "token-name",
|
|
46
|
-
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
47
|
-
children: "Name *"
|
|
48
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Q, {
|
|
49
|
-
value: name,
|
|
50
|
-
onChange: (e) => setName(e.target.value),
|
|
51
|
-
placeholder: "e.g. your-token-name",
|
|
52
|
-
className: "mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300"
|
|
53
|
-
})] }), oauth.codeEntryProvider ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OAuthCodeEntry, {
|
|
54
|
-
provider: oauth.codeEntryProvider,
|
|
55
|
-
isPending: oauth.completeMutation.isPending,
|
|
56
|
-
isError: oauth.completeMutation.isError,
|
|
57
|
-
onSubmit: (code) => void submitPastedCode(code),
|
|
58
|
-
onRestart: oauth.reset
|
|
59
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
60
|
-
className: "space-y-2",
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
63
|
-
type: "button",
|
|
64
|
-
className: "w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2",
|
|
65
|
-
disabled: !name.trim() || oauth.loadingProvider !== null,
|
|
66
|
-
onClick: () => void oauth.start("openai", name),
|
|
67
|
-
children: oauth.loadingProvider === "openai" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
68
|
-
className: "flex items-center gap-1.5",
|
|
69
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin" }), "Waiting for login..."]
|
|
70
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideKeyRound, { className: "size-4" }), "Login with OpenAI"] })
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
73
|
-
className: "flex items-center gap-3",
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 h-px bg-sand-200" }),
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
77
|
-
className: "text-[10px] text-sand-400 uppercase",
|
|
78
|
-
children: "or"
|
|
79
|
-
}),
|
|
80
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 h-px bg-sand-200" })
|
|
81
|
-
]
|
|
82
|
-
}),
|
|
83
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
84
|
-
type: "button",
|
|
85
|
-
className: "w-full py-2.5 text-sm font-medium rounded-md border border-sand-300 text-sand-700 hover:bg-sand-100 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2",
|
|
86
|
-
disabled: !name.trim() || oauth.loadingProvider !== null,
|
|
87
|
-
onClick: () => void oauth.start("anthropic", name),
|
|
88
|
-
children: oauth.loadingProvider === "anthropic" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
89
|
-
className: "flex items-center gap-1.5",
|
|
90
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "w-3.5 h-3.5 border-2 border-sand-400 border-t-transparent rounded-full animate-spin" }), "Waiting for login..."]
|
|
91
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideKeyRound, { className: "size-4" }), "Login with Claude"] })
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
})]
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
97
|
-
className: "px-5 py-3 border-t border-sand-100/50 flex items-center justify-end gap-2",
|
|
98
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
99
|
-
type: "button",
|
|
100
|
-
className: "px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150",
|
|
101
|
-
onClick: close,
|
|
102
|
-
children: "Cancel"
|
|
103
|
-
})
|
|
104
|
-
})
|
|
105
|
-
]
|
|
106
|
-
})]
|
|
107
|
-
})] });
|
|
108
|
-
}
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region ~icons/lucide/pencil.jsx
|
|
111
|
-
var lucidePencil = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
112
|
-
viewBox: "0 0 24 24",
|
|
113
|
-
width: "1.2em",
|
|
114
|
-
height: "1.2em",
|
|
115
|
-
...props,
|
|
116
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
117
|
-
fill: "none",
|
|
118
|
-
stroke: "currentColor",
|
|
119
|
-
strokeLinecap: "round",
|
|
120
|
-
strokeLinejoin: "round",
|
|
121
|
-
strokeWidth: 2,
|
|
122
|
-
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4"
|
|
123
|
-
})
|
|
124
|
-
});
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region ~icons/lucide/trash-2.jsx
|
|
127
|
-
var lucideTrash2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
128
|
-
viewBox: "0 0 24 24",
|
|
129
|
-
width: "1.2em",
|
|
130
|
-
height: "1.2em",
|
|
131
|
-
...props,
|
|
132
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
133
|
-
fill: "none",
|
|
134
|
-
stroke: "currentColor",
|
|
135
|
-
strokeLinecap: "round",
|
|
136
|
-
strokeLinejoin: "round",
|
|
137
|
-
strokeWidth: 2,
|
|
138
|
-
d: "M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
|
139
|
-
})
|
|
140
|
-
});
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region src/lib/token-label.ts
|
|
143
|
-
function maskAccessToken(credentials) {
|
|
144
|
-
if (!credentials || typeof credentials !== "object") return "—";
|
|
145
|
-
if ("authSource" in credentials && credentials.authSource === "system-keychain") return "System Keychain";
|
|
146
|
-
const token = "accessToken" in credentials ? credentials.accessToken : void 0;
|
|
147
|
-
if (typeof token !== "string" || !token) return "—";
|
|
148
|
-
return token.length <= 12 ? token : `${token.slice(0, 8)}...${token.slice(-4)}`;
|
|
149
|
-
}
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/components/qgrid/TokenTable.tsx
|
|
152
|
-
function getExpiresAt(token) {
|
|
153
|
-
const c = token.credentials;
|
|
154
|
-
if ("expiresAt" in c && typeof c.expiresAt === "number") return c.expiresAt;
|
|
155
|
-
if ("accessTokenExpiresAt" in c && typeof c.accessTokenExpiresAt === "number") return c.accessTokenExpiresAt;
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
function formatExpiry(expiresAt) {
|
|
159
|
-
if (!expiresAt) return {
|
|
160
|
-
text: "",
|
|
161
|
-
color: ""
|
|
162
|
-
};
|
|
163
|
-
const diff = expiresAt - Date.now();
|
|
164
|
-
if (diff <= 0) return {
|
|
165
|
-
text: "expired",
|
|
166
|
-
color: "text-red-500"
|
|
167
|
-
};
|
|
168
|
-
const h = Math.floor(diff / 36e5);
|
|
169
|
-
const m = Math.floor(diff % 36e5 / 6e4);
|
|
170
|
-
const text = h > 0 ? `${h}h ${m}m` : `${m}m`;
|
|
171
|
-
if (diff < 36e5) return {
|
|
172
|
-
text,
|
|
173
|
-
color: "text-amber-500"
|
|
174
|
-
};
|
|
175
|
-
return {
|
|
176
|
-
text,
|
|
177
|
-
color: "text-sand-400"
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
function TokenTable({ data, isLoading }) {
|
|
181
|
-
const [deleteTarget, setDeleteTarget] = (0, import_react.useState)(null);
|
|
182
|
-
const [editTarget, setEditTarget] = (0, import_react.useState)(null);
|
|
183
|
-
const [editName, setEditName] = (0, import_react.useState)("");
|
|
184
|
-
const queryClient = useQueryClient();
|
|
185
|
-
const removeMutation = QgridService.useRemoveTokenMutation();
|
|
186
|
-
const updateMutation = useUpdateTokenMutation();
|
|
187
|
-
const toggleMutation = QgridService.useToggleTokenMutation();
|
|
188
|
-
const invalidate = () => Promise.all([queryClient.invalidateQueries({ queryKey: ["Token"] }), queryClient.invalidateQueries({ queryKey: ["Qgrid"] })]);
|
|
189
|
-
const handleToggle = async (token) => {
|
|
190
|
-
await toggleMutation.mutateAsync({ id: token.id });
|
|
191
|
-
await invalidate();
|
|
192
|
-
};
|
|
193
|
-
const handleDelete = async () => {
|
|
194
|
-
if (!deleteTarget) return;
|
|
195
|
-
await removeMutation.mutateAsync({ id: deleteTarget.id });
|
|
196
|
-
await invalidate();
|
|
197
|
-
setDeleteTarget(null);
|
|
198
|
-
};
|
|
199
|
-
const openEdit = (token) => {
|
|
200
|
-
setEditTarget(token);
|
|
201
|
-
setEditName(token.name ?? "");
|
|
202
|
-
};
|
|
203
|
-
const handleUpdate = async () => {
|
|
204
|
-
if (!editTarget) return;
|
|
205
|
-
await updateMutation.mutateAsync({
|
|
206
|
-
id: editTarget.id,
|
|
207
|
-
name: editName.trim()
|
|
208
|
-
});
|
|
209
|
-
await invalidate();
|
|
210
|
-
setEditTarget(null);
|
|
211
|
-
};
|
|
212
|
-
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
213
|
-
className: "space-y-2",
|
|
214
|
-
children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-12 bg-sand-100 rounded-md animate-pulse" }, `skeleton-${i}`))
|
|
215
|
-
});
|
|
216
|
-
const tokens = data ?? [];
|
|
217
|
-
if (tokens.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
218
|
-
className: "text-sand-400 text-center py-16 text-sm",
|
|
219
|
-
children: [
|
|
220
|
-
"No tokens registered. Click ",
|
|
221
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", {
|
|
222
|
-
className: "text-sand-600",
|
|
223
|
-
children: "Add Token"
|
|
224
|
-
}),
|
|
225
|
-
" to get started."
|
|
226
|
-
]
|
|
227
|
-
});
|
|
228
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
229
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
230
|
-
className: "panel overflow-hidden",
|
|
231
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
232
|
-
className: "overflow-x-auto",
|
|
233
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
|
|
234
|
-
className: "w-full min-w-[640px] text-[13px]",
|
|
235
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
236
|
-
className: "panel-header",
|
|
237
|
-
children: [
|
|
238
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
239
|
-
className: "text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
240
|
-
children: "Provider"
|
|
241
|
-
}),
|
|
242
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
243
|
-
className: "text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
244
|
-
children: "Name"
|
|
245
|
-
}),
|
|
246
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
247
|
-
className: "text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
248
|
-
children: "Token"
|
|
249
|
-
}),
|
|
250
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
251
|
-
className: "text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
252
|
-
children: "Status"
|
|
253
|
-
}),
|
|
254
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
255
|
-
className: "text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
256
|
-
children: "Expires"
|
|
257
|
-
}),
|
|
258
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "w-20 px-3 py-2.5" })
|
|
259
|
-
]
|
|
260
|
-
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", {
|
|
261
|
-
className: "divide-y divide-sand-100/80",
|
|
262
|
-
children: tokens.map((token) => {
|
|
263
|
-
const expiry = formatExpiry(getExpiresAt(token));
|
|
264
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
265
|
-
className: `transition-colors duration-150 hover:bg-sand-100/60 ${token.active ? "" : "opacity-50"}`,
|
|
266
|
-
children: [
|
|
267
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
268
|
-
className: "px-5 py-3",
|
|
269
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
270
|
-
className: "text-xs font-medium text-sand-500 uppercase",
|
|
271
|
-
children: token.provider
|
|
272
|
-
})
|
|
273
|
-
}),
|
|
274
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
275
|
-
className: "px-5 py-3",
|
|
276
|
-
children: token.name ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
277
|
-
className: "text-sm text-sand-700",
|
|
278
|
-
children: token.name
|
|
279
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
280
|
-
className: "text-[11px] text-sand-400",
|
|
281
|
-
children: "—"
|
|
282
|
-
})
|
|
283
|
-
}),
|
|
284
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
285
|
-
className: "px-5 py-3",
|
|
286
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
|
|
287
|
-
className: "text-[13px] font-mono text-sand-800",
|
|
288
|
-
children: maskAccessToken(token.credentials)
|
|
289
|
-
})
|
|
290
|
-
}),
|
|
291
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
292
|
-
className: "px-5 py-3",
|
|
293
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
294
|
-
type: "button",
|
|
295
|
-
className: `relative inline-flex h-5 w-9 items-center rounded-full transition-colors duration-200 ${token.active ? "bg-sage-400" : "bg-sand-300"}`,
|
|
296
|
-
onClick: () => handleToggle(token),
|
|
297
|
-
disabled: toggleMutation.isPending || !token.active && token.reauth_required,
|
|
298
|
-
title: !token.active && token.reauth_required ? "재로그인이 필요한 토큰입니다" : void 0,
|
|
299
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform duration-200 ${token.active ? "translate-x-4.5" : "translate-x-0.5"}` })
|
|
300
|
-
})
|
|
301
|
-
}),
|
|
302
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
303
|
-
className: "px-5 py-3",
|
|
304
|
-
children: expiry.text && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
305
|
-
className: `text-xs ${expiry.color}`,
|
|
306
|
-
children: expiry.text
|
|
307
|
-
})
|
|
308
|
-
}),
|
|
309
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
310
|
-
className: "px-3 py-3",
|
|
311
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
312
|
-
className: "flex items-center gap-1",
|
|
313
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
314
|
-
type: "button",
|
|
315
|
-
className: "p-1 rounded text-sand-400 hover:text-sienna-500 transition-colors duration-150",
|
|
316
|
-
onClick: () => openEdit(token),
|
|
317
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucidePencil, { className: "size-4" })
|
|
318
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
319
|
-
type: "button",
|
|
320
|
-
className: "p-1 rounded text-sand-400 hover:text-red-500 transition-colors duration-150",
|
|
321
|
-
onClick: () => setDeleteTarget(token),
|
|
322
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideTrash2, { className: "size-4" })
|
|
323
|
-
})]
|
|
324
|
-
})
|
|
325
|
-
})
|
|
326
|
-
]
|
|
327
|
-
}, token.id);
|
|
328
|
-
})
|
|
329
|
-
})]
|
|
330
|
-
})
|
|
331
|
-
})
|
|
332
|
-
}),
|
|
333
|
-
editTarget && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
334
|
-
className: "fixed inset-0 z-50 flex items-start justify-center pt-[15vh]",
|
|
335
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
336
|
-
className: "absolute inset-0 bg-sand-900/8 backdrop-blur-sm",
|
|
337
|
-
onClick: () => setEditTarget(null),
|
|
338
|
-
onKeyDown: () => {}
|
|
339
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
340
|
-
className: "relative panel shadow-xl w-full max-w-sm mx-4",
|
|
341
|
-
children: [
|
|
342
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
343
|
-
className: "px-5 py-4 border-b border-sand-100/60",
|
|
344
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
345
|
-
className: "text-base font-medium text-sand-900",
|
|
346
|
-
children: "Edit Token"
|
|
347
|
-
})
|
|
348
|
-
}),
|
|
349
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
350
|
-
className: "px-5 py-4 space-y-3",
|
|
351
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
352
|
-
htmlFor: "token-name",
|
|
353
|
-
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
354
|
-
children: "Name"
|
|
355
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Q, {
|
|
356
|
-
value: editName,
|
|
357
|
-
onChange: (e) => setEditName(e.target.value),
|
|
358
|
-
placeholder: "e.g. prod, dev, team-a",
|
|
359
|
-
className: "mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300"
|
|
360
|
-
})] })
|
|
361
|
-
}),
|
|
362
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
363
|
-
className: "px-5 py-3 border-t border-sand-100/60 flex items-center justify-end gap-2",
|
|
364
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
365
|
-
type: "button",
|
|
366
|
-
className: "px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150",
|
|
367
|
-
onClick: () => setEditTarget(null),
|
|
368
|
-
children: "Cancel"
|
|
369
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
370
|
-
type: "button",
|
|
371
|
-
className: "px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150",
|
|
372
|
-
disabled: updateMutation.isPending,
|
|
373
|
-
onClick: handleUpdate,
|
|
374
|
-
children: updateMutation.isPending ? "Saving..." : "Save"
|
|
375
|
-
})]
|
|
376
|
-
})
|
|
377
|
-
]
|
|
378
|
-
})]
|
|
379
|
-
}),
|
|
380
|
-
deleteTarget && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
381
|
-
className: "fixed inset-0 z-50 flex items-start justify-center pt-[15vh]",
|
|
382
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
383
|
-
className: "absolute inset-0 bg-sand-900/8 backdrop-blur-sm",
|
|
384
|
-
onClick: () => setDeleteTarget(null),
|
|
385
|
-
onKeyDown: () => {}
|
|
386
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
387
|
-
className: "relative panel shadow-xl w-full max-w-sm mx-4",
|
|
388
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
389
|
-
className: "px-5 py-4",
|
|
390
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
391
|
-
className: "text-base font-medium text-sand-900",
|
|
392
|
-
children: "Remove Token"
|
|
393
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
394
|
-
className: "text-sm text-sand-700 mt-2",
|
|
395
|
-
children: [
|
|
396
|
-
"Are you sure you want to remove",
|
|
397
|
-
" ",
|
|
398
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
|
|
399
|
-
className: "text-[13px] font-mono text-sand-800",
|
|
400
|
-
children: maskAccessToken(deleteTarget.credentials)
|
|
401
|
-
}),
|
|
402
|
-
deleteTarget.name && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
403
|
-
className: "text-sand-500",
|
|
404
|
-
children: [
|
|
405
|
-
" (",
|
|
406
|
-
deleteTarget.name,
|
|
407
|
-
")"
|
|
408
|
-
]
|
|
409
|
-
}),
|
|
410
|
-
"?"
|
|
411
|
-
]
|
|
412
|
-
})]
|
|
413
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
414
|
-
className: "px-5 py-3 border-t border-sand-100/60 flex items-center justify-end gap-2",
|
|
415
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
416
|
-
type: "button",
|
|
417
|
-
className: "px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150",
|
|
418
|
-
onClick: () => setDeleteTarget(null),
|
|
419
|
-
children: "Cancel"
|
|
420
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
421
|
-
type: "button",
|
|
422
|
-
className: "px-3 py-1 text-xs font-medium rounded-md bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 transition-colors duration-150",
|
|
423
|
-
disabled: removeMutation.isPending,
|
|
424
|
-
onClick: handleDelete,
|
|
425
|
-
children: removeMutation.isPending ? "Removing..." : "Remove"
|
|
426
|
-
})]
|
|
427
|
-
})]
|
|
428
|
-
})]
|
|
429
|
-
})
|
|
430
|
-
] });
|
|
431
|
-
}
|
|
432
|
-
//#endregion
|
|
433
|
-
//#region src/routes/tokens.tsx?tsr-split=component
|
|
434
|
-
function TokensPage() {
|
|
435
|
-
const { data, isLoading } = TokenService.useTokens("A");
|
|
436
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
437
|
-
className: "max-w-6xl mx-auto space-y-4",
|
|
438
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
439
|
-
className: "flex items-center justify-end",
|
|
440
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AddTokenModal, {})
|
|
441
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TokenTable, {
|
|
442
|
-
data: data?.rows,
|
|
443
|
-
isLoading
|
|
444
|
-
})]
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
//#endregion
|
|
448
|
-
export { TokensPage as component };
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { A as require_react, O as useQueryClient, X as __toESM, k as require_jsx_runtime, n as QgridService, o as TokenService } from "./services.generated-BA4AcAf5.js";
|
|
2
|
-
import { o as Q } from "../entry-server.generated.js";
|
|
3
|
-
//#region src/components/qgrid/OAuthCodeEntry.tsx
|
|
4
|
-
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
5
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
6
|
-
/**
|
|
7
|
-
* 원격 접속(code 모드) 로그인의 인증 결과 입력 단계.
|
|
8
|
-
* Add Token 모달과 재로그인이 같은 문구·에러·재시작 동선을 쓰도록 한 곳에 둔다.
|
|
9
|
-
*/
|
|
10
|
-
function OAuthCodeEntry({ provider, isPending, isError, onSubmit, onRestart }) {
|
|
11
|
-
const [pastedCode, setPastedCode] = (0, import_react.useState)("");
|
|
12
|
-
const isOpenAI = provider === "openai";
|
|
13
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
14
|
-
className: "space-y-2",
|
|
15
|
-
children: [
|
|
16
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
17
|
-
className: "text-[12px] text-sand-600 leading-relaxed",
|
|
18
|
-
children: isOpenAI ? "새 탭에서 OpenAI 로그인을 완료한 뒤 연결 실패 화면이 나타나면, 주소창의 전체 URL을 아래에 붙여넣으세요." : "새 탭에서 Claude 로그인을 완료하면 코드가 표시됩니다. 코드 전체를 아래에 붙여넣으세요."
|
|
19
|
-
}),
|
|
20
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Q, {
|
|
21
|
-
value: pastedCode,
|
|
22
|
-
onChange: (e) => setPastedCode(e.target.value),
|
|
23
|
-
placeholder: isOpenAI ? "http://localhost:1455/auth/callback?code=...&state=..." : "code#state",
|
|
24
|
-
className: "w-full border border-sand-200 rounded-md px-3 py-2 text-sm font-mono text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300"
|
|
25
|
-
}),
|
|
26
|
-
isError && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
27
|
-
className: "text-[11px] text-red-500",
|
|
28
|
-
children: "인증 결과 확인에 실패했습니다 — 전체 값을 다시 붙여넣거나 로그인을 다시 시작하세요."
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
31
|
-
type: "button",
|
|
32
|
-
className: "w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2",
|
|
33
|
-
disabled: !pastedCode.trim() || isPending,
|
|
34
|
-
onClick: () => onSubmit(pastedCode),
|
|
35
|
-
children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
36
|
-
className: "flex items-center gap-1.5",
|
|
37
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin" }), "Verifying..."]
|
|
38
|
-
}) : "Complete login"
|
|
39
|
-
}),
|
|
40
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
41
|
-
type: "button",
|
|
42
|
-
className: "w-full py-1.5 text-[12px] text-sand-500 hover:text-sand-700 transition-colors duration-150",
|
|
43
|
-
onClick: () => {
|
|
44
|
-
setPastedCode("");
|
|
45
|
-
onRestart();
|
|
46
|
-
},
|
|
47
|
-
children: "처음부터 다시 시작"
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/components/qgrid/use-oauth-login-flow.ts
|
|
54
|
-
var OPENAI_POLL_INTERVAL_MS = 3e3;
|
|
55
|
-
var OPENAI_POLL_TIMEOUT_MS = 3e5;
|
|
56
|
-
async function getTokenIds(provider, name) {
|
|
57
|
-
const { rows } = await TokenService.getTokens("A", {
|
|
58
|
-
num: 0,
|
|
59
|
-
queryMode: "list"
|
|
60
|
-
});
|
|
61
|
-
return new Set(rows.filter((token) => token.provider === provider && token.name === name).map((token) => token.id));
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* provider별 OAuth 로그인 시작과 코드 제출을 한 곳에 모은다.
|
|
65
|
-
* Add Token 모달과 tokens 목록의 재로그인 버튼이 같은 플로우를 쓴다 — 두 진입점이
|
|
66
|
-
* redirect/code 분기나 폴링 처리를 각자 구현하면 원격 접속 경험이 갈라진다.
|
|
67
|
-
*/
|
|
68
|
-
function useOAuthLoginFlow() {
|
|
69
|
-
const [loadingProvider, setLoadingProvider] = (0, import_react.useState)(null);
|
|
70
|
-
const [codeEntryProvider, setCodeEntryProvider] = (0, import_react.useState)(null);
|
|
71
|
-
const queryClient = useQueryClient();
|
|
72
|
-
const oauthStartMutation = QgridService.useOauthStartMutation();
|
|
73
|
-
const oauthStartOpenAIMutation = QgridService.useOauthStartOpenAIMutation();
|
|
74
|
-
const oauthCompleteMutation = QgridService.useOauthCompleteMutation();
|
|
75
|
-
const pollTimers = (0, import_react.useRef)({});
|
|
76
|
-
const attemptRef = (0, import_react.useRef)(0);
|
|
77
|
-
const stopPolling = () => {
|
|
78
|
-
attemptRef.current += 1;
|
|
79
|
-
if (pollTimers.current.interval !== void 0) clearInterval(pollTimers.current.interval);
|
|
80
|
-
if (pollTimers.current.timeout !== void 0) clearTimeout(pollTimers.current.timeout);
|
|
81
|
-
pollTimers.current = {};
|
|
82
|
-
};
|
|
83
|
-
(0, import_react.useEffect)(() => stopPolling, []);
|
|
84
|
-
const invalidateTokens = () => Promise.all([queryClient.invalidateQueries({ queryKey: ["Token"] }), queryClient.invalidateQueries({ queryKey: ["Qgrid"] })]);
|
|
85
|
-
const start = async (provider, name) => {
|
|
86
|
-
const trimmed = name.trim();
|
|
87
|
-
if (!trimmed) return;
|
|
88
|
-
stopPolling();
|
|
89
|
-
const attempt = attemptRef.current;
|
|
90
|
-
const popup = window.open("about:blank", "_blank");
|
|
91
|
-
setLoadingProvider(provider);
|
|
92
|
-
try {
|
|
93
|
-
if (provider === "openai") {
|
|
94
|
-
const before = await getTokenIds(provider, trimmed);
|
|
95
|
-
if (attempt !== attemptRef.current) {
|
|
96
|
-
popup?.close();
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const { authUrl, mode } = await oauthStartOpenAIMutation.mutateAsync({ name: trimmed });
|
|
100
|
-
if (attempt !== attemptRef.current) {
|
|
101
|
-
popup?.close();
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
if (popup) popup.location.href = authUrl;
|
|
105
|
-
else window.open(authUrl, "_blank");
|
|
106
|
-
if (mode === "code") {
|
|
107
|
-
setCodeEntryProvider(provider);
|
|
108
|
-
setLoadingProvider(null);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
pollTimers.current.interval = window.setInterval(() => {
|
|
112
|
-
getTokenIds(provider, trimmed).then((ids) => {
|
|
113
|
-
if (attempt !== attemptRef.current) return;
|
|
114
|
-
if ([...ids].some((id) => !before.has(id))) {
|
|
115
|
-
stopPolling();
|
|
116
|
-
setLoadingProvider(null);
|
|
117
|
-
invalidateTokens();
|
|
118
|
-
}
|
|
119
|
-
}).catch(() => {});
|
|
120
|
-
}, OPENAI_POLL_INTERVAL_MS);
|
|
121
|
-
pollTimers.current.timeout = window.setTimeout(() => {
|
|
122
|
-
if (attempt !== attemptRef.current) return;
|
|
123
|
-
stopPolling();
|
|
124
|
-
setLoadingProvider(null);
|
|
125
|
-
}, OPENAI_POLL_TIMEOUT_MS);
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
const { authUrl, mode } = await oauthStartMutation.mutateAsync({ name: trimmed });
|
|
129
|
-
if (attempt !== attemptRef.current) {
|
|
130
|
-
popup?.close();
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (mode === "code") {
|
|
134
|
-
if (popup) popup.location.href = authUrl;
|
|
135
|
-
else window.open(authUrl, "_blank");
|
|
136
|
-
setCodeEntryProvider(provider);
|
|
137
|
-
setLoadingProvider(null);
|
|
138
|
-
} else {
|
|
139
|
-
popup?.close();
|
|
140
|
-
window.location.href = authUrl;
|
|
141
|
-
}
|
|
142
|
-
} catch (e) {
|
|
143
|
-
popup?.close();
|
|
144
|
-
if (attempt !== attemptRef.current) return;
|
|
145
|
-
console.error("OAuth start failed:", e);
|
|
146
|
-
setLoadingProvider(null);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
/** @returns 교환 성공 여부. 실패 시 `completeMutation.isError` 로 안내 문구를 띄운다. */
|
|
150
|
-
const submitCode = async (pastedCode) => {
|
|
151
|
-
const trimmed = pastedCode.trim();
|
|
152
|
-
if (!trimmed) return false;
|
|
153
|
-
try {
|
|
154
|
-
await oauthCompleteMutation.mutateAsync({ pastedCode: trimmed });
|
|
155
|
-
} catch (e) {
|
|
156
|
-
console.error("OAuth complete failed:", e);
|
|
157
|
-
return false;
|
|
158
|
-
}
|
|
159
|
-
await invalidateTokens();
|
|
160
|
-
return true;
|
|
161
|
-
};
|
|
162
|
-
const reset = () => {
|
|
163
|
-
stopPolling();
|
|
164
|
-
setLoadingProvider(null);
|
|
165
|
-
setCodeEntryProvider(null);
|
|
166
|
-
oauthCompleteMutation.reset();
|
|
167
|
-
};
|
|
168
|
-
return {
|
|
169
|
-
loadingProvider,
|
|
170
|
-
codeEntryProvider,
|
|
171
|
-
start,
|
|
172
|
-
submitCode,
|
|
173
|
-
reset,
|
|
174
|
-
completeMutation: oauthCompleteMutation
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
export { OAuthCodeEntry as n, useOAuthLoginFlow as t };
|
package/dist/cli.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region src/cli.d.ts
|
|
2
|
-
declare const RUNTIME_CLI_DEPENDENCIES: readonly [{
|
|
3
|
-
readonly command: "claude";
|
|
4
|
-
readonly packageName: "@anthropic-ai/claude-code";
|
|
5
|
-
readonly label: "Claude Code";
|
|
6
|
-
readonly missingReason: "Anthropic tokens require Claude Code.";
|
|
7
|
-
}];
|
|
8
|
-
declare function ensureLatestRuntimeCliDependencies(): void;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { RUNTIME_CLI_DEPENDENCIES, ensureLatestRuntimeCliDependencies };
|
|
File without changes
|
/package/bundle/web-dist/client/assets/{preload-helper-ca-nBW7U.js → preload-helper-DWTEM3RW.js}
RENAMED
|
File without changes
|
|
File without changes
|