@@ -22,6 +22,7 @@ function cleanPluginManifestEnv(): Record<(typeof PLUGIN_MANIFEST_ENV_KEYS)[numb
|
22 | 22 | } |
23 | 23 | |
24 | 24 | let listKnownProviderEnvApiKeyNames: typeof import("./model-auth-env-vars.js").listKnownProviderEnvApiKeyNames; |
| 25 | +let CODEX_APP_SERVER_AUTH_MARKER: typeof import("./model-auth-markers.js").CODEX_APP_SERVER_AUTH_MARKER; |
25 | 26 | let GCP_VERTEX_CREDENTIALS_MARKER: typeof import("./model-auth-markers.js").GCP_VERTEX_CREDENTIALS_MARKER; |
26 | 27 | let NON_ENV_SECRETREF_MARKER: typeof import("./model-auth-markers.js").NON_ENV_SECRETREF_MARKER; |
27 | 28 | let isKnownEnvApiKeyMarker: typeof import("./model-auth-markers.js").isKnownEnvApiKeyMarker; |
@@ -39,6 +40,7 @@ async function loadMarkerModules() {
|
39 | 40 | import("./model-auth-markers.js"), |
40 | 41 | ]); |
41 | 42 | listKnownProviderEnvApiKeyNames = envVarsModule.listKnownProviderEnvApiKeyNames; |
| 43 | +CODEX_APP_SERVER_AUTH_MARKER = markersModule.CODEX_APP_SERVER_AUTH_MARKER; |
42 | 44 | GCP_VERTEX_CREDENTIALS_MARKER = markersModule.GCP_VERTEX_CREDENTIALS_MARKER; |
43 | 45 | NON_ENV_SECRETREF_MARKER = markersModule.NON_ENV_SECRETREF_MARKER; |
44 | 46 | isKnownEnvApiKeyMarker = markersModule.isKnownEnvApiKeyMarker; |
@@ -69,10 +71,18 @@ describe("model auth markers", () => {
|
69 | 71 | expect(isNonSecretApiKeyMarker(resolveOAuthApiKeyMarker("chutes"))).toBe(true); |
70 | 72 | expect(isNonSecretApiKeyMarker("ollama-local")).toBe(true); |
71 | 73 | expect(isNonSecretApiKeyMarker("lmstudio-local")).toBe(true); |
72 | | -expect(isNonSecretApiKeyMarker("codex-app-server")).toBe(true); |
| 74 | +expect(isNonSecretApiKeyMarker(CODEX_APP_SERVER_AUTH_MARKER)).toBe(true); |
73 | 75 | expect(isNonSecretApiKeyMarker(GCP_VERTEX_CREDENTIALS_MARKER)).toBe(true); |
74 | 76 | }); |
75 | 77 | |
| 78 | +it("recognizes the Codex app-server marker without bundled plugin discovery", async () => { |
| 79 | +await withEnvAsync({ OPENCLAW_DISABLE_BUNDLED_PLUGINS: "1" }, async () => { |
| 80 | +await loadMarkerModules(); |
| 81 | +expect(isNonSecretApiKeyMarker(CODEX_APP_SERVER_AUTH_MARKER)).toBe(true); |
| 82 | +}); |
| 83 | +await withEnvAsync(cleanPluginManifestEnv(), loadMarkerModules); |
| 84 | +}); |
| 85 | + |
76 | 86 | it("reads bundled plugin-owned non-secret markers from manifests", () => { |
77 | 87 | const markers = new Set(listKnownNonSecretApiKeyMarkers()); |
78 | 88 | expect(markers.has("codex-app-server")).toBe(true); |
|