編集者注

认证与用量一体

dsh-AuthInOne is a DeepSeek Harness plugin for OpenAI Codex and Kimi Code login, experimental compatibility login for seven additional account Providers, API and custom OpenAI-compatible Provider setup, model switching, token usage analytics, and cost tracking inside DSH's native Models and Usage settings.

これは DeepSeek Harness(DSH)プラグインです。当サイトは GitHub README、インストール情報、メンテナンス状況、公開セキュリティシグナルをまとめています。

上流で中国語 README が提供されていないため、リポジトリのオリジナルコンテンツを表示しています。

dsh-AuthInOne

English | 简体中文

dsh-AuthInOne cover

dsh-AuthInOne is a DeepSeek Harness plugin for OpenAI Codex and Kimi Code login, experimental compatibility login for seven additional account Providers, API and custom OpenAI-compatible Provider setup, model switching, token usage analytics, and cost tracking inside DSH's native Models and Usage settings.

OpenAI Codex uses browser OAuth with state, S256 PKCE, and a loopback callback. Kimi Code uses an RFC 8628 device flow. xAI Grok, Anthropic, GitHub Copilot, Command Code, Cursor, Google Antigravity, and Kiro are explicitly marked Experimental compatibility. Installed-Host validation reached each Provider's authorization boundary and stopped before user consent; mock/fixture tests cover exchange or polling, refresh rotation, denial, timeout, cancellation, logout, route activation, and secret redaction.

Alpha v0.1.0-alpha.2 · DSH 0.1.0-rc.6 for Host/Usage · the full Models/Auth UI requires the generic settings seams listed under Compatibility · MIT · community-maintained and not a DeepSeek or OpenAI product.

dsh plugin --profile web add github:Stormycry-cryp/dsh-AuthInOne#v0.1.0-alpha.2
dsh web

Open DSH, then go to Settings → Models or Settings → Usage. The browser receives aggregated usage, redacted status, an authorization URL, and where required a user code. OAuth verifier, authorization code, device code, access token, and refresh token stay on the Host; the plugin never imports ~/.codex/auth.json, OpenCodex state, cookies, browser storage, OTPs, or another product's credentials.

Agent instruction: Install dsh-AuthInOne in the DSH web profile, restart DSH, then verify Settings → Models and Settings → Usage.

Use this plugin when

  • you want OpenAI Codex or Kimi Code login inside DSH, or knowingly opt into a labeled compatibility flow;
  • you manage API-key or custom OpenAI-compatible Providers in DSH's native Models page;
  • you switch the future-session default model without replacing DSH's per-session selector;
  • you need reconstructable Provider/model/tool token usage and auditable calculated cost.

DeepSeek Harness Models settings with Provider state and OpenAI Codex account authorization

DeepSeek Harness Usage settings with token activity, model usage, and cost analytics

Additional real DSH captures: Auth login dialog, Models action area, dark Usage, light narrow Usage, dark narrow Usage, and second-precision time range.

Verified capabilities

CapabilityStatusVerificationMinimum DSH
OpenAI Codex browser account authorizationVerified to user-confirmation boundaryReal navigation reached auth.openai.com; mock issuer covers callback, state/PKCE, exchange, refresh, denial, expiry, cancellation, logout, revocation, and redactionCurrent DSH build with settings.models.actions
Kimi Code device loginExperimental; verified to user-confirmation boundaryInstalled Host returned the Kimi verification page and user code without returning the device code; fixtures cover pending, slow_down, denial, expiry, refresh, cancellation, and logoutCurrent DSH build with settings.models.actions
Seven compatibility account flowsExperimental; verified to user-confirmation boundaryxAI, Anthropic, GitHub Copilot, Command Code, Cursor, Antigravity, and Kiro each reached their expected authorization boundary; mocked completion registers and later disposes the corresponding model routeCurrent DSH build with settings.models.actions
Provider subscription quotaBest effort where upstream data existsCodex, Kimi, xAI, Anthropic, Cursor, and Antigravity have token-free Remote projections; the Models page omits the quota block when the upstream response is missing, incomplete, unsupported, or cannot yield a reliable percentageCurrent DSH build with settings.models.insights
Plan/API presetsAvailable with vendor limits shownOpenAI, xAI, Gemini, Anthropic, Kimi Code, GLM Coding Plan, and ModelStudio/Qwen presets write credentials through DSH; GLM and Qwen usage restrictions remain visibleCurrent DSH build with settings.models.actions
DeepSeek API-key Provider and live model callAPI-key onlyNative Provider remained connected; a real DeepSeek call populated Usage without exposing the keyDSH 0.1.0-rc.6
Custom OpenAI-compatible Base URL, headers, model mappingNative DSH capabilityAuthInOne preserves the native Models cards and reads their public Provider projectionDSH 0.1.0-rc.6
Future-session default model and connection testVerifiedModels contribution and Host/Remote route exercised in the installed Web profileCurrent DSH build with settings.models.insights
Cross-session Usage and cost analyticsVerifiedReal DSH session logs rebuilt 26,383 Token into KPI, heatmap, model, Provider, bucket, and cost projectionsDSH 0.1.0-rc.6
Usage navigation iconRequires optional DSH seamPlugin contributes its own currentColor 16 px icon; unknown sections still use the native fallbackCurrent DSH build with settings.section.icon

Account-login support matrix

ProviderFlowStabilityAuthorization boundary verifiedRefresh/logout/model routeQuota
OpenAI CodexBrowser OAuth, state + S256 PKCE + loopbackStableauth.openai.comYes / Yes / YesPrimary and secondary windows, best effort
Kimi CodeRFC 8628 device loginExperimentalwww.kimi.comYes / local logout / YesBest effort
xAI GrokDevice loginExperimentalaccounts.x.aiYes / Yes / YesWeekly or monthly, best effort
AnthropicBrowser/manual compatibility loginExperimental compatibilityclaude.aiYes / local logout / YesBest effort
GitHub CopilotDevice loginExperimental compatibilitygithub.comYes / local logout / YesNot exposed
Command CodeBrowser loopback compatibility loginExperimental compatibilitycommandcode.aiRefresh via returned account credential / local logout / YesNot exposed
CursorBrowser PKCE compatibility loginExperimental compatibilitycursor.comYes / local logout / YesBest effort
Google AntigravityBrowser PKCE compatibility loginExperimental compatibilityaccounts.google.comYes / local logout / YesBest effort
KiroBuilder ID device loginExperimental compatibilityview.awsapps.comYes / local logout / YesNot exposed
Qwen account OAuthDiscontinuedUnsupportedNo start actionNoNo

“Local logout” means the plugin deletes its DSH credential and unregisters the model route when the observed compatibility protocol exposes no reviewed revoke endpoint. The browser never receives the stored credential. Stability labels describe implementation risk; they do not imply Provider sponsorship or certification.

30-second install, upgrade, and remove

Install the immutable GitHub tag and restart DSH:

dsh plugin --profile web add github:Stormycry-cryp/dsh-AuthInOne#v0.1.0-alpha.2
dsh web

Upgrade by removing the installed package, adding the newer tag, and restarting. Remove this release with:

dsh plugin --profile web remove dsh-auth-in-one

The CLI owns the profile dependency and bundle row. Do not copy lib/, create a workspace link, edit the profile YAML, or apply the bundle patch by hand. Removal unloads the page, Models contributions, Remote namespace, Host service, styles, and listeners. It intentionally preserves DSH sessions, plugin settings, and credential references; data deletion is a separate explicit action.

Models and authentication

DSH's native Provider cards remain the only place to add, edit, or remove an API-key Provider. They own custom Base URLs, request headers, protocol choice, model mappings, and endpoint model discovery. AuthInOne adds a compact connection/default-route projection, a full-width Add Auth login action, and an Add Plan / API Key action above the two native add-Provider buttons. Per-session switching stays in DSH's conversation model selector.

Every Auth entry uses the same Host transaction surface: start, redacted status, cancel, optional one-time input, refresh, logout, and disposal. Browser/loopback flows keep state and PKCE verifier in the Host. Device flows keep the device code in the Host and expose only the verification URL and user code. A successful credential is written through DSH credentials before its model adapter is registered; terminal refresh failure or logout unregisters the route. Cancellation during a pending write compensates by deleting the credential. Remote revocation is bounded and best effort after local deletion.

OpenAI Codex protocol values were checked against OpenAI's public Codex sources for the login server, auth manager, and PKCE helper. Kimi device polling follows RFC 8628 pending and slow_down semantics. Compatibility entries use reviewed Provider/public-client behavior and remain labeled Experimental.

The Plan/API action includes OpenAI API, xAI API, Google Gemini API, Anthropic API, Kimi Code subscription keys, GLM Coding Plan, and ModelStudio/Qwen Coding Plan. GLM and Qwen presets retain the vendor's supported-tool or interactive-use restrictions. API keys are a separate connection method and never count as account Auth.

The connection test calls the configured OpenAI-compatible /models endpoint from the Host. It rejects redirects before a credential-bearing request can reach another origin and incrementally caps response bytes. The Client receives only success, latency, model ids, or a sanitized failure category; it never receives request headers, upstream response bodies, or credentials.

Usage filters and accounting

  • Time, Provider, and output-price filters share one query context and drive every KPI, heatmap point, ranking, Token bucket, and cost value.
  • Time is an inclusive local YYYY-MM-DD HH:mm:ss range in the displayed IANA timezone. The Host converts it to a deterministic UTC [start, endExclusive) query. Shortcuts fill the last 7, 15, or 30 days without closing the editor.
  • Output-price bands use only outputTokensPerMillion in USD per 1M output Token. The disjoint bands are [0,1), [1,5), [5,15), [15,+∞), and unpriced. Missing/non-USD rows are unpriced; there is no silent currency conversion.
  • Refresh keeps the active filters. Failed refreshes remain visible and do not replace the last good result.
  • Model calls use their actual logged event time. Tool calls are a separate dimension. DSH does not log an authoritative owner plugin for every tool call, so the UI reports durable tool names and does not invent plugin attribution.
  • Total Token is uncached input + output + cache read + cache write. Reasoning is shown separately because some Providers already include it in output. Missing buckets remain unknown.
  • Token values below 1M use locale grouping; 1M to below 1B use M; 1B and above use B; exact values remain in title and accessible labels.

The built-in deepseek-usd-2026-08-14 catalog contains only DeepSeek-V4-Flash and DeepSeek-V4-Pro USD rows verified from the official DeepSeek pricing page on 2026-08-14. Every row carries a source URL, verification/update date, effective date, currency, and explicit token-bucket rates. Missing prices remain unknown or partial, never a forged zero or another Provider's price.

Security and data boundaries

AuthInOne creates no separate database. Analytics rebuilds from DSH sessions; non-sensitive overrides use the plugin's DSH settings namespace; OAuth and API credentials stay in DSH credentials. The plugin does not scan user homes, browser stores, keychains, Codex/OpenCodex files, .env files, or unrelated databases.

Authorization URLs and device user codes are public instructions for the current login transaction. The Remote DTO has no verifier, authorization code, device code, access token, refresh token, raw identity, upstream body, or credential value. Tests assert those fields do not cross Remote or logs. Screenshots contain no authorization URL, account, token, user code, or API key.

Provider responses have both time limits and incremental byte limits. Credential-bearing connection tests refuse redirects. The alpha.2 security diff scan reviewed 74 changed/added artifacts, found two medium-severity network-boundary issues, and verified both fixes with Node 24 reproductions and focused tests before release.

Compatibility

DSH environmentHost/UsageModels status/defaultAdd Auth loginUsage icon
Official 0.1.0-rc.6AvailableHiddenHiddenNative fallback icon
Current DSH main at 47f9438 plus the generic settings seam diffAvailableAvailableAvailablePlugin icon
Plugin removedAbsentNative page onlyAbsentAbsent

Full alpha.2 UI currently needs three generic, optional, backward-compatible DSH declarations: settings.models.insights, settings.models.actions, and the optional settings.section.icon metadata field. They contain no AuthInOne, OAuth, Provider, pricing, or Usage business code. On an unmodified tagged rc6 build, the Host and Usage page continue to work, the Usage section uses the native fallback icon, and the unsupported Models contributions stay hidden. The plugin never patches the DOM. Until these seams ship in a public DSH tag, alpha.2 is an early-adopter build and the full Auth UI is not available on stock rc6.

See Architecture and plugin boundary invariants for plugin-owned code, the exact core seam allowance, lifecycle disposal, safe degradation, and boundary gates.

What this plugin does not claim

  • It is not an official DeepSeek, OpenAI, or model-provider product and does not imply endorsement.
  • It does not claim every compatibility login is a stable or Provider-endorsed integration. Seven entries are explicitly Experimental, and Qwen account OAuth is discontinued and unavailable.
  • It does not replace DSH's Models page, attachment pipeline, session log, or model selector.
  • It does not fabricate missing Token buckets, prices, currency conversion, tool ownership, or a successful login.

Local development

Use Node ^22.19 or >=24 and the locked pnpm project:

pnpm install --frozen-lockfile
pnpm typecheck
pnpm test
DSH_SOURCE_ROOT=/path/to/deepseek-harness pnpm verify:boundaries
pnpm build
pnpm pack --dry-run

lib/ is committed because GitHub installs do not run a build. The package has no prepare script and requires no install-time lifecycle permission.

Provenance and licenses

The implementation, module structure, credential representation, settings fields, tests, README prose, React components, CSS modules, and interaction copy were independently written for this repository. DSH public APIs/types and reviewed Provider implementations were protocol references. The local OpenCodex source was read only for responsibility and failure-state comparison; details are in the clean-room comparison and alpha.2 provenance audit.

The following repositories were used only for capability collision and public seam research: usage-report, openai-codex-auth, codex-provider, polyglot, usage-meter, cost-ledger, and dsh-web-ui. No source, README text, CSS, component structure, schema, or tests were copied or vendored from them.

Runtime dependency: Zod (MIT). Build-time Provider transport dependency: @earendil-works/pi-ai 0.82.1 (MIT), bundled into the committed Host artifact and not installed into the DSH profile. Cursor compatibility uses @cursor/sdk 1.0.24 under the Cursor SDK license and Terms of Service; it is bundled into the Host artifact and remains Experimental. Development tools include React, tsdown, Vitest, and Testing Library (MIT), TypeScript (Apache-2.0), and Lightning CSS (MPL-2.0). This repository is licensed under MIT.

DeepSeek, OpenAI, Codex, and other Provider names and marks belong to their respective owners. Their appearance describes compatibility and does not imply sponsorship, certification, or endorsement.

REPOSITORY SIGNALS

セキュリティとインストールエビデンス

このスコアは公開リポジトリメタデータと当サイトに登録されたインストールエビデンスのみに基づくもので、コードセキュリティ監査とは異なります。

出所の追跡可能性

公開プラグインカタログから取得し、公開 GitHub リポジトリにリンクしています。

ライセンス

リポジトリは MIT ライセンスを宣言しています。

メンテナンス活動

過去180日以内にコードの更新があります。

インストールエビデンス

再現可能な正確なインストールメタデータはまだ登録されていません。リポジトリの説明に従って手動で確認してください。

インストールライフサイクルスクリプト

確認したパッケージメタデータにインストールライフサイクルスクリプトは宣言されていません。