mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:40:44 +00:00
fix: complete codex app-server turns in docker
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
import type { AgentHarness } from "openclaw/plugin-sdk/agent-harness";
|
||||
import { maybeCompactCodexAppServerSession } from "./src/app-server/compact.js";
|
||||
import { listCodexAppServerModels } from "./src/app-server/models.js";
|
||||
import type { AgentHarness } from "openclaw/plugin-sdk/agent-harness-runtime";
|
||||
import type {
|
||||
CodexAppServerListModelsOptions,
|
||||
CodexAppServerModel,
|
||||
CodexAppServerModelListResult,
|
||||
} from "./src/app-server/models.js";
|
||||
import { runCodexAppServerAttempt } from "./src/app-server/run-attempt.js";
|
||||
import { clearCodexAppServerBinding } from "./src/app-server/session-binding.js";
|
||||
import { clearSharedCodexAppServerClient } from "./src/app-server/shared-client.js";
|
||||
|
||||
const DEFAULT_CODEX_HARNESS_PROVIDER_IDS = new Set(["codex"]);
|
||||
|
||||
export type { CodexAppServerListModelsOptions, CodexAppServerModel, CodexAppServerModelListResult };
|
||||
export { listCodexAppServerModels };
|
||||
|
||||
export function createCodexAppServerAgentHarness(options?: {
|
||||
id?: string;
|
||||
@@ -39,16 +33,22 @@ export function createCodexAppServerAgentHarness(options?: {
|
||||
reason: `provider is not one of: ${[...providerIds].toSorted().join(", ")}`,
|
||||
};
|
||||
},
|
||||
runAttempt: (params) =>
|
||||
runCodexAppServerAttempt(params, { pluginConfig: options?.pluginConfig }),
|
||||
compact: (params) =>
|
||||
maybeCompactCodexAppServerSession(params, { pluginConfig: options?.pluginConfig }),
|
||||
runAttempt: async (params) => {
|
||||
const { runCodexAppServerAttempt } = await import("./src/app-server/run-attempt.js");
|
||||
return runCodexAppServerAttempt(params, { pluginConfig: options?.pluginConfig });
|
||||
},
|
||||
compact: async (params) => {
|
||||
const { maybeCompactCodexAppServerSession } = await import("./src/app-server/compact.js");
|
||||
return maybeCompactCodexAppServerSession(params, { pluginConfig: options?.pluginConfig });
|
||||
},
|
||||
reset: async (params) => {
|
||||
if (params.sessionFile) {
|
||||
const { clearCodexAppServerBinding } = await import("./src/app-server/session-binding.js");
|
||||
await clearCodexAppServerBinding(params.sessionFile);
|
||||
}
|
||||
},
|
||||
dispose: () => {
|
||||
dispose: async () => {
|
||||
const { clearSharedCodexAppServerClient } = await import("./src/app-server/shared-client.js");
|
||||
clearSharedCodexAppServerClient();
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user