@openclaw/codex 2026.9.6 → 2026.9.8
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/README.md +2 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/{account-usage-runtime-Eem_WGqY.mjs → account-usage-runtime-G348lY1q.mjs} +5 -5
- package/dist/.setup/{apply-DDOi8uNx.mjs → apply-Cqb-YoCS.mjs} +22 -36
- package/dist/.setup/{attempt-client-cleanup-CEv1cKwF.mjs → attempt-client-cleanup-B-S7ngS_.mjs} +128 -37
- package/dist/.setup/attempt-workspace-context-BJ5Z_olH.mjs +164 -0
- package/dist/.setup/{auth-binding-DhLWa_7K.mjs → auth-binding-BLWz7stm.mjs} +14 -1
- package/dist/.setup/{auth-cache-key-B2mpaI9D.mjs → auth-cache-key-Dnps4W4_.mjs} +36 -34
- package/dist/.setup/{auth-profile-WqZtZfXN.mjs → auth-profile-B0okYl2D.mjs} +1 -2
- package/dist/.setup/auth-start-options-BPIPeEX8.mjs +44 -0
- package/dist/.setup/{binding-connection-ThoatDcb.mjs → binding-connection-DTtN1KrX.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-yoHrABt-.mjs → binding-connection.runtime-6TpgD1M6.mjs} +4 -4
- package/dist/.setup/{bounded-turn-B2HScEgT.mjs → bounded-turn-BNunZPtz.mjs} +15 -18
- package/dist/.setup/bounded-turn-isolation-B8K_ylqk.mjs +14 -0
- package/dist/.setup/{build-state-C7EnDVgr.mjs → build-state-DIQ5O_-S.mjs} +1 -1
- package/dist/.setup/{capabilities-CDXOOFdZ.mjs → capabilities-B3WEZl4e.mjs} +2 -10
- package/dist/.setup/{client-catalog-response-BMgt_4q4.mjs → client-catalog-response-DRvx_wCC.mjs} +1 -1
- package/dist/.setup/{client-Cs08OXVQ.mjs → client-qyUBJlGZ.mjs} +138 -399
- package/dist/.setup/{command-dispatch-B4JuOsOk.mjs → command-dispatch-Btrs1D6f.mjs} +5 -8
- package/dist/.setup/{command-formatters-Bmqvr9tO.mjs → command-formatters-R3ckE3Co.mjs} +29 -61
- package/dist/.setup/{command-handlers-DW7Lx9oH.mjs → command-handlers-DvlCHJch.mjs} +222 -343
- package/dist/.setup/{command-rpc-DixIj3HW.mjs → command-rpc-skzRq4wD.mjs} +15 -18
- package/dist/.setup/compact-8ttks5U5.mjs +776 -0
- package/dist/.setup/{config-BoTP_mrL.mjs → config-DKhXquav.mjs} +26 -28
- package/dist/.setup/{config-options-BvaRs51b.mjs → config-options-CzyWLTJt.mjs} +24 -37
- package/dist/.setup/{config-parsing-CcB9iPoq.mjs → config-parsing-b088LyhT.mjs} +57 -60
- package/dist/.setup/{config-runtime-C8Rw1m1m.mjs → config-runtime-C0NbLms1.mjs} +2 -2
- package/dist/.setup/{config-security-BEReZ6go.mjs → config-security-CE-FcGw9.mjs} +32 -111
- package/dist/.setup/{config-utils-DujwEnhg.mjs → config-utils-D0CXecki.mjs} +3 -13
- package/dist/.setup/context-engine-projection-PezSESth.mjs +387 -0
- package/dist/.setup/{conversation-binding-DP-gMrBP.mjs → conversation-binding-74LaGGH-.mjs} +67 -90
- package/dist/.setup/{conversation-binding-data-CrcyZk6O.mjs → conversation-binding-data-C746z5Pn.mjs} +8 -12
- package/dist/.setup/{conversation-control-uK9Jomlc.mjs → conversation-control-OrN6zuaY.mjs} +8 -8
- package/dist/.setup/{cyber-failover-DYwbmf1o.mjs → cyber-failover-XV0nNRZu.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-e9G3J9-e.mjs → cyber-failover-notice-RNpGpTyP.mjs} +1 -1
- package/dist/.setup/{dynamic-tools-BDXl-8Cw.mjs → dynamic-tools-Db2sY5cZ.mjs} +2305 -2606
- package/dist/.setup/{effective-mcp-catalog-CvnvnGIe.mjs → effective-mcp-catalog-Bi6-SQ7i.mjs} +8 -17
- package/dist/.setup/{ephemeral-turn-poidXgek.mjs → ephemeral-turn-DiCS1ijR.mjs} +3 -3
- package/dist/.setup/event-projector-assistant-message-MV_1dj-3.mjs +69 -0
- package/dist/.setup/{event-projector-usage-CnBS8Wa3.mjs → event-projector-usage-03R0I2dM.mjs} +3 -25
- package/dist/.setup/event-projector-values-DJSz8BTk.mjs +106 -0
- package/dist/.setup/incognito-session-DWYapfwf.mjs +2 -0
- package/dist/.setup/{inference-context-D96l9-ew.mjs → inference-context-D-9gWlTR.mjs} +16 -18
- package/dist/.setup/inference-dispatch-CMZtjQyz.mjs +359 -0
- package/dist/.setup/inference-metadata-CgIf7sOx.mjs +81 -0
- package/dist/.setup/{inference-proxy-b-aJMSxm.mjs → inference-proxy-DhcXOgUE.mjs} +174 -214
- package/dist/.setup/{isolated-completion-BIZFhTNG.mjs → isolated-completion-D80IXfQF.mjs} +9 -12
- package/dist/.setup/{managed-binary-BnshlFag.mjs → managed-binary-kiWRhNRE.mjs} +8 -12
- package/dist/.setup/{model-catalog-CfXJf9Ay.mjs → model-catalog-DiC0Tkha.mjs} +11 -10
- package/dist/.setup/model-runtime-BdqzOMkU.mjs +11 -0
- package/dist/.setup/{models-KnqBv0hE.mjs → models-DfLmPV0k.mjs} +9 -18
- package/dist/.setup/{native-auth-rWbGbMn3.mjs → native-auth-CuG53tu4.mjs} +4 -4
- package/dist/.setup/{native-execution-policy-umd0tgh4.mjs → native-execution-policy-BxZJy5mP.mjs} +5 -30
- package/dist/.setup/{native-subagent-monitor-D3filLY2.mjs → native-subagent-monitor-BwkQXf9e.mjs} +4395 -3609
- package/dist/.setup/native-subagent-pending-assignments-DwkCzLvD.mjs +203 -0
- package/dist/.setup/native-task-assignments-DMQ0g3hu.mjs +194 -0
- package/dist/.setup/{node-cli-sessions-r3avj02l.mjs → node-cli-sessions-HC4W6FLI.mjs} +19 -49
- package/dist/.setup/{node-exec-server.runtime-BDwWXVpK.mjs → node-exec-server.runtime-BgBfWQqo.mjs} +3 -6
- package/dist/.setup/{plan-CN3VwfNU.mjs → plan-DPdMk1Oy.mjs} +49 -92
- package/dist/.setup/{plugin-activation-DT3MNtqj.mjs → plugin-activation-cNHRfaxU.mjs} +8 -36
- package/dist/.setup/{plugin-app-cache-key-B2CsSdnV.mjs → plugin-app-cache-key-BL9B5H0L.mjs} +6 -23
- package/dist/.setup/{plugin-inventory-BoRei8Z4.mjs → plugin-inventory-Cky2XJUw.mjs} +21 -21
- package/dist/.setup/{plugin-marketplace-discovery-CDOi8IFs.mjs → plugin-marketplace-discovery-D_dV9FXa.mjs} +18 -24
- package/dist/.setup/{plugin-metadata-cache-Ctmo83k_.mjs → plugin-metadata-cache-BRwtRct9.mjs} +116 -176
- package/dist/.setup/{provider-BOsxQHOM.mjs → provider-D6F_7p1I.mjs} +11 -14
- package/dist/.setup/{provider-capabilities-BfE88FZ5.mjs → provider-capabilities-DG5qbsUZ.mjs} +13 -18
- package/dist/.setup/{rate-limits-CMU3DUD0.mjs → rate-limits-B7-X2TgG.mjs} +9 -31
- package/dist/.setup/{request-D2L0zMrq.mjs → request-BZOfsSXW.mjs} +7 -6
- package/dist/.setup/responses-oauth-twnuTaAa.mjs +93 -0
- package/dist/.setup/rpc-error-BlD2vuzn.mjs +31 -0
- package/dist/.setup/{run-attempt-BHu11r7h.mjs → run-attempt-dYJhjZrp.mjs} +1035 -1023
- package/dist/.setup/{run-attempt-lifecycle-B7JbY4-F.mjs → run-attempt-lifecycle-C-6O3Exn.mjs} +10 -24
- package/dist/.setup/{runtime-artifact-CLZ8udh-.mjs → runtime-artifact-DDQ-HGXf.mjs} +16 -4
- package/dist/.setup/runtime-artifact-connection-D68qQn1m.mjs +78 -0
- package/dist/.setup/sandbox-guard-DjCz2eOw.mjs +126 -0
- package/dist/.setup/scope-DOC1Xjc8.mjs +6 -0
- package/dist/.setup/session-binding-DGCYAfvD.mjs +443 -0
- package/dist/.setup/{session-binding-record-BGoz8wOK.mjs → session-binding-record-Oe9L-CNY.mjs} +52 -130
- package/dist/.setup/{session-binding-sidecars-BlB5EvIS.mjs → session-binding-sidecars-jo6H8dFr.mjs} +196 -17
- package/dist/.setup/{session-catalog-Pno1xGcl.mjs → session-catalog-BFafIiF6.mjs} +185 -350
- package/dist/.setup/{session-catalog-adoption-BI6UTDZT.mjs → session-catalog-adoption-BU_pHWG7.mjs} +7 -6
- package/dist/.setup/{session-catalog-archive-lHBqzhaO.mjs → session-catalog-archive-spHfihri.mjs} +6 -6
- package/dist/.setup/session-catalog-events-BMCFMZw-.mjs +139 -0
- package/dist/.setup/session-catalog-home-id-vlih0B_g.mjs +22 -0
- package/dist/.setup/{session-catalog-index-B9_VQIUz.mjs → session-catalog-index-DwJjnF5k.mjs} +126 -122
- package/dist/.setup/{session-catalog-index-order-hcdz07yN.mjs → session-catalog-index-order-BcQpHks3.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-state-Dgh8ORJm.mjs → session-catalog-index-state-TeO7EyO-.mjs} +3 -2
- package/dist/.setup/session-catalog-limits-DDxOsQeC.mjs +14 -0
- package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +170 -0
- package/dist/.setup/session-catalog-native-projection-CuaFZuQE.mjs +178 -0
- package/dist/.setup/{session-catalog-node-adoption-ITddWx_X.mjs → session-catalog-node-adoption-DgXvSGu0.mjs} +10 -27
- package/dist/.setup/{session-catalog-node-continue-6g6qi4A9.mjs → session-catalog-node-continue-DjKXHBbi.mjs} +8 -10
- package/dist/.setup/session-catalog-node-lookup-CtAXI5W5.mjs +56 -0
- package/dist/.setup/{session-catalog-native-projection-DowriLid.mjs → session-catalog-parsing-CPGaPYr-.mjs} +11 -194
- package/dist/.setup/{session-catalog-projection-zK_PUsiE.mjs → session-catalog-projection-CGfzfP93.mjs} +6 -4
- package/dist/.setup/session-catalog-provenance-DoAvktcj.mjs +95 -0
- package/dist/.setup/{session-cli-irrD-uo7.mjs → session-cli-DlmBHYIe.mjs} +9 -22
- package/dist/.setup/{session-history-BrqhSCf9.mjs → session-history-D83lJWHG.mjs} +4 -6
- package/dist/.setup/{session-history-import-D-3wAgOP.mjs → session-history-import-WhX-X33a.mjs} +7 -10
- package/dist/.setup/session-history-read-Ov3StuL4.mjs +133 -0
- package/dist/.setup/{session-history.worker-CaCh0xF_.mjs → session-history.worker-MnPKncqP.mjs} +9 -5
- package/dist/.setup/session-initialization-6aveB9qb.mjs +22 -0
- package/dist/.setup/{session-permission-policy-BI1QK_98.mjs → session-permission-policy-Ci_fVX6y.mjs} +4 -8
- package/dist/.setup/{session-retirement-BH-S6qkJ.mjs → session-retirement-LlYWBKTJ.mjs} +17 -17
- package/dist/.setup/{settled-turn-context-fmwouT5I.mjs → settled-turn-context-D4yj4rxf.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-DiAi6Kx6.mjs → settled-turn-finalizer-DW9W3gza.mjs} +14 -10
- package/dist/.setup/{shared-client-DA4VR4Eb.mjs → shared-client-CJCTeFpQ.mjs} +783 -412
- package/dist/.setup/shared-client-lifecycle-7xgtlo15.mjs +153 -0
- package/dist/.setup/{side-question-BJ1wSDcB.mjs → side-question-BLeGj7TQ.mjs} +79 -143
- package/dist/.setup/{source-CUzJq5WN.mjs → source-CJis_1EF.mjs} +80 -137
- package/dist/.setup/{thread-lifecycle-B3mfz1TG.mjs → thread-lifecycle-_bAbjedG.mjs} +294 -737
- package/dist/.setup/{thread-ownership-DcTtAcXj.mjs → thread-ownership-B6pPt21M.mjs} +45 -10
- package/dist/.setup/{incognito-session-uhrBF6wJ.mjs → thread-ownership-queue-Dp24d7-F.mjs} +1 -2
- package/dist/.setup/{thread-policy-DGuQsuFC.mjs → thread-policy-gNPzzpVp.mjs} +46 -7
- package/dist/.setup/{thread-requests-BLvGkP2R.mjs → thread-requests-OWGOiDaV.mjs} +199 -302
- package/dist/.setup/{thread-resume-DIBXwOpE.mjs → thread-resume-GOry0AYh.mjs} +6 -6
- package/dist/.setup/{timeout-C910MdAB.mjs → timeout-CXOfNoaX.mjs} +1 -35
- package/dist/.setup/{transcript-history-projection-ZZpkFkJ_.mjs → transcript-history-projection-DRSifI-1.mjs} +17 -89
- package/dist/.setup/{transcript-mirror-attestation-CzM-94NC.mjs → transcript-mirror-attestation-YSegaktH.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-BtHDBp1G.mjs → transcript-mirror-kxmCYsuF.mjs} +7 -9
- package/dist/.setup/{transport-stdio-h2VHOskC.mjs → transport-stdio-Bdegpn2V.mjs} +5 -22
- package/dist/.setup/transport-websocket-BTBE-LD9.mjs +211 -0
- package/dist/.setup/{upstream-prompt-provenance-LphB8slG.mjs → upstream-prompt-provenance-fXkKbPVC.mjs} +3 -9
- package/dist/.setup/{upstream-session-fork-BUr4OUbC.mjs → upstream-session-fork-gkdRj2yH.mjs} +23 -23
- package/dist/.setup/{usage-BML0r-ua.mjs → usage-CApUvLOV.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-DUMbefVY.mjs → usage-limit-error-wSMQkbpV.mjs} +4 -19
- package/dist/.setup/{web-search-provider.runtime-CDKlN-Rv.mjs → web-search-provider.runtime-UKgeiBUG.mjs} +8 -19
- package/dist/api.js +9 -11
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +50 -8
- package/dist/harness.js +344 -1
- package/dist/index.js +193 -245
- package/dist/media-understanding-provider.js +9 -22
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +3 -3
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +14 -2
- package/package.json +7 -6
- package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +0 -331
- package/dist/.setup/compact-Du5UvtxA.mjs +0 -680
- package/dist/.setup/event-projector-assistant-message-BsruvNrH.mjs +0 -103
- package/dist/.setup/event-projector-items-C6L_5ZiT.mjs +0 -234
- package/dist/.setup/harness-a_MsE4-_.mjs +0 -355
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +0 -13
- package/dist/.setup/image-payload-sanitizer-tupAr-2o.mjs +0 -79
- package/dist/.setup/local-runtime-attribution-B_2mnqhb.mjs +0 -19
- package/dist/.setup/native-subagent-history-0nYYgo0k.mjs +0 -148
- package/dist/.setup/native-subagent-task-ids-wb8CKZGN.mjs +0 -441
- package/dist/.setup/plugin-approval-roundtrip-C0MZzCuP.mjs +0 -122
- package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
- package/dist/.setup/sandbox-guard-C2sRMOEY.mjs +0 -166
- package/dist/.setup/session-binding-Cm0apEbd.mjs +0 -692
- package/dist/.setup/session-catalog-events-Bj6j94E_.mjs +0 -347
- package/dist/.setup/session-history-read-B3ZfSUbF.mjs +0 -50
- package/dist/.setup/session-initialization-rcgbZiid.mjs +0 -75
- package/dist/.setup/thread-history-page-DoVpnHim.mjs +0 -83
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as formatCodexDisplayText } from "./command-formatters-
|
|
2
|
-
import { n as describeControlFailure } from "./capabilities-
|
|
1
|
+
import { o as formatCodexDisplayText } from "./command-formatters-R3ckE3Co.mjs";
|
|
2
|
+
import { n as describeControlFailure } from "./capabilities-B3WEZl4e.mjs";
|
|
3
3
|
//#region extensions/codex/src/command-dispatch.ts
|
|
4
4
|
/** Dispatches a `/codex` command to the lazily loaded handler. */
|
|
5
5
|
async function handleCodexCommand(ctx, options) {
|
|
@@ -7,9 +7,10 @@ async function handleCodexCommand(ctx, options) {
|
|
|
7
7
|
...ctx,
|
|
8
8
|
gatewayClientScopes: ctx.gatewayClientScopes?.slice()
|
|
9
9
|
};
|
|
10
|
-
const {
|
|
10
|
+
const { resolvePluginConfig, ...subcommandOptions } = options;
|
|
11
11
|
try {
|
|
12
|
-
|
|
12
|
+
const { handleCodexSubcommand } = await import("./command-handlers-DvlCHJch.mjs");
|
|
13
|
+
return await handleCodexSubcommand(commandContext, {
|
|
13
14
|
...subcommandOptions,
|
|
14
15
|
pluginConfig: resolvePluginConfig?.() ?? subcommandOptions.pluginConfig
|
|
15
16
|
});
|
|
@@ -17,9 +18,5 @@ async function handleCodexCommand(ctx, options) {
|
|
|
17
18
|
return { text: `Codex command failed: ${formatCodexDisplayText(describeControlFailure(error))}` };
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
async function loadDefaultCodexSubcommandHandler() {
|
|
21
|
-
const { handleCodexSubcommand } = await import("./command-handlers-DW7Lx9oH.mjs");
|
|
22
|
-
return handleCodexSubcommand;
|
|
23
|
-
}
|
|
24
21
|
//#endregion
|
|
25
22
|
export { handleCodexCommand };
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import { c as summarizeCodexRateLimits, o as summarizeCodexAccountRateLimits, r as hasCodexRateLimitSnapshots } from "./rate-limits-
|
|
2
|
+
import { c as summarizeCodexRateLimits, o as summarizeCodexAccountRateLimits, r as hasCodexRateLimitSnapshots } from "./rate-limits-B7-X2TgG.mjs";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/codex/src/command-formatters.ts
|
|
5
5
|
/**
|
|
6
6
|
* Formats Codex command responses for safe chat display, including status,
|
|
7
7
|
* lists, account summaries, and user-facing help text.
|
|
8
8
|
*/
|
|
9
|
-
/** Formats the combined `/codex status` probe result. */
|
|
10
9
|
function formatCodexStatus(probes) {
|
|
11
10
|
const lines = [`Codex app-server: ${probes.models.ok || probes.account.ok || probes.limits.ok || probes.mcps.ok || probes.skills.ok ? "connected" : "unavailable"}`];
|
|
12
11
|
if (probes.models.ok) lines.push(`Models: ${probes.models.value.models.map((model) => formatCodexDisplayText(model.id)).slice(0, 8).join(", ") || "none"}`);
|
|
13
12
|
else lines.push(`Models: ${formatCodexDisplayText(probes.models.error)}`);
|
|
14
|
-
lines.push(`Account: ${probes.account.
|
|
15
|
-
lines.push(`Rate limits: ${probes.limits.ok ? formatCodexRateLimitSummary(probes.limits.value) : formatCodexDisplayText(probes.limits.error)}`);
|
|
16
|
-
lines.push(`MCP servers: ${probes.mcps.ok ? summarizeArrayLike(probes.mcps.value) : formatCodexDisplayText(probes.mcps.error)}`);
|
|
17
|
-
lines.push(`Skills: ${probes.skills.ok ? summarizeCodexSkills(probes.skills.value) : formatCodexDisplayText(probes.skills.error)}`);
|
|
13
|
+
lines.push(`Account: ${formatProbe(probes.account, formatCodexAccountSummary)}`, `Rate limits: ${formatProbe(probes.limits, formatCodexRateLimitSummary)}`, `MCP servers: ${formatProbe(probes.mcps, summarizeArrayLike)}`, `Skills: ${formatProbe(probes.skills, summarizeCodexSkills)}`);
|
|
18
14
|
return lines.join("\n");
|
|
19
15
|
}
|
|
20
|
-
|
|
16
|
+
function formatProbe(probe, format) {
|
|
17
|
+
return probe.ok ? format(probe.value) : formatCodexDisplayText(probe.error);
|
|
18
|
+
}
|
|
21
19
|
function formatModels(result) {
|
|
22
20
|
if (result.models.length === 0) return "No Codex app-server models returned.";
|
|
23
21
|
const lines = ["Codex models:", ...result.models.map((model) => `- ${formatCodexDisplayText(model.id)}${model.isDefault ? " (default)" : ""}`)];
|
|
24
22
|
if (result.truncated) lines.push("- More models available; output truncated.");
|
|
25
23
|
return lines.join("\n");
|
|
26
24
|
}
|
|
27
|
-
/** Formats Codex thread-list responses with safe resume hints. */
|
|
28
25
|
function formatThreads(response) {
|
|
29
26
|
const threads = extractArray(response);
|
|
30
27
|
if (threads.length === 0) return "No Codex threads returned.";
|
|
@@ -40,7 +37,6 @@ function formatThreads(response) {
|
|
|
40
37
|
return `- ${formatCodexDisplayText(id)}${title ? ` - ${formatCodexDisplayText(title)}` : ""}${details.length > 0 ? ` (${details.map(formatCodexDisplayText).join(", ")})` : ""}\n Resume: ${formatCodexResumeHint(id)}`;
|
|
41
38
|
})].join("\n");
|
|
42
39
|
}
|
|
43
|
-
/** Formats account and rate-limit output for `/codex account`. */
|
|
44
40
|
function formatAccount(account, limits, authOverview) {
|
|
45
41
|
if (authOverview?.rows.some((row) => row.active)) return formatAccountAuthOverview(authOverview);
|
|
46
42
|
const formattedLimits = limits.ok ? formatCodexRateLimitDetails(limits.value) : formatCodexDisplayText(limits.error);
|
|
@@ -61,22 +57,20 @@ function formatAccountAuthOverview(overview) {
|
|
|
61
57
|
}
|
|
62
58
|
if (overview.rows.length > 0) {
|
|
63
59
|
lines.push(overview.orderTitle);
|
|
64
|
-
for (const [index, row] of overview.rows.entries()) lines.push(` ${index + 1}. ${row.label} ${row.kind} — ${
|
|
60
|
+
for (const [index, row] of overview.rows.entries()) lines.push(` ${index + 1}. ${row.label} ${row.kind} — ${row.billingNote ? `${row.status} · ${row.billingNote}` : row.status}`);
|
|
65
61
|
}
|
|
66
62
|
while (lines.at(-1) === "") lines.pop();
|
|
67
63
|
return lines.map(formatCodexAccountLine).join("\n");
|
|
68
64
|
}
|
|
69
|
-
function formatAuthRowStatus(row) {
|
|
70
|
-
return row.billingNote ? `${row.status} · ${row.billingNote}` : row.status;
|
|
71
|
-
}
|
|
72
|
-
/** Formats Codex Computer Use readiness and plugin/MCP availability. */
|
|
73
65
|
function formatComputerUseStatus(status) {
|
|
74
|
-
const lines = [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
const lines = [
|
|
67
|
+
`Computer Use: ${status.ready ? "ready" : status.enabled ? "not ready" : "disabled"}`,
|
|
68
|
+
`Plugin: ${formatCodexDisplayText(status.pluginName)} (${computerUsePluginState(status)})`,
|
|
69
|
+
`Installation: ${formatCodexDisplayText(status.installation.status)} (${status.installation.ok ? "ok" : "not ok"})`,
|
|
70
|
+
`MCP server: ${formatCodexDisplayText(status.mcpServerName)}${status.mcpServerAvailable ? ` (${status.tools.length} tools)` : " (unavailable)"}`,
|
|
71
|
+
`Exposure: ${formatCodexDisplayText(status.exposure.status)} (${status.exposure.ok ? "ok" : "not ok"})`,
|
|
72
|
+
`Live test: ${formatCodexDisplayText(status.liveTest.status)} (${status.liveTest.attempted ? `${status.liveTest.attempts} attempt${status.liveTest.attempts === 1 ? "" : "s"}, ${status.liveTest.timeoutMs}ms` : "not run"})`
|
|
73
|
+
];
|
|
80
74
|
if (status.liveTest.retried || status.liveTest.repaired) lines.push(`Live test recovery: retried=${status.liveTest.retried ? "yes" : "no"}, repaired=${status.liveTest.repaired ? "yes" : "no"}`);
|
|
81
75
|
if (status.marketplaceName) lines.push(`Marketplace: ${formatCodexDisplayText(status.marketplaceName)}`);
|
|
82
76
|
if (status.tools.length > 0) lines.push(`Tools: ${status.tools.slice(0, 8).map(formatCodexDisplayText).join(", ")}`);
|
|
@@ -85,10 +79,10 @@ function formatComputerUseStatus(status) {
|
|
|
85
79
|
return lines.join("\n");
|
|
86
80
|
}
|
|
87
81
|
function computerUsePluginState(status) {
|
|
82
|
+
if (status.installed === null) return "installation unchecked";
|
|
88
83
|
if (!status.installed) return "not installed";
|
|
89
84
|
return status.pluginEnabled ? "installed" : "installed, disabled";
|
|
90
85
|
}
|
|
91
|
-
/** Formats generic array-like Codex app-server responses. */
|
|
92
86
|
function formatList(response, label) {
|
|
93
87
|
const entries = extractArray(response);
|
|
94
88
|
if (entries.length === 0) return `${label}: none returned.`;
|
|
@@ -97,29 +91,9 @@ function formatList(response, label) {
|
|
|
97
91
|
return `- ${formatCodexDisplayText(normalizeOptionalString(record.name) ?? normalizeOptionalString(record.id) ?? JSON.stringify(entry))}`;
|
|
98
92
|
})].join("\n");
|
|
99
93
|
}
|
|
100
|
-
/** Formats Codex skills grouped by scope, omitting disabled entries. */
|
|
101
94
|
function formatSkills(response) {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
const lines = ["Codex skills:"];
|
|
105
|
-
let renderedSkills = 0;
|
|
106
|
-
let loadErrors = 0;
|
|
107
|
-
for (const group of groups) {
|
|
108
|
-
const record = isJsonObject(group) ? group : {};
|
|
109
|
-
if (Array.isArray(record.errors)) loadErrors += record.errors.length;
|
|
110
|
-
const skills = Array.isArray(record.skills) ? record.skills : [];
|
|
111
|
-
if (skills.length === 0) continue;
|
|
112
|
-
for (const skill of skills) {
|
|
113
|
-
if (isJsonObject(skill) && skill.enabled === false) continue;
|
|
114
|
-
lines.push(`- ${formatCodexSkillEntry(skill)}`);
|
|
115
|
-
renderedSkills += 1;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
if (renderedSkills === 0) {
|
|
119
|
-
if (loadErrors > 0) return `Codex skills: none returned (${loadErrors} load ${loadErrors === 1 ? "error" : "errors"}).`;
|
|
120
|
-
return "Codex skills: none returned.";
|
|
121
|
-
}
|
|
122
|
-
return lines.join("\n");
|
|
95
|
+
const { skills, emptySummary } = readEnabledCodexSkills(response);
|
|
96
|
+
return skills.length > 0 ? ["Codex skills:", ...skills.map((skill) => `- ${formatCodexSkillEntry(skill)}`)].join("\n") : `Codex skills: ${emptySummary}.`;
|
|
123
97
|
}
|
|
124
98
|
function formatCodexSkillEntry(entry) {
|
|
125
99
|
const record = isJsonObject(entry) ? entry : {};
|
|
@@ -143,12 +117,7 @@ function formatCodexTextForDisplay(value) {
|
|
|
143
117
|
return sanitizeCodexTextForDisplay(value).trim() || "<unknown>";
|
|
144
118
|
}
|
|
145
119
|
function sanitizeCodexTextForDisplay(value) {
|
|
146
|
-
|
|
147
|
-
for (const character of value) {
|
|
148
|
-
const codePoint = character.codePointAt(0);
|
|
149
|
-
safe += codePoint != null && isUnsafeDisplayCodePoint(codePoint) ? "?" : character;
|
|
150
|
-
}
|
|
151
|
-
return safe;
|
|
120
|
+
return value.replace(/[\p{Cc}\u00ad\u061c\u180e\u200b-\u200f\u202a-\u202e\u2060-\u206f\ufeff\ufff9-\ufffb\u{e0000}-\u{e007f}]/gu, "?");
|
|
152
121
|
}
|
|
153
122
|
function escapeCodexChatText(value) {
|
|
154
123
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("@", "@").replaceAll("`", "`").replaceAll("[", "[").replaceAll("]", "]").replaceAll("(", "(").replaceAll(")", ")").replaceAll("*", "∗").replaceAll("_", "_").replaceAll("~", "~").replaceAll("|", "|");
|
|
@@ -175,10 +144,6 @@ function formatCodexAccountLine(value) {
|
|
|
175
144
|
function isLikelyEmailAddress(value) {
|
|
176
145
|
return /^[^\s@<>()[\]`]+@[^\s@<>()[\]`]+\.[^\s@<>()[\]`]+$/.test(value);
|
|
177
146
|
}
|
|
178
|
-
function isUnsafeDisplayCodePoint(codePoint) {
|
|
179
|
-
return codePoint <= 31 || codePoint >= 127 && codePoint <= 159 || codePoint === 173 || codePoint === 1564 || codePoint === 6158 || codePoint >= 8203 && codePoint <= 8207 || codePoint >= 8234 && codePoint <= 8238 || codePoint >= 8288 && codePoint <= 8303 || codePoint === 65279 || codePoint >= 65529 && codePoint <= 65531 || codePoint >= 917504 && codePoint <= 917631;
|
|
180
|
-
}
|
|
181
|
-
/** Builds the portable `/codex` command help text. */
|
|
182
147
|
function buildHelp() {
|
|
183
148
|
return [
|
|
184
149
|
"Codex commands:",
|
|
@@ -219,20 +184,23 @@ function summarizeArrayLike(value) {
|
|
|
219
184
|
if (entries.length === 0) return "none returned";
|
|
220
185
|
return `${entries.length}`;
|
|
221
186
|
}
|
|
222
|
-
function
|
|
187
|
+
function readEnabledCodexSkills(value) {
|
|
223
188
|
const groups = isJsonObject(value) && Array.isArray(value.data) ? value.data : [];
|
|
224
|
-
|
|
225
|
-
let enabledSkills = 0;
|
|
189
|
+
const skills = [];
|
|
226
190
|
let loadErrors = 0;
|
|
227
191
|
for (const group of groups) {
|
|
228
192
|
if (!isJsonObject(group)) continue;
|
|
229
193
|
if (Array.isArray(group.errors)) loadErrors += group.errors.length;
|
|
230
|
-
|
|
231
|
-
enabledSkills += group.skills.filter((skill) => !isJsonObject(skill) || skill.enabled !== false).length;
|
|
194
|
+
for (const skill of Array.isArray(group.skills) ? group.skills : []) if (!isJsonObject(skill) || skill.enabled !== false) skills.push(skill);
|
|
232
195
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
196
|
+
return {
|
|
197
|
+
skills,
|
|
198
|
+
emptySummary: loadErrors > 0 ? `none returned (${loadErrors} load ${loadErrors === 1 ? "error" : "errors"})` : "none returned"
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
function summarizeCodexSkills(value) {
|
|
202
|
+
const { skills, emptySummary } = readEnabledCodexSkills(value);
|
|
203
|
+
return skills.length > 0 ? `${skills.length}` : emptySummary;
|
|
236
204
|
}
|
|
237
205
|
function formatCodexRateLimitSummary(value) {
|
|
238
206
|
const summary = summarizeCodexRateLimits(value);
|