@alas-ide/codex-acp 2.5.0-alas.3 → 2.5.0-alas.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/dist/index.js +114 -39
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -33488,6 +33488,18 @@ function parsePatch(uniDiff) {
|
|
|
33488
33488
|
|
|
33489
33489
|
// src/GitPatch.ts
|
|
33490
33490
|
var DIFF_PATCH_MAX_BYTES = 1024 * 1024;
|
|
33491
|
+
var NEUTRAL_DIFF_PATCH_META_KEY = "diffPatch";
|
|
33492
|
+
var DIFF_PATCH_VERSION = 1;
|
|
33493
|
+
var DIFF_PATCH_FORMAT = "git_patch";
|
|
33494
|
+
function neutralDiffPatchCapability() {
|
|
33495
|
+
return { version: DIFF_PATCH_VERSION, format: DIFF_PATCH_FORMAT };
|
|
33496
|
+
}
|
|
33497
|
+
function clientRequestsNeutralDiffPatch(capabilities) {
|
|
33498
|
+
const declared = capabilities?._meta?.[NEUTRAL_DIFF_PATCH_META_KEY];
|
|
33499
|
+
if (declared === null || typeof declared !== "object" || Array.isArray(declared)) return false;
|
|
33500
|
+
const version2 = declared["version"];
|
|
33501
|
+
return typeof version2 === "number" && Number.isInteger(version2) && version2 >= 1;
|
|
33502
|
+
}
|
|
33491
33503
|
var BINARY_PROBE_LENGTH = 8e3;
|
|
33492
33504
|
var NO_NEWLINE_MARKER = "\";
|
|
33493
33505
|
var HUNK_HEADER = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;
|
|
@@ -33707,29 +33719,31 @@ var FileChangeReporter = class {
|
|
|
33707
33719
|
}
|
|
33708
33720
|
};
|
|
33709
33721
|
function createPatchContent(change, diffPatch) {
|
|
33710
|
-
const
|
|
33722
|
+
const wrapper = diffPatch === "air" || diffPatch === "neutral" ? diffPatch : null;
|
|
33711
33723
|
try {
|
|
33712
33724
|
if (diffPatch === "acpV2") return createAcpV2Content(change);
|
|
33713
33725
|
switch (change.kind.type) {
|
|
33714
33726
|
case "add":
|
|
33715
|
-
return createWholeFileContent(change, "add",
|
|
33727
|
+
return createWholeFileContent(change, "add", wrapper);
|
|
33716
33728
|
case "delete":
|
|
33717
|
-
return createWholeFileContent(change, "delete",
|
|
33729
|
+
return createWholeFileContent(change, "delete", wrapper);
|
|
33718
33730
|
case "update":
|
|
33719
|
-
return createUpdateFileContent(change, change.kind.move_path,
|
|
33731
|
+
return createUpdateFileContent(change, change.kind.move_path, wrapper);
|
|
33720
33732
|
}
|
|
33721
33733
|
} catch (error62) {
|
|
33722
33734
|
logger.log(`Error processing file update change: ${error62}`);
|
|
33723
33735
|
return [];
|
|
33724
33736
|
}
|
|
33725
33737
|
}
|
|
33726
|
-
function createWholeFileContent(change, kind,
|
|
33738
|
+
function createWholeFileContent(change, kind, wrapper) {
|
|
33727
33739
|
if (!fitsDiffLimit(change.diff)) {
|
|
33728
33740
|
logger.log("Skipped the diff of a file that is too large", { path: change.path });
|
|
33729
33741
|
return [];
|
|
33730
33742
|
}
|
|
33731
|
-
|
|
33732
|
-
|
|
33743
|
+
if (wrapper !== null) {
|
|
33744
|
+
const patch = kind === "add" ? createAddedFileGitPatch(change.path, change.diff) : createDeletedFileGitPatch(change.path, change.diff);
|
|
33745
|
+
if (patch !== null) return [createPatchOnlyContent(change.path, kind, patch, wrapper)];
|
|
33746
|
+
}
|
|
33733
33747
|
return [{
|
|
33734
33748
|
type: "diff",
|
|
33735
33749
|
oldText: kind === "add" ? null : change.diff,
|
|
@@ -33738,16 +33752,16 @@ function createWholeFileContent(change, kind, supportsDiffPatch) {
|
|
|
33738
33752
|
_meta: { kind }
|
|
33739
33753
|
}];
|
|
33740
33754
|
}
|
|
33741
|
-
function createUpdateFileContent(change, movePath,
|
|
33755
|
+
function createUpdateFileContent(change, movePath, wrapper) {
|
|
33742
33756
|
const unifiedDiff = recoverCorruptedDiff(change.diff);
|
|
33743
33757
|
const targetPath = movePath ?? change.path;
|
|
33744
33758
|
if (!fitsDiffLimit(unifiedDiff)) {
|
|
33745
33759
|
logger.log("Skipped the diff of a file change that is too large", { path: targetPath });
|
|
33746
33760
|
return [];
|
|
33747
33761
|
}
|
|
33748
|
-
|
|
33749
|
-
|
|
33750
|
-
return [createPatchOnlyContent(targetPath, "update", gitPatch)];
|
|
33762
|
+
if (wrapper !== null) {
|
|
33763
|
+
const gitPatch = createUpdateGitPatch(change.path, targetPath, unifiedDiff);
|
|
33764
|
+
if (gitPatch !== null) return [createPatchOnlyContent(targetPath, "update", gitPatch, wrapper)];
|
|
33751
33765
|
}
|
|
33752
33766
|
if (movePath !== null && unifiedDiff.trim().length === 0) {
|
|
33753
33767
|
return [{ type: "diff", oldText: "", newText: "", path: targetPath, _meta: { kind: "update" } }];
|
|
@@ -33829,17 +33843,14 @@ function parseSinglePatch(diff) {
|
|
|
33829
33843
|
return null;
|
|
33830
33844
|
}
|
|
33831
33845
|
}
|
|
33832
|
-
function createPatchOnlyContent(path16, kind, patch) {
|
|
33846
|
+
function createPatchOnlyContent(path16, kind, patch, wrapper) {
|
|
33847
|
+
const diffPatch = { version: DIFF_PATCH_VERSION, format: DIFF_PATCH_FORMAT, text: patch };
|
|
33833
33848
|
return {
|
|
33834
33849
|
type: "diff",
|
|
33835
33850
|
oldText: null,
|
|
33836
33851
|
newText: "",
|
|
33837
33852
|
path: path16,
|
|
33838
|
-
_meta: withAirMeta({ kind }, AIR_DIFF_PATCH_KEY, {
|
|
33839
|
-
version: 1,
|
|
33840
|
-
format: "git_patch",
|
|
33841
|
-
text: patch
|
|
33842
|
-
})
|
|
33853
|
+
_meta: wrapper === "air" ? withAirMeta({ kind }, AIR_DIFF_PATCH_KEY, diffPatch) : { kind, [NEUTRAL_DIFF_PATCH_META_KEY]: diffPatch }
|
|
33843
33854
|
};
|
|
33844
33855
|
}
|
|
33845
33856
|
function recoverCorruptedDiff(diff) {
|
|
@@ -34685,6 +34696,32 @@ function goalSessionInfoUpdate(goal, capabilities) {
|
|
|
34685
34696
|
};
|
|
34686
34697
|
}
|
|
34687
34698
|
|
|
34699
|
+
// src/SessionFailureExtension.ts
|
|
34700
|
+
var NEUTRAL_SESSION_FAILURE_META_KEY = "sessionFailure";
|
|
34701
|
+
var SESSION_FAILURE_VERSION = 1;
|
|
34702
|
+
function neutralSessionFailureCapability() {
|
|
34703
|
+
return { version: SESSION_FAILURE_VERSION };
|
|
34704
|
+
}
|
|
34705
|
+
function clientRequestsNeutralSessionFailure(capabilities) {
|
|
34706
|
+
const declared = capabilities?._meta?.[NEUTRAL_SESSION_FAILURE_META_KEY];
|
|
34707
|
+
if (declared === null || typeof declared !== "object" || Array.isArray(declared)) return false;
|
|
34708
|
+
const version2 = declared["version"];
|
|
34709
|
+
return typeof version2 === "number" && Number.isInteger(version2) && version2 >= 1;
|
|
34710
|
+
}
|
|
34711
|
+
var NeutralSessionFailureLedger = class {
|
|
34712
|
+
revisions = /* @__PURE__ */ new Map();
|
|
34713
|
+
nextIncident = 1;
|
|
34714
|
+
incidentNumber() {
|
|
34715
|
+
return this.nextIncident++;
|
|
34716
|
+
}
|
|
34717
|
+
/** The lowest revision of `id` that is at least `proposed` and above every revision already sent. */
|
|
34718
|
+
revision(id, proposed) {
|
|
34719
|
+
const revision = Math.max(proposed, (this.revisions.get(id) ?? 0) + 1);
|
|
34720
|
+
this.revisions.set(id, revision);
|
|
34721
|
+
return revision;
|
|
34722
|
+
}
|
|
34723
|
+
};
|
|
34724
|
+
|
|
34688
34725
|
// src/tool-calls/ClientCapabilities.ts
|
|
34689
34726
|
var ClientCapabilities = class _ClientCapabilities {
|
|
34690
34727
|
static DEFAULT = new _ClientCapabilities({
|
|
@@ -34697,6 +34734,7 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
34697
34734
|
planUpdates: false,
|
|
34698
34735
|
air: { rawInputRendering: false, planContentDelta: false, diffPatch: false },
|
|
34699
34736
|
diffPatchFormat: "none",
|
|
34737
|
+
sessionFailureFormat: "none",
|
|
34700
34738
|
permissionPromptFields: false
|
|
34701
34739
|
});
|
|
34702
34740
|
/** The client declares `_meta.jetbrains.air`. */
|
|
@@ -34715,6 +34753,7 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
34715
34753
|
planUpdates;
|
|
34716
34754
|
air;
|
|
34717
34755
|
diffPatchFormat;
|
|
34756
|
+
sessionFailureFormat;
|
|
34718
34757
|
/** A permission request has its own `title` and `description` (ACP v2). */
|
|
34719
34758
|
permissionPromptFields;
|
|
34720
34759
|
constructor(values) {
|
|
@@ -34727,6 +34766,7 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
34727
34766
|
this.planUpdates = values.planUpdates;
|
|
34728
34767
|
this.air = values.air;
|
|
34729
34768
|
this.diffPatchFormat = values.diffPatchFormat;
|
|
34769
|
+
this.sessionFailureFormat = values.sessionFailureFormat;
|
|
34730
34770
|
this.permissionPromptFields = values.permissionPromptFields;
|
|
34731
34771
|
}
|
|
34732
34772
|
static from(capabilities) {
|
|
@@ -34746,7 +34786,10 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
34746
34786
|
planContentDelta: clientSupportsAirCapability(capabilities, AIR_PLAN_CONTENT_DELTA_KEY),
|
|
34747
34787
|
diffPatch
|
|
34748
34788
|
},
|
|
34749
|
-
|
|
34789
|
+
// A client that declares both forms gets only the client-neutral one.
|
|
34790
|
+
diffPatchFormat: clientRequestsNeutralDiffPatch(capabilities) ? "neutral" : diffPatch ? "air" : "none",
|
|
34791
|
+
// Likewise, and the client-neutral form selects the whole typed failure lane.
|
|
34792
|
+
sessionFailureFormat: clientRequestsNeutralSessionFailure(capabilities) ? "neutral" : clientSupportsAirCapability(capabilities, AIR_SESSION_FAILURE_KEY) ? "air" : "none",
|
|
34750
34793
|
permissionPromptFields: false
|
|
34751
34794
|
});
|
|
34752
34795
|
}
|
|
@@ -34769,6 +34812,8 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
34769
34812
|
planUpdates: true,
|
|
34770
34813
|
air: { rawInputRendering: false, planContentDelta: false, diffPatch: false },
|
|
34771
34814
|
diffPatchFormat: "acpV2",
|
|
34815
|
+
// ACP v2 has its own terminal failure state, so it ignores the client-neutral opt-in.
|
|
34816
|
+
sessionFailureFormat: clientSupportsAirCapability(capabilities, AIR_SESSION_FAILURE_KEY) ? "air" : "none",
|
|
34772
34817
|
permissionPromptFields: true
|
|
34773
34818
|
});
|
|
34774
34819
|
}
|
|
@@ -37047,6 +37092,7 @@ var SessionIndexTitles = class {
|
|
|
37047
37092
|
|
|
37048
37093
|
// src/CodexEventHandler.ts
|
|
37049
37094
|
var MAX_SESSION_FAILURE_TITLE_LENGTH = 240;
|
|
37095
|
+
var SESSION_NOTICE_KIND = "notice";
|
|
37050
37096
|
var SESSION_FAILURE_POLICY = {
|
|
37051
37097
|
transport_lost: {
|
|
37052
37098
|
category: "connection",
|
|
@@ -37129,12 +37175,14 @@ function failureWasShownAsMessage(error62) {
|
|
|
37129
37175
|
return error62 instanceof RequestError && failuresShownAsMessages.has(error62);
|
|
37130
37176
|
}
|
|
37131
37177
|
var CodexEventHandler = class {
|
|
37132
|
-
constructor(connection, sessionState,
|
|
37178
|
+
constructor(connection, sessionState, sessionFailureFormat, sessionFailureEpoch, subagents, onAccountUpdated, collectTurnDiffs, supportsCompaction, supportsNotices, neutralFailures) {
|
|
37179
|
+
this.sessionFailureFormat = sessionFailureFormat;
|
|
37133
37180
|
this.supportsCompaction = supportsCompaction;
|
|
37134
37181
|
this.supportsNotices = supportsNotices;
|
|
37182
|
+
this.neutralFailures = neutralFailures;
|
|
37135
37183
|
this.onAccountUpdated = onAccountUpdated;
|
|
37136
37184
|
this.sessionState = sessionState;
|
|
37137
|
-
this.supportsTypedSessionFailures =
|
|
37185
|
+
this.supportsTypedSessionFailures = sessionFailureFormat !== "none";
|
|
37138
37186
|
this.sessionFailureEpoch = sessionFailureEpoch;
|
|
37139
37187
|
this.session = new ACPSessionConnection(connection, sessionState.sessionId);
|
|
37140
37188
|
this.renderer = new AcpToolCallRenderer(sessionState.clientCapabilities);
|
|
@@ -37145,9 +37193,12 @@ var CodexEventHandler = class {
|
|
|
37145
37193
|
this.failuresById.set(sessionState.sessionFailure.id, sessionState.sessionFailure);
|
|
37146
37194
|
}
|
|
37147
37195
|
}
|
|
37196
|
+
sessionFailureFormat;
|
|
37148
37197
|
supportsCompaction;
|
|
37149
37198
|
supportsNotices;
|
|
37199
|
+
neutralFailures;
|
|
37150
37200
|
sessionState;
|
|
37201
|
+
/** The typed failure lane, in either form. Only {@link createSessionFailureMeta} reads the form itself. */
|
|
37151
37202
|
supportsTypedSessionFailures;
|
|
37152
37203
|
sessionFailureEpoch;
|
|
37153
37204
|
pendingErrors = [];
|
|
@@ -37979,11 +38030,12 @@ ${event.details}` : event.summary;
|
|
|
37979
38030
|
const previous = this.failuresById.get(id);
|
|
37980
38031
|
const failure3 = {
|
|
37981
38032
|
id,
|
|
37982
|
-
revision:
|
|
38033
|
+
revision: this.sessionFailureRevision(previous, id),
|
|
37983
38034
|
category: policy.category,
|
|
37984
38035
|
severity,
|
|
37985
38036
|
title: readableServiceErrorMessage(title),
|
|
37986
|
-
actions: actionsOverride ?? policy.actions
|
|
38037
|
+
actions: actionsOverride ?? policy.actions,
|
|
38038
|
+
kind
|
|
37987
38039
|
};
|
|
37988
38040
|
this.failuresById.set(id, failure3);
|
|
37989
38041
|
this.failureTurnIdById.set(id, attributeToTurn ? turnId : void 0);
|
|
@@ -37998,7 +38050,14 @@ ${event.details}` : event.summary;
|
|
|
37998
38050
|
return `${turnId}:error`;
|
|
37999
38051
|
}
|
|
38000
38052
|
this.allocatedFailureScopes.add(scope);
|
|
38001
|
-
return `${scope}:error:${this.sessionFailureEpoch}:${this.
|
|
38053
|
+
return `${scope}:error:${this.sessionFailureEpoch}:${this.nextIncidentNumber()}`;
|
|
38054
|
+
}
|
|
38055
|
+
nextIncidentNumber() {
|
|
38056
|
+
return this.sessionFailureFormat === "neutral" ? this.neutralFailures.incidentNumber() : this.nextNoticeId++;
|
|
38057
|
+
}
|
|
38058
|
+
sessionFailureRevision(previous, id) {
|
|
38059
|
+
const revision = nextSessionFailureRevision(previous, id);
|
|
38060
|
+
return this.sessionFailureFormat === "neutral" ? this.neutralFailures.revision(id, revision) : revision;
|
|
38002
38061
|
}
|
|
38003
38062
|
/**
|
|
38004
38063
|
* A retry warning remains the active incident until Codex produces turn content again. That content is
|
|
@@ -38031,15 +38090,16 @@ ${event.details}` : event.summary;
|
|
|
38031
38090
|
recordSessionNotice(title, details) {
|
|
38032
38091
|
const key = `${title}\0${details ?? ""}`;
|
|
38033
38092
|
const previous = this.lastSessionNotice?.key === key ? this.lastSessionNotice.failure : void 0;
|
|
38034
|
-
const id = previous?.id ?? `${this.sessionState.sessionId}:notice:${this.sessionFailureEpoch}:${this.
|
|
38093
|
+
const id = previous?.id ?? `${this.sessionState.sessionId}:notice:${this.sessionFailureEpoch}:${this.nextIncidentNumber()}`;
|
|
38035
38094
|
const notice = {
|
|
38036
38095
|
id,
|
|
38037
|
-
revision:
|
|
38096
|
+
revision: this.sessionFailureRevision(previous, id),
|
|
38038
38097
|
category: "unknown",
|
|
38039
38098
|
severity: "warning",
|
|
38040
38099
|
title,
|
|
38041
38100
|
...details === void 0 ? {} : { details },
|
|
38042
|
-
actions: []
|
|
38101
|
+
actions: [],
|
|
38102
|
+
kind: SESSION_NOTICE_KIND
|
|
38043
38103
|
};
|
|
38044
38104
|
this.lastSessionNotice = { key, failure: notice };
|
|
38045
38105
|
return notice;
|
|
@@ -38050,11 +38110,15 @@ ${event.details}` : event.summary;
|
|
|
38050
38110
|
return combinedTitle.length <= MAX_SESSION_FAILURE_TITLE_LENGTH ? [combinedTitle] : [summary, details];
|
|
38051
38111
|
}
|
|
38052
38112
|
createSessionFailureMeta(failure3) {
|
|
38113
|
+
if (this.sessionFailureFormat === "neutral") {
|
|
38114
|
+
return { [NEUTRAL_SESSION_FAILURE_META_KEY]: { version: SESSION_FAILURE_VERSION, ...failure3 } };
|
|
38115
|
+
}
|
|
38116
|
+
const { kind: _kind, ...airFailure } = failure3;
|
|
38053
38117
|
return {
|
|
38054
38118
|
[JETBRAINS_META_KEY]: {
|
|
38055
38119
|
[AIR_META_KEY]: {
|
|
38056
38120
|
[AIR_EXTENSION_VERSION_KEY]: AIR_EXTENSION_VERSION,
|
|
38057
|
-
[AIR_SESSION_FAILURE_KEY]:
|
|
38121
|
+
[AIR_SESSION_FAILURE_KEY]: airFailure
|
|
38058
38122
|
}
|
|
38059
38123
|
}
|
|
38060
38124
|
};
|
|
@@ -40611,7 +40675,7 @@ var package_default = {
|
|
|
40611
40675
|
publishConfig: {
|
|
40612
40676
|
access: "public"
|
|
40613
40677
|
},
|
|
40614
|
-
version: "2.5.0-alas.
|
|
40678
|
+
version: "2.5.0-alas.5",
|
|
40615
40679
|
description: "",
|
|
40616
40680
|
main: "dist/index.js",
|
|
40617
40681
|
bin: {
|
|
@@ -40689,7 +40753,7 @@ var package_default = {
|
|
|
40689
40753
|
alasDownstream: {
|
|
40690
40754
|
upstreamVersion: "2.5.0",
|
|
40691
40755
|
upstreamCommit: "34e08970aa324a2be985f5080674d5aa91d7666f",
|
|
40692
|
-
sourceCommit: "
|
|
40756
|
+
sourceCommit: "d1c53266b4d5d1f308323259b81d01ea687104ef"
|
|
40693
40757
|
}
|
|
40694
40758
|
};
|
|
40695
40759
|
|
|
@@ -52112,9 +52176,6 @@ var DENY_ALL_ELICITATIONS = {
|
|
|
52112
52176
|
handleElicitation: async () => ({ action: "cancel", content: null, _meta: null }),
|
|
52113
52177
|
handleUserInput: async () => ({ answers: {} })
|
|
52114
52178
|
};
|
|
52115
|
-
function clientSupportsTypedSessionFailures(capabilities) {
|
|
52116
|
-
return clientSupportsAirCapability(capabilities, AIR_SESSION_FAILURE_KEY);
|
|
52117
|
-
}
|
|
52118
52179
|
function clientSupportsAgentFileChangeReports(capabilities) {
|
|
52119
52180
|
return clientSupportsAirCapability(capabilities, AIR_AGENT_FILE_CHANGE_REPORT_KEY);
|
|
52120
52181
|
}
|
|
@@ -52134,6 +52195,7 @@ var CodexAcpServer = class {
|
|
|
52134
52195
|
getExitCode;
|
|
52135
52196
|
getRecentStderr;
|
|
52136
52197
|
sessionFailureEpoch;
|
|
52198
|
+
neutralSessionFailures = new NeutralSessionFailureLedger();
|
|
52137
52199
|
availableCommands;
|
|
52138
52200
|
clientInfo;
|
|
52139
52201
|
clientCapabilities;
|
|
@@ -52553,6 +52615,16 @@ var CodexAcpServer = class {
|
|
|
52553
52615
|
...this.neutralForkPointSupported ? {
|
|
52554
52616
|
[NEUTRAL_FORK_POINT_META_KEY]: neutralForkPointCapability()
|
|
52555
52617
|
} : {},
|
|
52618
|
+
// The client-neutral diff patch, see `docs/air-extensions.md`. ACP v2 has its own diff patch,
|
|
52619
|
+
// so `ClientCapabilities.fromV2` never selects it.
|
|
52620
|
+
...protocolVersion === 1 && this.capabilities.diffPatchFormat === "neutral" ? {
|
|
52621
|
+
[NEUTRAL_DIFF_PATCH_META_KEY]: neutralDiffPatchCapability()
|
|
52622
|
+
} : {},
|
|
52623
|
+
// The client-neutral session failure, see `docs/air-extensions.md`. ACP v2 has its own terminal
|
|
52624
|
+
// failure state, so `ClientCapabilities.fromV2` never selects it.
|
|
52625
|
+
...protocolVersion === 1 && this.capabilities.sessionFailureFormat === "neutral" ? {
|
|
52626
|
+
[NEUTRAL_SESSION_FAILURE_META_KEY]: neutralSessionFailureCapability()
|
|
52627
|
+
} : {},
|
|
52556
52628
|
// The session index for a client that opted in without AIR, see `docs/air-extensions.md`.
|
|
52557
52629
|
...neutralSessionIndex ? {
|
|
52558
52630
|
[NEUTRAL_SESSION_INDEX_META_KEY]: neutralSessionIndex
|
|
@@ -53175,13 +53247,14 @@ You have been logged out. Please try again.`);
|
|
|
53175
53247
|
baselineEventHandler = new CodexEventHandler(
|
|
53176
53248
|
this.connection,
|
|
53177
53249
|
sessionState,
|
|
53178
|
-
|
|
53250
|
+
this.capabilities.sessionFailureFormat,
|
|
53179
53251
|
this.sessionFailureEpoch,
|
|
53180
53252
|
sessionState.subagents,
|
|
53181
53253
|
(accountUpdated) => this.handleAccountUpdated(accountUpdated),
|
|
53182
53254
|
false,
|
|
53183
53255
|
clientSupportsCompaction(this.clientCapabilities),
|
|
53184
|
-
clientSupportsNotices(this.clientCapabilities)
|
|
53256
|
+
clientSupportsNotices(this.clientCapabilities),
|
|
53257
|
+
this.neutralSessionFailures
|
|
53185
53258
|
);
|
|
53186
53259
|
}
|
|
53187
53260
|
await this.trackCodexForegroundWork(sessionState, event);
|
|
@@ -54458,13 +54531,14 @@ You have been logged out. Please try again.`);
|
|
|
54458
54531
|
const eventHandler = new CodexEventHandler(
|
|
54459
54532
|
this.connection,
|
|
54460
54533
|
sessionState,
|
|
54461
|
-
|
|
54534
|
+
this.capabilities.sessionFailureFormat,
|
|
54462
54535
|
this.sessionFailureEpoch,
|
|
54463
54536
|
sessionState.subagents,
|
|
54464
54537
|
(accountUpdated) => this.handleAccountUpdated(accountUpdated),
|
|
54465
54538
|
false,
|
|
54466
54539
|
clientSupportsCompaction(this.clientCapabilities),
|
|
54467
|
-
clientSupportsNotices(this.clientCapabilities)
|
|
54540
|
+
clientSupportsNotices(this.clientCapabilities),
|
|
54541
|
+
this.neutralSessionFailures
|
|
54468
54542
|
);
|
|
54469
54543
|
const permissionContext = this.permissionLifecycleContext(sessionState).beginPrompt();
|
|
54470
54544
|
const toolCallRenderer = new AcpToolCallRenderer(this.capabilities);
|
|
@@ -56021,13 +56095,14 @@ You have been logged out. Please try again.`);
|
|
|
56021
56095
|
const promptEventHandler = new CodexEventHandler(
|
|
56022
56096
|
this.connection,
|
|
56023
56097
|
sessionState,
|
|
56024
|
-
|
|
56098
|
+
this.capabilities.sessionFailureFormat,
|
|
56025
56099
|
this.sessionFailureEpoch,
|
|
56026
56100
|
sessionState.subagents,
|
|
56027
56101
|
(accountUpdated) => this.handleAccountUpdated(accountUpdated),
|
|
56028
56102
|
agentFileChangeReportRequest !== null,
|
|
56029
56103
|
clientSupportsCompaction(this.clientCapabilities),
|
|
56030
|
-
clientSupportsNotices(this.clientCapabilities)
|
|
56104
|
+
clientSupportsNotices(this.clientCapabilities),
|
|
56105
|
+
this.neutralSessionFailures
|
|
56031
56106
|
);
|
|
56032
56107
|
eventHandler = promptEventHandler;
|
|
56033
56108
|
const permissionLifecycle = this.permissionLifecycleContext(sessionState);
|
|
@@ -56446,7 +56521,7 @@ You have been logged out. Please try again.`);
|
|
|
56446
56521
|
}
|
|
56447
56522
|
insertion?.onFailure?.(toV2Failure(err));
|
|
56448
56523
|
const isUnexpectedFailure = !(err instanceof RequestError);
|
|
56449
|
-
if (eventHandler !== null &&
|
|
56524
|
+
if (eventHandler !== null && this.capabilities.sessionFailureFormat !== "none" && (isProcessExit || isUnexpectedFailure)) {
|
|
56450
56525
|
eventHandler.recordSyntheticTerminalFailure(
|
|
56451
56526
|
isProcessExit ? "transport_lost" : "internal_error",
|
|
56452
56527
|
sessionState.currentTurnId
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.5.0-alas.
|
|
6
|
+
"version": "2.5.0-alas.5",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"bin": {
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"alasDownstream": {
|
|
82
82
|
"upstreamVersion": "2.5.0",
|
|
83
83
|
"upstreamCommit": "34e08970aa324a2be985f5080674d5aa91d7666f",
|
|
84
|
-
"sourceCommit": "
|
|
84
|
+
"sourceCommit": "d1c53266b4d5d1f308323259b81d01ea687104ef"
|
|
85
85
|
}
|
|
86
86
|
}
|