@agentclientprotocol/codex-acp 2.5.1-preview.6 → 2.5.1-preview.7
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 +21 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32770,13 +32770,13 @@ var AcpV2Connection = class {
|
|
|
32770
32770
|
let update;
|
|
32771
32771
|
switch (kind) {
|
|
32772
32772
|
case "user_message":
|
|
32773
|
-
update = { sessionUpdate: "user_message", messageId, content: [] };
|
|
32773
|
+
update = { sessionUpdate: "user_message", messageId, content: [], _meta: null };
|
|
32774
32774
|
break;
|
|
32775
32775
|
case "agent_message":
|
|
32776
|
-
update = { sessionUpdate: "agent_message", messageId, content: [] };
|
|
32776
|
+
update = { sessionUpdate: "agent_message", messageId, content: [], _meta: null };
|
|
32777
32777
|
break;
|
|
32778
32778
|
case "agent_thought":
|
|
32779
|
-
update = { sessionUpdate: "agent_thought", messageId, content: [] };
|
|
32779
|
+
update = { sessionUpdate: "agent_thought", messageId, content: [], _meta: null };
|
|
32780
32780
|
break;
|
|
32781
32781
|
}
|
|
32782
32782
|
await this.client.notify(methods2.client.session.update, {
|
|
@@ -40998,7 +40998,7 @@ var package_default = {
|
|
|
40998
40998
|
publishConfig: {
|
|
40999
40999
|
access: "public"
|
|
41000
41000
|
},
|
|
41001
|
-
version: "2.5.1-preview.
|
|
41001
|
+
version: "2.5.1-preview.7",
|
|
41002
41002
|
description: "",
|
|
41003
41003
|
main: "dist/index.js",
|
|
41004
41004
|
bin: {
|
|
@@ -42082,6 +42082,7 @@ var CodexAcpClient = class _CodexAcpClient {
|
|
|
42082
42082
|
// Codex sends no thread/settings/updated on a resume. The response holds the mode.
|
|
42083
42083
|
collaborationMode: response.collaborationMode ?? this.getCollaborationMode(response.thread.id),
|
|
42084
42084
|
threadStatus: response.thread.status,
|
|
42085
|
+
sessionTitle: normalizeSessionTitle(listedSessionTitle(response.thread)),
|
|
42085
42086
|
modelProvider: response.modelProvider,
|
|
42086
42087
|
currentServiceTier: response.serviceTier ?? null,
|
|
42087
42088
|
additionalDirectories,
|
|
@@ -50564,7 +50565,7 @@ You have been logged out. Please try again.`);
|
|
|
50564
50565
|
sessionMcpServers,
|
|
50565
50566
|
clientCapabilities: this.capabilities,
|
|
50566
50567
|
goalRevision: 0,
|
|
50567
|
-
sessionTitle: null,
|
|
50568
|
+
sessionTitle: sessionMetadata.sessionTitle ?? null,
|
|
50568
50569
|
sessionTitleSource: operation === "resume" ? "unknown" : "unset",
|
|
50569
50570
|
subagents: this.createSubagentRouter(sessionId),
|
|
50570
50571
|
asyncTasks: this.createAsyncTasks(sessionId),
|
|
@@ -51039,19 +51040,22 @@ You have been logged out. Please try again.`);
|
|
|
51039
51040
|
const request = { ...rest, systemPrompt: toV1SystemPrompt(systemPrompt) };
|
|
51040
51041
|
if (replayFrom == null) {
|
|
51041
51042
|
await this.resumeSession(request);
|
|
51042
|
-
|
|
51043
|
-
|
|
51044
|
-
|
|
51045
|
-
|
|
51046
|
-
|
|
51043
|
+
} else {
|
|
51044
|
+
if (replayFrom.type !== "start") {
|
|
51045
|
+
throw RequestError.invalidParams(void 0, `Unsupported replayFrom type: ${replayFrom.type}`);
|
|
51046
|
+
}
|
|
51047
|
+
await this.loadSessionAndReplayHistory(request);
|
|
51047
51048
|
}
|
|
51048
|
-
|
|
51049
|
-
|
|
51050
|
-
return this.createSessionSetupResponseV2(this.getSessionState(sessionId));
|
|
51049
|
+
await this.snapshotSessionStateV2(params.sessionId);
|
|
51050
|
+
return this.createSessionSetupResponseV2(this.getSessionState(params.sessionId));
|
|
51051
51051
|
}
|
|
51052
|
-
async
|
|
51052
|
+
async snapshotSessionStateV2(sessionId) {
|
|
51053
51053
|
await this.codexAcpClient.waitForSessionNotifications(sessionId);
|
|
51054
|
-
this.getSessionState(sessionId);
|
|
51054
|
+
const state = this.getSessionState(sessionId);
|
|
51055
|
+
await new ACPSessionConnection(this.connection, sessionId).update({
|
|
51056
|
+
sessionUpdate: "session_info_update",
|
|
51057
|
+
title: state.sessionTitle
|
|
51058
|
+
});
|
|
51055
51059
|
await AcpV2Connection.of(this.connection).snapshotForegroundState(sessionId);
|
|
51056
51060
|
}
|
|
51057
51061
|
async forkSession(params) {
|
|
@@ -52438,11 +52442,8 @@ You have been logged out. Please try again.`);
|
|
|
52438
52442
|
}
|
|
52439
52443
|
}
|
|
52440
52444
|
/**
|
|
52441
|
-
*
|
|
52442
|
-
*
|
|
52443
|
-
* already holds for it (`session-setup.mdx`). No-op for chunks with no messageId: those get
|
|
52444
|
-
* a fresh random id downstream instead (`toV2SessionUpdate`), so there is nothing to key on
|
|
52445
|
-
* ahead of time.
|
|
52445
|
+
* Start each v2 replayed message with empty content and metadata before its chunks.
|
|
52446
|
+
* Chunks without a messageId get a fresh id in toV2SessionUpdate and cannot be primed.
|
|
52446
52447
|
*/
|
|
52447
52448
|
async sendReplayMessageStart(session, update, started) {
|
|
52448
52449
|
const kind = replayMessageStartKind(update.sessionUpdate);
|