@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.
@@ -4,7 +4,7 @@
4
4
  "node": "^22.19.0 || >=24.0.0"
5
5
  },
6
6
  "dshPluginApi": {
7
- "version": "0.1.2-alpha.4",
7
+ "version": "0.1.2-rc.1",
8
8
  "packages": [
9
9
  "@deepseek-ai/dsh-atomic-write",
10
10
  "@deepseek-ai/dsh-attachment",
@@ -21,6 +21,6 @@
21
21
  },
22
22
  "piAi": {
23
23
  "package": "@earendil-works/pi-ai",
24
- "version": "0.82.1"
24
+ "version": "0.84.2"
25
25
  }
26
26
  }
@@ -4,7 +4,7 @@ import { mkdir, readFile, rm, stat } from "node:fs/promises";
4
4
  import { dirname, join, resolve } from "node:path";
5
5
  import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
6
6
  import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
7
- //#region src/store.ts
7
+ //#region src/host/store.ts
8
8
  /** Owner-only persistent storage for the shared OpenAI Codex OAuth document. */
9
9
  /** pi-ai provider id used by ChatGPT Codex OAuth. */
10
10
  const CODEX_PROVIDER = "openai-codex";
@@ -118,7 +118,7 @@ var CodexCredentialStore = class {
118
118
  }
119
119
  };
120
120
  //#endregion
121
- //#region src/auth.ts
121
+ //#region src/host/auth.ts
122
122
  /** ChatGPT OAuth orchestration used by the Host routes and CLI consumers. */
123
123
  /** Start provider-native ChatGPT OAuth and persist its credential. */
124
124
  async function loginCodex(interaction, store = new CodexCredentialStore()) {
@@ -1,5 +1,5 @@
1
1
  import { AuthInteraction, Credential, CredentialInfo, CredentialStore } from "@earendil-works/pi-ai";
2
- //#region src/store.d.ts
2
+ //#region src/host/store.d.ts
3
3
  /** pi-ai provider id used by ChatGPT Codex OAuth. */
4
4
  declare const CODEX_PROVIDER = "openai-codex";
5
5
  /** Kept compatible with dsh-codex-connect so a login can be reused. */
@@ -16,7 +16,7 @@ declare class CodexCredentialStore implements CredentialStore {
16
16
  delete(providerId: string): Promise<void>;
17
17
  }
18
18
  //#endregion
19
- //#region src/auth.d.ts
19
+ //#region src/host/auth.d.ts
20
20
  interface CodexAuthStatus {
21
21
  authenticated: boolean;
22
22
  expiresAt?: Date;
@@ -1,14 +1,12 @@
1
- //#region src/auth-paths.d.ts
1
+ //#region src/contracts/auth-paths.d.ts
2
2
  /** Browser-facing paths owned by the standalone Codex authentication plugin. */
3
- /** Host settings namespace used to dispatch the browser settings card. */
4
- declare const CODEX_AUTH_SETTINGS_NAMESPACE = "dsh-codex-auth";
5
3
  declare const CODEX_AUTH_STATUS_PATH = "/plugins/dsh-codex-auth-plugin/auth/status";
6
4
  declare const CODEX_AUTH_LOGIN_PATH = "/plugins/dsh-codex-auth-plugin/auth/login";
7
5
  declare const CODEX_AUTH_LOGOUT_PATH = "/plugins/dsh-codex-auth-plugin/auth/logout";
8
6
  declare const CODEX_USAGE_PATH = "/plugins/dsh-codex-auth-plugin/auth/usage";
9
- /** Same-origin settings endpoint used when DSH marks a NAS browser as remote. */
10
- declare const CODEX_AUTH_SETTINGS_PATH = "/plugins/dsh-codex-auth-plugin/auth/settings";
11
7
  /** Same-origin endpoint for the DSH-wide Codex default model selection. */
12
8
  declare const CODEX_GLOBAL_MODEL_PATH = "/plugins/dsh-codex-auth-plugin/auth/global-model";
9
+ /** Same-origin endpoint that refreshes the OpenAI Codex route's model catalog. */
10
+ declare const CODEX_MODEL_REFRESH_PATH = "/plugins/dsh-codex-auth-plugin/auth/refresh-models";
13
11
  //#endregion
14
- export { CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_SETTINGS_NAMESPACE, CODEX_AUTH_SETTINGS_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH, CODEX_USAGE_PATH };
12
+ export { CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH, CODEX_MODEL_REFRESH_PATH, CODEX_USAGE_PATH };
package/lib/auth-paths.js CHANGED
@@ -1,14 +1,12 @@
1
- //#region src/auth-paths.ts
1
+ //#region src/contracts/auth-paths.ts
2
2
  /** Browser-facing paths owned by the standalone Codex authentication plugin. */
3
- /** Host settings namespace used to dispatch the browser settings card. */
4
- const CODEX_AUTH_SETTINGS_NAMESPACE = "dsh-codex-auth";
5
3
  const CODEX_AUTH_STATUS_PATH = "/plugins/dsh-codex-auth-plugin/auth/status";
6
4
  const CODEX_AUTH_LOGIN_PATH = "/plugins/dsh-codex-auth-plugin/auth/login";
7
5
  const CODEX_AUTH_LOGOUT_PATH = "/plugins/dsh-codex-auth-plugin/auth/logout";
8
6
  const CODEX_USAGE_PATH = "/plugins/dsh-codex-auth-plugin/auth/usage";
9
- /** Same-origin settings endpoint used when DSH marks a NAS browser as remote. */
10
- const CODEX_AUTH_SETTINGS_PATH = "/plugins/dsh-codex-auth-plugin/auth/settings";
11
7
  /** Same-origin endpoint for the DSH-wide Codex default model selection. */
12
8
  const CODEX_GLOBAL_MODEL_PATH = "/plugins/dsh-codex-auth-plugin/auth/global-model";
9
+ /** Same-origin endpoint that refreshes the OpenAI Codex route's model catalog. */
10
+ const CODEX_MODEL_REFRESH_PATH = "/plugins/dsh-codex-auth-plugin/auth/refresh-models";
13
11
  //#endregion
14
- export { CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_SETTINGS_NAMESPACE, CODEX_AUTH_SETTINGS_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH, CODEX_USAGE_PATH };
12
+ export { CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH, CODEX_MODEL_REFRESH_PATH, CODEX_USAGE_PATH };
package/lib/auth.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as logoutCodex, n as codexAuthStatus, r as loginCodex, t as CodexAuthStatus } from "./auth-BBBeI24-.js";
1
+ import { i as logoutCodex, n as codexAuthStatus, r as loginCodex, t as CodexAuthStatus } from "./auth-DyHxRsSd.js";
2
2
  export { CodexAuthStatus, codexAuthStatus, loginCodex, logoutCodex };
package/lib/auth.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as loginCodex, r as logoutCodex, t as codexAuthStatus } from "./auth-DQ2F4vc6.js";
1
+ import { n as loginCodex, r as logoutCodex, t as codexAuthStatus } from "./auth-BdEwtK4R.js";
2
2
  export { codexAuthStatus, loginCodex, logoutCodex };