@openclaw/codex 2026.8.2 → 2026.9.1

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.
Files changed (61) hide show
  1. package/dist/api.js +3 -3
  2. package/dist/{attempt-client-cleanup-CpVfwctT.js → attempt-client-cleanup-DYHcRQAa.js} +6 -43
  3. package/dist/attempt-context-DmQUNWwT.js +634 -0
  4. package/dist/{binding-connection-CF7BmrDk.js → binding-connection-E6uDsPlx.js} +2 -2
  5. package/dist/{bounded-turn-DRC3hcjm.js → bounded-turn-wzJrwKKe.js} +8 -9
  6. package/dist/{capabilities-D6m_TdVy.js → capabilities-dIjNVCYH.js} +1 -1
  7. package/dist/cli-metadata.js +1 -1
  8. package/dist/{command-formatters--UToCokS.js → command-formatters-CLHhEB1Q.js} +3 -3
  9. package/dist/{command-handlers-CLFx2Ypa.js → command-handlers-CTGb2csu.js} +54 -55
  10. package/dist/{compact-5xqW1oCh.js → compact-_t0HQrUS.js} +33 -25
  11. package/dist/{config-CcYL77O6.js → config-BhmfC1s6.js} +12 -8
  12. package/dist/{context-compaction-activity-BOeJf7yo.js → context-compaction-activity-CMla5FPJ.js} +4 -1
  13. package/dist/doctor-contract-api.js +31 -4
  14. package/dist/{dynamic-tools-BmeXjwNZ.js → dynamic-tools-BU9tmlYm.js} +448 -457
  15. package/dist/{effective-mcp-catalog-XXQKgK1U.js → effective-mcp-catalog-DzYBW4h1.js} +2 -2
  16. package/dist/{event-projector-assistant-message-C5-Ds8mA.js → event-projector-assistant-message-DHRFXKbS.js} +4 -4
  17. package/dist/{event-projector-usage-B2r5vhWH.js → event-projector-usage-C5mcrGjp.js} +9 -137
  18. package/dist/{harness-BgeB7LnD.js → harness-DXVZ5II5.js} +13 -13
  19. package/dist/harness.js +1 -1
  20. package/dist/index.js +323 -313
  21. package/dist/{isolated-completion-CxTus3vZ.js → isolated-completion-kg9kv4iH.js} +4 -4
  22. package/dist/{launch-args-sXOAg0SX.js → launch-args-RXQwn8zV.js} +7 -1
  23. package/dist/{managed-binary-ZkGodW19.js → managed-binary-4-Vjz5GH.js} +14 -9
  24. package/dist/media-understanding-provider.js +1 -1
  25. package/dist/{model-catalog-DULBcniB.js → model-catalog-CUM68Hkl.js} +11 -11
  26. package/dist/{models-DaWfETQk.js → models-sYnEc0gd.js} +3 -3
  27. package/dist/{native-subagent-monitor-vXYUZH37.js → native-subagent-monitor-CnH147jH.js} +3 -3
  28. package/dist/{node-exec-server.runtime-DirKVZ5h.js → node-exec-server.runtime-CstNHCmC.js} +2 -2
  29. package/dist/{plugin-approval-roundtrip-CCWQGlAI.js → plugin-approval-roundtrip-CNe-Xrjx.js} +29 -3
  30. package/dist/{plugin-marketplace-discovery-BXjIFEiw.js → plugin-marketplace-discovery-CfFlKqDl.js} +6 -6
  31. package/dist/{plugin-metadata-cache-DQQm4gWT.js → plugin-metadata-cache-BFrPhb2c.js} +5 -5
  32. package/dist/provider-capabilities-DW5p4k9w.js +101 -0
  33. package/dist/{rate-limits-BqHEHXQJ.js → rate-limits-CawQJfUS.js} +1 -1
  34. package/dist/{request-BWxweEdK.js → request-DYAI5FQE.js} +18 -6
  35. package/dist/{run-attempt-BVLE4Gbi.js → run-attempt-D1hJO4fX.js} +483 -1865
  36. package/dist/{runtime-artifact-D9pYp4zL.js → runtime-artifact-C3jVimFn.js} +19 -12
  37. package/dist/{session-binding-D0zinCP1.js → session-binding-BHuTCRZQ.js} +8 -10
  38. package/dist/{session-catalog-eMhVm0Ql.js → session-catalog-yyvTWFOw.js} +138 -116
  39. package/dist/{session-cli-B2lyjJA0.js → session-cli-CmFEXMAM.js} +1 -1
  40. package/dist/session-initialization-BeWzjGiR.js +74 -0
  41. package/dist/{session-permission-policy-ScnAyG90.js → session-permission-policy-DeWVTCMj.js} +2 -2
  42. package/dist/{session-retirement-CtUtUTr9.js → session-retirement-BujDjXVF.js} +16 -9
  43. package/dist/{session-upstream-marker-gqrYIRHk.js → session-upstream-marker-C351-5Qw.js} +18 -2
  44. package/dist/{settled-turn-context-Bk3IUwod.js → settled-turn-context-D3SNWtUn.js} +6 -28
  45. package/dist/{settled-turn-finalizer-BXLN9PfJ.js → settled-turn-finalizer-BVJx4yoc.js} +5 -5
  46. package/dist/{shared-client-B1tT5U6r.js → shared-client-DxcfF9KX.js} +2748 -101
  47. package/dist/{side-question-CZ-mCw-t.js → side-question-BTZAII4l.js} +97 -63
  48. package/dist/{thread-lifecycle-CGGKP720.js → thread-lifecycle-DAcEJ_Om.js} +2039 -1487
  49. package/dist/{thread-ownership-RkaoZCmQ.js → thread-ownership-zGokd8i1.js} +10 -9
  50. package/dist/thread-policy-g4KbJPzp.js +54 -0
  51. package/dist/{thread-resume-BFt1-ZDa.js → thread-resume-C7pyVKeW.js} +15 -7
  52. package/dist/{transcript-mirror-1ep4XjzF.js → transcript-mirror-DTUxFWa_.js} +47 -10
  53. package/dist/{transport-stdio-NT_Dpd9V.js → transport-stdio-CyPldczm.js} +3 -1
  54. package/dist/upstream-session-fork-CYlBIGVt.js +966 -0
  55. package/dist/{usage-DUhd58gI.js → usage-Bj-rrzkR.js} +3 -3
  56. package/dist/{web-search-provider.runtime-BEmlE7ov.js → web-search-provider.runtime-D2FWSK4w.js} +3 -3
  57. package/openclaw.plugin.json +0 -30
  58. package/package.json +5 -5
  59. package/dist/protocol-validators-Bg5rpNxk.js +0 -2542
  60. package/dist/session-catalog-home-id-Dt2GiG5o.js +0 -112
  61. package/dist/upstream-session-fork-Dc8BFExw.js +0 -312
@@ -0,0 +1,634 @@
1
+ import { $t as isJsonObject, Qt as flattenCodexDynamicToolFunctions } from "./shared-client-DxcfF9KX.js";
2
+ import { ct as isMessageOnlyCodexSourceReply, et as areCodexDynamicToolFingerprintsCompatible, mt as isContextEngineBindingCompatible } from "./thread-lifecycle-DAcEJ_Om.js";
3
+ import { n as readCodexMirroredSessionHistoryMessages } from "./session-history-C5J1AKzG.js";
4
+ import { readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
+ import path from "node:path";
6
+ import { buildBootstrapContextForFiles, buildWatchedSessionsHarnessContext, embeddedAgentLog, resolveBootstrapFilesForRun } from "openclaw/plugin-sdk/agent-harness-runtime";
7
+ import { createHash } from "node:crypto";
8
+ import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
9
+ import { resolveBootstrapFilesForPreparation } from "openclaw/plugin-sdk/codex-mcp-projection";
10
+ import { prepareMemorySystemPromptAddition } from "openclaw/plugin-sdk/core";
11
+ import { MESSAGE_TOOL_DELIVERY_HINTS } from "openclaw/plugin-sdk/message-tool-delivery-hints";
12
+ //#region extensions/codex/src/app-server/attempt-context.ts
13
+ /**
14
+ * Builds Codex app-server prompt context, workspace bootstrap injections,
15
+ * system-prompt reports, and context-engine projection decisions.
16
+ */
17
+ const CODEX_NATIVE_PROJECT_DOC_BASENAMES = /* @__PURE__ */ new Set(["agents.md"]);
18
+ const CODEX_TURN_SCOPED_WORKSPACE_DEVELOPER_CONTEXT_BASENAMES = /* @__PURE__ */ new Set([
19
+ "identity.md",
20
+ "soul.md",
21
+ "user.md"
22
+ ]);
23
+ const CODEX_WORKSPACE_DEVELOPER_CONTEXT_BASENAMES = new Set(CODEX_TURN_SCOPED_WORKSPACE_DEVELOPER_CONTEXT_BASENAMES);
24
+ const CODEX_MEMORY_CONTEXT_BASENAME = "memory.md";
25
+ const CODEX_MEMORY_TOOL_NAMES = /* @__PURE__ */ new Set(["memory_search", "memory_get"]);
26
+ const CODEX_BOOTSTRAP_CONTEXT_ORDER = /* @__PURE__ */ new Map([
27
+ ["soul.md", 10],
28
+ ["identity.md", 20],
29
+ ["user.md", 30],
30
+ ["bootstrap.md", 50],
31
+ ["memory.md", 60]
32
+ ]);
33
+ /** Reads mirrored Codex session history for harness hooks. */
34
+ async function readMirroredSessionHistoryMessages(params) {
35
+ const { admission, ...target } = params;
36
+ const messages = await readCodexMirroredSessionHistoryMessages(target, admission, "model-context");
37
+ if (!messages) embeddedAgentLog.warn("failed to read mirrored session history for codex harness hooks", { sessionFile: params.sessionFile });
38
+ return messages;
39
+ }
40
+ /** Reads a valid thread-bootstrap projection request from context-engine output. */
41
+ function readContextEngineThreadBootstrapProjection(projection) {
42
+ if (projection?.mode !== "thread_bootstrap") return;
43
+ const epoch = projection.epoch?.trim();
44
+ if (!epoch) {
45
+ embeddedAgentLog.warn("context engine requested Codex thread-bootstrap projection without an epoch; using per-turn projection");
46
+ return;
47
+ }
48
+ const fingerprint = projection.fingerprint?.trim();
49
+ return {
50
+ mode: "thread_bootstrap",
51
+ epoch,
52
+ ...fingerprint ? { fingerprint } : {}
53
+ };
54
+ }
55
+ /**
56
+ * Decides whether an existing Codex thread can reuse its context-engine
57
+ * bootstrap projection or must be reprojected.
58
+ */
59
+ function resolveContextEngineBootstrapProjectionDecision(params) {
60
+ const bindingProjection = params.startupBinding?.contextEngine?.projection;
61
+ if (!params.startupBinding?.threadId || !bindingProjection) return {
62
+ project: true,
63
+ reason: !params.startupBinding?.threadId ? "missing-thread-binding" : "missing-projection-binding"
64
+ };
65
+ if (!params.expectedBinding || !isContextEngineBindingCompatible(params.startupBinding.contextEngine, params.expectedBinding)) return {
66
+ project: true,
67
+ reason: "context-engine-binding-mismatch"
68
+ };
69
+ if (!areCodexDynamicToolFingerprintsCompatible({
70
+ previous: params.startupBinding.dynamicToolsFingerprint,
71
+ next: params.dynamicToolsFingerprint,
72
+ nextLegacy: params.legacyDynamicToolsFingerprint
73
+ })) return {
74
+ project: true,
75
+ reason: "dynamic-tools-mismatch"
76
+ };
77
+ return bindingProjection.mode !== "thread_bootstrap" || bindingProjection.epoch !== params.projection.epoch || bindingProjection.fingerprint !== params.projection.fingerprint ? {
78
+ project: true,
79
+ reason: "projection-mismatch"
80
+ } : {
81
+ project: false,
82
+ reason: "matching-thread-bootstrap-binding"
83
+ };
84
+ }
85
+ /**
86
+ * Loads workspace bootstrap files and partitions them into Codex-native prompt,
87
+ * developer-instruction, heartbeat, and memory-tool contexts.
88
+ */
89
+ /** A child baseline reads the bounded workspace snapshot without invoking admission hooks. */
90
+ async function prepareCodexWorkspaceDeveloperInstructions(params) {
91
+ if (isSameCodexWorkspacePath(params.workspaceDir, params.cwd)) return;
92
+ const files = await resolveBootstrapFilesForPreparation(params);
93
+ return renderCodexWorkspaceDeveloperInstructions({
94
+ files: selectCodexWorkspaceAgentProjectInstructionFiles(buildBootstrapContextForFiles(files, {
95
+ config: params.config,
96
+ agentId: params.agentId
97
+ }), params.workspaceDir),
98
+ header: "## OpenClaw Agent Workspace Instructions",
99
+ preamble: "OpenClaw loaded this bounded snapshot from the configured agent workspace."
100
+ });
101
+ }
102
+ async function buildCodexWorkspaceBootstrapContext(params) {
103
+ try {
104
+ const inheritsAgentWorkspace = (params.executionWorkspace ?? params.resolvedWorkspace) !== params.resolvedWorkspace;
105
+ const promptWorkspace = inheritsAgentWorkspace ? params.resolvedWorkspace : params.effectiveWorkspace;
106
+ const memoryToolsAvailable = params.memoryToolNames.length > 0 && canRouteCodexWorkspaceMemoryThroughTools({
107
+ config: params.params.config,
108
+ agentId: params.params.agentId ?? params.sessionAgentId,
109
+ workspaceDir: inheritsAgentWorkspace ? params.resolvedWorkspace : params.effectiveWorkspace
110
+ });
111
+ const bootstrapFiles = await resolveBootstrapFilesForRun({
112
+ workspaceDir: params.resolvedWorkspace,
113
+ config: params.params.config,
114
+ sessionKey: params.sessionKey,
115
+ sessionId: params.params.sessionId,
116
+ chatType: params.params.chatType,
117
+ agentId: params.params.agentId ?? params.sessionAgentId,
118
+ warn: (message) => embeddedAgentLog.warn(message),
119
+ contextMode: params.params.bootstrapContextMode,
120
+ runKind: params.params.bootstrapContextRunKind
121
+ });
122
+ const memoryToolRoutedBootstrapFiles = memoryToolsAvailable ? selectCodexWorkspaceMemoryReferenceFiles({
123
+ bootstrapFiles,
124
+ workspaceDir: params.resolvedWorkspace
125
+ }) : [];
126
+ const memoryReferenceFiles = memoryToolRoutedBootstrapFiles.map((file) => remapCodexContextFilePath({
127
+ file: toCodexEmbeddedContextFile(file),
128
+ sourceWorkspaceDir: params.resolvedWorkspace,
129
+ targetWorkspaceDir: promptWorkspace
130
+ }));
131
+ const contextFiles = buildBootstrapContextForFiles(memoryToolsAvailable ? bootstrapFiles.filter((file) => !isCodexWorkspaceRootMemoryBootstrapFile({
132
+ file,
133
+ workspaceDir: params.resolvedWorkspace
134
+ })) : bootstrapFiles, {
135
+ config: params.params.config,
136
+ agentId: params.params.agentId ?? params.sessionAgentId,
137
+ warn: (message) => embeddedAgentLog.warn(message)
138
+ }).map((file) => remapCodexContextFilePath({
139
+ file,
140
+ sourceWorkspaceDir: params.resolvedWorkspace,
141
+ targetWorkspaceDir: promptWorkspace
142
+ }));
143
+ const promptContextFiles = selectCodexWorkspacePromptContextFiles(contextFiles, {
144
+ excludeMemory: memoryToolsAvailable,
145
+ memoryWorkspaceDir: params.effectiveWorkspace
146
+ });
147
+ const injectOpenClawContext = shouldInjectCodexOpenClawPromptContext(params.params);
148
+ const restrictedProjectDocNeedsOpenClawCarrier = params.params.pluginHarnessToolPolicyRestricted === true && !params.params.disableTools && !isMessageOnlyCodexSourceReply(params.params) && params.params.bootstrapContextMode !== "lightweight";
149
+ const threadDeveloperInstructionFiles = injectOpenClawContext && !params.ringZeroActive && (inheritsAgentWorkspace || restrictedProjectDocNeedsOpenClawCarrier) ? selectCodexWorkspaceAgentProjectInstructionFiles(contextFiles, params.resolvedWorkspace) : [];
150
+ const turnScopedDeveloperInstructionFiles = injectOpenClawContext ? selectCodexWorkspaceTurnScopedDeveloperInstructionFiles(contextFiles) : [];
151
+ return {
152
+ bootstrapFiles,
153
+ contextFiles,
154
+ inheritsAgentWorkspace,
155
+ promptContextFiles,
156
+ threadDeveloperInstructionFiles,
157
+ turnScopedDeveloperInstructionFiles,
158
+ memoryReferenceFiles,
159
+ memoryToolRoutedBootstrapFiles,
160
+ memoryToolNames: [...params.memoryToolNames],
161
+ memoryToolRouted: memoryToolsAvailable,
162
+ promptContext: renderCodexWorkspaceBootstrapPromptContext(promptContextFiles),
163
+ threadDeveloperInstructions: renderCodexWorkspaceDeveloperInstructions({
164
+ files: threadDeveloperInstructionFiles,
165
+ header: "## OpenClaw Agent Workspace Instructions",
166
+ preamble: "OpenClaw loaded this bounded snapshot from the configured agent workspace."
167
+ }),
168
+ turnScopedDeveloperInstructions: renderCodexWorkspaceCollaborationDeveloperInstructions(turnScopedDeveloperInstructionFiles),
169
+ memoryCollaborationInstructions: shouldInjectCodexOpenClawPromptContext(params.params) ? await renderCodexWorkspaceMemoryCollaborationInstructions({
170
+ files: memoryReferenceFiles,
171
+ toolNames: params.memoryToolNames,
172
+ memoryToolRouted: memoryToolsAvailable,
173
+ citationsMode: params.params.config?.memory?.citations,
174
+ agentId: params.params.agentId ?? params.sessionAgentId,
175
+ agentSessionKey: params.sessionKey,
176
+ sandboxed: params.sandboxed
177
+ }) : void 0
178
+ };
179
+ } catch (error) {
180
+ embeddedAgentLog.warn("failed to load codex workspace bootstrap instructions", { error });
181
+ return {
182
+ bootstrapFiles: [],
183
+ contextFiles: [],
184
+ inheritsAgentWorkspace: false
185
+ };
186
+ }
187
+ }
188
+ /**
189
+ * Builds the prompt-size, bootstrap-file, skill, and tool-schema accounting
190
+ * report for a Codex run.
191
+ */
192
+ function buildCodexSystemPromptReport(params) {
193
+ const toolEntries = flattenCodexDynamicToolFunctions(params.tools).map(buildCodexToolReportEntry);
194
+ const schemaChars = toolEntries.reduce((sum, tool) => sum + tool.schemaChars, 0);
195
+ const skillsPrompt = params.skillsPrompt.trim();
196
+ const bootstrapMaxChars = readPositiveNumber(params.attempt.config?.agents?.defaults?.bootstrapMaxChars);
197
+ const bootstrapTotalMaxChars = readPositiveNumber(params.attempt.config?.agents?.defaults?.bootstrapTotalMaxChars);
198
+ return {
199
+ source: "run",
200
+ generatedAt: Date.now(),
201
+ sessionId: params.attempt.sessionId,
202
+ sessionKey: params.sessionKey,
203
+ provider: params.attempt.provider,
204
+ model: params.attempt.modelId,
205
+ workspaceDir: params.workspaceDir,
206
+ ...bootstrapMaxChars ? { bootstrapMaxChars } : {},
207
+ ...bootstrapTotalMaxChars ? { bootstrapTotalMaxChars } : {},
208
+ systemPrompt: {
209
+ chars: params.developerInstructions.length,
210
+ projectContextChars: 0,
211
+ nonProjectContextChars: params.developerInstructions.length,
212
+ hash: sha256Text(params.developerInstructions)
213
+ },
214
+ injectedWorkspaceFiles: buildCodexBootstrapInjectionStats({
215
+ bootstrapFiles: params.workspaceBootstrapContext.bootstrapFiles,
216
+ injectedFiles: params.workspaceBootstrapContext.promptContextFiles ?? [],
217
+ developerInstructionFiles: [...params.workspaceBootstrapContext.threadDeveloperInstructionFiles ?? [], ...params.workspaceBootstrapContext.turnScopedDeveloperInstructionFiles ?? []],
218
+ memoryToolRoutedBootstrapFiles: params.workspaceBootstrapContext.memoryToolRoutedBootstrapFiles ?? [],
219
+ memoryToolRouted: params.workspaceBootstrapContext.memoryToolRouted === true
220
+ }),
221
+ skills: {
222
+ promptChars: skillsPrompt.length,
223
+ hash: sha256Text(skillsPrompt),
224
+ entries: buildCodexSkillReportEntries(skillsPrompt)
225
+ },
226
+ tools: {
227
+ listChars: 0,
228
+ schemaChars,
229
+ entries: toolEntries
230
+ }
231
+ };
232
+ }
233
+ function buildCodexSkillReportEntries(skillsPrompt) {
234
+ if (!skillsPrompt) return [];
235
+ return Array.from(skillsPrompt.matchAll(/<skill>[\s\S]*?<\/skill>/gi)).map((match) => match[0] ?? "").map((block) => ({
236
+ name: block.match(/<name>\s*([^<]+?)\s*<\/name>/i)?.[1]?.trim() || "(unknown)",
237
+ blockChars: block.length
238
+ })).filter((entry) => entry.blockChars > 0);
239
+ }
240
+ function buildCodexToolReportEntry(tool) {
241
+ const summary = tool.description.trim();
242
+ if (tool.deferLoading === true) return {
243
+ name: tool.name,
244
+ summaryChars: summary.length,
245
+ summaryHash: sha256Text(summary),
246
+ schemaChars: 0,
247
+ schemaHash: stableJsonHash(null),
248
+ propertiesCount: null
249
+ };
250
+ return {
251
+ name: tool.name,
252
+ summaryChars: summary.length,
253
+ summaryHash: sha256Text(summary),
254
+ ...buildCodexToolSchemaStats(tool.inputSchema)
255
+ };
256
+ }
257
+ function buildCodexToolSchemaStats(schema) {
258
+ const schemaChars = (() => {
259
+ try {
260
+ return JSON.stringify(schema).length;
261
+ } catch {
262
+ return 0;
263
+ }
264
+ })();
265
+ const properties = isJsonObject(schema) && isJsonObject(schema.properties) ? schema.properties : null;
266
+ return {
267
+ schemaChars,
268
+ schemaHash: stableJsonHash(schema),
269
+ propertiesCount: properties ? Object.keys(properties).length : null
270
+ };
271
+ }
272
+ function sha256Text(value) {
273
+ return createHash("sha256").update(value).digest("hex");
274
+ }
275
+ function normalizeForStableHash(value) {
276
+ if (Array.isArray(value)) return value.map((entry) => normalizeForStableHash(entry));
277
+ if (value && typeof value === "object") {
278
+ const record = value;
279
+ return Object.fromEntries(Object.keys(record).toSorted((left, right) => left.localeCompare(right)).map((key) => [key, normalizeForStableHash(record[key])]));
280
+ }
281
+ return value;
282
+ }
283
+ function stableJsonHash(value) {
284
+ return sha256Text(JSON.stringify(normalizeForStableHash(value)) ?? "null");
285
+ }
286
+ function buildCodexBootstrapInjectionStats(params) {
287
+ const injectedIndex = indexCodexContextFileContent(params.injectedFiles);
288
+ const developerInstructionIndex = indexCodexContextFileContent(params.developerInstructionFiles ?? []);
289
+ const memoryToolRoutedPaths = new Set((params.memoryToolRoutedBootstrapFiles ?? []).map((file) => readNonBlankString(file.path)).filter(isNonEmptyString).map(normalizeCodexContextFilePath));
290
+ return params.bootstrapFiles.map((file) => {
291
+ const fileName = readNonBlankString(file.name);
292
+ const pathValue = readNonBlankString(file.path) ?? fileName ?? "";
293
+ const displayName = (fileName ?? getCodexContextFileDisplayBasename(pathValue)) || pathValue;
294
+ const baseName = getCodexContextFileBasename(pathValue || fileName || "");
295
+ const rawChars = file.missing ? 0 : (file.content ?? "").trimEnd().length;
296
+ const memoryToolRoutedFile = baseName === CODEX_MEMORY_CONTEXT_BASENAME && params.memoryToolRouted === true && memoryToolRoutedPaths.has(normalizeCodexContextFilePath(pathValue));
297
+ const injected = memoryToolRoutedFile ? void 0 : readCodexIndexedContextFileContent(injectedIndex, pathValue, fileName) ?? readCodexIndexedContextFileContent(developerInstructionIndex, pathValue, fileName);
298
+ if (!file.missing && injected === void 0 && CODEX_NATIVE_PROJECT_DOC_BASENAMES.has(baseName)) return {
299
+ name: displayName,
300
+ path: pathValue,
301
+ missing: false,
302
+ rawChars,
303
+ injectionStatus: "native_unverified",
304
+ injectedChars: null,
305
+ truncated: null
306
+ };
307
+ const injectedChars = memoryToolRoutedFile ? 0 : injected?.length ?? 0;
308
+ const truncated = memoryToolRoutedFile ? false : !file.missing && injectedChars < rawChars;
309
+ return {
310
+ name: displayName,
311
+ path: pathValue,
312
+ missing: file.missing,
313
+ rawChars,
314
+ injectedChars,
315
+ truncated
316
+ };
317
+ });
318
+ }
319
+ function indexCodexContextFileContent(files) {
320
+ const byPath = /* @__PURE__ */ new Map();
321
+ const byBaseName = /* @__PURE__ */ new Map();
322
+ for (const file of files) {
323
+ const pathValue = readNonBlankString(file.path);
324
+ if (!pathValue) continue;
325
+ if (!byPath.has(pathValue)) byPath.set(pathValue, file.content);
326
+ const baseName = getCodexContextFileBasename(pathValue);
327
+ if (baseName && !byBaseName.has(baseName)) byBaseName.set(baseName, file.content);
328
+ }
329
+ return {
330
+ byPath,
331
+ byBaseName
332
+ };
333
+ }
334
+ function readCodexIndexedContextFileContent(index, pathValue, fileName) {
335
+ const pathContent = index.byPath.get(pathValue);
336
+ if (pathContent !== void 0) return pathContent;
337
+ if (fileName) {
338
+ const nameContent = index.byPath.get(fileName);
339
+ if (nameContent !== void 0) return nameContent;
340
+ }
341
+ const baseName = getCodexContextFileBasename(fileName ?? pathValue);
342
+ return baseName ? index.byBaseName.get(baseName) : void 0;
343
+ }
344
+ function readPositiveNumber(value) {
345
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : void 0;
346
+ }
347
+ /**
348
+ * Builds OpenClaw-provided workspace prompt context for the current Codex turn.
349
+ */
350
+ function buildCodexOpenClawPromptContext(params) {
351
+ if (!shouldInjectCodexOpenClawPromptContext(params.params)) return;
352
+ const sections = [params.workspacePromptContext?.trim() ? [
353
+ "## OpenClaw Workspace Context",
354
+ "",
355
+ params.workspacePromptContext.trim()
356
+ ].join("\n") : void 0, params.watchedSessionsContext?.trim() || void 0].filter(isNonEmptyString);
357
+ if (sections.length === 0) return;
358
+ return [
359
+ "OpenClaw runtime context for this turn:",
360
+ "Treat this OpenClaw-provided context as supporting project/user reference for the current request.",
361
+ "",
362
+ ...sections
363
+ ].join("\n");
364
+ }
365
+ /**
366
+ * Renders the watched-sessions block for the Codex per-turn runtime context.
367
+ * Codex builds its own instruction layers, so the embedded prompt's Watched
368
+ * Sessions section must be re-surfaced here or Codex-backed main sessions
369
+ * keep refusing cross-session questions (openclaw#114797).
370
+ */
371
+ function buildCodexWatchedSessionsContext(params) {
372
+ if (!shouldInjectCodexOpenClawPromptContext(params.attempt)) return;
373
+ return buildWatchedSessionsHarnessContext({
374
+ config: params.attempt.config,
375
+ sessionKey: params.sessionKey,
376
+ sandboxed: params.sandboxed,
377
+ toolNames: flattenCodexDynamicToolFunctions(params.dynamicTools).map((tool) => normalizeCodexDynamicToolName(tool.name))
378
+ });
379
+ }
380
+ function shouldInjectCodexOpenClawPromptContext(params) {
381
+ return !(params.bootstrapContextMode === "lightweight" && params.bootstrapContextRunKind === "cron");
382
+ }
383
+ /** Renders loaded OpenClaw skill prompts as Codex collaboration instructions. */
384
+ function renderCodexSkillsCollaborationInstructions(params) {
385
+ if (!shouldInjectCodexOpenClawPromptContext(params.attempt)) return;
386
+ return params.skillsPrompt?.trim() ? [
387
+ "## OpenClaw Skills",
388
+ "",
389
+ params.skillsPrompt.trim()
390
+ ].join("\n") : void 0;
391
+ }
392
+ /**
393
+ * Prepends OpenClaw context while preserving leading delivery metadata as
394
+ * routing guidance instead of user request text.
395
+ */
396
+ function prependCodexOpenClawPromptContext(prompt, context, options = {}) {
397
+ const { deliveryHint, prompt: promptWithoutDeliveryHint } = splitLeadingCodexDeliveryHint(prompt);
398
+ if (!context?.trim() && (!deliveryHint || options.preservePromptWithoutContext)) return prompt;
399
+ const promptSection = promptWithoutDeliveryHint.startsWith("OpenClaw assembled context for this turn:") ? promptWithoutDeliveryHint : ["Current user request:", promptWithoutDeliveryHint].join("\n");
400
+ const deliverySection = deliveryHint ? [
401
+ "OpenClaw delivery metadata:",
402
+ "This delivery metadata is runtime routing guidance, not the user's request.",
403
+ deliveryHint
404
+ ].join("\n") : void 0;
405
+ return [
406
+ context?.trim(),
407
+ deliverySection,
408
+ promptSection
409
+ ].filter(Boolean).join("\n\n");
410
+ }
411
+ /**
412
+ * Maps the surviving user-request portion of an input range after delivery
413
+ * metadata has been relocated before the request.
414
+ */
415
+ function resolveCodexDeliveryHintPreservedInputRange(params) {
416
+ const { prompt, promptInputRange, decoratedPrompt } = params;
417
+ const { deliveryHint, prompt: promptWithoutDeliveryHint } = splitLeadingCodexDeliveryHint(prompt);
418
+ if (!deliveryHint || !promptInputRange || promptInputRange.start < 0 || promptInputRange.end < promptInputRange.start || promptInputRange.end > prompt.length || !decoratedPrompt.endsWith(promptWithoutDeliveryHint)) return;
419
+ const promptWithoutDeliveryHintStart = prompt.length - promptWithoutDeliveryHint.length;
420
+ const inputStart = Math.max(promptInputRange.start, promptWithoutDeliveryHintStart);
421
+ const inputEnd = Math.max(inputStart, Math.min(promptInputRange.end, promptWithoutDeliveryHint.length + promptWithoutDeliveryHintStart));
422
+ const decoratedPromptSuffixStart = decoratedPrompt.length - promptWithoutDeliveryHint.length;
423
+ const requestHeader = "Current user request:\n";
424
+ const requestHeaderStart = decoratedPromptSuffixStart - 22;
425
+ return {
426
+ start: inputStart === promptWithoutDeliveryHintStart && decoratedPrompt.slice(requestHeaderStart, decoratedPromptSuffixStart) === requestHeader ? requestHeaderStart : decoratedPromptSuffixStart + inputStart - promptWithoutDeliveryHintStart,
427
+ end: decoratedPromptSuffixStart + inputEnd - promptWithoutDeliveryHintStart
428
+ };
429
+ }
430
+ function splitLeadingCodexDeliveryHint(prompt) {
431
+ const trimmedStart = prompt.trimStart();
432
+ const matchedHint = MESSAGE_TOOL_DELIVERY_HINTS.find((hint) => trimmedStart.startsWith(hint));
433
+ if (!matchedHint) return { prompt };
434
+ return {
435
+ deliveryHint: matchedHint,
436
+ prompt: trimmedStart.slice(matchedHint.length).replace(/^\s*\n/, "").trimStart()
437
+ };
438
+ }
439
+ function renderCodexWorkspaceBootstrapPromptContext(contextFiles) {
440
+ const files = contextFiles;
441
+ if (files.length === 0) return;
442
+ const lines = [
443
+ "OpenClaw loaded these user-editable workspace files for the current turn. Codex loads project-local AGENTS.md natively. When execution uses another folder, OpenClaw supplies the agent workspace AGENTS.md as thread-level developer instructions. SOUL.md, IDENTITY.md, and USER.md remain turn-scoped collaboration instructions. Those files are not repeated here.",
444
+ "",
445
+ "# Project Context",
446
+ "",
447
+ "The following project context files have been loaded:"
448
+ ];
449
+ lines.push("");
450
+ for (const file of files) lines.push(`## ${file.path}`, "", file.content, "");
451
+ return lines.join("\n").trim();
452
+ }
453
+ function selectCodexWorkspacePromptContextFiles(contextFiles, options = {}) {
454
+ const excludeMemory = options.excludeMemory ?? true;
455
+ return contextFiles.filter((file) => {
456
+ const baseName = getCodexContextFileBasename(file.path);
457
+ return baseName && !CODEX_NATIVE_PROJECT_DOC_BASENAMES.has(baseName) && !CODEX_WORKSPACE_DEVELOPER_CONTEXT_BASENAMES.has(baseName) && (!excludeMemory || !isCodexWorkspaceRootMemoryContextFile({
458
+ file,
459
+ workspaceDir: options.memoryWorkspaceDir
460
+ })) && !isMissingCodexBootstrapContextFile(file);
461
+ }).toSorted(compareCodexContextFiles);
462
+ }
463
+ function selectCodexWorkspaceTurnScopedDeveloperInstructionFiles(contextFiles) {
464
+ return selectCodexWorkspaceDeveloperInstructionFiles(contextFiles, CODEX_TURN_SCOPED_WORKSPACE_DEVELOPER_CONTEXT_BASENAMES);
465
+ }
466
+ function selectCodexWorkspaceAgentProjectInstructionFiles(contextFiles, agentWorkspaceDir) {
467
+ const agentProjectDocPath = path.join(path.resolve(agentWorkspaceDir), "AGENTS.md");
468
+ return selectCodexWorkspaceDeveloperInstructionFiles(contextFiles, CODEX_NATIVE_PROJECT_DOC_BASENAMES).filter((file) => path.resolve(file.path) === agentProjectDocPath);
469
+ }
470
+ function selectCodexWorkspaceDeveloperInstructionFiles(contextFiles, basenames) {
471
+ return contextFiles.filter((file) => {
472
+ const baseName = getCodexContextFileBasename(file.path);
473
+ return baseName && basenames.has(baseName) && !isMissingCodexBootstrapContextFile(file) && file.content.trim().length > 0;
474
+ }).toSorted(compareCodexContextFiles);
475
+ }
476
+ function renderCodexWorkspaceCollaborationDeveloperInstructions(files) {
477
+ return renderCodexWorkspaceDeveloperInstructions({
478
+ files,
479
+ header: "## OpenClaw Agent Soul",
480
+ preamble: "OpenClaw loaded these workspace instruction files from the active agent workspace. They are the canonical definitions of who you are, how you think and work, and the human you work alongside. Internalize and follow them accordingly.",
481
+ wrapperTag: "AGENT_SOUL"
482
+ });
483
+ }
484
+ function renderCodexWorkspaceDeveloperInstructions(params) {
485
+ const { files, header, preamble, wrapperTag } = params;
486
+ if (files.length === 0) return;
487
+ const lines = [
488
+ header,
489
+ "",
490
+ preamble,
491
+ ""
492
+ ];
493
+ if (wrapperTag) lines.push(`<${wrapperTag}>`, "");
494
+ for (const file of files) lines.push(`### ${file.path}`, "", file.content, "");
495
+ if (wrapperTag) lines.push(`</${wrapperTag}>`);
496
+ return lines.join("\n").trim();
497
+ }
498
+ function selectCodexWorkspaceMemoryReferenceFiles(params) {
499
+ return params.bootstrapFiles.filter((file) => {
500
+ return isCodexWorkspaceRootMemoryBootstrapFile({
501
+ file,
502
+ workspaceDir: params.workspaceDir
503
+ }) && !file.missing && (file.content ?? "").trim().length > 0;
504
+ }).toSorted(compareCodexBootstrapFiles);
505
+ }
506
+ /**
507
+ * Renders a memory-file reference that points Codex at memory tools instead of
508
+ * embedding MEMORY.md contents.
509
+ */
510
+ function renderCodexWorkspaceMemoryReference(params) {
511
+ if (params.files.length === 0) return;
512
+ const lines = [
513
+ "## OpenClaw Workspace Memory",
514
+ "",
515
+ `MEMORY.md exists in the active agent workspace as a memory file, not an instruction file. OpenClaw does not paste its contents into native Codex turns; use ${(params.toolNames?.length ? params.toolNames : Array.from(CODEX_MEMORY_TOOL_NAMES)).join(" or ")} when durable memory is relevant and the tools are available.`,
516
+ ""
517
+ ];
518
+ for (const file of params.files) lines.push(`- ${file.path}`);
519
+ return lines.join("\n").trim();
520
+ }
521
+ async function renderCodexWorkspaceMemoryCollaborationInstructions(params) {
522
+ const sections = [params.memoryToolRouted ? await renderCodexMemoryRecallInstructions({
523
+ toolNames: params.toolNames,
524
+ citationsMode: params.citationsMode,
525
+ agentId: params.agentId,
526
+ agentSessionKey: params.agentSessionKey,
527
+ sandboxed: params.sandboxed
528
+ }) : void 0, renderCodexWorkspaceMemoryReference({
529
+ files: params.files,
530
+ toolNames: params.toolNames
531
+ })].filter(isNonEmptyString);
532
+ return sections.length > 0 ? sections.join("\n\n") : void 0;
533
+ }
534
+ async function renderCodexMemoryRecallInstructions(params) {
535
+ const availableTools = new Set(params.toolNames);
536
+ const memoryPrompt = await prepareMemorySystemPromptAddition({
537
+ availableTools,
538
+ citationsMode: params.citationsMode,
539
+ agentId: params.agentId,
540
+ agentSessionKey: params.agentSessionKey,
541
+ sandboxed: params.sandboxed
542
+ });
543
+ if (!memoryPrompt) return;
544
+ return [memoryPrompt, renderCodexMemoryToolSearchBridge(params.toolNames)].filter(isNonEmptyString).join("\n").trim();
545
+ }
546
+ function renderCodexMemoryToolSearchBridge(toolNames) {
547
+ const memoryToolNames = toolNames.map((name) => normalizeCodexDynamicToolName(name)).filter((name) => CODEX_MEMORY_TOOL_NAMES.has(name)).toSorted();
548
+ if (memoryToolNames.length === 0) return;
549
+ return `Codex may expose ${memoryToolNames.join(" and ")} as deferred tools. When the memory guidance above calls for memory recall, use an already-loaded memory tool directly. If the needed memory tool is deferred and not currently callable, use \`tool_search\` to load it, then call that memory tool.`;
550
+ }
551
+ /** Lists available memory tool names understood by Codex workspace memory routing. */
552
+ function getCodexWorkspaceMemoryToolNames(tools) {
553
+ const availableToolNames = new Set(flattenCodexDynamicToolFunctions(tools).map((tool) => normalizeCodexDynamicToolName(tool.name)));
554
+ return Array.from(CODEX_MEMORY_TOOL_NAMES).filter((name) => availableToolNames.has(name));
555
+ }
556
+ function canRouteCodexWorkspaceMemoryThroughTools(params) {
557
+ if (!params.config) return false;
558
+ return isSameCodexWorkspacePath(resolveAgentWorkspaceDir(params.config, params.agentId), params.workspaceDir);
559
+ }
560
+ function isMissingCodexBootstrapContextFile(file) {
561
+ return file.content.trimStart().startsWith("[MISSING] Expected at:");
562
+ }
563
+ function toCodexEmbeddedContextFile(file) {
564
+ return {
565
+ path: readNonBlankString(file.path) ?? readNonBlankString(file.name) ?? "",
566
+ content: file.content ?? ""
567
+ };
568
+ }
569
+ function isCodexWorkspaceRootMemoryBootstrapFile(params) {
570
+ return isCodexWorkspaceRootMemoryPath({
571
+ filePath: readNonBlankString(params.file.path) ?? readNonBlankString(params.file.name) ?? "",
572
+ workspaceDir: params.workspaceDir
573
+ });
574
+ }
575
+ function isCodexWorkspaceRootMemoryContextFile(params) {
576
+ if (!params.workspaceDir) return false;
577
+ return isCodexWorkspaceRootMemoryPath({
578
+ filePath: params.file.path,
579
+ workspaceDir: params.workspaceDir
580
+ });
581
+ }
582
+ function isCodexWorkspaceRootMemoryPath(params) {
583
+ const filePath = params.filePath.trim();
584
+ if (!filePath) return false;
585
+ return (path.isAbsolute(filePath) ? path.resolve(filePath) : path.resolve(params.workspaceDir, filePath)) === path.join(path.resolve(params.workspaceDir), "MEMORY.md");
586
+ }
587
+ function isSameCodexWorkspacePath(left, right) {
588
+ return path.resolve(left) === path.resolve(right);
589
+ }
590
+ /**
591
+ * Remaps bootstrap file paths from the resolved workspace to the effective Codex
592
+ * workspace while preserving platform path separators.
593
+ */
594
+ function remapCodexContextFilePath(params) {
595
+ const relativePath = path.relative(params.sourceWorkspaceDir, params.file.path);
596
+ if (!relativePath || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath) || params.sourceWorkspaceDir === params.targetWorkspaceDir) return params.file;
597
+ const targetUsesPosixSeparators = params.targetWorkspaceDir.includes("/") && !params.targetWorkspaceDir.includes("\\");
598
+ const normalizedRelativePath = targetUsesPosixSeparators ? relativePath.replaceAll("\\", "/") : relativePath.replaceAll("/", "\\");
599
+ return {
600
+ ...params.file,
601
+ path: targetUsesPosixSeparators ? path.posix.join(params.targetWorkspaceDir, normalizedRelativePath) : path.win32.join(params.targetWorkspaceDir, normalizedRelativePath)
602
+ };
603
+ }
604
+ function compareCodexContextFiles(left, right) {
605
+ const leftPath = normalizeCodexContextFilePath(left.path);
606
+ const rightPath = normalizeCodexContextFilePath(right.path);
607
+ const leftBase = getCodexContextFileBasename(left.path);
608
+ const rightBase = getCodexContextFileBasename(right.path);
609
+ const leftOrder = CODEX_BOOTSTRAP_CONTEXT_ORDER.get(leftBase) ?? Number.MAX_SAFE_INTEGER;
610
+ const rightOrder = CODEX_BOOTSTRAP_CONTEXT_ORDER.get(rightBase) ?? Number.MAX_SAFE_INTEGER;
611
+ if (leftOrder !== rightOrder) return leftOrder - rightOrder;
612
+ if (leftBase !== rightBase) return leftBase.localeCompare(rightBase);
613
+ return leftPath.localeCompare(rightPath);
614
+ }
615
+ function compareCodexBootstrapFiles(left, right) {
616
+ return compareCodexContextFiles(toCodexEmbeddedContextFile(left), toCodexEmbeddedContextFile(right));
617
+ }
618
+ function normalizeCodexContextFilePath(filePath) {
619
+ return filePath.trim().replaceAll("\\", "/").toLowerCase();
620
+ }
621
+ function getCodexContextFileDisplayBasename(filePath) {
622
+ return filePath.trim().replaceAll("\\", "/").split("/").pop()?.trim() ?? "";
623
+ }
624
+ function getCodexContextFileBasename(filePath) {
625
+ return normalizeCodexContextFilePath(filePath).split("/").pop() ?? "";
626
+ }
627
+ function normalizeCodexDynamicToolName(name) {
628
+ return name.trim().toLowerCase();
629
+ }
630
+ function isNonEmptyString(value) {
631
+ return typeof value === "string" && value.length > 0;
632
+ }
633
+ //#endregion
634
+ export { getCodexWorkspaceMemoryToolNames as a, readContextEngineThreadBootstrapProjection as c, resolveCodexDeliveryHintPreservedInputRange as d, resolveContextEngineBootstrapProjectionDecision as f, buildCodexWorkspaceBootstrapContext as i, readMirroredSessionHistoryMessages as l, buildCodexSystemPromptReport as n, prepareCodexWorkspaceDeveloperInstructions as o, buildCodexWatchedSessionsContext as r, prependCodexOpenClawPromptContext as s, buildCodexOpenClawPromptContext as t, renderCodexSkillsCollaborationInstructions as u };
@@ -1,5 +1,5 @@
1
- import { T as readCodexPluginConfig, i as resolveCodexAppServerRuntimeOptions, s as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-CcYL77O6.js";
2
- import { n as buildCodexAppServerConnectionFingerprint, o as resolveCodexCatalogConnectionHome } from "./thread-resume-BFt1-ZDa.js";
1
+ import { E as readCodexPluginConfig, i as resolveCodexAppServerRuntimeOptions, s as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-BhmfC1s6.js";
2
+ import { n as buildCodexAppServerConnectionFingerprint, o as resolveCodexCatalogConnectionHome } from "./thread-resume-C7pyVKeW.js";
3
3
  //#region extensions/codex/src/app-server/binding-connection.ts
4
4
  /** Requires the native model pair after a supervised pending branch has materialized. */
5
5
  function requireCodexSupervisionModelSelection(binding) {
@@ -1,11 +1,10 @@
1
- import { n as readCodexAppServerConfigOptions } from "./launch-args-sXOAg0SX.js";
2
- import { i as resolveCodexAppServerRuntimeOptions } from "./config-CcYL77O6.js";
3
- import { Ht as isJsonObject, et as createCodexElicitationResponse, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-B1tT5U6r.js";
4
- import { c as assertCodexTurnStartResponse, f as readCodexTurnCompletedNotification, s as assertCodexThreadStartResponse, u as readCodexErrorNotification } from "./protocol-validators-Bg5rpNxk.js";
5
- import { a as closeCodexStartupClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS, v as readCodexNotificationTurnId } from "./attempt-client-cleanup-CpVfwctT.js";
6
- import { b as isTerminalTurnStatus, n as normalizeCodexResponseTokenUsage, x as readCodexNotificationItem, y as isRetryableErrorNotification } from "./event-projector-usage-B2r5vhWH.js";
7
- import { r as readModelListResult } from "./models-DaWfETQk.js";
8
- import { _ as buildCodexRingZeroThreadConfigPatch, g as attestCodexRestrictedToolSurfaceMcpServersDisabled, h as assertCodexManagedRequirementsDoNotOverrideToolPolicy, ot as mergeCodexThreadConfigs, v as buildCodexRuntimeThreadConfig, y as readCodexInheritedMcpServerNames } from "./thread-lifecycle-CGGKP720.js";
1
+ import { $t as isJsonObject, at as readCodexTurnCompletedNotification, et as assertCodexThreadStartResponse, ot as createCodexElicitationResponse, rt as readCodexErrorNotification, tt as assertCodexTurnStartResponse, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-DxcfF9KX.js";
2
+ import { r as readCodexAppServerConfigOptions } from "./launch-args-RXQwn8zV.js";
3
+ import { i as resolveCodexAppServerRuntimeOptions } from "./config-BhmfC1s6.js";
4
+ import { _ as readCodexNotificationTurnId, a as closeCodexStartupClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-DYHcRQAa.js";
5
+ import { d as isTerminalTurnStatus, f as readCodexNotificationItem, n as normalizeCodexResponseTokenUsage, u as isRetryableErrorNotification } from "./event-projector-usage-C5mcrGjp.js";
6
+ import { r as readModelListResult } from "./models-sYnEc0gd.js";
7
+ import { Dt as mergeCodexThreadConfigs, G as attestCodexRestrictedToolSurfaceMcpServersDisabled, _ as buildCodexRingZeroThreadConfigPatch, b as readCodexInheritedMcpServerNames, g as assertCodexManagedRequirementsDoNotOverrideToolPolicy, v as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-DAcEJ_Om.js";
9
8
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
10
9
  import fs from "node:fs/promises";
11
10
  import path from "node:path";
@@ -77,7 +76,7 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
77
76
  config: params.config,
78
77
  timeoutMs,
79
78
  ...params.signal ? { abandonSignal: params.signal } : {}
80
- }) : await import("./shared-client-B1tT5U6r.js").then((n) => n.x).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
79
+ }) : await import("./shared-client-DxcfF9KX.js").then((n) => n.x).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
81
80
  startOptions,
82
81
  timeoutMs,
83
82
  ...authSelection,