@openclaw/codex 2026.5.31-beta.2 → 2026.5.31-beta.3
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.
|
@@ -305,9 +305,8 @@ function formatRelativeReset(untilMs, nowMs) {
|
|
|
305
305
|
return `in ${days} ${days === 1 ? "day" : "days"}`;
|
|
306
306
|
}
|
|
307
307
|
//#endregion
|
|
308
|
-
//#region extensions/codex/src/command-
|
|
309
|
-
|
|
310
|
-
function buildPickerPresentation$1(title, prompt, buttons) {
|
|
308
|
+
//#region extensions/codex/src/command-presentation.ts
|
|
309
|
+
function buildCodexCommandPickerPresentation(title, prompt, buttons) {
|
|
311
310
|
return {
|
|
312
311
|
title,
|
|
313
312
|
blocks: [{
|
|
@@ -317,11 +316,17 @@ function buildPickerPresentation$1(title, prompt, buttons) {
|
|
|
317
316
|
type: "buttons",
|
|
318
317
|
buttons: buttons.map((button) => ({
|
|
319
318
|
label: button.label,
|
|
320
|
-
|
|
319
|
+
action: {
|
|
320
|
+
type: "command",
|
|
321
|
+
command: button.command
|
|
322
|
+
}
|
|
321
323
|
}))
|
|
322
324
|
}]
|
|
323
325
|
};
|
|
324
326
|
}
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region extensions/codex/src/command-plugins-management.ts
|
|
329
|
+
const POLICY_REFRESH_HINT = "New Codex conversations pick this up automatically. Use /new or /reset to refresh the current one.";
|
|
325
330
|
async function handleCodexPluginsSubcommand(ctx, rest, io) {
|
|
326
331
|
const [verb = "list", ...args] = rest;
|
|
327
332
|
const normalized = verb.toLowerCase();
|
|
@@ -369,7 +374,7 @@ function buildPluginsMenuReply() {
|
|
|
369
374
|
"",
|
|
370
375
|
"Type '/codex' to go back to the main menu."
|
|
371
376
|
].join("\n"),
|
|
372
|
-
presentation:
|
|
377
|
+
presentation: buildCodexCommandPickerPresentation("Codex sub-plugins", "Pick a Codex sub-plugin action:", [
|
|
373
378
|
{
|
|
374
379
|
label: "list",
|
|
375
380
|
command: "/codex plugins list"
|
|
@@ -406,7 +411,7 @@ function buildPluginNamePickerReply(verb, current) {
|
|
|
406
411
|
"Type '/codex plugins list' to inspect configured sub-plugins.",
|
|
407
412
|
"Type '/codex plugins menu' to go back to the plugins menu."
|
|
408
413
|
].join("\n"),
|
|
409
|
-
presentation:
|
|
414
|
+
presentation: buildCodexCommandPickerPresentation("Codex sub-plugins", "Pick another Codex sub-plugin action:", [{
|
|
410
415
|
label: "list",
|
|
411
416
|
command: "/codex plugins list"
|
|
412
417
|
}, {
|
|
@@ -430,7 +435,7 @@ function buildPluginNamePickerReply(verb, current) {
|
|
|
430
435
|
...verb === "enable" && !globalEnabled ? ["Global codexPlugins.enabled is off; enabling one configured sub-plugin turns it on.", ""] : [],
|
|
431
436
|
"Type '/codex plugins menu' to go back to the plugins menu."
|
|
432
437
|
].join("\n"),
|
|
433
|
-
presentation:
|
|
438
|
+
presentation: buildCodexCommandPickerPresentation("Codex sub-plugins", `Pick a Codex sub-plugin to ${verb}:`, buttons)
|
|
434
439
|
};
|
|
435
440
|
}
|
|
436
441
|
function canMutateCodexPlugins(ctx) {
|
|
@@ -585,24 +590,9 @@ const lastCodexDiagnosticsUploadByThread = /* @__PURE__ */ new Map();
|
|
|
585
590
|
const lastCodexDiagnosticsUploadByScope = /* @__PURE__ */ new Map();
|
|
586
591
|
const pendingCodexDiagnosticsConfirmations = /* @__PURE__ */ new Map();
|
|
587
592
|
const pendingCodexDiagnosticsConfirmationTokensByScope = /* @__PURE__ */ new Map();
|
|
588
|
-
function buildPickerPresentation(title, prompt, buttons) {
|
|
589
|
-
return {
|
|
590
|
-
title,
|
|
591
|
-
blocks: [{
|
|
592
|
-
type: "text",
|
|
593
|
-
text: prompt
|
|
594
|
-
}, {
|
|
595
|
-
type: "buttons",
|
|
596
|
-
buttons: buttons.map((button) => ({
|
|
597
|
-
label: button.label,
|
|
598
|
-
value: button.command
|
|
599
|
-
}))
|
|
600
|
-
}]
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
593
|
/**
|
|
604
|
-
* No-arg `/codex` picker.
|
|
605
|
-
*
|
|
594
|
+
* No-arg `/codex` picker. Codex owns the command tree; channels render the
|
|
595
|
+
* portable command actions as inline controls when their transport can.
|
|
606
596
|
*/
|
|
607
597
|
function buildCodexSubcommandPickerReply() {
|
|
608
598
|
const verbs = [
|
|
@@ -643,7 +633,7 @@ function buildCodexSubcommandPickerReply() {
|
|
|
643
633
|
"",
|
|
644
634
|
"Top-level shortcuts cover everyday operations: /status, /fast, /help, /stop, /models."
|
|
645
635
|
].join("\n"),
|
|
646
|
-
presentation:
|
|
636
|
+
presentation: buildCodexCommandPickerPresentation("Codex commands", "Pick a Codex subcommand:", verbs)
|
|
647
637
|
};
|
|
648
638
|
}
|
|
649
639
|
/** Sub-picker for `/codex fast menu` (on / off / status). */
|
|
@@ -668,7 +658,7 @@ function buildCodexFastMenuReply() {
|
|
|
668
658
|
"",
|
|
669
659
|
"Type '/codex' to go back to the main menu."
|
|
670
660
|
].join("\n"),
|
|
671
|
-
presentation:
|
|
661
|
+
presentation: buildCodexCommandPickerPresentation("Codex fast mode", "Pick a Codex fast mode:", buttons)
|
|
672
662
|
};
|
|
673
663
|
}
|
|
674
664
|
/** Sub-picker for `/codex permissions menu` (default / yolo / status). */
|
|
@@ -693,7 +683,7 @@ function buildCodexPermissionsMenuReply() {
|
|
|
693
683
|
"",
|
|
694
684
|
"Type '/codex' to go back to the main menu."
|
|
695
685
|
].join("\n"),
|
|
696
|
-
presentation:
|
|
686
|
+
presentation: buildCodexCommandPickerPresentation("Codex permissions", "Pick a Codex permissions mode:", buttons)
|
|
697
687
|
};
|
|
698
688
|
}
|
|
699
689
|
/** Sub-picker for `/codex computer-use menu` (status / install). */
|
|
@@ -716,7 +706,7 @@ function buildCodexComputerUseMenuReply() {
|
|
|
716
706
|
"",
|
|
717
707
|
"Type '/codex' to go back to the main menu."
|
|
718
708
|
].join("\n"),
|
|
719
|
-
presentation:
|
|
709
|
+
presentation: buildCodexCommandPickerPresentation("Codex computer-use", "Pick a Codex computer-use action:", buttons)
|
|
720
710
|
};
|
|
721
711
|
}
|
|
722
712
|
/** Returns true when the rest-args are exactly `["menu"]` (case-insensitive). */
|
|
@@ -1136,10 +1126,18 @@ async function requestCodexDiagnosticsFeedbackApproval(deps, ctx, note, commandP
|
|
|
1136
1126
|
type: "buttons",
|
|
1137
1127
|
buttons: [{
|
|
1138
1128
|
label: "Send diagnostics",
|
|
1129
|
+
action: {
|
|
1130
|
+
type: "command",
|
|
1131
|
+
command: confirmCommand
|
|
1132
|
+
},
|
|
1139
1133
|
value: confirmCommand,
|
|
1140
1134
|
style: "danger"
|
|
1141
1135
|
}, {
|
|
1142
1136
|
label: "Cancel",
|
|
1137
|
+
action: {
|
|
1138
|
+
type: "command",
|
|
1139
|
+
command: cancelCommand
|
|
1140
|
+
},
|
|
1143
1141
|
value: cancelCommand,
|
|
1144
1142
|
style: "secondary"
|
|
1145
1143
|
}]
|
package/dist/harness.js
CHANGED
|
@@ -28,7 +28,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
28
28
|
};
|
|
29
29
|
},
|
|
30
30
|
runAttempt: async (params) => {
|
|
31
|
-
const { runCodexAppServerAttempt } = await import("./run-attempt-
|
|
31
|
+
const { runCodexAppServerAttempt } = await import("./run-attempt-DczP9cMX.js");
|
|
32
32
|
return runCodexAppServerAttempt(params, {
|
|
33
33
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
|
|
34
34
|
nativeHookRelay: { enabled: true }
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ async function handleCodexCommand(ctx, options = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
async function loadDefaultCodexSubcommandHandler() {
|
|
51
|
-
const { handleCodexSubcommand } = await import("./command-handlers-
|
|
51
|
+
const { handleCodexSubcommand } = await import("./command-handlers-B8-28KIp.js");
|
|
52
52
|
return handleCodexSubcommand;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
@@ -4022,6 +4022,9 @@ var CodexAppServerEventProjector = class {
|
|
|
4022
4022
|
const itemId = readString$5(params, "itemId") ?? readString$5(params, "id") ?? "assistant";
|
|
4023
4023
|
const delta = readString$5(params, "delta") ?? "";
|
|
4024
4024
|
if (!delta) return;
|
|
4025
|
+
this.rememberAssistantPhase(readItem(params.item));
|
|
4026
|
+
const phase = readString$5(params, "phase");
|
|
4027
|
+
if (phase) this.assistantPhaseByItem.set(itemId, phase);
|
|
4025
4028
|
if (!this.assistantStarted) {
|
|
4026
4029
|
this.assistantStarted = true;
|
|
4027
4030
|
await this.params.onAssistantMessageStart?.();
|
|
@@ -4033,6 +4036,10 @@ var CodexAppServerEventProjector = class {
|
|
|
4033
4036
|
itemId,
|
|
4034
4037
|
text
|
|
4035
4038
|
});
|
|
4039
|
+
else if (this.shouldStreamAssistantPartial(itemId)) await this.params.onPartialReply?.({
|
|
4040
|
+
text,
|
|
4041
|
+
delta
|
|
4042
|
+
});
|
|
4036
4043
|
}
|
|
4037
4044
|
async handleReasoningDelta(method, params) {
|
|
4038
4045
|
const itemId = readString$5(params, "itemId") ?? readString$5(params, "id") ?? "reasoning";
|
|
@@ -4461,6 +4468,9 @@ var CodexAppServerEventProjector = class {
|
|
|
4461
4468
|
isCommentaryAssistantItem(itemId) {
|
|
4462
4469
|
return this.assistantPhaseByItem.get(itemId) === "commentary";
|
|
4463
4470
|
}
|
|
4471
|
+
shouldStreamAssistantPartial(itemId) {
|
|
4472
|
+
return this.assistantPhaseByItem.get(itemId) === "final_answer";
|
|
4473
|
+
}
|
|
4464
4474
|
emitCommentaryProgress(params) {
|
|
4465
4475
|
const progressText = params.text.replace(/\s+/g, " ").trim();
|
|
4466
4476
|
if (!progressText || this.lastCommentaryProgressTextByItem.get(params.itemId) === progressText) return;
|
|
@@ -6834,7 +6844,7 @@ function sanitizeValue(value, depth = 0, key = "") {
|
|
|
6834
6844
|
if (Array.isArray(value)) return value.slice(0, 100).map((entry) => sanitizeValue(entry, depth + 1, key));
|
|
6835
6845
|
if (typeof value === "object") {
|
|
6836
6846
|
const next = {};
|
|
6837
|
-
for (const [
|
|
6847
|
+
for (const [keyLocal, child] of Object.entries(value).slice(0, 100)) next[keyLocal] = sanitizeValue(child, depth + 1, keyLocal);
|
|
6838
6848
|
return next;
|
|
6839
6849
|
}
|
|
6840
6850
|
return JSON.stringify(value);
|
|
@@ -7902,11 +7912,11 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
7902
7912
|
});
|
|
7903
7913
|
}
|
|
7904
7914
|
});
|
|
7905
|
-
const releaseTurnAfterTerminalDynamicTool = (
|
|
7915
|
+
const releaseTurnAfterTerminalDynamicTool = (paramsValue) => {
|
|
7906
7916
|
if (!shouldReleaseTurnAfterTerminalDynamicTool({
|
|
7907
7917
|
completed,
|
|
7908
7918
|
aborted: runAbortController.signal.aborted,
|
|
7909
|
-
responseSuccess:
|
|
7919
|
+
responseSuccess: paramsValue.response.success,
|
|
7910
7920
|
currentTurnHadNonTerminalDynamicToolResult,
|
|
7911
7921
|
activeAppServerTurnRequests,
|
|
7912
7922
|
activeTurnItemIdsCount: activeTurnItemIds.size,
|
|
@@ -7914,22 +7924,22 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
7914
7924
|
})) return;
|
|
7915
7925
|
pendingTerminalDynamicToolRelease = void 0;
|
|
7916
7926
|
trajectoryRecorder?.recordEvent("turn.dynamic_tool_terminal_release", {
|
|
7917
|
-
threadId:
|
|
7918
|
-
turnId:
|
|
7919
|
-
toolCallId:
|
|
7920
|
-
name:
|
|
7921
|
-
durationMs:
|
|
7927
|
+
threadId: paramsValue.call.threadId,
|
|
7928
|
+
turnId: paramsValue.call.turnId,
|
|
7929
|
+
toolCallId: paramsValue.call.callId,
|
|
7930
|
+
name: paramsValue.call.tool,
|
|
7931
|
+
durationMs: paramsValue.durationMs
|
|
7922
7932
|
});
|
|
7923
7933
|
embeddedAgentLog.info("codex app-server turn released after terminal dynamic tool result", {
|
|
7924
|
-
threadId:
|
|
7925
|
-
turnId:
|
|
7926
|
-
toolCallId:
|
|
7927
|
-
tool:
|
|
7928
|
-
durationMs:
|
|
7934
|
+
threadId: paramsValue.call.threadId,
|
|
7935
|
+
turnId: paramsValue.call.turnId,
|
|
7936
|
+
toolCallId: paramsValue.call.callId,
|
|
7937
|
+
tool: paramsValue.call.tool,
|
|
7938
|
+
durationMs: paramsValue.durationMs
|
|
7929
7939
|
});
|
|
7930
7940
|
interruptCodexTurnBestEffort(client, {
|
|
7931
|
-
threadId:
|
|
7932
|
-
turnId:
|
|
7941
|
+
threadId: paramsValue.call.threadId,
|
|
7942
|
+
turnId: paramsValue.call.turnId,
|
|
7933
7943
|
timeoutMs: CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS
|
|
7934
7944
|
});
|
|
7935
7945
|
completed = true;
|
|
@@ -7957,8 +7967,8 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
7957
7967
|
}
|
|
7958
7968
|
}).unref?.();
|
|
7959
7969
|
};
|
|
7960
|
-
const scheduleTurnReleaseAfterTerminalDynamicTool = (
|
|
7961
|
-
pendingTerminalDynamicToolRelease =
|
|
7970
|
+
const scheduleTurnReleaseAfterTerminalDynamicTool = (paramsLocal) => {
|
|
7971
|
+
pendingTerminalDynamicToolRelease = paramsLocal;
|
|
7962
7972
|
scheduleTerminalDynamicToolReleaseCheck();
|
|
7963
7973
|
};
|
|
7964
7974
|
const emitLifecycleStart = () => {
|
|
@@ -8598,7 +8608,7 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
8598
8608
|
steeringQueueRef.current = activeSteeringQueue;
|
|
8599
8609
|
const handle = {
|
|
8600
8610
|
kind: "embedded",
|
|
8601
|
-
queueMessage: async (text,
|
|
8611
|
+
queueMessage: async (text, optionsLocal) => activeSteeringQueue.queue(text, optionsLocal),
|
|
8602
8612
|
isStreaming: () => !completed,
|
|
8603
8613
|
isCompacting: () => projectorRef.current?.isCompacting() ?? false,
|
|
8604
8614
|
sourceReplyDeliveryMode: params.sourceReplyDeliveryMode,
|
|
@@ -8732,7 +8742,7 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
8732
8742
|
...finalAborted ? { aborted: true } : {}
|
|
8733
8743
|
});
|
|
8734
8744
|
if (activeContextEngine) {
|
|
8735
|
-
const
|
|
8745
|
+
const activeContextEnginePluginIdLocal = resolveContextEngineOwnerPluginId(activeContextEngine);
|
|
8736
8746
|
const finalMessages = await readMirroredSessionHistoryMessages(activeSessionFile) ?? historyMessages.concat(result.messagesSnapshot);
|
|
8737
8747
|
await finalizeHarnessContextEngineTurn({
|
|
8738
8748
|
contextEngine: activeContextEngine,
|
|
@@ -8751,7 +8761,7 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
8751
8761
|
cwd: effectiveCwd,
|
|
8752
8762
|
agentDir,
|
|
8753
8763
|
activeAgentId: sessionAgentId,
|
|
8754
|
-
contextEnginePluginId:
|
|
8764
|
+
contextEnginePluginId: activeContextEnginePluginIdLocal,
|
|
8755
8765
|
tokenBudget: params.contextTokenBudget,
|
|
8756
8766
|
lastCallUsage: result.attemptUsage,
|
|
8757
8767
|
promptCache: result.promptCache
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/codex",
|
|
3
|
-
"version": "2026.5.31-beta.
|
|
3
|
+
"version": "2026.5.31-beta.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/codex",
|
|
9
|
-
"version": "2026.5.31-beta.
|
|
9
|
+
"version": "2026.5.31-beta.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@openai/codex": "0.135.0",
|
|
12
12
|
"typebox": "1.1.39",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/codex",
|
|
3
|
-
"version": "2026.5.31-beta.
|
|
3
|
+
"version": "2026.5.31-beta.3",
|
|
4
4
|
"description": "OpenClaw Codex app-server harness and model provider plugin with a Codex-managed GPT catalog.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"minHostVersion": ">=2026.5.1-beta.1"
|
|
27
27
|
},
|
|
28
28
|
"compat": {
|
|
29
|
-
"pluginApi": ">=2026.5.31-beta.
|
|
29
|
+
"pluginApi": ">=2026.5.31-beta.3"
|
|
30
30
|
},
|
|
31
31
|
"build": {
|
|
32
|
-
"openclawVersion": "2026.5.31-beta.
|
|
32
|
+
"openclawVersion": "2026.5.31-beta.3"
|
|
33
33
|
},
|
|
34
34
|
"release": {
|
|
35
35
|
"publishToClawHub": true,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"README.md"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"openclaw": ">=2026.5.31-beta.
|
|
50
|
+
"openclaw": ">=2026.5.31-beta.3"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"openclaw": {
|