mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-23 07:31:12 +00:00
* refactor(browser): collapse Playwright export paths * refactor(browser): remove dead plugin exports * refactor(codex): remove dead app-server exports * refactor(codex): remove remaining dead exports * test(codex): use canonical private-type owners * test(browser): isolate proxy startup state * test(browser): remove stale chrome imports * refactor(codex): privatize remaining helpers * chore(deadcode): refresh export baseline after rebase * refactor(browser): finish canonical helper ownership * refactor: fix dead-export cleanup gates * refactor(codex): keep runtime facades LOC-neutral * chore(ci): refresh TypeScript LOC baseline * chore(deadcode): refresh ratchets after rebase * chore(ci): refresh LOC baseline after main advance * chore(deadcode): align ratchets with latest main
52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
import type {
|
|
CodexAppServerBindingIdentity,
|
|
CodexAppServerThreadBinding,
|
|
} from "./app-server/session-binding.js";
|
|
|
|
export type CodexDiagnosticsTarget = {
|
|
threadId: string;
|
|
identity: CodexAppServerBindingIdentity;
|
|
agentDir: string;
|
|
connectionScope?: "supervision";
|
|
appServerRuntimeFingerprint?: string;
|
|
pendingSupervisionBranch?: CodexAppServerThreadBinding["pendingSupervisionBranch"];
|
|
authProfileId?: string;
|
|
sessionKey?: string;
|
|
sessionId?: string;
|
|
channel?: string;
|
|
channelId?: string;
|
|
accountId?: string;
|
|
messageThreadId?: string | number;
|
|
threadParentId?: string;
|
|
};
|
|
|
|
export type PendingCodexDiagnosticsConfirmation = {
|
|
token: string;
|
|
targets: CodexDiagnosticsTarget[];
|
|
note?: string;
|
|
senderId: string;
|
|
channel: string;
|
|
accountId?: string;
|
|
channelId?: string;
|
|
messageThreadId?: string;
|
|
threadParentId?: string;
|
|
sessionKey?: string;
|
|
scopeKey: string;
|
|
privateRouted?: boolean;
|
|
createdAt: number;
|
|
};
|
|
|
|
/** Runtime state for diagnostics upload throttling and confirmation handshakes. */
|
|
export const codexDiagnosticsFeedbackState = {
|
|
lastUploadByThread: new Map<string, number>(),
|
|
lastUploadByScope: new Map<string, number>(),
|
|
pendingConfirmations: new Map<string, PendingCodexDiagnosticsConfirmation>(),
|
|
pendingTokensByScope: new Map<string, string[]>(),
|
|
clear(): void {
|
|
this.lastUploadByThread.clear();
|
|
this.lastUploadByScope.clear();
|
|
this.pendingConfirmations.clear();
|
|
this.pendingTokensByScope.clear();
|
|
},
|
|
};
|