@agentclientprotocol/codex-acp 2.1.2-preview.7 → 2.2.1-preview.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.
- package/dist/index.js +12 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34372,7 +34372,7 @@ var package_default = {
|
|
|
34372
34372
|
publishConfig: {
|
|
34373
34373
|
access: "public"
|
|
34374
34374
|
},
|
|
34375
|
-
version: "2.1
|
|
34375
|
+
version: "2.2.1-preview.1",
|
|
34376
34376
|
description: "",
|
|
34377
34377
|
main: "dist/index.js",
|
|
34378
34378
|
bin: {
|
|
@@ -37223,6 +37223,15 @@ var SessionReplacedError = class extends AppServerUnavailableError {
|
|
|
37223
37223
|
this.name = "SessionReplacedError";
|
|
37224
37224
|
}
|
|
37225
37225
|
};
|
|
37226
|
+
var UnpersistedSessionLostError = class extends AppServerUnavailableError {
|
|
37227
|
+
constructor(sessionId) {
|
|
37228
|
+
super(
|
|
37229
|
+
`Session ${sessionId} had no messages yet and was lost when the Codex app-server restarted. Start a new session.`,
|
|
37230
|
+
{ exitCode: null, signal: null, restartable: false }
|
|
37231
|
+
);
|
|
37232
|
+
this.name = "UnpersistedSessionLostError";
|
|
37233
|
+
}
|
|
37234
|
+
};
|
|
37226
37235
|
function isAppServerUnavailableError(error62) {
|
|
37227
37236
|
return error62 instanceof RequestError && error62.code === CODEX_PROCESS_EXITED_ERROR_CODE;
|
|
37228
37237
|
}
|
|
@@ -37820,10 +37829,7 @@ var AppServerRecovery = class {
|
|
|
37820
37829
|
const mapped = this.mapError(error62, client);
|
|
37821
37830
|
if (mapped !== error62) return mapped;
|
|
37822
37831
|
if (isMissingRolloutError(error62)) {
|
|
37823
|
-
return new
|
|
37824
|
-
`Session ${sessionId} had no messages yet and was lost when the Codex app-server restarted. Start a new session.`,
|
|
37825
|
-
{ exitCode: null, signal: null, restartable: false }
|
|
37826
|
-
);
|
|
37832
|
+
return new UnpersistedSessionLostError(sessionId);
|
|
37827
37833
|
}
|
|
37828
37834
|
const message = error62 instanceof Error ? error62.message : String(error62);
|
|
37829
37835
|
return new AppServerUnavailableError(
|
|
@@ -43338,7 +43344,7 @@ Check ${configPath} and project .codex directories, especially their config.toml
|
|
|
43338
43344
|
session.asyncTasks.refresh();
|
|
43339
43345
|
logger.log("Resumed session after provider restart", { sessionId: session.sessionId });
|
|
43340
43346
|
} catch (error62) {
|
|
43341
|
-
if (error62 instanceof ThreadRefusedError || error62 instanceof SessionReplacedError) {
|
|
43347
|
+
if (error62 instanceof ThreadRefusedError || error62 instanceof SessionReplacedError || error62 instanceof UnpersistedSessionLostError) {
|
|
43342
43348
|
logger.log("Session not resumed after provider restart", { sessionId: session.sessionId, reason: String(error62) });
|
|
43343
43349
|
continue;
|
|
43344
43350
|
}
|