@tnnevol/dsh-codex-auth 0.1.2-alpha.4 → 0.1.2-rc.1.2
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/compatibility.json +2 -2
- package/lib/{auth-DQ2F4vc6.js → auth-BdEwtK4R.js} +2 -2
- package/lib/{auth-BBBeI24-.d.ts → auth-DyHxRsSd.d.ts} +2 -2
- package/lib/auth-paths.d.ts +4 -6
- package/lib/auth-paths.js +4 -6
- package/lib/auth.d.ts +1 -1
- package/lib/auth.js +1 -1
- package/lib/client.js +205 -1238
- package/lib/index.d.ts +9 -10
- package/lib/index.js +250 -295
- package/lib/style.css +1 -1
- package/package.json +50 -55
package/lib/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH,
|
|
2
|
-
import { a as CODEX_AUTH_FILENAME, c as codexAuthPath, i as logoutCodex, n as codexAuthStatus, o as CODEX_PROVIDER, r as loginCodex, s as CodexCredentialStore, t as CodexAuthStatus } from "./auth-
|
|
1
|
+
import { CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH } from "./auth-paths.js";
|
|
2
|
+
import { a as CODEX_AUTH_FILENAME, c as codexAuthPath, i as logoutCodex, n as codexAuthStatus, o as CODEX_PROVIDER, r as loginCodex, s as CodexCredentialStore, t as CodexAuthStatus } from "./auth-DyHxRsSd.js";
|
|
3
3
|
import { CredentialProvider } from "@deepseek-ai/dsh-credentials";
|
|
4
|
-
import { AttachmentStore } from "@deepseek-ai/dsh-attachment";
|
|
5
4
|
import { PiAiAdapter } from "@deepseek-ai/dsh-llm-pi-ai";
|
|
6
5
|
import { Context } from "@deepseek-ai/cordis";
|
|
6
|
+
import { AttachmentStore } from "@deepseek-ai/dsh-attachment";
|
|
7
7
|
import { IncomingMessage } from "node:http";
|
|
8
|
-
|
|
9
|
-
//#region src/credential-mirror.d.ts
|
|
8
|
+
//#region src/host/credential-mirror.d.ts
|
|
10
9
|
/** Credential reference exposed to the official `llm-pi-ai` model settings UI. */
|
|
11
10
|
declare const CODEX_API_KEY_ENV = "OPENAI_CODEX_AUTH_TOKEN";
|
|
12
11
|
declare const CODEX_API_KEY_REF: import("@deepseek-ai/dsh-credentials").CredentialRef;
|
|
@@ -31,13 +30,13 @@ declare class CodexCredentialMirror {
|
|
|
31
30
|
private syncNow;
|
|
32
31
|
}
|
|
33
32
|
//#endregion
|
|
34
|
-
//#region src/adapter.d.ts
|
|
33
|
+
//#region src/host/adapter.d.ts
|
|
35
34
|
/** Keep the Codex stream open while the provider is still producing output. */
|
|
36
35
|
declare const CODEX_STREAM_IDLE_TIMEOUT_MS = 300000;
|
|
37
36
|
/** Create the dsh LLM adapter for the provider-native OpenAI Codex catalog. */
|
|
38
37
|
declare function createCodexAdapter(credentials: CodexCredentialStore, resolveAttachments: () => AttachmentStore | undefined): PiAiAdapter;
|
|
39
38
|
//#endregion
|
|
40
|
-
//#region src/usage.d.ts
|
|
39
|
+
//#region src/host/usage.d.ts
|
|
41
40
|
interface CodexUsageWindow {
|
|
42
41
|
remainingPercent?: number;
|
|
43
42
|
limitWindowSeconds?: number;
|
|
@@ -70,7 +69,7 @@ declare class CodexUsageService {
|
|
|
70
69
|
private readNow;
|
|
71
70
|
}
|
|
72
71
|
//#endregion
|
|
73
|
-
//#region src/auth-routes.d.ts
|
|
72
|
+
//#region src/host/auth-routes.d.ts
|
|
74
73
|
type CodexWebAuthStatus = {
|
|
75
74
|
status: 'signed-out';
|
|
76
75
|
} | {
|
|
@@ -120,8 +119,8 @@ declare function registerCodexAuthRoutes(ctx: Context, store: CodexCredentialSto
|
|
|
120
119
|
//#region src/index.d.ts
|
|
121
120
|
/** Stable Host bundle name. */
|
|
122
121
|
declare const name = "dsh-codex-auth-plugin";
|
|
123
|
-
/** Host services required by the routes
|
|
122
|
+
/** Host services required by the routes and credential mirror. */
|
|
124
123
|
declare const inject: string[];
|
|
125
124
|
declare function apply(ctx: Context): void;
|
|
126
125
|
//#endregion
|
|
127
|
-
export { CODEX_API_KEY_ENV, CODEX_API_KEY_REF, CODEX_AUTH_FILENAME, CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH,
|
|
126
|
+
export { CODEX_API_KEY_ENV, CODEX_API_KEY_REF, CODEX_AUTH_FILENAME, CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH, CODEX_PROVIDER, CODEX_STREAM_IDLE_TIMEOUT_MS, type CodexAuthStatus, CodexCredentialMirror, CodexCredentialStore, type CodexLoginChallenge, CodexUsageService, CodexWebAuth, type CodexWebAuthStatus, apply, codexAuthPath, codexAuthStatus, createCodexAdapter, inject, loginCodex, logoutCodex, name, normalizeCodexUsagePayload, registerCodexAuthRoutes, trustedRequest };
|