@openclaw/codex 2026.5.12 → 2026.5.14-beta.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.
@@ -1,17 +1,17 @@
1
1
  import { l as resolveCodexPluginsPolicy, o as readCodexPluginConfig, s as resolveCodexAppServerRuntimeOptions, u as withMcpElicitationsApprovalPolicy } from "./config-0rd3LnKg.js";
2
2
  import { a as readCodexDynamicToolCallParams, c as readCodexTurn, i as assertCodexTurnStartResponse } from "./protocol-validators-CSY0BFBo.js";
3
3
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
4
- import { i as isCodexAppServerConnectionClosedError, r as isCodexAppServerApprovalRequest } from "./client-iRf11BEu.js";
5
- import { n as CODEX_CONTROL_METHODS } from "./request-ohCy5ASa.js";
6
- import { d as resolveCodexUsageLimitResetAtMs, f as shouldRefreshCodexRateLimitsForUsageLimitMessage, r as formatCodexDisplayText, u as formatCodexUsageLimitErrorMessage } from "./command-formatters-Ttwc_kgX.js";
7
- import { c as resolveCodexAppServerAuthProfileId, l as resolveCodexAppServerAuthProfileIdForAgent, o as refreshCodexAppServerAuthTokens, s as resolveCodexAppServerAuthAccountCacheKey, t as clearSharedCodexAppServerClientIfCurrent, u as resolveCodexAppServerEnvApiKeyCacheKey } from "./shared-client-Cr6W-a2G.js";
4
+ import { i as isCodexAppServerConnectionClosedError, r as isCodexAppServerApprovalRequest } from "./client-CoctX13d.js";
5
+ import { n as CODEX_CONTROL_METHODS } from "./request-BxAP1uyw.js";
6
+ import { d as resolveCodexUsageLimitResetAtMs, f as shouldRefreshCodexRateLimitsForUsageLimitMessage, r as formatCodexDisplayText, u as formatCodexUsageLimitErrorMessage } from "./command-formatters-CJH9-hFT.js";
7
+ import { c as resolveCodexAppServerAuthAccountCacheKey, d as resolveCodexAppServerEnvApiKeyCacheKey, l as resolveCodexAppServerAuthProfileId, n as clearSharedCodexAppServerClientIfCurrent, s as refreshCodexAppServerAuthTokens, u as resolveCodexAppServerAuthProfileIdForAgent } from "./shared-client-BwUqd3lh.js";
8
8
  import { i as readCodexAppServerBinding, t as clearCodexAppServerBinding } from "./session-binding-CMTXuyoz.js";
9
9
  import { a as defaultCodexAppInventoryCache } from "./plugin-activation-PXGqUjwY.js";
10
- import { t as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-B7eU8fNZ.js";
11
- import { _ as resolveCodexContextEngineProjectionReserveTokens, b as normalizeCodexDynamicToolName, d as buildCodexPluginThreadConfig, f as buildCodexPluginThreadConfigInputFingerprint, g as resolveCodexContextEngineProjectionMaxChars, h as projectContextEngineAssemblyForCodex, m as shouldBuildCodexPluginThreadConfig, o as buildTurnStartParams, p as mergeCodexThreadConfigs, r as buildDeveloperInstructions, s as codexDynamicToolsFingerprint, t as areCodexDynamicToolFingerprintsCompatible, u as startOrResumeThread, v as createCodexDynamicToolBridge, y as filterCodexDynamicTools } from "./thread-lifecycle-CJppEyYT.js";
12
- import { n as defaultCodexAppServerClientFactory } from "./client-factory-DfnbdQv7.js";
13
- import { n as handleCodexAppServerElicitationRequest, r as handleCodexAppServerApprovalRequest, t as filterToolsForVisionInputs } from "./vision-tools-DHyuabWn.js";
14
- import { t as ensureCodexComputerUse } from "./computer-use-Ct3ngNBt.js";
10
+ import { t as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-DBlqE0gO.js";
11
+ import { _ as resolveCodexContextEngineProjectionReserveTokens, b as normalizeCodexDynamicToolName, d as buildCodexPluginThreadConfig, f as buildCodexPluginThreadConfigInputFingerprint, g as resolveCodexContextEngineProjectionMaxChars, h as projectContextEngineAssemblyForCodex, m as shouldBuildCodexPluginThreadConfig, o as buildTurnStartParams, p as mergeCodexThreadConfigs, r as buildDeveloperInstructions, s as codexDynamicToolsFingerprint, t as areCodexDynamicToolFingerprintsCompatible, u as startOrResumeThread, v as createCodexDynamicToolBridge, y as filterCodexDynamicTools } from "./thread-lifecycle-B_oezv_0.js";
12
+ import { n as defaultCodexAppServerClientFactory } from "./client-factory-BB5hgnWH.js";
13
+ import { n as handleCodexAppServerElicitationRequest, r as handleCodexAppServerApprovalRequest, t as filterToolsForVisionInputs } from "./vision-tools-cbM0WkCZ.js";
14
+ import { t as ensureCodexComputerUse } from "./computer-use-DFdLwPQa.js";
15
15
  import { n as rememberCodexRateLimits, t as readRecentCodexRateLimits } from "./rate-limit-cache-BFi-50LG.js";
16
16
  import { createHash } from "node:crypto";
17
17
  import nodeFs from "node:fs";
@@ -490,6 +490,8 @@ var CodexAppServerEventProjector = class {
490
490
  this.options = options;
491
491
  this.assistantTextByItem = /* @__PURE__ */ new Map();
492
492
  this.assistantItemOrder = [];
493
+ this.assistantPhaseByItem = /* @__PURE__ */ new Map();
494
+ this.lastCommentaryProgressTextByItem = /* @__PURE__ */ new Map();
493
495
  this.reasoningTextByItem = /* @__PURE__ */ new Map();
494
496
  this.planTextByItem = /* @__PURE__ */ new Map();
495
497
  this.activeItemIds = /* @__PURE__ */ new Set();
@@ -694,6 +696,10 @@ var CodexAppServerEventProjector = class {
694
696
  this.rememberAssistantItem(itemId);
695
697
  const text = `${this.assistantTextByItem.get(itemId) ?? ""}${delta}`;
696
698
  this.assistantTextByItem.set(itemId, text);
699
+ if (this.isCommentaryAssistantItem(itemId)) this.emitCommentaryProgress({
700
+ itemId,
701
+ text
702
+ });
697
703
  }
698
704
  async handleReasoningDelta(params) {
699
705
  const itemId = readString$2(params, "itemId") ?? readString$2(params, "id") ?? "reasoning";
@@ -730,6 +736,7 @@ var CodexAppServerEventProjector = class {
730
736
  async handleItemStarted(params) {
731
737
  const item = readItem(params.item);
732
738
  const itemId = item?.id ?? readString$2(params, "itemId") ?? readString$2(params, "id");
739
+ this.rememberAssistantPhase(item);
733
740
  if (itemId) this.activeItemIds.add(itemId);
734
741
  if (item?.type === "contextCompaction" && itemId) {
735
742
  this.activeCompactionItemIds.add(itemId);
@@ -784,9 +791,14 @@ var CodexAppServerEventProjector = class {
784
791
  this.activeItemIds.delete(itemId);
785
792
  this.completedItemIds.add(itemId);
786
793
  }
794
+ this.rememberAssistantPhase(item);
787
795
  if (item?.type === "agentMessage" && typeof item.text === "string" && item.text) {
788
796
  this.rememberAssistantItem(item.id);
789
797
  this.assistantTextByItem.set(item.id, item.text);
798
+ if (this.isCommentaryAssistantItem(item.id)) this.emitCommentaryProgress({
799
+ itemId: item.id,
800
+ text: item.text
801
+ });
790
802
  }
791
803
  this.recordNativeGeneratedMedia(item);
792
804
  if (item?.type === "plan" && typeof item.text === "string" && item.text) {
@@ -914,6 +926,7 @@ var CodexAppServerEventProjector = class {
914
926
  this.promptErrorSource = "prompt";
915
927
  }
916
928
  for (const item of turn.items ?? []) {
929
+ this.rememberAssistantPhase(item);
917
930
  if (item.type === "agentMessage" && typeof item.text === "string" && item.text) {
918
931
  this.rememberAssistantItem(item.id);
919
932
  this.assistantTextByItem.set(item.id, item.text);
@@ -1006,6 +1019,30 @@ var CodexAppServerEventProjector = class {
1006
1019
  }
1007
1020
  });
1008
1021
  }
1022
+ rememberAssistantPhase(item) {
1023
+ if (item?.type !== "agentMessage") return;
1024
+ const phase = readItemString(item, "phase");
1025
+ if (phase) this.assistantPhaseByItem.set(item.id, phase);
1026
+ }
1027
+ isCommentaryAssistantItem(itemId) {
1028
+ return this.assistantPhaseByItem.get(itemId) === "commentary";
1029
+ }
1030
+ emitCommentaryProgress(params) {
1031
+ const progressText = params.text.replace(/\s+/g, " ").trim();
1032
+ if (!progressText || this.lastCommentaryProgressTextByItem.get(params.itemId) === progressText) return;
1033
+ this.lastCommentaryProgressTextByItem.set(params.itemId, progressText);
1034
+ this.emitAgentEvent({
1035
+ stream: "item",
1036
+ data: {
1037
+ itemId: params.itemId,
1038
+ kind: "preamble",
1039
+ title: "Preamble",
1040
+ phase: "update",
1041
+ progressText,
1042
+ source: "codex-app-server"
1043
+ }
1044
+ });
1045
+ }
1009
1046
  emitStandardItemEvent(params) {
1010
1047
  const { item } = params;
1011
1048
  if (!item) return;
@@ -1249,6 +1286,7 @@ var CodexAppServerEventProjector = class {
1249
1286
  const itemId = this.assistantItemOrder[i];
1250
1287
  if (!itemId) continue;
1251
1288
  const text = this.assistantTextByItem.get(itemId)?.trim();
1289
+ if (this.assistantPhaseByItem.get(itemId) === "commentary") continue;
1252
1290
  if (text && !this.toolProgressTexts.has(text)) return text;
1253
1291
  }
1254
1292
  }
@@ -2181,7 +2219,8 @@ function createCodexSteeringQueue(params) {
2181
2219
  }
2182
2220
  };
2183
2221
  const sendTexts = async (texts) => {
2184
- if (texts.length === 0 || params.signal.aborted) return;
2222
+ if (texts.length === 0) return;
2223
+ if (params.signal.aborted) throw new Error("codex app-server steering queue aborted");
2185
2224
  await params.client.request("turn/steer", {
2186
2225
  threadId: params.threadId,
2187
2226
  expectedTurnId: params.turnId,
@@ -2189,39 +2228,49 @@ function createCodexSteeringQueue(params) {
2189
2228
  });
2190
2229
  };
2191
2230
  const enqueueSend = (texts) => {
2192
- sendChain = sendChain.then(() => sendTexts(texts)).catch((error) => {
2231
+ const send = sendChain.then(() => sendTexts(texts));
2232
+ sendChain = send.catch((error) => {
2193
2233
  embeddedAgentLog.debug("codex app-server queued steer failed", { error });
2194
2234
  });
2195
- return sendChain;
2235
+ return send;
2196
2236
  };
2197
2237
  const flushBatch = () => {
2198
2238
  clearBatchTimer();
2199
- const texts = batchedTexts;
2239
+ const items = batchedTexts;
2200
2240
  batchedTexts = [];
2201
- return enqueueSend(texts);
2241
+ const send = enqueueSend(items.map((item) => item.text));
2242
+ send.then(() => {
2243
+ for (const item of items) item.resolve();
2244
+ }, (error) => {
2245
+ for (const item of items) item.reject(error);
2246
+ });
2247
+ return send;
2202
2248
  };
2203
2249
  return {
2204
2250
  async queue(text, options) {
2205
2251
  if (params.answerPendingUserInput(text)) return;
2206
- if (options?.steeringMode === "one-at-a-time") {
2207
- await flushBatch();
2208
- await enqueueSend([text]);
2209
- return;
2210
- }
2211
- batchedTexts.push(text);
2212
- clearBatchTimer();
2213
- const debounceMs = normalizeCodexSteerDebounceMs(options?.debounceMs);
2214
- batchTimer = setTimeout(() => {
2215
- batchTimer = void 0;
2216
- flushBatch();
2217
- }, debounceMs);
2252
+ return await new Promise((resolve, reject) => {
2253
+ batchedTexts.push({
2254
+ text,
2255
+ resolve,
2256
+ reject
2257
+ });
2258
+ clearBatchTimer();
2259
+ const debounceMs = normalizeCodexSteerDebounceMs(options?.debounceMs);
2260
+ batchTimer = setTimeout(() => {
2261
+ batchTimer = void 0;
2262
+ flushBatch().catch(() => void 0);
2263
+ }, debounceMs);
2264
+ });
2218
2265
  },
2219
2266
  async flushPending() {
2220
- await flushBatch();
2267
+ await flushBatch().catch(() => void 0);
2221
2268
  },
2222
2269
  cancel() {
2223
2270
  clearBatchTimer();
2271
+ const items = batchedTexts;
2224
2272
  batchedTexts = [];
2273
+ for (const item of items) item.reject(/* @__PURE__ */ new Error("codex app-server steering queue cancelled"));
2225
2274
  }
2226
2275
  };
2227
2276
  }
@@ -4118,7 +4167,7 @@ function renderCodexWorkspaceBootstrapInstructions(contextFiles) {
4118
4167
  }
4119
4168
  function remapCodexContextFilePath(params) {
4120
4169
  const relativePath = path.relative(params.sourceWorkspaceDir, params.file.path);
4121
- if (!relativePath || relativePath.startsWith("..") || path.isAbsolute(relativePath) || params.sourceWorkspaceDir === params.targetWorkspaceDir) return params.file;
4170
+ if (!relativePath || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath) || params.sourceWorkspaceDir === params.targetWorkspaceDir) return params.file;
4122
4171
  return {
4123
4172
  ...params.file,
4124
4173
  path: path.join(params.targetWorkspaceDir, relativePath)
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
2
  import { n as codexAppServerStartOptionsKey, s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
3
- import { a as MANAGED_CODEX_APP_SERVER_PACKAGE, o as resolveCodexAppServerSpawnEnv, t as CodexAppServerClient } from "./client-iRf11BEu.js";
3
+ import { a as MANAGED_CODEX_APP_SERVER_PACKAGE, o as resolveCodexAppServerSpawnEnv, t as CodexAppServerClient } from "./client-CoctX13d.js";
4
4
  import { createRequire } from "node:module";
5
5
  import { createHash } from "node:crypto";
6
6
  import { constants, readFileSync } from "node:fs";
7
7
  import fs, { access } from "node:fs/promises";
8
8
  import path from "node:path";
9
- import { ensureAuthProfileStore, ensureAuthProfileStoreWithoutExternalProfiles, loadAuthProfileStoreForSecretsRuntime, refreshOAuthCredentialForRuntime, resolveApiKeyForProfile, resolveAuthProfileOrder, resolveDefaultAgentDir, resolvePersistedAuthProfileOwnerAgentDir, resolveProviderIdForAuth, saveAuthProfileStore } from "openclaw/plugin-sdk/agent-runtime";
9
+ import { ensureAuthProfileStore, ensureAuthProfileStoreWithoutExternalProfiles, loadAuthProfileStoreForSecretsRuntime, refreshOAuthCredentialForRuntime, resolveApiKeyForProfile, resolveAuthProfileOrder, resolveDefaultAgentDir, resolvePersistedAuthProfileOwnerAgentDir, resolveProviderIdForAuth } from "openclaw/plugin-sdk/agent-runtime";
10
10
  import { fileURLToPath } from "node:url";
11
11
  import { withTimeout } from "openclaw/plugin-sdk/security-runtime";
12
12
  //#region extensions/codex/src/app-server/auth-bridge.ts
@@ -283,24 +283,17 @@ async function resolveOAuthCredentialForCodexAppServer(profileId, credential, pa
283
283
  const persistedOAuthCredential = persistedCredential?.type === "oauth" && isCodexAppServerAuthProvider(persistedCredential.provider, params.config) ? persistedCredential : void 0;
284
284
  const ownerCredential = store.profiles[profileId];
285
285
  const overlaidOAuthCredential = ownerCredential?.type === "oauth" && isCodexAppServerAuthProvider(ownerCredential.provider, params.config) ? ownerCredential : void 0;
286
- const credentialForOwner = persistedOAuthCredential ?? overlaidOAuthCredential ?? credential;
287
286
  if (params.forceRefresh && !persistedOAuthCredential && overlaidOAuthCredential) {
288
287
  const refreshedRuntimeCredential = await refreshOAuthCredentialForRuntime({ credential: overlaidOAuthCredential });
289
288
  if (!refreshedRuntimeCredential?.access?.trim()) throw new Error(`Codex app-server auth profile "${profileId}" could not refresh.`);
290
289
  store.profiles[profileId] = refreshedRuntimeCredential;
291
290
  return refreshedRuntimeCredential;
292
291
  }
293
- if (params.forceRefresh && persistedOAuthCredential) {
294
- store.profiles[profileId] = {
295
- ...credentialForOwner,
296
- expires: 0
297
- };
298
- saveAuthProfileStore(store, ownerAgentDir);
299
- }
300
292
  const resolved = await resolveApiKeyForProfile({
301
293
  store,
302
294
  profileId,
303
- agentDir: ownerAgentDir
295
+ agentDir: ownerAgentDir,
296
+ forceRefresh: params.forceRefresh && Boolean(persistedOAuthCredential)
304
297
  });
305
298
  const refreshed = loadAuthProfileStoreForSecretsRuntime(ownerAgentDir).profiles[profileId];
306
299
  const storedCredential = store.profiles[profileId];
@@ -601,4 +594,4 @@ function clearSharedClientIfCurrent(client) {
601
594
  state.key = void 0;
602
595
  }
603
596
  //#endregion
604
- export { withTimeout$1 as a, resolveCodexAppServerAuthProfileId as c, resolveCodexAppServerHomeDir as d, shared_client_exports as i, resolveCodexAppServerAuthProfileIdForAgent as l, createIsolatedCodexAppServerClient as n, refreshCodexAppServerAuthTokens as o, getSharedCodexAppServerClient as r, resolveCodexAppServerAuthAccountCacheKey as s, clearSharedCodexAppServerClientIfCurrent as t, resolveCodexAppServerEnvApiKeyCacheKey as u };
597
+ export { shared_client_exports as a, resolveCodexAppServerAuthAccountCacheKey as c, resolveCodexAppServerEnvApiKeyCacheKey as d, resolveCodexAppServerHomeDir as f, getSharedCodexAppServerClient as i, resolveCodexAppServerAuthProfileId as l, clearSharedCodexAppServerClientIfCurrent as n, withTimeout$1 as o, createIsolatedCodexAppServerClient as r, refreshCodexAppServerAuthTokens as s, clearSharedCodexAppServerClientAndWait as t, resolveCodexAppServerAuthProfileIdForAgent as u };
@@ -1,12 +1,12 @@
1
1
  import { o as readCodexPluginConfig, s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
2
2
  import { a as readCodexDynamicToolCallParams, i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, t as assertCodexThreadForkResponse } from "./protocol-validators-CSY0BFBo.js";
3
3
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
4
- import { r as isCodexAppServerApprovalRequest } from "./client-iRf11BEu.js";
5
- import { u as formatCodexUsageLimitErrorMessage } from "./command-formatters-Ttwc_kgX.js";
6
- import { o as refreshCodexAppServerAuthTokens, r as getSharedCodexAppServerClient } from "./shared-client-Cr6W-a2G.js";
4
+ import { r as isCodexAppServerApprovalRequest } from "./client-CoctX13d.js";
5
+ import { u as formatCodexUsageLimitErrorMessage } from "./command-formatters-CJH9-hFT.js";
6
+ import { i as getSharedCodexAppServerClient, s as refreshCodexAppServerAuthTokens } from "./shared-client-BwUqd3lh.js";
7
7
  import { i as readCodexAppServerBinding } from "./session-binding-CMTXuyoz.js";
8
- import { c as resolveCodexAppServerModelProvider, l as resolveReasoningEffort, n as buildCodexRuntimeThreadConfig, v as createCodexDynamicToolBridge, y as filterCodexDynamicTools } from "./thread-lifecycle-CJppEyYT.js";
9
- import { n as handleCodexAppServerElicitationRequest, r as handleCodexAppServerApprovalRequest, t as filterToolsForVisionInputs } from "./vision-tools-DHyuabWn.js";
8
+ import { c as resolveCodexAppServerModelProvider, l as resolveReasoningEffort, n as buildCodexRuntimeThreadConfig, v as createCodexDynamicToolBridge, y as filterCodexDynamicTools } from "./thread-lifecycle-B_oezv_0.js";
9
+ import { n as handleCodexAppServerElicitationRequest, r as handleCodexAppServerApprovalRequest, t as filterToolsForVisionInputs } from "./vision-tools-cbM0WkCZ.js";
10
10
  import { n as rememberCodexRateLimits, t as readRecentCodexRateLimits } from "./rate-limit-cache-BFi-50LG.js";
11
11
  import { embeddedAgentLog, formatErrorMessage, resolveAgentDir, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext, resolveSessionAgentIds, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
12
12
  //#region extensions/codex/src/app-server/side-question.ts
package/dist/test-api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
2
- import { a as buildThreadStartParams, i as buildThreadResumeParams, o as buildTurnStartParams, r as buildDeveloperInstructions, v as createCodexDynamicToolBridge, y as filterCodexDynamicTools } from "./thread-lifecycle-CJppEyYT.js";
2
+ import { a as buildThreadStartParams, i as buildThreadResumeParams, o as buildTurnStartParams, r as buildDeveloperInstructions, v as createCodexDynamicToolBridge, y as filterCodexDynamicTools } from "./thread-lifecycle-B_oezv_0.js";
3
3
  //#region extensions/codex/test-api.ts
4
4
  function resolveCodexPromptSnapshotAppServerOptions(pluginConfig) {
5
5
  return resolveCodexAppServerRuntimeOptions({
@@ -3,7 +3,7 @@ import { n as assertCodexThreadResumeResponse, r as assertCodexThreadStartRespon
3
3
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
4
4
  import { CODEX_GPT5_HEARTBEAT_PROMPT_OVERLAY, renderCodexPromptOverlay } from "./prompt-overlay.js";
5
5
  import { isModernCodexModel } from "./provider.js";
6
- import { i as isCodexAppServerConnectionClosedError } from "./client-iRf11BEu.js";
6
+ import { i as isCodexAppServerConnectionClosedError } from "./client-CoctX13d.js";
7
7
  import { i as readCodexAppServerBinding, n as isCodexAppServerNativeAuthProfile, o as writeCodexAppServerBinding, t as clearCodexAppServerBinding } from "./session-binding-CMTXuyoz.js";
8
8
  import { a as defaultCodexAppInventoryCache, r as readCodexPluginInventory, t as ensureCodexPluginActivation } from "./plugin-activation-PXGqUjwY.js";
9
9
  import crypto from "node:crypto";
@@ -990,10 +990,23 @@ function buildTurnCollaborationMode(params) {
990
990
  settings: {
991
991
  model: params.modelId,
992
992
  reasoning_effort: resolveReasoningEffort(params.thinkLevel, params.modelId),
993
- developer_instructions: params.trigger === "heartbeat" ? buildHeartbeatCollaborationInstructions() : null
993
+ developer_instructions: buildTurnScopedCollaborationInstructions(params)
994
994
  }
995
995
  };
996
996
  }
997
+ function buildTurnScopedCollaborationInstructions(params) {
998
+ if (params.trigger === "cron") return buildCronCollaborationInstructions();
999
+ if (params.trigger === "heartbeat") return buildHeartbeatCollaborationInstructions();
1000
+ return null;
1001
+ }
1002
+ function buildCronCollaborationInstructions() {
1003
+ return [
1004
+ "This is an OpenClaw cron automation turn. Apply these instructions only to this scheduled job; ordinary chat turns should stay in Codex Default mode.",
1005
+ "Execute the cron payload directly. If it asks you to run an exact command, run that command before doing any investigation, planning, memory review, or workspace bootstrap.",
1006
+ "Use context already provided by the runtime, but do not spend time loading or re-reading workspace bootstrap, memory, or project-doc files before executing the cron payload. Inspect those files only if the payload asks for them or the command fails and they are needed to diagnose it.",
1007
+ "Keep output concise and automation-oriented. Prefer the final command result or a short failure summary over status narration."
1008
+ ].join("\n\n");
1009
+ }
997
1010
  function buildHeartbeatCollaborationInstructions() {
998
1011
  return [
999
1012
  "This is an OpenClaw heartbeat turn. Apply these instructions only to this heartbeat wake; ordinary chat turns should stay in Codex Default mode.",
@@ -1,5 +1,5 @@
1
1
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
2
- import { r as formatCodexDisplayText } from "./command-formatters-Ttwc_kgX.js";
2
+ import { r as formatCodexDisplayText } from "./command-formatters-CJH9-hFT.js";
3
3
  import { callGatewayTool, embeddedAgentLog, formatApprovalDisplayPath } from "openclaw/plugin-sdk/agent-harness-runtime";
4
4
  //#region extensions/codex/src/app-server/plugin-approval-roundtrip.ts
5
5
  const DEFAULT_CODEX_APPROVAL_TIMEOUT_MS = 12e4;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/codex",
3
- "version": "2026.5.12",
3
+ "version": "2026.5.14-beta.1",
4
4
  "description": "OpenClaw Codex harness and model provider plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,10 +27,10 @@
27
27
  "minHostVersion": ">=2026.5.1-beta.1"
28
28
  },
29
29
  "compat": {
30
- "pluginApi": ">=2026.5.12"
30
+ "pluginApi": ">=2026.5.14-beta.1"
31
31
  },
32
32
  "build": {
33
- "openclawVersion": "2026.5.12"
33
+ "openclawVersion": "2026.5.14-beta.1"
34
34
  },
35
35
  "release": {
36
36
  "publishToClawHub": true,
@@ -45,7 +45,7 @@
45
45
  "openclaw.plugin.json"
46
46
  ],
47
47
  "peerDependencies": {
48
- "openclaw": ">=2026.5.12"
48
+ "openclaw": ">=2026.5.14-beta.1"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "openclaw": {