dsh-coding-subscription-oauth 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +136 -0
- package/CONTRIBUTING.md +109 -0
- package/INSTALL.md +220 -0
- package/LICENSE +19 -0
- package/NOTICE +11 -0
- package/README.de.md +254 -0
- package/README.es.md +254 -0
- package/README.fr.md +254 -0
- package/README.ja.md +254 -0
- package/README.ko.md +254 -0
- package/README.md +286 -0
- package/README.pt-BR.md +254 -0
- package/README.ru.md +254 -0
- package/README.zh-CN.md +271 -0
- package/cordis.patch.yml +13 -0
- package/docs/00-project-rules.md +195 -0
- package/docs/02-architecture.md +132 -0
- package/docs/02-architecture.zh-CN.md +128 -0
- package/lib/adapter.d.ts +24 -0
- package/lib/adapter.d.ts.map +1 -0
- package/lib/alias-adapter.d.ts +43 -0
- package/lib/alias-adapter.d.ts.map +1 -0
- package/lib/auth-routes.d.ts +155 -0
- package/lib/auth-routes.d.ts.map +1 -0
- package/lib/auth.d.ts +29 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/bin.d.ts +6 -0
- package/lib/bin.d.ts.map +1 -0
- package/lib/bin.js +27591 -0
- package/lib/bin.js.map +7 -0
- package/lib/capability-routes.d.ts +43 -0
- package/lib/capability-routes.d.ts.map +1 -0
- package/lib/capability-runtime.d.ts +56 -0
- package/lib/capability-runtime.d.ts.map +1 -0
- package/lib/capability-settings.d.ts +263 -0
- package/lib/capability-settings.d.ts.map +1 -0
- package/lib/capability-tools.d.ts +50 -0
- package/lib/capability-tools.d.ts.map +1 -0
- package/lib/catalog.d.ts +53 -0
- package/lib/catalog.d.ts.map +1 -0
- package/lib/client.js +3 -0
- package/lib/client.js.map +7 -0
- package/lib/codex-http.d.ts +77 -0
- package/lib/codex-http.d.ts.map +1 -0
- package/lib/codex-images.d.ts +109 -0
- package/lib/codex-images.d.ts.map +1 -0
- package/lib/codex-model-capabilities.d.ts +112 -0
- package/lib/codex-model-capabilities.d.ts.map +1 -0
- package/lib/codex-search.d.ts +96 -0
- package/lib/codex-search.d.ts.map +1 -0
- package/lib/codex-usage.d.ts +79 -0
- package/lib/codex-usage.d.ts.map +1 -0
- package/lib/gateway-anthropic-messages.d.ts +8 -0
- package/lib/gateway-anthropic-messages.d.ts.map +1 -0
- package/lib/gateway-auth.d.ts +22 -0
- package/lib/gateway-auth.d.ts.map +1 -0
- package/lib/gateway-backend.d.ts +62 -0
- package/lib/gateway-backend.d.ts.map +1 -0
- package/lib/gateway-body.d.ts +9 -0
- package/lib/gateway-body.d.ts.map +1 -0
- package/lib/gateway-config.d.ts +24 -0
- package/lib/gateway-config.d.ts.map +1 -0
- package/lib/gateway-http.d.ts +16 -0
- package/lib/gateway-http.d.ts.map +1 -0
- package/lib/gateway-openai-chat.d.ts +8 -0
- package/lib/gateway-openai-chat.d.ts.map +1 -0
- package/lib/gateway-openai-responses.d.ts +8 -0
- package/lib/gateway-openai-responses.d.ts.map +1 -0
- package/lib/gateway-parse.d.ts +10 -0
- package/lib/gateway-parse.d.ts.map +1 -0
- package/lib/gateway-protocol.d.ts +47 -0
- package/lib/gateway-protocol.d.ts.map +1 -0
- package/lib/gateway-routes.d.ts +21 -0
- package/lib/gateway-routes.d.ts.map +1 -0
- package/lib/gateway.d.ts +48 -0
- package/lib/gateway.d.ts.map +1 -0
- package/lib/grok-imagine.d.ts +271 -0
- package/lib/grok-imagine.d.ts.map +1 -0
- package/lib/grok-import.d.ts +21 -0
- package/lib/grok-import.d.ts.map +1 -0
- package/lib/http-json.d.ts +10 -0
- package/lib/http-json.d.ts.map +1 -0
- package/lib/ids.d.ts +33 -0
- package/lib/ids.d.ts.map +1 -0
- package/lib/imagine-routes.d.ts +59 -0
- package/lib/imagine-routes.d.ts.map +1 -0
- package/lib/index.d.ts +69 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +35355 -0
- package/lib/index.js.map +7 -0
- package/lib/invariant.d.ts +9 -0
- package/lib/invariant.d.ts.map +1 -0
- package/lib/invariant.js +14 -0
- package/lib/invariant.js.map +7 -0
- package/lib/kimi-errors.d.ts +13 -0
- package/lib/kimi-errors.d.ts.map +1 -0
- package/lib/media-store.d.ts +130 -0
- package/lib/media-store.d.ts.map +1 -0
- package/lib/oauth-import-routes.d.ts +52 -0
- package/lib/oauth-import-routes.d.ts.map +1 -0
- package/lib/oauth-providers.d.ts +26 -0
- package/lib/oauth-providers.d.ts.map +1 -0
- package/lib/oauth-session.d.ts +40 -0
- package/lib/oauth-session.d.ts.map +1 -0
- package/lib/oauth-sources.d.ts +205 -0
- package/lib/oauth-sources.d.ts.map +1 -0
- package/lib/oauth.d.ts +79 -0
- package/lib/oauth.d.ts.map +1 -0
- package/lib/provider.d.ts +38 -0
- package/lib/provider.d.ts.map +1 -0
- package/lib/proxy.d.ts +17 -0
- package/lib/proxy.d.ts.map +1 -0
- package/lib/redact.d.ts +5 -0
- package/lib/redact.d.ts.map +1 -0
- package/lib/session.d.ts +40 -0
- package/lib/session.d.ts.map +1 -0
- package/lib/store.d.ts +46 -0
- package/lib/store.d.ts.map +1 -0
- package/lib/web-origin.d.ts +10 -0
- package/lib/web-origin.d.ts.map +1 -0
- package/lib/web-routes.d.ts +20 -0
- package/lib/web-routes.d.ts.map +1 -0
- package/package.json +185 -0
- package/patches/dsh-agy@0.1.2.patch +25 -0
- package/scripts/release.mjs +166 -0
- package/scripts/smoke-deployed-routes.mjs +146 -0
- package/scripts/verify-deployed-catalog.mjs +87 -0
- package/src/adapter.ts +282 -0
- package/src/alias-adapter.ts +152 -0
- package/src/auth-routes.ts +871 -0
- package/src/auth.ts +67 -0
- package/src/bin.ts +350 -0
- package/src/capability-routes.ts +275 -0
- package/src/capability-runtime.ts +313 -0
- package/src/capability-settings.ts +657 -0
- package/src/capability-tools.ts +666 -0
- package/src/catalog.ts +271 -0
- package/src/client/GrokBuildSettings.tsx +2221 -0
- package/src/client/index.tsx +37 -0
- package/src/client/locales.ts +421 -0
- package/src/codex-http.ts +447 -0
- package/src/codex-images.ts +485 -0
- package/src/codex-model-capabilities.ts +320 -0
- package/src/codex-search.ts +245 -0
- package/src/codex-usage.ts +263 -0
- package/src/gateway-anthropic-messages.ts +84 -0
- package/src/gateway-auth.ts +100 -0
- package/src/gateway-backend.ts +274 -0
- package/src/gateway-body.ts +49 -0
- package/src/gateway-config.ts +76 -0
- package/src/gateway-http.ts +104 -0
- package/src/gateway-openai-chat.ts +124 -0
- package/src/gateway-openai-responses.ts +53 -0
- package/src/gateway-parse.ts +224 -0
- package/src/gateway-protocol.ts +52 -0
- package/src/gateway-routes.ts +152 -0
- package/src/gateway.ts +242 -0
- package/src/grok-imagine.ts +1627 -0
- package/src/grok-import.ts +151 -0
- package/src/http-json.ts +82 -0
- package/src/ids.ts +45 -0
- package/src/imagine-routes.ts +461 -0
- package/src/index.ts +598 -0
- package/src/invariant.ts +17 -0
- package/src/kimi-errors.ts +26 -0
- package/src/media-store.ts +927 -0
- package/src/oauth-import-routes.ts +314 -0
- package/src/oauth-providers.ts +152 -0
- package/src/oauth-session.ts +183 -0
- package/src/oauth-sources.ts +1104 -0
- package/src/oauth.ts +620 -0
- package/src/provider.ts +128 -0
- package/src/proxy.ts +99 -0
- package/src/redact.ts +72 -0
- package/src/session.ts +218 -0
- package/src/store.ts +217 -0
- package/src/web-origin.ts +60 -0
- package/src/web-routes.ts +75 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Browser half: coding-subscription account management inside dsh Settings. */
|
|
2
|
+
|
|
3
|
+
import type {} from "@deepseek-ai/dsh-client-locale/client";
|
|
4
|
+
import type { ClientContext } from "@deepseek-ai/dsh-client-runtime/client";
|
|
5
|
+
import type {} from "@deepseek-ai/dsh-client-ui-settings/client";
|
|
6
|
+
import type {} from "@deepseek-ai/dsh-client-ui-slots";
|
|
7
|
+
import type { GrokBuildSettingsInjected } from "./GrokBuildSettings.tsx";
|
|
8
|
+
import { GrokBuildSettings } from "./GrokBuildSettings.tsx";
|
|
9
|
+
import type { GrokBuildSettingsKey } from "./locales.ts";
|
|
10
|
+
import { en, zh } from "./locales.ts";
|
|
11
|
+
|
|
12
|
+
declare module "@deepseek-ai/dsh-client-ui-slots" {
|
|
13
|
+
interface LocaleNamespaceMap {
|
|
14
|
+
"settings.grok-build": GrokBuildSettingsKey;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const name = "dsh-grok-build-client";
|
|
19
|
+
export const inject = ["slots", "locale"];
|
|
20
|
+
|
|
21
|
+
export function apply(ctx: ClientContext): void {
|
|
22
|
+
const namespace = "settings.grok-build";
|
|
23
|
+
ctx.effect(() => ctx.locale.register(namespace, { zh, en }), "dsh-coding-subscription-oauth: settings copy");
|
|
24
|
+
const t = ctx.locale.bind(namespace) as GrokBuildSettingsInjected["t"];
|
|
25
|
+
ctx.slots.inject("settings.section", () =>
|
|
26
|
+
ctx.slots.register(
|
|
27
|
+
{
|
|
28
|
+
name: "settings.section",
|
|
29
|
+
id: "grok-build",
|
|
30
|
+
order: 17,
|
|
31
|
+
label: () => t("nav"),
|
|
32
|
+
inject: (): GrokBuildSettingsInjected => ({ t }),
|
|
33
|
+
},
|
|
34
|
+
GrokBuildSettings,
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/** English copy for the Coding OAuth settings section. */
|
|
2
|
+
export const en = {
|
|
3
|
+
nav: "Coding OAuth",
|
|
4
|
+
title: "Coding subscriptions",
|
|
5
|
+
intro:
|
|
6
|
+
"Use your own Grok Build, ChatGPT Codex, Kimi Code, and Claude Code subscriptions in dsh. API-key routes remain separate.",
|
|
7
|
+
termsWarning:
|
|
8
|
+
"These are unofficial third-party integrations with subscription services. Provider terms, quotas, regions, and account-risk policies still apply.",
|
|
9
|
+
loadingAccount: "Loading accounts…",
|
|
10
|
+
signedOut: "Not signed in",
|
|
11
|
+
signingIn: "Waiting for authorization…",
|
|
12
|
+
signedIn: "Signed in",
|
|
13
|
+
requestFailed: "The account request failed.",
|
|
14
|
+
logout: "Sign out",
|
|
15
|
+
working: "Working…",
|
|
16
|
+
cancelLogin: "Cancel sign-in",
|
|
17
|
+
deviceLogin: "Sign in with device code",
|
|
18
|
+
browserLogin: "Sign in in browser",
|
|
19
|
+
pkceLogin: "Sign in with authorization code",
|
|
20
|
+
userCode: "Enter this code when the provider asks:",
|
|
21
|
+
openUrl: "Complete sign-in at:",
|
|
22
|
+
popupBlocked: "The browser blocked the sign-in window. Open this URL manually:",
|
|
23
|
+
pasteCodeHint:
|
|
24
|
+
"Paste the authorization code or complete redirect URL returned by the provider. For local PKCE, use this only if the callback could not reach this DSH host:",
|
|
25
|
+
pasteBrowserCodeHint:
|
|
26
|
+
"Paste the authorization code or complete redirect URL returned by the provider to finish this browser sign-in:",
|
|
27
|
+
pasteCodePlaceholder: "authorization code or complete redirect URL",
|
|
28
|
+
submitCode: "Submit code",
|
|
29
|
+
importGrok: "Import from Grok CLI",
|
|
30
|
+
importHint: "Copies ~/.grok/auth.json into dsh. A later dsh refresh may rotate the token and sign the Grok CLI out.",
|
|
31
|
+
models: "Visible models",
|
|
32
|
+
catalogLive: "From your current xAI account",
|
|
33
|
+
catalogCache: "From the last successful xAI listing",
|
|
34
|
+
catalogFallback: "Built-in Grok baseline (live listing unavailable)",
|
|
35
|
+
catalogError: "Could not refresh the live Grok model list.",
|
|
36
|
+
selectAll: "Show all",
|
|
37
|
+
modelHint: "Checked models appear in the model picker as",
|
|
38
|
+
grokTitle: "xAI Grok Build",
|
|
39
|
+
grokDescription: "SuperGrok / X Premium coding subscription through the Grok Build endpoint.",
|
|
40
|
+
codexTitle: "OpenAI Codex",
|
|
41
|
+
codexDescription: "ChatGPT Plus/Pro Codex entitlement. Device code is recommended for a remote DSH host.",
|
|
42
|
+
kimiTitle: "Kimi Code",
|
|
43
|
+
kimiDescription:
|
|
44
|
+
"Kimi Code membership through auth.kimi.com and api.kimi.com/coding; this is not the Moonshot API-key platform.",
|
|
45
|
+
claudeTitle: "Claude Code",
|
|
46
|
+
claudeDescription: "Claude Pro/Max OAuth with Claude Code scopes and automatic refresh.",
|
|
47
|
+
antigravityTitle: "Google Antigravity",
|
|
48
|
+
antigravityDescription: "Provided by the separately pinned MIT dsh-agy plugin and exposed as the agy route.",
|
|
49
|
+
antigravityInstalled: "Installed (CLI-managed)",
|
|
50
|
+
antigravityMissing: "Not installed",
|
|
51
|
+
antigravityCliHint:
|
|
52
|
+
"The unauthenticated dsh-agy web export dashboard is disabled. Manage Google OAuth with the profile-local CLI when needed.",
|
|
53
|
+
antigravityCliCommand: "dsh plugin --profile web exec dsh-agy login --headless",
|
|
54
|
+
sourcesTitle: "Pull a copy from official CLI files",
|
|
55
|
+
sourcesIntro:
|
|
56
|
+
"dsh can discover a local official CLI login and pull a one-way copy into its own store. Official CLI files stay read-only and are never modified.",
|
|
57
|
+
sourcesReadOnlyHint:
|
|
58
|
+
"This is a one-way pull of a copy. dsh does not update, replace, or write back the official CLI documents.",
|
|
59
|
+
sourcesLoading: "Looking for official CLI login files…",
|
|
60
|
+
sourcesCheckAgain: "Check again",
|
|
61
|
+
sourcesAvailable: "A readable copy is available",
|
|
62
|
+
sourcesUnavailable: "No usable copy found",
|
|
63
|
+
sourcesPullCopy: "Pull a copy",
|
|
64
|
+
sourcesPreviewTitle: "Review this copy before saving it in dsh",
|
|
65
|
+
sourcesPreviewExpires: "CLI credential expiry: {time}",
|
|
66
|
+
sourcesTicketExpires: "This preview expires at {time}",
|
|
67
|
+
sourcesConflict: "Stored dsh credential: {detail}",
|
|
68
|
+
sourcesAction: "If you continue: {detail}",
|
|
69
|
+
sourcesWarnings: "Notes",
|
|
70
|
+
sourcesConfirmOverwrite: "Replace the credential already stored in dsh with this copy",
|
|
71
|
+
sourcesConfirmOverwriteHint: "A different credential is already stored. Check the box, then confirm the pull.",
|
|
72
|
+
sourcesCommit: "Confirm pull",
|
|
73
|
+
sourcesCancelPreview: "Cancel preview",
|
|
74
|
+
sourcesCommitSuccess: "Copied into dsh ({action}).",
|
|
75
|
+
sourcesPreviewFailed: "Could not prepare a copy from that CLI file.",
|
|
76
|
+
sourcesCommitFailed: "Could not save the copy in dsh.",
|
|
77
|
+
sourcesLoadFailed: "Could not look for official CLI login files.",
|
|
78
|
+
sourceKindGrok: "Grok CLI",
|
|
79
|
+
sourceKindCodex: "Codex CLI",
|
|
80
|
+
sourceKindKimi: "Kimi Code CLI",
|
|
81
|
+
sourceKindClaude: "Claude Code CLI",
|
|
82
|
+
sourceReasonMissing: "No official CLI file was found at the expected location.",
|
|
83
|
+
sourceReasonUnsafe: "The official CLI file is not safe to read (permissions or file type).",
|
|
84
|
+
sourceReasonInvalid: "The official CLI file is present but is not a usable OAuth login.",
|
|
85
|
+
sourceReasonTooLarge: "The official CLI file is larger than the allowed read limit.",
|
|
86
|
+
sourceConflictNone: "dsh has no stored credential yet",
|
|
87
|
+
sourceConflictSameCredential: "same credential already stored",
|
|
88
|
+
sourceConflictSameAccount: "same account, different credential",
|
|
89
|
+
sourceConflictDifferentAccount: "a different account is already stored",
|
|
90
|
+
sourceConflictUnknownAccount: "an existing credential is stored (account could not be compared)",
|
|
91
|
+
sourceConflictUnreadableDestination: "the stored dsh credential could not be read",
|
|
92
|
+
sourceConflictUnsafeDestination: "the stored dsh credential file is not safe to replace",
|
|
93
|
+
sourceConflictUnrecognized: "the stored credential needs a review",
|
|
94
|
+
sourceActionImport: "save this copy in dsh",
|
|
95
|
+
sourceActionReuse: "keep the stored dsh credential (it already matches)",
|
|
96
|
+
sourceActionOverwrite: "replace the stored dsh credential",
|
|
97
|
+
sourceActionBlocked: "blocked — the stored dsh file cannot be replaced from here",
|
|
98
|
+
sourceActionUnrecognized: "needs a review",
|
|
99
|
+
sourceCommitImported: "saved",
|
|
100
|
+
sourceCommitUnchanged: "already matched",
|
|
101
|
+
sourceCommitOverwritten: "replaced",
|
|
102
|
+
capabilitiesTitle: "Subscription capabilities",
|
|
103
|
+
capabilitiesIntro:
|
|
104
|
+
"Every switch starts off. Turning one on uses that vendor’s subscription quota, not a separate API-key bill.",
|
|
105
|
+
capabilitiesQuotaHint:
|
|
106
|
+
"Search, images, edits, Fast, usage, and Grok Imagine all consume the matching subscription quota when they run.",
|
|
107
|
+
capabilitiesReadOnly: "These switches are read-only in this deployment.",
|
|
108
|
+
capabilitiesLoading: "Loading capability settings…",
|
|
109
|
+
capabilitiesLoadFailed: "Could not load capability settings.",
|
|
110
|
+
capabilitiesSaveFailed: "Could not save that capability setting.",
|
|
111
|
+
capabilitiesConflictRefreshed: "Those settings changed elsewhere. The page was refreshed; try again.",
|
|
112
|
+
capabilityLimitsTitle: "Capability limits",
|
|
113
|
+
capabilityLimitsHint: "Limits apply live to newly started operations and remain within the audited safety bounds.",
|
|
114
|
+
capSearchResults: "Maximum search results",
|
|
115
|
+
capSearchResultsHint: "Codex search returns at most this many results (1–20).",
|
|
116
|
+
capImageCount: "Maximum images per call",
|
|
117
|
+
capImageCountHint: "Codex and Imagine image tools can return at most this many images (1–4).",
|
|
118
|
+
capVideoTtlHours: "Video artifact retention (hours)",
|
|
119
|
+
capVideoTtlHoursHint:
|
|
120
|
+
"Completed Imagine video artifacts are kept for 1–168 hours. Lowering retention cleans older artifacts immediately; raising it applies to new artifacts.",
|
|
121
|
+
capabilityLimitInvalid: "Enter a whole number from {min} through {max}.",
|
|
122
|
+
capCodexSearch: "Codex subscription search",
|
|
123
|
+
capCodexSearchHint: "Optional Codex search. It does not become the default search provider.",
|
|
124
|
+
capCodexImages: "Codex images",
|
|
125
|
+
capCodexImagesHint: "Optional Codex image generation. Uses ChatGPT/Codex quota.",
|
|
126
|
+
capCodexImageEdits: "Codex image edits",
|
|
127
|
+
capCodexImageEditsHint: "Optional Codex image edits. Available only when Codex images is on.",
|
|
128
|
+
capCodexUsage: "Show Codex quota",
|
|
129
|
+
capCodexUsageHint: "Best-effort remaining-quota card. Hidden if the vendor does not return usable numbers.",
|
|
130
|
+
capCodexFast: "Fast requested",
|
|
131
|
+
capCodexFastHint:
|
|
132
|
+
"Publishes the codex-oauth-fast route only after a fresh private model catalog confirms a priority-eligible model; failures withdraw it.",
|
|
133
|
+
capGrokImagineImage: "Grok Imagine images",
|
|
134
|
+
capGrokImagineImageHint: "Optional official xAI Imagine images. Requires an Imagine credential, not only Grok OAuth.",
|
|
135
|
+
capGrokImagineVideo: "Grok Imagine video",
|
|
136
|
+
capGrokImagineVideoHint: "Optional official xAI Imagine video. Requires an Imagine credential, not only Grok OAuth.",
|
|
137
|
+
usageTitle: "Codex quota",
|
|
138
|
+
usageLoading: "Loading Codex quota…",
|
|
139
|
+
usageUnavailable: "Codex quota is not available right now.",
|
|
140
|
+
usageEmpty: "The vendor did not return any displayable quota fields.",
|
|
141
|
+
usageFetchedAt: "Last read: {time}",
|
|
142
|
+
usageRateLimit: "Rate limit",
|
|
143
|
+
usageWindow: "{seconds}s window",
|
|
144
|
+
usageUsed: "Used {value}",
|
|
145
|
+
usageRemaining: "Remaining {value}",
|
|
146
|
+
usageResets: "Resets {time}",
|
|
147
|
+
usageCredits: "Credits",
|
|
148
|
+
usageCreditsUnlimited: "Unlimited credits",
|
|
149
|
+
usageCreditsLimited: "Limited credits",
|
|
150
|
+
usageBalance: "Balance {value}",
|
|
151
|
+
usageIndividualLimit: "Individual limit",
|
|
152
|
+
usageLimit: "Limit {value}",
|
|
153
|
+
usageUsedAmount: "Used {value}",
|
|
154
|
+
usageRemainingAmount: "Remaining {value}",
|
|
155
|
+
usageSpendControlReached: "Spend control has been reached.",
|
|
156
|
+
usageResetCredits: "Reset credits available: {value}",
|
|
157
|
+
imagineTitle: "Grok Imagine credential",
|
|
158
|
+
imagineIntro:
|
|
159
|
+
"Official Imagine calls use an xAI API credential (for example $XAI_API_KEY). That key is separate from a Grok Build OAuth login and is never shown here.",
|
|
160
|
+
imagineLoading: "Checking the Imagine credential…",
|
|
161
|
+
imagineLoadFailed: "Could not read the Imagine credential status.",
|
|
162
|
+
imagineConfigured: "An Imagine credential is configured",
|
|
163
|
+
imagineNotConfigured: "No Imagine credential is configured",
|
|
164
|
+
imagineSource: "Source: {source}",
|
|
165
|
+
imagineWritable: "This deployment can update the Imagine credential store.",
|
|
166
|
+
imagineReadOnly: "This deployment cannot update the Imagine credential store.",
|
|
167
|
+
imagineSourceNone: "none",
|
|
168
|
+
imagineSourceEnv: "environment variable",
|
|
169
|
+
imagineSourceApiKey: "stored API key",
|
|
170
|
+
imagineSourceOAuth: "OAuth access (only if Imagine accepted it)",
|
|
171
|
+
imagineSourceCliKey: "Grok CLI key field",
|
|
172
|
+
imagineSourceUnknown: "configured (details withheld)",
|
|
173
|
+
tabAccounts: "Accounts",
|
|
174
|
+
tabCapabilities: "Capabilities",
|
|
175
|
+
tabGateway: "Gateway",
|
|
176
|
+
tabAbout: "About",
|
|
177
|
+
copy: "Copy",
|
|
178
|
+
copied: "Copied",
|
|
179
|
+
copyFailed: "Could not copy",
|
|
180
|
+
modelsSummary: "{selected}/{total} models visible",
|
|
181
|
+
expandModels: "Models",
|
|
182
|
+
collapseModels: "Hide models",
|
|
183
|
+
usageUsedShort: "Used {value}",
|
|
184
|
+
gatewayTitle: "Local API gateway",
|
|
185
|
+
gatewayIntro: "Loopback OpenAI/Anthropic-compatible server for your own tools. Off until you enable it.",
|
|
186
|
+
gatewayWarning: "Exposes signed-in subscriptions as a local API. Can violate provider terms and uses quota.",
|
|
187
|
+
gatewayEnabled: "Enable local gateway",
|
|
188
|
+
gatewayBind: "Bind",
|
|
189
|
+
gatewayPort: "Port",
|
|
190
|
+
gatewayPortHint: "Integer from 1024 through 65535. Apply to save; Random fills a high port, then Apply.",
|
|
191
|
+
gatewayPortApply: "Apply",
|
|
192
|
+
gatewayPortRandom: "Random",
|
|
193
|
+
gatewayPortInvalid: "Enter a whole port number from 1024 through 65535.",
|
|
194
|
+
gatewayAddress: "Gateway address",
|
|
195
|
+
gatewayOpenAiUrl: "OpenAI-compatible base URL",
|
|
196
|
+
gatewayAnthropicUrl: "Anthropic-compatible base URL",
|
|
197
|
+
gatewayKeyHint: "Bearer key",
|
|
198
|
+
gatewayKeyCopyHint: "Copy uses the current key. Rotate only if you want to invalidate existing clients.",
|
|
199
|
+
gatewayCopyKey: "Copy key",
|
|
200
|
+
gatewayShowKey: "Show",
|
|
201
|
+
gatewayHideKey: "Hide",
|
|
202
|
+
gatewayRevealFailed: "Could not read the current key.",
|
|
203
|
+
gatewayRotateConfirm: "Rotate the key? Existing clients will stop working.",
|
|
204
|
+
gatewayRotateConfirmHint: "This replaces the current Bearer key.",
|
|
205
|
+
gatewayRotateConfirmAction: "Confirm rotate",
|
|
206
|
+
gatewayRotateCancel: "Cancel",
|
|
207
|
+
gatewayRunning: "Listening",
|
|
208
|
+
gatewayStopped: "Not listening",
|
|
209
|
+
gatewayRotate: "Rotate API key",
|
|
210
|
+
gatewayRotated: "New key (shown once): {key}",
|
|
211
|
+
gatewayLoadFailed: "Could not load gateway settings.",
|
|
212
|
+
gatewaySaveFailed: "Could not update the gateway.",
|
|
213
|
+
gatewayLoading: "Loading gateway settings…",
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export type GrokBuildSettingsKey = keyof typeof en;
|
|
217
|
+
|
|
218
|
+
export const zh: { [Key in GrokBuildSettingsKey]: string } = {
|
|
219
|
+
nav: "编码 OAuth",
|
|
220
|
+
title: "编码订阅账户",
|
|
221
|
+
intro:
|
|
222
|
+
"在 dsh 中使用自己的 Grok Build、ChatGPT Codex、Kimi Code 和 Claude Code 订阅;现有 API-key 路由继续独立保留。",
|
|
223
|
+
termsWarning: "这些是订阅服务的非官方第三方集成,仍受供应商条款、配额、地区限制和账号风控约束。",
|
|
224
|
+
loadingAccount: "正在加载账户…",
|
|
225
|
+
signedOut: "尚未登录",
|
|
226
|
+
signingIn: "正在等待授权…",
|
|
227
|
+
signedIn: "已登录",
|
|
228
|
+
requestFailed: "账户请求失败。",
|
|
229
|
+
logout: "退出登录",
|
|
230
|
+
working: "处理中…",
|
|
231
|
+
cancelLogin: "取消登录",
|
|
232
|
+
deviceLogin: "使用设备码登录",
|
|
233
|
+
browserLogin: "在浏览器中登录",
|
|
234
|
+
pkceLogin: "使用授权码登录",
|
|
235
|
+
userCode: "供应商要求输入代码时,请输入:",
|
|
236
|
+
openUrl: "请在此完成登录:",
|
|
237
|
+
popupBlocked: "浏览器阻止了登录窗口,请手动打开:",
|
|
238
|
+
pasteCodeHint: "请粘贴供应商返回的授权 code 或完整跳转链接。本地 PKCE 仅在回调无法到达这台 DSH 主机时使用:",
|
|
239
|
+
pasteBrowserCodeHint: "请粘贴供应商返回的授权 code 或完整跳转链接,以完成此次浏览器登录:",
|
|
240
|
+
pasteCodePlaceholder: "授权 code 或完整跳转链接",
|
|
241
|
+
submitCode: "提交 code",
|
|
242
|
+
importGrok: "从 Grok CLI 导入",
|
|
243
|
+
importHint: "把 ~/.grok/auth.json 复制进 dsh;之后 dsh 刷新 token 可能让 Grok CLI 掉线。",
|
|
244
|
+
models: "可见模型",
|
|
245
|
+
catalogLive: "来自当前 xAI 账号",
|
|
246
|
+
catalogCache: "来自上一次成功拉取的 xAI 列表",
|
|
247
|
+
catalogFallback: "内置 Grok 基线目录(线上列表不可用)",
|
|
248
|
+
catalogError: "无法刷新线上 Grok 模型列表。",
|
|
249
|
+
selectAll: "全部显示",
|
|
250
|
+
modelHint: "勾选模型会以该前缀出现在模型选择器:",
|
|
251
|
+
grokTitle: "xAI Grok Build",
|
|
252
|
+
grokDescription: "通过 Grok Build 端点使用 SuperGrok / X Premium 编码订阅。",
|
|
253
|
+
codexTitle: "OpenAI Codex",
|
|
254
|
+
codexDescription: "使用 ChatGPT Plus/Pro 的 Codex 权益;远程 DSH 主机推荐设备码登录。",
|
|
255
|
+
kimiTitle: "Kimi Code",
|
|
256
|
+
kimiDescription: "通过 auth.kimi.com 与 api.kimi.com/coding 使用 Kimi Code 会员;不是 Moonshot API-key 开放平台。",
|
|
257
|
+
claudeTitle: "Claude Code",
|
|
258
|
+
claudeDescription: "Claude Pro/Max OAuth,包含 Claude Code scope 和自动刷新。",
|
|
259
|
+
antigravityTitle: "Google Antigravity",
|
|
260
|
+
antigravityDescription: "由单独固定版本的 MIT 开源 dsh-agy 插件提供,对外路由为 agy。",
|
|
261
|
+
antigravityInstalled: "已安装(CLI 管理)",
|
|
262
|
+
antigravityMissing: "尚未安装",
|
|
263
|
+
antigravityCliHint:
|
|
264
|
+
"为避免暴露无认证的凭据导出页面,默认禁用 dsh-agy Web 管理页;需要时使用 profile 内 CLI 管理 Google OAuth。",
|
|
265
|
+
antigravityCliCommand: "dsh plugin --profile web exec dsh-agy login --headless",
|
|
266
|
+
sourcesTitle: "从官方 CLI 文件拉取副本",
|
|
267
|
+
sourcesIntro:
|
|
268
|
+
"dsh 可以自动发现本机官方 CLI 登录,并单向拉取一份副本到自己的存储。官方 CLI 文件保持只读,绝不会被修改。",
|
|
269
|
+
sourcesReadOnlyHint: "这是单向拉取副本。dsh 不会更新、覆盖或回写官方 CLI 文档。",
|
|
270
|
+
sourcesLoading: "正在查找官方 CLI 登录文件…",
|
|
271
|
+
sourcesCheckAgain: "再检查一次",
|
|
272
|
+
sourcesAvailable: "可以读取一份副本",
|
|
273
|
+
sourcesUnavailable: "没有可用的副本",
|
|
274
|
+
sourcesPullCopy: "拉取副本",
|
|
275
|
+
sourcesPreviewTitle: "先核对这份副本,再写入 dsh",
|
|
276
|
+
sourcesPreviewExpires: "CLI 凭据到期时间:{time}",
|
|
277
|
+
sourcesTicketExpires: "此次预览将于 {time} 失效",
|
|
278
|
+
sourcesConflict: "dsh 中已存凭据:{detail}",
|
|
279
|
+
sourcesAction: "若继续:{detail}",
|
|
280
|
+
sourcesWarnings: "说明",
|
|
281
|
+
sourcesConfirmOverwrite: "用这份副本替换 dsh 中已保存的凭据",
|
|
282
|
+
sourcesConfirmOverwriteHint: "dsh 里已有另一份凭据。请先勾选,再确认拉取。",
|
|
283
|
+
sourcesCommit: "确认拉取",
|
|
284
|
+
sourcesCancelPreview: "取消预览",
|
|
285
|
+
sourcesCommitSuccess: "已复制到 dsh({action})。",
|
|
286
|
+
sourcesPreviewFailed: "无法从该 CLI 文件准备副本。",
|
|
287
|
+
sourcesCommitFailed: "无法把副本保存到 dsh。",
|
|
288
|
+
sourcesLoadFailed: "无法查找官方 CLI 登录文件。",
|
|
289
|
+
sourceKindGrok: "Grok CLI",
|
|
290
|
+
sourceKindCodex: "Codex CLI",
|
|
291
|
+
sourceKindKimi: "Kimi Code CLI",
|
|
292
|
+
sourceKindClaude: "Claude Code CLI",
|
|
293
|
+
sourceReasonMissing: "在预期位置没有找到官方 CLI 文件。",
|
|
294
|
+
sourceReasonUnsafe: "官方 CLI 文件不安全,无法读取(权限或文件类型)。",
|
|
295
|
+
sourceReasonInvalid: "官方 CLI 文件存在,但不是可用的 OAuth 登录。",
|
|
296
|
+
sourceReasonTooLarge: "官方 CLI 文件超过允许的读取上限。",
|
|
297
|
+
sourceConflictNone: "dsh 尚未保存凭据",
|
|
298
|
+
sourceConflictSameCredential: "已保存同一份凭据",
|
|
299
|
+
sourceConflictSameAccount: "同一账号,但凭据不同",
|
|
300
|
+
sourceConflictDifferentAccount: "已保存另一个账号",
|
|
301
|
+
sourceConflictUnknownAccount: "已保存凭据(无法比较账号)",
|
|
302
|
+
sourceConflictUnreadableDestination: "无法读取 dsh 中已存凭据",
|
|
303
|
+
sourceConflictUnsafeDestination: "dsh 中的凭据文件不安全,不能从这里替换",
|
|
304
|
+
sourceConflictUnrecognized: "已存凭据需要核对",
|
|
305
|
+
sourceActionImport: "把这份副本保存到 dsh",
|
|
306
|
+
sourceActionReuse: "保留 dsh 中已存凭据(内容已相同)",
|
|
307
|
+
sourceActionOverwrite: "替换 dsh 中已存凭据",
|
|
308
|
+
sourceActionBlocked: "已阻止 — 不能从这里替换 dsh 中的文件",
|
|
309
|
+
sourceActionUnrecognized: "需要核对",
|
|
310
|
+
sourceCommitImported: "已保存",
|
|
311
|
+
sourceCommitUnchanged: "原本就相同",
|
|
312
|
+
sourceCommitOverwritten: "已替换",
|
|
313
|
+
capabilitiesTitle: "订阅能力",
|
|
314
|
+
capabilitiesIntro: "所有开关默认关闭。打开后消耗的是对应供应商的订阅配额,不是另一套 API-key 账单。",
|
|
315
|
+
capabilitiesQuotaHint: "搜索、出图、改图、Fast、额度展示和 Grok Imagine 在实际调用时都会消耗对应订阅配额。",
|
|
316
|
+
capabilitiesReadOnly: "当前部署中这些开关为只读。",
|
|
317
|
+
capabilitiesLoading: "正在加载能力设置…",
|
|
318
|
+
capabilitiesLoadFailed: "无法加载能力设置。",
|
|
319
|
+
capabilitiesSaveFailed: "无法保存该能力设置。",
|
|
320
|
+
capabilitiesConflictRefreshed: "这些设置已在别处被改过。页面已刷新,请再试一次。",
|
|
321
|
+
capabilityLimitsTitle: "能力限制",
|
|
322
|
+
capabilityLimitsHint: "限制会实时应用于新发起的操作,并始终保持在已审计的安全范围内。",
|
|
323
|
+
capSearchResults: "最多搜索结果数",
|
|
324
|
+
capSearchResultsHint: "Codex 搜索最多返回这么多条结果(1–20)。",
|
|
325
|
+
capImageCount: "单次最多图片数",
|
|
326
|
+
capImageCountHint: "Codex 与 Imagine 图片工具单次最多返回这么多张图片(1–4)。",
|
|
327
|
+
capVideoTtlHours: "视频产物保留时间(小时)",
|
|
328
|
+
capVideoTtlHoursHint: "Imagine 视频产物保留 1–168 小时;降低保留时间会立即清理过期旧产物,提高只影响新产物。",
|
|
329
|
+
capabilityLimitInvalid: "请输入 {min} 到 {max} 之间的整数。",
|
|
330
|
+
capCodexSearch: "Codex 订阅搜索",
|
|
331
|
+
capCodexSearchHint: "可选的 Codex 搜索。不会自动变成默认搜索提供方。",
|
|
332
|
+
capCodexImages: "Codex 出图",
|
|
333
|
+
capCodexImagesHint: "可选的 Codex 出图。消耗 ChatGPT/Codex 配额。",
|
|
334
|
+
capCodexImageEdits: "Codex 改图",
|
|
335
|
+
capCodexImageEditsHint: "可选的 Codex 改图。仅在打开 Codex 出图后可编辑。",
|
|
336
|
+
capCodexUsage: "显示 Codex 额度",
|
|
337
|
+
capCodexUsageHint: "尽力展示剩余额度。供应商未返回可用数字时会隐藏对应项。",
|
|
338
|
+
capCodexFast: "已请求 Fast",
|
|
339
|
+
capCodexFastHint: "仅在最新私有模型目录确认存在可用优先模型后发布 codex-oauth-fast 路由;刷新失败会撤回该路由。",
|
|
340
|
+
capGrokImagineImage: "Grok Imagine 出图",
|
|
341
|
+
capGrokImagineImageHint: "可选的官方 xAI Imagine 出图。需要 Imagine 凭据,仅有 Grok OAuth 不够。",
|
|
342
|
+
capGrokImagineVideo: "Grok Imagine 出视频",
|
|
343
|
+
capGrokImagineVideoHint: "可选的官方 xAI Imagine 出视频。需要 Imagine 凭据,仅有 Grok OAuth 不够。",
|
|
344
|
+
usageTitle: "Codex 额度",
|
|
345
|
+
usageLoading: "正在加载 Codex 额度…",
|
|
346
|
+
usageUnavailable: "当前无法读取 Codex 额度。",
|
|
347
|
+
usageEmpty: "供应商没有返回可展示的额度字段。",
|
|
348
|
+
usageFetchedAt: "最近读取:{time}",
|
|
349
|
+
usageRateLimit: "速率限制",
|
|
350
|
+
usageWindow: "{seconds} 秒窗口",
|
|
351
|
+
usageUsed: "已用 {value}",
|
|
352
|
+
usageRemaining: "剩余 {value}",
|
|
353
|
+
usageResets: "重置时间 {time}",
|
|
354
|
+
usageCredits: "积分",
|
|
355
|
+
usageCreditsUnlimited: "无限积分",
|
|
356
|
+
usageCreditsLimited: "有限积分",
|
|
357
|
+
usageBalance: "余额 {value}",
|
|
358
|
+
usageIndividualLimit: "个人额度",
|
|
359
|
+
usageLimit: "上限 {value}",
|
|
360
|
+
usageUsedAmount: "已用 {value}",
|
|
361
|
+
usageRemainingAmount: "剩余 {value}",
|
|
362
|
+
usageSpendControlReached: "已达到支出控制上限。",
|
|
363
|
+
usageResetCredits: "可用重置次数:{value}",
|
|
364
|
+
imagineTitle: "Grok Imagine 凭据",
|
|
365
|
+
imagineIntro:
|
|
366
|
+
"官方 Imagine 调用使用 xAI API 凭据(例如 $XAI_API_KEY)。它与 Grok Build OAuth 登录不是同一份凭据,这里也不会显示密钥。",
|
|
367
|
+
imagineLoading: "正在检查 Imagine 凭据…",
|
|
368
|
+
imagineLoadFailed: "无法读取 Imagine 凭据状态。",
|
|
369
|
+
imagineConfigured: "已配置 Imagine 凭据",
|
|
370
|
+
imagineNotConfigured: "尚未配置 Imagine 凭据",
|
|
371
|
+
imagineSource: "来源:{source}",
|
|
372
|
+
imagineWritable: "当前部署可以更新 Imagine 凭据存储。",
|
|
373
|
+
imagineReadOnly: "当前部署不能更新 Imagine 凭据存储。",
|
|
374
|
+
imagineSourceNone: "无",
|
|
375
|
+
imagineSourceEnv: "环境变量",
|
|
376
|
+
imagineSourceApiKey: "已保存的 API key",
|
|
377
|
+
imagineSourceOAuth: "OAuth access(仅当 Imagine 接受时)",
|
|
378
|
+
imagineSourceCliKey: "Grok CLI 的 key 字段",
|
|
379
|
+
imagineSourceUnknown: "已配置(细节不展示)",
|
|
380
|
+
tabAccounts: "账户",
|
|
381
|
+
tabCapabilities: "能力",
|
|
382
|
+
tabGateway: "网关",
|
|
383
|
+
tabAbout: "关于",
|
|
384
|
+
copy: "复制",
|
|
385
|
+
copied: "已复制",
|
|
386
|
+
copyFailed: "复制失败",
|
|
387
|
+
modelsSummary: "已显示 {selected}/{total} 个模型",
|
|
388
|
+
expandModels: "模型",
|
|
389
|
+
collapseModels: "收起模型",
|
|
390
|
+
usageUsedShort: "已用 {value}",
|
|
391
|
+
gatewayTitle: "本地 API 网关",
|
|
392
|
+
gatewayIntro: "本机 loopback 上的 OpenAI/Anthropic 兼容服务,供你自己的工具使用。默认关闭。",
|
|
393
|
+
gatewayWarning: "打开后会把已登录订阅暴露成本地 API。可能违反供应商条款并消耗配额。",
|
|
394
|
+
gatewayEnabled: "启用本地网关",
|
|
395
|
+
gatewayBind: "绑定地址",
|
|
396
|
+
gatewayPort: "端口",
|
|
397
|
+
gatewayPortHint: "1024–65535 的整数。改完点确定保存;随机会填一个高位端口,仍需确定。",
|
|
398
|
+
gatewayPortApply: "确定",
|
|
399
|
+
gatewayPortRandom: "随机",
|
|
400
|
+
gatewayPortInvalid: "请输入 1024 到 65535 之间的整数端口。",
|
|
401
|
+
gatewayAddress: "网关地址",
|
|
402
|
+
gatewayOpenAiUrl: "OpenAI 兼容地址",
|
|
403
|
+
gatewayAnthropicUrl: "Anthropic 兼容地址",
|
|
404
|
+
gatewayKeyHint: "Bearer key",
|
|
405
|
+
gatewayKeyCopyHint: "复制的是当前 key。只有要作废已有客户端时才轮换。",
|
|
406
|
+
gatewayCopyKey: "复制 key",
|
|
407
|
+
gatewayShowKey: "显示",
|
|
408
|
+
gatewayHideKey: "隐藏",
|
|
409
|
+
gatewayRevealFailed: "无法读取当前 key。",
|
|
410
|
+
gatewayRotateConfirm: "确定轮换 key?现有客户端将失效。",
|
|
411
|
+
gatewayRotateConfirmHint: "这会替换当前 Bearer key。",
|
|
412
|
+
gatewayRotateConfirmAction: "确认轮换",
|
|
413
|
+
gatewayRotateCancel: "取消",
|
|
414
|
+
gatewayRunning: "正在监听",
|
|
415
|
+
gatewayStopped: "未监听",
|
|
416
|
+
gatewayRotate: "轮换 API key",
|
|
417
|
+
gatewayRotated: "新 key(只显示一次):{key}",
|
|
418
|
+
gatewayLoadFailed: "无法加载网关设置。",
|
|
419
|
+
gatewaySaveFailed: "无法更新网关。",
|
|
420
|
+
gatewayLoading: "正在加载网关设置…",
|
|
421
|
+
};
|