Skip to content

Commit 57fa68c

Browse files
committed
test(codex): keep catalog fixture internals private
1 parent 547573f commit 57fa68c

1 file changed

Lines changed: 14 additions & 20 deletions

File tree

‎extensions/codex/src/session-catalog.test-helpers.ts‎

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ export const CODEX_NODE_CONTINUE_COMMANDS = [
6464
export const originalPath = process.env.PATH;
6565
export const tempDirs: string[] = [];
6666

67-
export const archiveLocalCodexSession = codexSessionCatalogRuntime.archiveLocal;
68-
export const continueLocalCodexSessionRuntime = codexSessionCatalogRuntime.continueLocal;
69-
export const listCodexSessionCatalogRuntime = codexSessionCatalogRuntime.list;
70-
export const readCodexSessionTranscriptRuntime = codexSessionCatalogRuntime.readTranscript;
71-
export const registerCodexSessionCatalogRuntime = codexSessionCatalogRuntime.register;
67+
const archiveLocalCodexSession = codexSessionCatalogRuntime.archiveLocal;
68+
const continueLocalCodexSessionRuntime = codexSessionCatalogRuntime.continueLocal;
69+
const listCodexSessionCatalogRuntime = codexSessionCatalogRuntime.list;
70+
const readCodexSessionTranscriptRuntime = codexSessionCatalogRuntime.readTranscript;
71+
const registerCodexSessionCatalogRuntime = codexSessionCatalogRuntime.register;
7272

7373
export function createCodexSessionCatalogControl(
7474
params: Parameters<typeof createCodexSessionCatalogControlFactory>[0],
@@ -79,12 +79,9 @@ export function createCodexSessionCatalogControl(
7979
);
8080
}
8181

82-
export type CodexSessionCatalogControlFactoryStub = Pick<
83-
CodexSessionCatalogControlFactory,
84-
"forRequest"
85-
>;
82+
type CodexSessionCatalogControlFactoryStub = Pick<CodexSessionCatalogControlFactory, "forRequest">;
8683

87-
export function asControlFactory(
84+
function asControlFactory(
8885
control:
8986
| CodexSessionCatalogControl
9087
| CodexSessionCatalogControlFactory
@@ -179,23 +176,23 @@ export function createCodexSessionCatalogNodeHostCommands(
179176
return createCodexSessionCatalogNodeHostCommandsRuntime(asControlFactory(control), configSources);
180177
}
181178

182-
export type CreateSessionEntryParams = Parameters<
179+
type CreateSessionEntryParams = Parameters<
183180
PluginRuntime["agent"]["session"]["createSessionEntry"]
184181
>[0];
185-
export type CreateSessionEntryResult = Awaited<
182+
type CreateSessionEntryResult = Awaited<
186183
ReturnType<PluginRuntime["agent"]["session"]["createSessionEntry"]>
187184
>;
188-
export type PatchSessionEntryParams = Parameters<
185+
type PatchSessionEntryParams = Parameters<
189186
PluginRuntime["agent"]["session"]["patchSessionEntry"]
190187
>[0];
191-
export type SessionEntrySummary = ReturnType<
188+
type SessionEntrySummary = ReturnType<
192189
PluginRuntime["agent"]["session"]["listSessionEntries"]
193190
>[number];
194191

195-
export type OptionalCatalogAgent<T extends { agentId?: string }> = Omit<T, "agentId"> & {
192+
type OptionalCatalogAgent<T extends { agentId?: string }> = Omit<T, "agentId"> & {
196193
agentId?: string;
197194
};
198-
export type SessionCatalogProvider = Omit<
195+
type SessionCatalogProvider = Omit<
199196
RegisteredSessionCatalogProvider,
200197
"list" | "read" | "continueSession" | "archive" | "openTerminal"
201198
> & {
@@ -222,9 +219,7 @@ export type SessionCatalogProvider = Omit<
222219
) => ReturnType<NonNullable<RegisteredSessionCatalogProvider["openTerminal"]>>;
223220
};
224221

225-
export function bindTestCatalogOwner(
226-
provider: RegisteredSessionCatalogProvider,
227-
): SessionCatalogProvider {
222+
function bindTestCatalogOwner(provider: RegisteredSessionCatalogProvider): SessionCatalogProvider {
228223
return {
229224
...provider,
230225
list: (params) => provider.list({ agentId: "main", ...params }),
@@ -572,7 +567,6 @@ export type {
572567
CodexAppServerBindingStore,
573568
CodexAppServerThreadBinding,
574569
CodexCatalogHome,
575-
CodexSessionCatalogControl,
576570
CodexThread,
577571
OpenClawConfig,
578572
PluginRuntime,

0 commit comments

Comments
 (0)