@openclaw/codex 2026.5.1-beta.1 → 2026.5.2-beta.2

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/test-api.ts ADDED
@@ -0,0 +1,79 @@
1
+ import type {
2
+ AnyAgentTool,
3
+ EmbeddedRunAttemptParams,
4
+ } from "openclaw/plugin-sdk/agent-harness-runtime";
5
+ import {
6
+ type CodexAppServerRuntimeOptions,
7
+ resolveCodexAppServerRuntimeOptions,
8
+ } from "./src/app-server/config.js";
9
+ import type { CodexPluginConfig } from "./src/app-server/config.js";
10
+ import { applyCodexDynamicToolProfile } from "./src/app-server/dynamic-tool-profile.js";
11
+ import { createCodexDynamicToolBridge } from "./src/app-server/dynamic-tools.js";
12
+ import type { CodexDynamicToolSpec, JsonObject } from "./src/app-server/protocol.js";
13
+ import {
14
+ buildDeveloperInstructions,
15
+ buildThreadResumeParams,
16
+ buildThreadStartParams,
17
+ buildTurnStartParams,
18
+ } from "./src/app-server/thread-lifecycle.js";
19
+
20
+ type CodexHarnessPromptSnapshot = {
21
+ developerInstructions: string;
22
+ threadStartParams: ReturnType<typeof buildThreadStartParams>;
23
+ threadResumeParams: ReturnType<typeof buildThreadResumeParams>;
24
+ turnStartParams: ReturnType<typeof buildTurnStartParams>;
25
+ };
26
+
27
+ export function resolveCodexPromptSnapshotAppServerOptions(
28
+ pluginConfig?: unknown,
29
+ ): CodexAppServerRuntimeOptions {
30
+ return resolveCodexAppServerRuntimeOptions({
31
+ pluginConfig,
32
+ env: {},
33
+ });
34
+ }
35
+
36
+ export function buildCodexHarnessPromptSnapshot(params: {
37
+ attempt: EmbeddedRunAttemptParams;
38
+ cwd: string;
39
+ threadId: string;
40
+ dynamicTools: CodexDynamicToolSpec[];
41
+ appServer: CodexAppServerRuntimeOptions;
42
+ config?: JsonObject;
43
+ promptText?: string;
44
+ }): CodexHarnessPromptSnapshot {
45
+ const developerInstructions = buildDeveloperInstructions(params.attempt);
46
+ return {
47
+ developerInstructions,
48
+ threadStartParams: buildThreadStartParams(params.attempt, {
49
+ cwd: params.cwd,
50
+ dynamicTools: params.dynamicTools,
51
+ appServer: params.appServer,
52
+ developerInstructions,
53
+ config: params.config,
54
+ }),
55
+ threadResumeParams: buildThreadResumeParams(params.attempt, {
56
+ threadId: params.threadId,
57
+ appServer: params.appServer,
58
+ developerInstructions,
59
+ config: params.config,
60
+ }),
61
+ turnStartParams: buildTurnStartParams(params.attempt, {
62
+ threadId: params.threadId,
63
+ cwd: params.cwd,
64
+ appServer: params.appServer,
65
+ promptText: params.promptText,
66
+ }),
67
+ };
68
+ }
69
+
70
+ export function createCodexDynamicToolSpecsForPromptSnapshot(params: {
71
+ tools: AnyAgentTool[];
72
+ pluginConfig?: Pick<CodexPluginConfig, "codexDynamicToolsProfile" | "codexDynamicToolsExclude">;
73
+ }): CodexDynamicToolSpec[] {
74
+ const profiledTools = applyCodexDynamicToolProfile(params.tools, params.pluginConfig ?? {});
75
+ return createCodexDynamicToolBridge({
76
+ tools: profiledTools,
77
+ signal: new AbortController().signal,
78
+ }).specs;
79
+ }
@@ -1 +0,0 @@
1
- 2026-04-29T11:28:51.418Z