codexuse-cli 5.2.7 → 5.2.9
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/dist/index.js +23 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10629,6 +10629,11 @@ var COMMAND_TIMEOUT_MS = 3e3;
|
|
|
10629
10629
|
var EXIT_WAIT_MS = 1e4;
|
|
10630
10630
|
var POLL_INTERVAL_MS = 250;
|
|
10631
10631
|
var PROCESS_EXIT_GRACE_MS = 15e3;
|
|
10632
|
+
var LIVE_SWITCH_RETRY_DELAY_MS = 3e3;
|
|
10633
|
+
var LAUNCH_VERIFY_RETRIES = (() => {
|
|
10634
|
+
const raw = Number(process.env.CODEXUSE_LAUNCH_RETRIES);
|
|
10635
|
+
return Number.isInteger(raw) && raw > 0 ? raw : 3;
|
|
10636
|
+
})();
|
|
10632
10637
|
var APP_DISCOVERY_CACHE_TTL_MS = 6e4;
|
|
10633
10638
|
var APP_DISCOVERY_MISS_CACHE_TTL_MS = 5e3;
|
|
10634
10639
|
var OFFICIAL_CODEX_ACTIVITY_LIMIT = 50;
|
|
@@ -10640,6 +10645,9 @@ var CODEXUSE_BRIDGE_BINDING_NAME = "__codexuseBridgeBinding";
|
|
|
10640
10645
|
var CODEXUSE_BRIDGE_INSTALL_TTL_MS = 5e3;
|
|
10641
10646
|
var CODEXUSE_BRIDGE_VERSION = "0.2.0";
|
|
10642
10647
|
var CODEXUSE_STALE_LAUNCH_GRACE_MS = 45e3;
|
|
10648
|
+
function sleep2(ms) {
|
|
10649
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
10650
|
+
}
|
|
10643
10651
|
var officialCodexBridgeActionHandler = null;
|
|
10644
10652
|
var bridgeActionListeners = /* @__PURE__ */ new Map();
|
|
10645
10653
|
var handledBridgeActionIds = [];
|
|
@@ -15877,7 +15885,20 @@ async function getOfficialCodexProfileInstances(options = {}) {
|
|
|
15877
15885
|
};
|
|
15878
15886
|
}
|
|
15879
15887
|
function launchOfficialCodexProfileInstance(options) {
|
|
15880
|
-
return enqueueProfileAction(
|
|
15888
|
+
return enqueueProfileAction(
|
|
15889
|
+
() => launchOfficialCodexProfileInstanceWithRetries(options)
|
|
15890
|
+
);
|
|
15891
|
+
}
|
|
15892
|
+
async function launchOfficialCodexProfileInstanceWithRetries(options) {
|
|
15893
|
+
let launched = await launchOfficialCodexProfileInstanceOnce(options);
|
|
15894
|
+
for (let attempt = 1; attempt < LAUNCH_VERIFY_RETRIES; attempt += 1) {
|
|
15895
|
+
if (launched.status !== "failed" || launched.reason !== "app-server-not-verified") {
|
|
15896
|
+
break;
|
|
15897
|
+
}
|
|
15898
|
+
await sleep2(LIVE_SWITCH_RETRY_DELAY_MS);
|
|
15899
|
+
launched = await launchOfficialCodexProfileInstanceOnce(options);
|
|
15900
|
+
}
|
|
15901
|
+
return launched;
|
|
15881
15902
|
}
|
|
15882
15903
|
async function launchOfficialCodexProfileInstanceOnce(options) {
|
|
15883
15904
|
if (process.platform !== "darwin") {
|
|
@@ -18202,7 +18223,7 @@ async function ensureCliStorageReady() {
|
|
|
18202
18223
|
}
|
|
18203
18224
|
|
|
18204
18225
|
// src/app/main.ts
|
|
18205
|
-
var VERSION = true ? "5.2.
|
|
18226
|
+
var VERSION = true ? "5.2.9" : "0.0.0";
|
|
18206
18227
|
async function runCli() {
|
|
18207
18228
|
const args = process.argv.slice(2);
|
|
18208
18229
|
if (args.length === 0) {
|