Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/audit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export enum AuditOutcome {
PARTIAL = "partial",
}

export interface AuditEntry {
interface AuditEntry {
timestamp: string;
correlationId: string | null;
action: AuditAction;
Expand Down
2 changes: 1 addition & 1 deletion lib/auth/device-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface DeviceAuthCode {
expiresAtMs?: number;
}

export interface DeviceAuthCompletion {
interface DeviceAuthCompletion {
authorizationCode: string;
codeVerifier: string;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/codex-manager/behavior-settings-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { UI_COPY } from "../ui/ui-copy.js";
import { getUiRuntimeOptions } from "../ui/runtime.js";
import { type MenuItem, select } from "../ui/select.js";

export type BehaviorConfigAction =
type BehaviorConfigAction =
| { type: "set-delay"; delayMs: number }
| { type: "toggle-pause" }
| { type: "toggle-menu-limit-fetch" }
Expand Down
2 changes: 1 addition & 1 deletion lib/codex-manager/commands/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function removePluginFromList(list: unknown[]): unknown[] {
});
}

export type UninstallCliOptions = {
type UninstallCliOptions = {
dryRun: boolean;
json: boolean;
clearAccounts: boolean;
Expand Down
4 changes: 2 additions & 2 deletions lib/codex-manager/commands/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ type ParsedArgsResult<T> =
| { ok: true; options: T }
| { ok: false; message: string };

export interface VerifyPathStep {
interface VerifyPathStep {
name: string;
input?: string;
output?: string;
ok: boolean;
error?: string;
}

export interface VerifySandboxResult {
interface VerifySandboxResult {
name: string;
input: string;
rejected: boolean;
Expand Down
6 changes: 3 additions & 3 deletions lib/codex-manager/commands/why-selected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ParsedArgsResult<T> =
| { ok: true; options: T }
| { ok: false; message: string };

export interface WhySelectedRuntimeSnapshot {
interface WhySelectedRuntimeSnapshot {
lastSwitchReason?: string;
lastRateLimitReason?: string;
cooldownReason?: string;
Expand All @@ -37,7 +37,7 @@ export interface WhySelectedCommandDeps {
logError?: (message: string) => void;
}

export interface WhySelectedCandidateRecord {
interface WhySelectedCandidateRecord {
index: number;
oneBasedIndex: number;
email?: string;
Expand All @@ -56,7 +56,7 @@ export interface WhySelectedCandidateRecord {
reason?: string;
}

export interface WhySelectedSelectedRecord extends WhySelectedCandidateRecord {
interface WhySelectedSelectedRecord extends WhySelectedCandidateRecord {
selectionReason: string;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/codex-manager/dashboard-display-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface DashboardDisplaySettingOption {
description: string;
}

export type DashboardConfigAction =
type DashboardConfigAction =
| { type: "toggle"; key: DashboardDisplaySettingKey }
| { type: "cycle-sort-mode" }
| { type: "cycle-layout-mode" }
Expand Down
2 changes: 1 addition & 1 deletion lib/codex-manager/experimental-settings-prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type {
mapExperimentalStatusHotkey,
} from "./experimental-settings-schema.js";

export type ExperimentalSettingsCopy = {
type ExperimentalSettingsCopy = {
experimentalSync: string;
experimentalBackup: string;
experimentalRefreshGuard: string;
Expand Down
2 changes: 1 addition & 1 deletion lib/codex-manager/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function parseAuthLoginArgs(args: string[]): ParsedAuthLoginArgs {
return { ok: true, options };
}

export interface BestCliOptions {
interface BestCliOptions {
live: boolean;
json: boolean;
model: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/codex-manager/repair-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ export interface FixCliOptions {
model: string;
}

export interface VerifyFlaggedCliOptions {
interface VerifyFlaggedCliOptions {
dryRun: boolean;
json: boolean;
restore: boolean;
}

export interface DoctorCliOptions {
interface DoctorCliOptions {
json: boolean;
fix: boolean;
dryRun: boolean;
Expand Down
4 changes: 2 additions & 2 deletions lib/codex-manager/statusline-settings-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import type { UI_COPY } from "../ui/ui-copy.js";
import { getUiRuntimeOptions } from "../ui/runtime.js";
import { type MenuItem, select } from "../ui/select.js";

export type StatuslineConfigAction =
type StatuslineConfigAction =
| { type: "toggle"; key: DashboardStatuslineField }
| { type: "move-up"; key: DashboardStatuslineField }
| { type: "move-down"; key: DashboardStatuslineField }
| { type: "reset" }
| { type: "save" }
| { type: "cancel" };

export interface StatuslineFieldOption {
interface StatuslineFieldOption {
key: DashboardStatuslineField;
label: string;
description: string;
Expand Down
2 changes: 1 addition & 1 deletion lib/codex-manager/theme-settings-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { UI_COPY } from "../ui/ui-copy.js";
import { getUiRuntimeOptions } from "../ui/runtime.js";
import { type MenuItem, select } from "../ui/select.js";

export type ThemeConfigAction =
type ThemeConfigAction =
| { type: "set-palette"; palette: DashboardThemePreset }
| { type: "set-accent"; accent: DashboardAccentColor }
| { type: "reset" }
Expand Down
4 changes: 2 additions & 2 deletions lib/dashboard-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
export type DashboardThemePreset = "green" | "blue";
export type DashboardAccentColor = "green" | "cyan" | "blue" | "yellow";
export type DashboardAccountSortMode = "manual" | "ready-first";
export type DashboardLayoutMode = "compact-details" | "expanded-rows";
export type DashboardFocusStyle = "row-invert";
type DashboardLayoutMode = "compact-details" | "expanded-rows";
type DashboardFocusStyle = "row-invert";

export interface DashboardDisplaySettings {
showPerAccountRows: boolean;
Expand Down
2 changes: 0 additions & 2 deletions lib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const ErrorCode = {
CODEX_UNAVAILABLE: "CODEX_UNAVAILABLE",
} as const;

export type ErrorCodeType = (typeof ErrorCode)[keyof typeof ErrorCode];

/**
* Options for creating a CodexError.
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/forecast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { getRateLimitResetTimeForFamily } from "./runtime/account-status.js";
import type { AccountMetadataV3 } from "./storage.js";
import type { TokenFailure } from "./types.js";

export type ForecastAvailability = "ready" | "delayed" | "unavailable";
export type ForecastRiskLevel = "low" | "medium" | "high";
type ForecastAvailability = "ready" | "delayed" | "unavailable";
type ForecastRiskLevel = "low" | "medium" | "high";

export interface ForecastAccountInput {
index: number;
Expand Down Expand Up @@ -54,7 +54,7 @@ export interface ForecastRecommendation {
reason: string;
}

export interface ForecastExplanationAccount {
interface ForecastExplanationAccount {
index: number;
label: string;
isCurrent: boolean;
Expand Down
2 changes: 1 addition & 1 deletion lib/oc-chatgpt-import-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type OcChatgptPreviewPayload = {
accounts: OcChatgptAccountRef[];
};

export type OcChatgptAccountRef = {
type OcChatgptAccountRef = {
accountId?: string;
email?: string;
refreshTokenLast4: string;
Expand Down
2 changes: 1 addition & 1 deletion lib/oc-chatgpt-target-detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export type OcChatgptTargetNone = {
>;
};

export type OcChatgptTargetFound = {
type OcChatgptTargetFound = {
kind: "target";
descriptor: OcChatgptTargetDescriptor;
};
Expand Down
4 changes: 2 additions & 2 deletions lib/recovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import {
} from "./recovery/storage.js";
import type {
MessageInfo,
ResumeConfig,
MessageData,
MessagePart,
RecoveryErrorType,
ResumeConfig,
ToolResultPart,
} from "./recovery/types.js";

export type { RecoveryErrorType, MessageInfo, MessageData, ResumeConfig };
export type { RecoveryErrorType };

type PluginClient = PluginInput["client"];

Expand Down
16 changes: 3 additions & 13 deletions lib/recovery/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
// Storage Types (for reading from host runtime filesystem)
// =============================================================================

export type ThinkingPartType = "thinking" | "redacted_thinking" | "reasoning";
export type MetaPartType = "step-start" | "step-finish";
export type ContentPartType = "text" | "tool" | "tool_use" | "tool_result";

export interface StoredMessageMeta {
id: string;
Expand All @@ -34,7 +31,7 @@ export interface StoredTextPart {
ignored?: boolean;
}

export interface StoredToolPart {
interface StoredToolPart {
id: string;
sessionID: string;
messageID: string;
Expand All @@ -49,15 +46,15 @@ export interface StoredToolPart {
};
}

export interface StoredReasoningPart {
interface StoredReasoningPart {
id: string;
sessionID: string;
messageID: string;
type: "reasoning";
text: string;
}

export interface StoredStepPart {
interface StoredStepPart {
id: string;
sessionID: string;
messageID: string;
Expand Down Expand Up @@ -136,13 +133,6 @@ export type RecoveryErrorType =
| "thinking_disabled_violation"
| null;

export interface ToolUsePart {
type: "tool_use";
id: string;
name: string;
input: Record<string, unknown>;
}

export interface ToolResultPart {
type: "tool_result";
tool_use_id: string;
Expand Down
2 changes: 1 addition & 1 deletion lib/request/response-compaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isRecord } from "../utils.js";
import { getModelCapabilities } from "./helpers/model-map.js";
import { trimInputForFastSession } from "./request-transformer.js";

export interface DeferredFastSessionInputTrim {
interface DeferredFastSessionInputTrim {
maxItems: number;
preferLatestUserOnly: boolean;
}
Expand Down
10 changes: 0 additions & 10 deletions lib/rotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@

import { createLogger } from "./logger.js";

// PR-N / R4: re-export SelectionRecord + RoutingMutexMode so rotation.ts
// remains the canonical entry point for "selection decision" types even
// though the concrete mutex lives in ./routing-mutex.ts. Callers wiring
// the fetch loop only need to import from `lib/rotation`.
export type {
SelectionRecord,
RoutingMutexMode,
AsyncMutex,
} from "./routing-mutex.js";

const log = createLogger("rotation");

// ============================================================================
Expand Down
6 changes: 3 additions & 3 deletions lib/runtime/first-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ const CI_ENV_KEYS = [
"BITBUCKET_BUILD_NUMBER",
];

export type FirstRunStepStatus = "completed" | "skipped" | "failed";
type FirstRunStepStatus = "completed" | "skipped" | "failed";

export interface FirstRunSetupOutcome {
interface FirstRunSetupOutcome {
appBind: FirstRunStepStatus;
launcher: FirstRunStepStatus;
}

export type FirstRunSkipReason =
type FirstRunSkipReason =
| "ci"
| "not-installed"
| "already-done"
Expand Down
2 changes: 1 addition & 1 deletion lib/runtime/quota-headers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CodexQuotaSnapshot, CodexQuotaWindow } from "../quota-probe.js";

export type { CodexQuotaSnapshot, CodexQuotaWindow } from "../quota-probe.js";
export type { CodexQuotaSnapshot } from "../quota-probe.js";

export type ParsedCodexQuotaSnapshot = Omit<CodexQuotaSnapshot, "model">;

Expand Down
4 changes: 2 additions & 2 deletions lib/runtime/runtime-current-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { getCodexMultiAuthDir } from "../runtime-paths.js";
import type { AccountStorageV3 } from "../storage.js";
import { isRecord } from "../utils.js";

export type RuntimeCurrentAccountSource =
type RuntimeCurrentAccountSource =
| "runtime-observability"
| "app-bind"
| "app-helper";

export type RuntimeCurrentAccountMatch = "account-id" | "email" | "index";
type RuntimeCurrentAccountMatch = "account-id" | "email" | "index";

export type AccountCurrentMarker = "current" | "in-use" | "selected";

Expand Down
2 changes: 1 addition & 1 deletion lib/runtime/runtime-observability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { existsSync, readFileSync, promises as fs } from "node:fs";
import { join } from "node:path";
import { getCodexMultiAuthDir } from "../runtime-paths.js";

export interface RuntimeMetricsSnapshot {
interface RuntimeMetricsSnapshot {
startedAt: number;
totalRequests: number;
successfulRequests: number;
Expand Down
Loading