@openclaw/codex 2026.9.3 → 2026.9.5
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/assets/activity.svg +30 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/account-usage-runtime-C2MOIvfq.mjs +75 -0
- package/dist/{apply-B6el6hdO.js → .setup/apply-CJ0ZfmBG.mjs} +12 -13
- package/dist/.setup/async-questions-DdhOCwGi.mjs +27 -0
- package/dist/{attempt-client-cleanup-D6cR54TV.js → .setup/attempt-client-cleanup-BpYKdTA0.mjs} +30 -211
- package/dist/{attempt-context-AO4DSjE0.js → .setup/attempt-context-VXVwTCfS.mjs} +6 -6
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +5 -0
- package/dist/{auth-binding-Co2Vfcf_.js → .setup/auth-binding-DhLWa_7K.mjs} +2 -2
- package/dist/{auth-cache-key-Kq6oerr6.js → .setup/auth-cache-key-QirmgiCo.mjs} +3 -3
- package/dist/{auth-profile-CwzO4_RG.js → .setup/auth-profile-WqZtZfXN.mjs} +1 -1
- package/dist/.setup/binding-connection-Bm38niE8.mjs +50 -0
- package/dist/.setup/binding-connection.runtime-CnRMC0ta.mjs +48 -0
- package/dist/{bounded-turn-lRpmZHFv.js → .setup/bounded-turn-BtlZcivC.mjs} +19 -14
- package/dist/{build-state-6RL6qohz.js → .setup/build-state-Xx9ybZqa.mjs} +1 -1
- package/dist/{capabilities-BeqLPbtM.js → .setup/capabilities-_vXcZGSx.mjs} +1 -1
- package/dist/{client-BEKu4yDx.js → .setup/client-vXs2929Q.mjs} +355 -164
- package/dist/{command-dispatch-CisT9Jqq.js → .setup/command-dispatch-naHIZwwF.mjs} +3 -3
- package/dist/{command-formatters-DeTfrapr.js → .setup/command-formatters-CGEkdawF.mjs} +4 -3
- package/dist/{command-handlers-BfIsJEuA.js → .setup/command-handlers-BtAJEW1X.mjs} +812 -152
- package/dist/{command-rpc-BMqRQOFX.js → .setup/command-rpc-DHFpn4le.mjs} +37 -21
- package/dist/{compact-CGJZ2rlb.js → .setup/compact-C3i3qlzj.mjs} +28 -43
- package/dist/{config-JDfTI4VI.js → .setup/config-CedDWjM-.mjs} +5 -4
- package/dist/{config-options-jnIFvwxD.js → .setup/config-options-BsanJ8QG.mjs} +9 -421
- package/dist/{protocol-CAAcVIKF.js → .setup/config-parsing-CcB9iPoq.mjs} +9 -51
- package/dist/{config-runtime-BWf6JLWG.js → .setup/config-runtime-CeAhl_h4.mjs} +2 -2
- package/dist/.setup/config-security-BRQ2mgW9.mjs +465 -0
- package/dist/{config-utils-C57JiJrU.js → .setup/config-utils-DujwEnhg.mjs} +2 -4
- package/dist/{conversation-binding-CxOlHiix.js → .setup/conversation-binding-DhzrpTM6.mjs} +60 -47
- package/dist/{conversation-binding-data-BiodpIzq.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +1 -1
- package/dist/{conversation-control-CUCrSIQI.js → .setup/conversation-control-DN53ns41.mjs} +17 -13
- package/dist/.setup/cyber-failover-DYwbmf1o.mjs +123 -0
- package/dist/.setup/cyber-failover-notice-e9G3J9-e.mjs +17 -0
- package/dist/{dynamic-tools-D-JBoaLt.js → .setup/dynamic-tools-D16lOp67.mjs} +168 -61
- package/dist/{effective-mcp-catalog-J_5Ep5Um.js → .setup/effective-mcp-catalog-K6kLCN8X.mjs} +3 -3
- package/dist/{ephemeral-turn-DSwzP8YY.js → .setup/ephemeral-turn-R1gA8Sn6.mjs} +4 -5
- package/dist/{event-projector-assistant-message-BmBM4qBV.js → .setup/event-projector-assistant-message-DNUR1s0A.mjs} +6 -3
- package/dist/.setup/event-projector-items-DyTQ_XqL.mjs +200 -0
- package/dist/{attempt-notifications--H8zXR5-.js → .setup/event-projector-usage-C7Ntzs-f.mjs} +102 -9
- package/dist/{harness-FR6eQgyO.js → .setup/harness-rxaaoN-o.mjs} +90 -19
- package/dist/.setup/inference-context-fulhZuz8.mjs +94 -0
- package/dist/.setup/inference-proxy-CC15HuSi.mjs +311 -0
- package/dist/{isolated-completion-DHBefrzg.js → .setup/isolated-completion-B6srt48J.mjs} +7 -7
- package/dist/{launch-args-RXQwn8zV.js → .setup/launch-args-DnMak49W.mjs} +22 -1
- package/dist/{managed-binary-DrjjRRUD.js → .setup/managed-binary-DP6Rib3P.mjs} +11 -2
- package/dist/{managed-thread-store-D1t5jh3G.js → .setup/managed-thread-store-BMqgThVL.mjs} +48 -14
- package/dist/{model-catalog-B_6M04Wo.js → .setup/model-catalog-DkvUuBey.mjs} +35 -10
- package/dist/{models-P9k2qAof.js → .setup/models-BDFgm_G-.mjs} +3 -3
- package/dist/.setup/native-auth-BLZGqFjw.mjs +57 -0
- package/dist/.setup/native-subagent-history-YXaL6dMd.mjs +135 -0
- package/dist/.setup/native-subagent-monitor-B1hxzIOy.mjs +5031 -0
- package/dist/.setup/native-subagent-task-ids-DsuOonKv.mjs +411 -0
- package/dist/{node-cli-sessions-rj0ysJwM.js → .setup/node-cli-sessions-Cl8b2ZF3.mjs} +1 -1
- package/dist/{node-exec-server.runtime-BY_ctYnT.js → .setup/node-exec-server.runtime-BaViBKNz.mjs} +5 -5
- package/dist/{plan-BMJdMOEF.js → .setup/plan-xD7WKYTM.mjs} +331 -79
- package/dist/{plugin-activation-BQK-f5sV.js → .setup/plugin-activation-r8nq5Jzp.mjs} +24 -19
- package/dist/{plugin-app-cache-key-CdSQzWyX.js → .setup/plugin-app-cache-key-BOxKP7db.mjs} +29 -25
- package/dist/{plugin-approval-roundtrip-DeW95wB5.js → .setup/plugin-approval-roundtrip-CjfzafAZ.mjs} +1 -1
- package/dist/{plugin-inventory-CoRCzWW4.js → .setup/plugin-inventory-DUle8DLz.mjs} +12 -8
- package/dist/{plugin-marketplace-discovery-3akBizzF.js → .setup/plugin-marketplace-discovery-P-Vndfqq.mjs} +18 -15
- package/dist/{plugin-metadata-cache-DgNfRAGA.js → .setup/plugin-metadata-cache-DsS5buNa.mjs} +33 -14
- package/dist/{provider-capabilities-W4tfK5Y5.js → .setup/provider-capabilities-B8J4Dy-O.mjs} +2 -2
- package/dist/.setup/provider-fFh_-VR3.mjs +50 -0
- package/dist/{rate-limits-Bqnx1N4z.js → .setup/rate-limits-DOEGYRNs.mjs} +90 -46
- package/dist/.setup/request-BioXJLYa.mjs +292 -0
- package/dist/.setup/run-attempt-lifecycle-B7JbY4-F.mjs +71 -0
- package/dist/{run-attempt-DwKds3DN.js → .setup/run-attempt-rlA07pUv.mjs} +644 -491
- package/dist/{runtime-artifact-T-NwqeSH.js → .setup/runtime-artifact-Dy38Z5iU.mjs} +2 -2
- package/dist/{sandbox-guard-BcT66fWy.js → .setup/sandbox-guard-BBP-RbTf.mjs} +4 -3
- package/dist/{session-binding-CKSepwIC.js → .setup/session-binding-_0W_fHRr.mjs} +45 -63
- package/dist/{session-binding-record-CaZjYwNS.js → .setup/session-binding-record-TH3xA0zj.mjs} +181 -3
- package/dist/.setup/session-binding-sidecars-CKYEcfNn.mjs +543 -0
- package/dist/{session-catalog-adoption-BKLtSrwi.js → .setup/session-catalog-adoption-CR_whkEW.mjs} +6 -6
- package/dist/{session-catalog-archive-D0i2pGj2.js → .setup/session-catalog-archive-CwZaPacf.mjs} +6 -6
- package/dist/.setup/session-catalog-events-jMcYfQyd.mjs +250 -0
- package/dist/.setup/session-catalog-fUdWDx-U.mjs +2464 -0
- package/dist/.setup/session-catalog-index-B141u15s.mjs +1070 -0
- package/dist/.setup/session-catalog-index-order-Cc5BzlQr.mjs +48 -0
- package/dist/.setup/session-catalog-index-state-BAuDztHN.mjs +180 -0
- package/dist/{session-catalog-parsing-CdD3JhdM.js → .setup/session-catalog-native-projection-ChV3cCtm.mjs} +213 -21
- package/dist/{session-catalog-node-adoption-BUuDYY8R.js → .setup/session-catalog-node-adoption-BVRsYOSh.mjs} +3 -3
- package/dist/{session-catalog-node-continue-CBtc4wkI.js → .setup/session-catalog-node-continue-Dowv8osw.mjs} +7 -7
- package/dist/.setup/session-catalog-projection-C1Bj9Jl-.mjs +414 -0
- package/dist/{session-cli-CbgaHh0f.js → .setup/session-cli-DIj-IE-E.mjs} +4 -4
- package/dist/{session-history-Cz-tOOYj.js → .setup/session-history-C--SrLI8.mjs} +10 -5
- package/dist/{session-history-import-DFN7sWRU.js → .setup/session-history-import-JHXT5Xfi.mjs} +4 -4
- package/dist/{session-history-read-cxPUxyVV.js → .setup/session-history-read-B3ZfSUbF.mjs} +2 -2
- package/dist/{session-history.worker-CNEvGaU5.js → .setup/session-history.worker-CpNj7H_P.mjs} +192 -89
- package/dist/{session-initialization-Jo86C60I.js → .setup/session-initialization-DH1z6fXn.mjs} +2 -2
- package/dist/{session-permission-policy-B22InTp_.js → .setup/session-permission-policy-DhurXY0l.mjs} +2 -2
- package/dist/{session-retirement-BSNG_mhf.js → .setup/session-retirement-CU87AOg9.mjs} +6 -6
- package/dist/{settled-turn-context-Du6gdUDd.js → .setup/settled-turn-context-fmwouT5I.mjs} +2 -2
- package/dist/{settled-turn-finalizer-BuLUrZl2.js → .setup/settled-turn-finalizer-CiY2bLFK.mjs} +10 -10
- package/dist/{shared-client-CVhez2Uo.js → .setup/shared-client-BpTtuLQ5.mjs} +495 -156
- package/dist/{side-question-DLbr2vUU.js → .setup/side-question-DSCZyoBD.mjs} +64 -47
- package/dist/{source-Da-h6f7e.js → .setup/source-Bjp4UQij.mjs} +15 -14
- package/dist/{thread-archive-guard-D1bP04Tf.js → .setup/thread-archive-guard-jmecf6OJ.mjs} +1 -1
- package/dist/.setup/thread-history-page-BTx-4xsg.mjs +83 -0
- package/dist/{thread-lifecycle-D1pzRwHB.js → .setup/thread-lifecycle-Cik28qWn.mjs} +330 -150
- package/dist/{thread-ownership-D6oASVRu.js → .setup/thread-ownership-skomxnIt.mjs} +4 -4
- package/dist/{thread-policy-D8kI7yAO.js → .setup/thread-policy-Cjs4B8xf.mjs} +3 -3
- package/dist/{thread-resume-T5cveyxA.js → .setup/thread-resume-BkNpj9Pz.mjs} +8 -5
- package/dist/.setup/timeout-DZF05XrR.mjs +63 -0
- package/dist/{session-catalog-home-id-D7-aLiNt.js → .setup/transcript-history-projection-DHNBDhCU.mjs} +73 -20
- package/dist/{transcript-mirror-t5TOccct.js → .setup/transcript-mirror-D4qp_leP.mjs} +15 -6
- package/dist/{transcript-mirror-attestation-DibE0krH.js → .setup/transcript-mirror-attestation-CzM-94NC.mjs} +4 -1
- package/dist/{transport-stdio-BGjHoYLr.js → .setup/transport-stdio-Cmx94Oiy.mjs} +149 -44
- package/dist/{upstream-session-fork-De-sLJ2r.js → .setup/upstream-session-fork-D3UKxgVD.mjs} +27 -26
- package/dist/{usage-CPPTmBvZ.js → .setup/usage-BOgBEKso.mjs} +4 -4
- package/dist/.setup/usage-limit-error-C0ow7DOc.mjs +166 -0
- package/dist/{version-omm6IPI3.js → .setup/version-CoqzXPgK.mjs} +1 -1
- package/dist/{web-search-provider.runtime-CSVgQL0w.js → .setup/web-search-provider.runtime-CTGuJt6i.mjs} +3 -3
- package/dist/api.js +28 -20
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +8 -528
- package/dist/harness.js +1 -1
- package/dist/index.js +130 -135
- package/dist/media-understanding-provider.js +3 -3
- package/dist/migration-provider-api.js +2 -0
- package/dist/native-tool-policy.js +12 -0
- package/dist/provider-discovery.js +18 -0
- package/dist/session-history-worker-runtime.js +23 -5
- package/dist/session-history.worker.js +2 -2
- package/dist/web-search-contract-api.js +1 -1
- package/openclaw.plugin.json +354 -68
- package/package.json +11 -8
- package/dist/binding-connection-QqgcPCgk.js +0 -60
- package/dist/event-projector-usage-CIyrYYid.js +0 -102
- package/dist/native-subagent-monitor-BbCUKRwC.js +0 -3350
- package/dist/request-CGvGOpeR.js +0 -198
- package/dist/session-catalog-HaDcp7Sv.js +0 -1533
- package/dist/session-catalog-provenance-DkJHo735.js +0 -124
- package/dist/timeout-BVw8aaM1.js +0 -33
- package/dist/{auth-profile-selection-DFu9e167.js → .setup/auth-profile-selection-DFu9e167.mjs} +0 -0
- package/dist/{context-compaction-activity-CMla5FPJ.js → .setup/context-compaction-activity-CMla5FPJ.mjs} +0 -0
- package/dist/{elicitation-input-DPoK8F7w.js → .setup/elicitation-input-DPoK8F7w.mjs} +0 -0
- package/dist/{history-rejection-B4nOXNXF.js → .setup/history-rejection-B4nOXNXF.mjs} +0 -0
- package/dist/{image-payload-sanitizer-tupAr-2o.js → .setup/image-payload-sanitizer-tupAr-2o.mjs} +0 -0
- package/dist/{incognito-session-uhrBF6wJ.js → .setup/incognito-session-uhrBF6wJ.mjs} +0 -0
- package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
- package/dist/{native-execution-policy-umd0tgh4.js → .setup/native-execution-policy-YBMHSzC4.mjs} +1 -1
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
- /package/dist/{session-upstream-marker-D15C9NHp.js → .setup/session-upstream-marker-D15C9NHp.mjs} +0 -0
- /package/dist/{upstream-prompt-provenance-LphB8slG.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { createZstdDecompress } from "node:zlib";
|
|
4
|
-
import { root } from "openclaw/plugin-sdk/file-access-runtime";
|
|
5
|
-
//#region extensions/codex/src/app-server/rpc-error.ts
|
|
6
|
-
/** RPC error wrapper that preserves app-server error code and data. */
|
|
7
|
-
var CodexAppServerRpcError = class extends Error {
|
|
8
|
-
constructor(error, method) {
|
|
9
|
-
super(formatCodexAppServerRpcErrorMessage(error, method));
|
|
10
|
-
this.name = "CodexAppServerRpcError";
|
|
11
|
-
this.code = error.code;
|
|
12
|
-
this.data = error.data;
|
|
13
|
-
this.method = method;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
function isCodexThreadReadMissingError(error, threadId) {
|
|
17
|
-
return error instanceof CodexAppServerRpcError && error.method === "thread/read" && error.code === -32600 && error.message === `thread not loaded: ${threadId}`;
|
|
18
|
-
}
|
|
19
|
-
function formatCodexAppServerRpcErrorMessage(error, method) {
|
|
20
|
-
const message = error.message || `${method} failed`;
|
|
21
|
-
const detail = readCodexAppServerRpcReloginDetail(error.data);
|
|
22
|
-
return detail && !message.includes(detail) ? `${message}: ${detail}` : message;
|
|
23
|
-
}
|
|
24
|
-
function readCodexAppServerRpcReloginDetail(data) {
|
|
25
|
-
const record = isJsonObject(data) ? data : void 0;
|
|
26
|
-
const nested = isJsonObject(record?.error) ? record.error : record;
|
|
27
|
-
if (!nested) return;
|
|
28
|
-
const isRelogin = nested.action === "relogin" || nested.reason === "cloudRequirements" && nested.errorCode === "Auth";
|
|
29
|
-
const detail = typeof nested.detail === "string" ? nested.detail.trim() : "";
|
|
30
|
-
return isRelogin && detail ? detail : void 0;
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region extensions/codex/src/session-catalog-provenance.ts
|
|
34
|
-
const MAX_SESSION_META_BYTES = 1048576;
|
|
35
|
-
const SESSION_META_READ_CHUNK_BYTES = 65536;
|
|
36
|
-
const MAX_PROVENANCE_CACHE_ENTRIES = 2e4;
|
|
37
|
-
const provenanceByPath = /* @__PURE__ */ new Map();
|
|
38
|
-
function cacheProvenance(key, value) {
|
|
39
|
-
provenanceByPath.delete(key);
|
|
40
|
-
provenanceByPath.set(key, value);
|
|
41
|
-
while (provenanceByPath.size > MAX_PROVENANCE_CACHE_ENTRIES) {
|
|
42
|
-
const oldest = provenanceByPath.keys().next().value;
|
|
43
|
-
if (oldest === void 0) break;
|
|
44
|
-
provenanceByPath.delete(oldest);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/** Undefined means the metadata line is not durable enough to cache yet. */
|
|
48
|
-
async function readCodexSessionMeta(sessionsRoot, rolloutPath, threadId) {
|
|
49
|
-
let safeRoot;
|
|
50
|
-
try {
|
|
51
|
-
safeRoot = await root(sessionsRoot, {
|
|
52
|
-
hardlinks: "reject",
|
|
53
|
-
maxBytes: Number.MAX_SAFE_INTEGER,
|
|
54
|
-
symlinks: "reject"
|
|
55
|
-
});
|
|
56
|
-
} catch {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const candidates = rolloutPath.endsWith(".zst") ? [rolloutPath, rolloutPath.slice(0, -4)] : [rolloutPath, `${rolloutPath}.zst`];
|
|
60
|
-
for (const candidate of candidates) {
|
|
61
|
-
let opened;
|
|
62
|
-
try {
|
|
63
|
-
opened = await safeRoot.open(path.relative(sessionsRoot, candidate));
|
|
64
|
-
} catch {
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
const input = opened.handle.createReadStream({
|
|
68
|
-
autoClose: false,
|
|
69
|
-
highWaterMark: SESSION_META_READ_CHUNK_BYTES
|
|
70
|
-
});
|
|
71
|
-
const reader = candidate.endsWith(".zst") ? input.pipe(createZstdDecompress()) : input;
|
|
72
|
-
try {
|
|
73
|
-
const chunks = [];
|
|
74
|
-
let bytesReadTotal = 0;
|
|
75
|
-
let line;
|
|
76
|
-
for await (const value of reader) {
|
|
77
|
-
const chunk = Buffer.isBuffer(value) ? value : Buffer.from(value);
|
|
78
|
-
const remaining = MAX_SESSION_META_BYTES - bytesReadTotal;
|
|
79
|
-
if (remaining <= 0) break;
|
|
80
|
-
const bounded = chunk.subarray(0, remaining);
|
|
81
|
-
bytesReadTotal += bounded.length;
|
|
82
|
-
const newline = bounded.indexOf(10);
|
|
83
|
-
chunks.push(newline >= 0 ? bounded.subarray(0, newline) : bounded);
|
|
84
|
-
if (newline >= 0) {
|
|
85
|
-
line = Buffer.concat(chunks).toString("utf8");
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (!line) continue;
|
|
90
|
-
let parsed;
|
|
91
|
-
try {
|
|
92
|
-
parsed = JSON.parse(line);
|
|
93
|
-
} catch {
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if (!isJsonObject(parsed) || parsed.type !== "session_meta" || !isJsonObject(parsed.payload)) return null;
|
|
97
|
-
const payload = parsed.payload;
|
|
98
|
-
return payload.id === threadId ? payload : null;
|
|
99
|
-
} catch {
|
|
100
|
-
continue;
|
|
101
|
-
} finally {
|
|
102
|
-
reader.destroy();
|
|
103
|
-
input.destroy();
|
|
104
|
-
await opened.handle.close().catch(() => void 0);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Codex 0.147 reports OpenClaw app-server rollouts as `vscode`, so the rollout's
|
|
110
|
-
* immutable session metadata is the authoritative historical provenance.
|
|
111
|
-
*/
|
|
112
|
-
async function isOpenClawManagedCodexThread(thread, localSessionsRoot) {
|
|
113
|
-
const rolloutPath = typeof thread.path === "string" ? thread.path.trim() : "";
|
|
114
|
-
if (!localSessionsRoot || !rolloutPath) return false;
|
|
115
|
-
const cacheKey = `${localSessionsRoot}\0${rolloutPath}`;
|
|
116
|
-
const cached = provenanceByPath.get(cacheKey);
|
|
117
|
-
if (cached !== void 0) return cached;
|
|
118
|
-
const metadata = await readCodexSessionMeta(localSessionsRoot, rolloutPath, thread.id);
|
|
119
|
-
const managed = metadata === void 0 ? void 0 : metadata?.originator === "openclaw";
|
|
120
|
-
if (managed !== void 0) cacheProvenance(cacheKey, managed);
|
|
121
|
-
return managed ?? false;
|
|
122
|
-
}
|
|
123
|
-
//#endregion
|
|
124
|
-
export { isCodexThreadReadMissingError as i, readCodexSessionMeta as n, CodexAppServerRpcError as r, isOpenClawManagedCodexThread as t };
|
package/dist/timeout-BVw8aaM1.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { withTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
2
|
-
//#region extensions/codex/src/app-server/timeout.ts
|
|
3
|
-
/**
|
|
4
|
-
* Thin Codex app-server timeout adapter around OpenClaw's shared timeout helper.
|
|
5
|
-
*/
|
|
6
|
-
function resolveAbortError(signal) {
|
|
7
|
-
return signal.reason instanceof Error ? signal.reason : new Error("Codex app-server operation aborted", { cause: signal.reason });
|
|
8
|
-
}
|
|
9
|
-
/** Awaits a promise with a Codex-specific timeout error message. */
|
|
10
|
-
async function withTimeout$1(promise, timeoutMs, timeoutMessage, createError) {
|
|
11
|
-
return await withTimeout(promise, timeoutMs, {
|
|
12
|
-
message: timeoutMessage,
|
|
13
|
-
...createError ? { createError } : {}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
/** Bounds an operation by both its owner lifecycle and one total wall-clock budget. */
|
|
17
|
-
async function withAbortableTimeout(params) {
|
|
18
|
-
const signal = params.signal;
|
|
19
|
-
if (signal?.aborted) throw resolveAbortError(signal);
|
|
20
|
-
let removeAbortListener;
|
|
21
|
-
const operation = signal ? Promise.race([params.promise, new Promise((_, reject) => {
|
|
22
|
-
const onAbort = () => reject(resolveAbortError(signal));
|
|
23
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
24
|
-
removeAbortListener = () => signal.removeEventListener("abort", onAbort);
|
|
25
|
-
})]) : params.promise;
|
|
26
|
-
try {
|
|
27
|
-
return await withTimeout$1(operation, params.timeoutMs, params.timeoutMessage, params.createTimeoutError);
|
|
28
|
-
} finally {
|
|
29
|
-
removeAbortListener?.();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { withTimeout$1 as n, withAbortableTimeout as t };
|
package/dist/{auth-profile-selection-DFu9e167.js → .setup/auth-profile-selection-DFu9e167.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{image-payload-sanitizer-tupAr-2o.js → .setup/image-payload-sanitizer-tupAr-2o.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs}
RENAMED
|
File without changes
|
package/dist/{native-execution-policy-umd0tgh4.js → .setup/native-execution-policy-YBMHSzC4.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveAgentConfig, tryResolveDefaultAgentId } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
2
|
-
import { normalizeAgentId, parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
3
2
|
import { getSessionEntry } from "openclaw/plugin-sdk/session-store-runtime";
|
|
3
|
+
import { normalizeAgentId, parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { resolveSandboxRuntimeStatus } from "openclaw/plugin-sdk/sandbox";
|
|
5
5
|
//#region extensions/codex/src/app-server/native-execution-policy.ts
|
|
6
6
|
/** Projects node execution ownership into the runtime tool factory options. */
|
|
File without changes
|
|
File without changes
|
/package/dist/{session-upstream-marker-D15C9NHp.js → .setup/session-upstream-marker-D15C9NHp.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|