dsh-codex-connect 0.1.0-alpha.4.10

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/lib/index.d.ts ADDED
@@ -0,0 +1,443 @@
1
+ import z from "@deepseek-ai/schemastery";
2
+ import { AuthInteraction, Credential, CredentialInfo, CredentialStore } from "@earendil-works/pi-ai";
3
+ import "@deepseek-ai/dsh-tools";
4
+ import { WebSearchProvider, WebSearchRequest, WebSearchResult } from "@deepseek-ai/dsh-web";
5
+ import { Context } from "@deepseek-ai/cordis";
6
+ //#region src/view-image.d.ts
7
+ /** Stable Codex tool name. */
8
+ declare const VIEW_IMAGE_TOOL_NAME = "view_image";
9
+ //#endregion
10
+ //#region src/compatibility.d.ts
11
+ declare const COMPATIBILITY_SCHEMA_VERSION: 1;
12
+ declare const SUPPORTED_NODE_RANGE = "^22.19.0 || >=24.0.0";
13
+ declare const SUPPORTED_DSH_PLUGIN_API_VERSION = "0.1.0-rc.7";
14
+ declare const SUPPORTED_PI_AI_VERSION = "0.82.1";
15
+ declare const PI_AI_PACKAGE = "@earendil-works/pi-ai";
16
+ declare const DSH_PLUGIN_API_PACKAGES: readonly ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-host-webserver", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-web"];
17
+ declare const COMPATIBILITY_PACKAGES: readonly ["@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@earendil-works/pi-ai"];
18
+ type CompatibilityPackageName = (typeof COMPATIBILITY_PACKAGES)[number];
19
+ type CompatibilityStatus = 'compatible' | 'incompatible' | 'unknown';
20
+ interface CompatibilityEntry {
21
+ supported: string;
22
+ installed: string | null;
23
+ status: CompatibilityStatus;
24
+ }
25
+ interface CompatibilityReport {
26
+ schemaVersion: typeof COMPATIBILITY_SCHEMA_VERSION;
27
+ status: CompatibilityStatus;
28
+ node: CompatibilityEntry;
29
+ packages: Record<CompatibilityPackageName, CompatibilityEntry>;
30
+ }
31
+ interface CompatibilityEvaluationInput {
32
+ /** Node version to evaluate; defaults to the running process in detectCompatibility. */
33
+ nodeVersion?: string | null;
34
+ /** Alias accepted by callers that already group installed values. */
35
+ node?: string | null;
36
+ /** Installed package versions keyed by package name. */
37
+ packageVersions?: Partial<Record<CompatibilityPackageName, string | null | undefined>>;
38
+ /** Alias accepted by callers that already group installed values. */
39
+ packages?: Partial<Record<CompatibilityPackageName, string | null | undefined>>;
40
+ /** Nested installed values are useful when feeding a captured diagnostic fixture. */
41
+ installed?: {
42
+ node?: string | null;
43
+ packages?: Partial<Record<CompatibilityPackageName, string | null | undefined>>;
44
+ };
45
+ }
46
+ interface CompatibilityDetectionOptions extends CompatibilityEvaluationInput {
47
+ /** Test seam for package metadata resolution; no package paths are returned. */
48
+ readPackageVersion?: (name: CompatibilityPackageName) => string | null | undefined | Promise<string | null | undefined>;
49
+ }
50
+ /** Public contract data mirrored by compatibility.json without importing JSON at runtime. */
51
+ declare const COMPATIBILITY_CONTRACT: {
52
+ readonly schemaVersion: 1;
53
+ readonly engines: {
54
+ readonly node: "^22.19.0 || >=24.0.0";
55
+ };
56
+ readonly dshPluginApi: {
57
+ readonly version: "0.1.0-rc.7";
58
+ readonly packages: readonly ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-host-webserver", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-web"];
59
+ };
60
+ readonly piAi: {
61
+ readonly package: "@earendil-works/pi-ai";
62
+ readonly version: "0.82.1";
63
+ };
64
+ };
65
+ /** Evaluate a captured set of versions without touching the filesystem. */
66
+ declare function evaluateCompatibility(input?: CompatibilityEvaluationInput): CompatibilityReport;
67
+ /** Alias for callers that prefer assessment terminology. */
68
+ declare const assessCompatibility: typeof evaluateCompatibility;
69
+ /** Read installed package metadata and return only versions and statuses. */
70
+ declare function detectCompatibility(options?: CompatibilityDetectionOptions): Promise<CompatibilityReport>;
71
+ //#endregion
72
+ //#region src/doctor.d.ts
73
+ /** Inputs that are safe to obtain without booting OAuth. */
74
+ interface OpenAICodexDiagnosticOptions {
75
+ /** Credential pathname to inspect through metadata only. */
76
+ credentialPath?: string;
77
+ /** Provider ids already registered in the active Harness context. */
78
+ providerIds?: readonly string[];
79
+ /** Whether the optional standalone search provider is enabled. */
80
+ enableSearch?: boolean;
81
+ /** Whether the optional image tool is enabled. */
82
+ enableImageTool?: boolean;
83
+ /** Optional pure-function seam for compatibility checks in tests/diagnostic callers. */
84
+ compatibilityOptions?: CompatibilityDetectionOptions;
85
+ }
86
+ interface OpenAICodexDiagnosticReport {
87
+ package: 'dsh-codex-connect';
88
+ version: string;
89
+ node: string;
90
+ credentialFile: {
91
+ path: string;
92
+ state: 'missing' | 'owner-only' | 'permissions-too-broad' | 'not-a-regular-file' | 'unreadable-metadata';
93
+ mode?: string;
94
+ };
95
+ capabilities: {
96
+ modelProvider: true;
97
+ search: boolean;
98
+ imageTool: boolean;
99
+ changesHarnessDefaultModel: false;
100
+ changesHarnessSearchRoute: false;
101
+ };
102
+ providerConflict: boolean;
103
+ compatibility: CompatibilityReport;
104
+ hints: string[];
105
+ }
106
+ /** Actionable message for legacy/manual `openai-codex` adapter collisions. */
107
+ declare function openAICodexConflictMessage(): string;
108
+ /** Fail before the generic registry error so the collision has a migration hint. */
109
+ declare function assertNoOpenAICodexProviderConflict(providerIds: readonly string[]): void;
110
+ /**
111
+ * Inspect only process and filesystem metadata. This function never opens the
112
+ * OAuth document, refreshes a token, or starts an authorization flow.
113
+ */
114
+ declare function diagnoseOpenAICodex(options?: OpenAICodexDiagnosticOptions): Promise<OpenAICodexDiagnosticReport>;
115
+ //#endregion
116
+ //#region src/store.d.ts
117
+ /** Provider route and pi-ai provider id owned by this bundle. */
118
+ declare const OPENAI_CODEX_PROVIDER = "openai-codex";
119
+ /** Basename of the OAuth document inside the Harness home. */
120
+ declare const OPENAI_CODEX_AUTH_FILENAME = ".openai-codex-auth.json";
121
+ /**
122
+ * Resolve the default OAuth document path.
123
+ * @param dshHome - optional Harness-home override.
124
+ * @returns the absolute owner-only document path.
125
+ */
126
+ declare function openAICodexAuthPath(dshHome?: string): string;
127
+ /** File-backed pi-ai store scoped to the single OpenAI Codex provider. */
128
+ declare class OpenAICodexCredentialStore implements CredentialStore {
129
+ /** Absolute credential document path. */
130
+ readonly filename: string;
131
+ /**
132
+ * @param filename - explicit document path, defaulting under `$DSH_HOME`.
133
+ */
134
+ constructor(filename?: string);
135
+ /** Read and validate the current document without acquiring the writer lock. */
136
+ private readCurrent;
137
+ /** @inheritdoc */
138
+ read(providerId: string): Promise<Credential | undefined>;
139
+ /** @inheritdoc */
140
+ list(): Promise<readonly CredentialInfo[]>;
141
+ /** @inheritdoc */
142
+ modify(providerId: string, fn: (current: Credential | undefined) => Promise<Credential | undefined>): Promise<Credential | undefined>;
143
+ /** @inheritdoc */
144
+ delete(providerId: string): Promise<void>;
145
+ }
146
+ //#endregion
147
+ //#region src/usage.d.ts
148
+ /** Fixed endpoint used by the official Codex client for ChatGPT rate limits. */
149
+ declare const OPENAI_CODEX_USAGE_URL = "https://chatgpt.com/backend-api/wham/usage";
150
+ /** One quota window expressed as remaining capacity for direct UI rendering. */
151
+ interface OpenAICodexRateLimitWindow {
152
+ /** Percent still available in this window. */
153
+ readonly remainingPercent: number;
154
+ /** Server-declared rolling-window length in seconds. */
155
+ readonly windowSeconds: number;
156
+ /** Server-declared reset time as Unix seconds, when supplied and valid. */
157
+ readonly resetAt?: number;
158
+ }
159
+ /** One separately metered Codex quota bucket. */
160
+ interface OpenAICodexRateLimit {
161
+ /** Stable server feature id. */
162
+ readonly id: string;
163
+ /** Optional server-provided display name. */
164
+ readonly name?: string;
165
+ /** Available rolling windows for this bucket. */
166
+ readonly windows: readonly OpenAICodexRateLimitWindow[];
167
+ }
168
+ /** Optional exact prepaid-credit balance returned by ChatGPT. */
169
+ interface OpenAICodexCredits {
170
+ /** Whether the balance is unmetered. */
171
+ readonly unlimited: boolean;
172
+ /** Exact provider-formatted balance when finite and disclosed. */
173
+ readonly balance?: string;
174
+ }
175
+ /** Optional exact workspace member spend limit returned by ChatGPT. */
176
+ interface OpenAICodexIndividualLimit {
177
+ /** Exact configured limit. */
178
+ readonly limit: string;
179
+ /** Exact amount consumed. */
180
+ readonly used: string;
181
+ /** Exact amount still available. */
182
+ readonly remaining: string;
183
+ /** Percent still available for progress rendering. */
184
+ readonly remainingPercent: number;
185
+ }
186
+ /** Secret-free quota projection returned to the browser. */
187
+ interface OpenAICodexUsage {
188
+ /** Rolling Codex rate-limit buckets. */
189
+ readonly rateLimits: readonly OpenAICodexRateLimit[];
190
+ /** Exact prepaid-credit balance when supported for this account. */
191
+ readonly credits?: OpenAICodexCredits;
192
+ /** Exact workspace member limit when supported for this account. */
193
+ readonly individualLimit?: OpenAICodexIndividualLimit;
194
+ }
195
+ /**
196
+ * Convert the provider response into the small secret-free object sent to the browser.
197
+ * @param value - opaque JSON returned by the ChatGPT usage endpoint.
198
+ * @returns core and additionally metered quota buckets with remaining percentages.
199
+ */
200
+ declare function parseOpenAICodexUsage(value: unknown): OpenAICodexUsage;
201
+ /**
202
+ * Read current quota without issuing a model request. OAuth is refreshed through
203
+ * the same provider-native credential lifecycle used by normal Codex turns.
204
+ * @param store - plugin-owned OAuth credential store.
205
+ * @returns current rate-limit buckets safe to expose to the local browser page.
206
+ */
207
+ declare function readOpenAICodexRateLimits(store: OpenAICodexCredentialStore): Promise<OpenAICodexUsage>;
208
+ //#endregion
209
+ //#region src/settings-contract.d.ts
210
+ /** Node-free settings contract shared by the Host plugin and browser card. */
211
+ /** Stable Harness settings namespace owned by this plugin. */
212
+ declare const OPENAI_CODEX_SETTINGS_NAMESPACE = "llm-openai-codex";
213
+ /** Search modes accepted by the Codex standalone search endpoint. */
214
+ type OpenAICodexSearchMode = 'cached' | 'indexed' | 'live';
215
+ /** Search-context sizes accepted by the Codex standalone search endpoint. */
216
+ type OpenAICodexSearchContextSize = 'low' | 'medium' | 'high';
217
+ /** Default model used by the standalone search endpoint. */
218
+ declare const DEFAULT_OPENAI_CODEX_SEARCH_MODEL = "gpt-5.6-sol";
219
+ /** Default search mode, matching the official local Codex client. */
220
+ declare const DEFAULT_OPENAI_CODEX_SEARCH_MODE: OpenAICodexSearchMode;
221
+ /** Default provider search-context size. */
222
+ declare const DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE: OpenAICodexSearchContextSize;
223
+ /** Default output budget for the standalone search response. */
224
+ declare const DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS = 10000;
225
+ /** Fully resolved user-editable section presented by Plugin configuration. */
226
+ interface OpenAICodexSettingsConfig {
227
+ enableSearch: boolean;
228
+ enableImageTool: boolean;
229
+ searchModel: string;
230
+ searchMode: OpenAICodexSearchMode;
231
+ searchContextSize: OpenAICodexSearchContextSize;
232
+ searchMaxOutputTokens: number;
233
+ }
234
+ declare const DEFAULT_OPENAI_CODEX_SETTINGS: Readonly<OpenAICodexSettingsConfig>;
235
+ /** Fill the schema defaults even when called without Cordis validation. */
236
+ declare function resolveOpenAICodexSettings(value: Partial<OpenAICodexSettingsConfig>): OpenAICodexSettingsConfig;
237
+ /** Narrow the redacted settings wire payload before it enters React state. */
238
+ declare function decodeOpenAICodexSettings(value: unknown): OpenAICodexSettingsConfig | undefined;
239
+ //#endregion
240
+ //#region src/search.d.ts
241
+ /** Stable dsh web-provider id selected by the bundle patch. */
242
+ declare const OPENAI_CODEX_SEARCH_PROVIDER = "openai-codex";
243
+ /** Trusted first-party Codex base; OAuth credentials never cross to a configured origin. */
244
+ declare const OPENAI_CODEX_BASE_URL = "https://chatgpt.com/backend-api/codex";
245
+ /** Standalone search endpoint used by the official Codex client. */
246
+ declare const OPENAI_CODEX_SEARCH_URL = "https://chatgpt.com/backend-api/codex/alpha/search";
247
+ interface SearchRequestBody {
248
+ readonly id: string;
249
+ readonly model: string;
250
+ readonly input: readonly [{
251
+ readonly type: 'message';
252
+ readonly role: 'user';
253
+ readonly content: readonly [{
254
+ readonly type: 'input_text';
255
+ readonly text: string;
256
+ }];
257
+ }];
258
+ readonly commands: {
259
+ readonly search_query: readonly [{
260
+ readonly q: string;
261
+ }];
262
+ };
263
+ readonly settings: {
264
+ readonly search_context_size: OpenAICodexSearchContextSize;
265
+ readonly allowed_callers: readonly ['direct'];
266
+ readonly external_web_access: boolean | 'indexed';
267
+ };
268
+ readonly max_output_tokens: number;
269
+ }
270
+ /** Exact secret-free request recorded before a standalone search dispatch. */
271
+ interface OpenAICodexSearchRequestRecord {
272
+ /** Fixed first-party endpoint. */
273
+ readonly endpoint: typeof OPENAI_CODEX_SEARCH_URL;
274
+ /** Exact JSON body sent to the provider. */
275
+ readonly body: SearchRequestBody;
276
+ }
277
+ /** Fully resolved provider options. */
278
+ interface OpenAICodexSearchProviderOptions {
279
+ /** Shared persistent OAuth store. */
280
+ readonly credentials: OpenAICodexCredentialStore;
281
+ /** Model sent to the standalone search endpoint. */
282
+ readonly model: string;
283
+ /** Cached, indexed, or live external-web policy. */
284
+ readonly mode: OpenAICodexSearchMode;
285
+ /** Provider-side search context size. */
286
+ readonly contextSize: OpenAICodexSearchContextSize;
287
+ /** Upper bound on the standalone endpoint's generated output. */
288
+ readonly maxOutputTokens: number;
289
+ /** Resolve the request identity, normally the initiating session id. */
290
+ readonly resolveRequestId: () => string;
291
+ /** Record the exact secret-free request before dispatch. */
292
+ readonly recordRequest?: (request: OpenAICodexSearchRequestRecord) => void;
293
+ }
294
+ /**
295
+ * Map the standalone endpoint's forward-compatible result DTOs into the dsh
296
+ * web result. Unknown DTO types and fields are ignored; malformed envelope
297
+ * fields fail at the network boundary.
298
+ * @param value - parsed response JSON.
299
+ * @returns normalized answer and citeable sources.
300
+ */
301
+ declare function mapOpenAICodexSearchResponse(value: unknown): WebSearchResult;
302
+ /** OpenAI Codex standalone-search provider using the same refreshable OAuth store as the LLM route. */
303
+ declare class OpenAICodexSearchProvider implements WebSearchProvider {
304
+ private readonly options;
305
+ readonly id = "openai-codex";
306
+ private readonly models;
307
+ /**
308
+ * @param options - fixed trusted endpoint policy and deployment tunables.
309
+ */
310
+ constructor(options: OpenAICodexSearchProviderOptions);
311
+ /** The local configuration is usable; credential presence is resolved per request. */
312
+ available(): boolean;
313
+ /** @inheritdoc */
314
+ search(request: WebSearchRequest, signal?: AbortSignal): Promise<WebSearchResult>;
315
+ }
316
+ //#endregion
317
+ //#region src/search-event.d.ts
318
+ /** Dedicated log event written before an OpenAI Codex search dispatch. */
319
+ declare const OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT = "web/openai-codex-search-llm-request";
320
+ declare module '@deepseek-ai/dsh-session/types' {
321
+ interface SessionEventMap {
322
+ /** Exact secret-free OpenAI Codex standalone-search request. */
323
+ 'web/openai-codex-search-llm-request': OpenAICodexSearchRequestRecord;
324
+ }
325
+ }
326
+ /**
327
+ * Register the plugin-owned event in the running Harness vocabulary. The
328
+ * public DSH build exports its known-event collection as read-only because
329
+ * core code must not mutate it accidentally; the runtime value is the Set
330
+ * deliberately consulted on every persistence read. Registration remains for
331
+ * the process lifetime so sessions written before an HMR cycle stay readable.
332
+ */
333
+ declare function installOpenAICodexSearchEvent(): void;
334
+ /**
335
+ * Append one resolved request to the initiating agent's session. Searches
336
+ * outside an agent turn have no owning session and therefore produce no log.
337
+ * @param ctx - plugin context carrying the optional active-agent service.
338
+ * @param request - exact request after defaults, excluding credentials.
339
+ */
340
+ declare function recordOpenAICodexSearchRequest(ctx: Context, request: OpenAICodexSearchRequestRecord): void;
341
+ //#endregion
342
+ //#region src/auth.d.ts
343
+ /** Non-secret login state shown by the launcher. */
344
+ interface OpenAICodexAuthStatus {
345
+ /** Whether a stored OAuth credential exists. */
346
+ authenticated: boolean;
347
+ /** Access-token expiry time; refresh is automatic on the next request. */
348
+ expiresAt?: Date;
349
+ }
350
+ /**
351
+ * Complete provider-native OAuth and persist the resulting credential.
352
+ * @param interaction - terminal or UI callbacks for the provider flow.
353
+ * @param store - credential store, defaulting under `$DSH_HOME`.
354
+ */
355
+ declare function loginOpenAICodex(interaction: AuthInteraction, store?: OpenAICodexCredentialStore): Promise<void>;
356
+ /**
357
+ * Remove the stored OpenAI Codex credential.
358
+ * @param store - credential store, defaulting under `$DSH_HOME`.
359
+ */
360
+ declare function logoutOpenAICodex(store?: OpenAICodexCredentialStore): Promise<void>;
361
+ /**
362
+ * Read non-secret OpenAI Codex login state without refreshing the token.
363
+ * @param store - credential store, defaulting under `$DSH_HOME`.
364
+ * @returns stored login state and expiry.
365
+ */
366
+ declare function openAICodexAuthStatus(store?: OpenAICodexCredentialStore): Promise<OpenAICodexAuthStatus>;
367
+ //#endregion
368
+ //#region src/fast-mode.d.ts
369
+ /** Process-local, per-session OpenAI Codex Fast Mode state. */
370
+ /** Maximum number of enabled sessions retained by one plugin instance. */
371
+ declare const OPENAI_CODEX_FAST_MODE_MAX_SESSIONS = 256;
372
+ /** Maximum UTF-16 code units accepted for an opaque DSH session id. */
373
+ declare const OPENAI_CODEX_FAST_MODE_MAX_SESSION_ID_LENGTH = 256;
374
+ /**
375
+ * Validate the opaque session identity used by the Fast Mode registry.
376
+ *
377
+ * The registry deliberately does not interpret or normalize session ids. It
378
+ * only rejects values that cannot safely serve as a bounded map key.
379
+ */
380
+ declare function isFastModeSessionId(value: unknown): value is string;
381
+ /**
382
+ * In-memory Fast Mode registry. Entries are positive-only: disabling a
383
+ * session removes its key, and an insertion over the bound evicts the least
384
+ * recently touched key. A new plugin instance starts with an empty map.
385
+ */
386
+ declare class FastModeRegistry {
387
+ private readonly maxSessions;
388
+ private readonly enabledSessions;
389
+ constructor(maxSessions?: number);
390
+ /** Number of currently enabled sessions. */
391
+ get size(): number;
392
+ /** Read one session without exposing the map or any credential state. */
393
+ isEnabled(sessionId: unknown): boolean;
394
+ /** Alias useful to callers that model this as a boolean setting. */
395
+ get(sessionId: unknown): boolean;
396
+ /** Enable or disable exactly one opaque session id. */
397
+ set(sessionId: unknown, enabled: boolean): void;
398
+ /** Explicitly named alias for callers that avoid boolean-setting verbs. */
399
+ setEnabled(sessionId: unknown, enabled: boolean): void;
400
+ /** Disable one session and forget its key. */
401
+ delete(sessionId: unknown): void;
402
+ /** Remove all process-local state during an explicit lifecycle teardown. */
403
+ clear(): void;
404
+ }
405
+ //#endregion
406
+ //#region src/fast-mode-paths.d.ts
407
+ /** Node-free Fast Mode route constants shared by Host and browser halves. */
408
+ /** GET/POST endpoint for one conversation's process-local Fast Mode state. */
409
+ declare const OPENAI_CODEX_FAST_MODE_PATH = "/plugins/dsh-openai-codex/fast-mode";
410
+ //#endregion
411
+ //#region src/index.d.ts
412
+ /** Stable Cordis plugin name. */
413
+ declare const name = "llm-openai-codex";
414
+ /** The model registry required before the provider can register. */
415
+ declare const inject: string[];
416
+ /** Branded Host settings namespace used by the configurable-provider directory. */
417
+ declare const OPENAI_CODEX_SETTINGS_NS: import("@deepseek-ai/dsh-settings").SettingsNamespace;
418
+ /** Composite model and standalone-search configuration. */
419
+ interface Config {
420
+ /** Register the optional standalone Codex search provider. */
421
+ enableSearch?: boolean;
422
+ /** Register the optional image-loading tool. */
423
+ enableImageTool?: boolean;
424
+ /** Model used for auxiliary standalone searches. */
425
+ searchModel?: string;
426
+ /** Cached, indexed, or live web access. */
427
+ searchMode?: OpenAICodexSearchMode;
428
+ /** Amount of search context returned by the provider. */
429
+ searchContextSize?: OpenAICodexSearchContextSize;
430
+ /** Maximum generated tokens returned by the standalone search endpoint. */
431
+ searchMaxOutputTokens?: number;
432
+ }
433
+ declare const Config: z<Config>;
434
+ /**
435
+ * Register the `openai-codex` LLM route with one provider-native OAuth store.
436
+ * Search and image tooling are added only when their config flags are true.
437
+ * Selecting this route as the Harness default remains a separate profile choice.
438
+ * @param ctx - plugin context carrying the LLM registry plus optional services.
439
+ * @param config - capability gates and standalone-search tuning.
440
+ */
441
+ declare function apply(ctx: Context, config: Config): void;
442
+ //#endregion
443
+ export { COMPATIBILITY_CONTRACT, COMPATIBILITY_PACKAGES, COMPATIBILITY_SCHEMA_VERSION, type CompatibilityDetectionOptions, type CompatibilityEntry, type CompatibilityEvaluationInput, type CompatibilityPackageName, type CompatibilityReport, type CompatibilityStatus, Config, DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, DEFAULT_OPENAI_CODEX_SEARCH_MODE, DEFAULT_OPENAI_CODEX_SEARCH_MODEL, DEFAULT_OPENAI_CODEX_SETTINGS, DSH_PLUGIN_API_PACKAGES, FastModeRegistry, FastModeRegistry as OpenAICodexFastModeRegistry, OPENAI_CODEX_AUTH_FILENAME, OPENAI_CODEX_BASE_URL, OPENAI_CODEX_FAST_MODE_MAX_SESSIONS, OPENAI_CODEX_FAST_MODE_MAX_SESSION_ID_LENGTH, OPENAI_CODEX_FAST_MODE_PATH, OPENAI_CODEX_PROVIDER, OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT, OPENAI_CODEX_SEARCH_PROVIDER, OPENAI_CODEX_SEARCH_URL, OPENAI_CODEX_SETTINGS_NAMESPACE, OPENAI_CODEX_SETTINGS_NS, OPENAI_CODEX_USAGE_URL, type OpenAICodexAuthStatus, OpenAICodexCredentialStore, type OpenAICodexCredits, type OpenAICodexDiagnosticOptions, type OpenAICodexDiagnosticReport, type OpenAICodexIndividualLimit, type OpenAICodexRateLimit, type OpenAICodexRateLimitWindow, type OpenAICodexSearchContextSize, type OpenAICodexSearchMode, OpenAICodexSearchProvider, type OpenAICodexSearchProviderOptions, type OpenAICodexSearchRequestRecord, type OpenAICodexSettingsConfig, type OpenAICodexUsage, PI_AI_PACKAGE, SUPPORTED_DSH_PLUGIN_API_VERSION, SUPPORTED_NODE_RANGE, SUPPORTED_PI_AI_VERSION, VIEW_IMAGE_TOOL_NAME, apply, assertNoOpenAICodexProviderConflict, assessCompatibility, decodeOpenAICodexSettings, detectCompatibility, diagnoseOpenAICodex, evaluateCompatibility, inject, installOpenAICodexSearchEvent, isFastModeSessionId, loginOpenAICodex, logoutOpenAICodex, mapOpenAICodexSearchResponse, name, openAICodexAuthPath, openAICodexAuthStatus, openAICodexConflictMessage, parseOpenAICodexUsage, readOpenAICodexRateLimits, recordOpenAICodexSearchRequest, resolveOpenAICodexSettings };
package/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import { $ as OpenAICodexCredentialStore, A as DSH_PLUGIN_API_PACKAGES, B as OPENAI_CODEX_FAST_MODE_MAX_SESSIONS, C as assertNoOpenAICodexProviderConflict, D as COMPATIBILITY_CONTRACT, F as assessCompatibility, G as OPENAI_CODEX_USAGE_URL, H as isFastModeSessionId, I as detectCompatibility, J as loginOpenAICodex, K as parseOpenAICodexUsage, L as evaluateCompatibility, M as SUPPORTED_DSH_PLUGIN_API_VERSION, N as SUPPORTED_NODE_RANGE, O as COMPATIBILITY_PACKAGES, P as SUPPORTED_PI_AI_VERSION, Q as OPENAI_CODEX_PROVIDER, R as OPENAI_CODEX_FAST_MODE_PATH, S as VIEW_IMAGE_TOOL_NAME, T as openAICodexConflictMessage, V as OPENAI_CODEX_FAST_MODE_MAX_SESSION_ID_LENGTH, X as openAICodexAuthStatus, Y as logoutOpenAICodex, Z as OPENAI_CODEX_AUTH_FILENAME, _ as decodeOpenAICodexSettings, a as name, b as installOpenAICodexSearchEvent, c as OPENAI_CODEX_SEARCH_URL, d as DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, et as openAICodexAuthPath, f as DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, g as OPENAI_CODEX_SETTINGS_NAMESPACE, h as DEFAULT_OPENAI_CODEX_SETTINGS, i as inject, j as PI_AI_PACKAGE, k as COMPATIBILITY_SCHEMA_VERSION, l as OpenAICodexSearchProvider, m as DEFAULT_OPENAI_CODEX_SEARCH_MODEL, n as OPENAI_CODEX_SETTINGS_NS, o as OPENAI_CODEX_BASE_URL, p as DEFAULT_OPENAI_CODEX_SEARCH_MODE, q as readOpenAICodexRateLimits, r as apply, s as OPENAI_CODEX_SEARCH_PROVIDER, t as Config, u as mapOpenAICodexSearchResponse, v as resolveOpenAICodexSettings, w as diagnoseOpenAICodex, x as recordOpenAICodexSearchRequest, y as OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT, z as FastModeRegistry } from "./src-DLX8Rs0k.js";
2
+ export { COMPATIBILITY_CONTRACT, COMPATIBILITY_PACKAGES, COMPATIBILITY_SCHEMA_VERSION, Config, DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, DEFAULT_OPENAI_CODEX_SEARCH_MODE, DEFAULT_OPENAI_CODEX_SEARCH_MODEL, DEFAULT_OPENAI_CODEX_SETTINGS, DSH_PLUGIN_API_PACKAGES, FastModeRegistry, FastModeRegistry as OpenAICodexFastModeRegistry, OPENAI_CODEX_AUTH_FILENAME, OPENAI_CODEX_BASE_URL, OPENAI_CODEX_FAST_MODE_MAX_SESSIONS, OPENAI_CODEX_FAST_MODE_MAX_SESSION_ID_LENGTH, OPENAI_CODEX_FAST_MODE_PATH, OPENAI_CODEX_PROVIDER, OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT, OPENAI_CODEX_SEARCH_PROVIDER, OPENAI_CODEX_SEARCH_URL, OPENAI_CODEX_SETTINGS_NAMESPACE, OPENAI_CODEX_SETTINGS_NS, OPENAI_CODEX_USAGE_URL, OpenAICodexCredentialStore, OpenAICodexSearchProvider, PI_AI_PACKAGE, SUPPORTED_DSH_PLUGIN_API_VERSION, SUPPORTED_NODE_RANGE, SUPPORTED_PI_AI_VERSION, VIEW_IMAGE_TOOL_NAME, apply, assertNoOpenAICodexProviderConflict, assessCompatibility, decodeOpenAICodexSettings, detectCompatibility, diagnoseOpenAICodex, evaluateCompatibility, inject, installOpenAICodexSearchEvent, isFastModeSessionId, loginOpenAICodex, logoutOpenAICodex, mapOpenAICodexSearchResponse, name, openAICodexAuthPath, openAICodexAuthStatus, openAICodexConflictMessage, parseOpenAICodexUsage, readOpenAICodexRateLimits, recordOpenAICodexSearchRequest, resolveOpenAICodexSettings };
@@ -0,0 +1,14 @@
1
+ import { Context } from "@deepseek-ai/cordis";
2
+ //#region src/invariant.d.ts
3
+ /** Cordis companion plugin name. */
4
+ declare const name = "openai-codex-invariant";
5
+ /** Service required before the companion can register. */
6
+ declare const inject: string[];
7
+ /**
8
+ * Register this package's invariant companion.
9
+ * @param ctx - Cordis context carrying the invariant service.
10
+ * @returns the installed registration's disposer after setup succeeds.
11
+ */
12
+ declare const apply: (ctx: Context) => Promise<() => void>;
13
+ //#endregion
14
+ export { apply, inject, name };
@@ -0,0 +1,15 @@
1
+ //#region src/invariant.ts
2
+ const PACKAGE_NAME = "dsh-codex-connect";
3
+ /** Cordis companion plugin name. */
4
+ const name = "openai-codex-invariant";
5
+ /** Service required before the companion can register. */
6
+ const inject = ["invariants"];
7
+ const install = () => {};
8
+ /**
9
+ * Register this package's invariant companion.
10
+ * @param ctx - Cordis context carrying the invariant service.
11
+ * @returns the installed registration's disposer after setup succeeds.
12
+ */
13
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
14
+ //#endregion
15
+ export { apply, inject, name };