@ycodium-ai/agent-dsh 0.2.2588 → 0.2.2634
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 +26 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -23844,6 +23844,10 @@ function createAcpConnection(options) {
|
|
|
23844
23844
|
return;
|
|
23845
23845
|
}
|
|
23846
23846
|
pending.delete(key);
|
|
23847
|
+
try {
|
|
23848
|
+
options.onResponse?.(waiter.method);
|
|
23849
|
+
} catch {
|
|
23850
|
+
}
|
|
23847
23851
|
if (Object.hasOwn(message, "error")) {
|
|
23848
23852
|
const rpcError = readJsonRpcError(message["error"]);
|
|
23849
23853
|
waiter.reject(
|
|
@@ -25391,6 +25395,8 @@ function createAcpExecutor(options) {
|
|
|
25391
25395
|
let promptWaiters = [];
|
|
25392
25396
|
let abortLocalPrompt;
|
|
25393
25397
|
let connectionClosed = false;
|
|
25398
|
+
let sessionLoadInFlight = false;
|
|
25399
|
+
let droppedReplayUpdates = 0;
|
|
25394
25400
|
const stamp = () => ({
|
|
25395
25401
|
eventId: randomId(),
|
|
25396
25402
|
createdAt: nowIso2()
|
|
@@ -25462,6 +25468,10 @@ function createAcpExecutor(options) {
|
|
|
25462
25468
|
if (commands !== void 0) {
|
|
25463
25469
|
availableCommands = commands;
|
|
25464
25470
|
}
|
|
25471
|
+
if (sessionLoadInFlight) {
|
|
25472
|
+
droppedReplayUpdates += parsed.events.filter((event) => event._tag !== "ModeChanged").length;
|
|
25473
|
+
return;
|
|
25474
|
+
}
|
|
25465
25475
|
for (const event of parsed.events) {
|
|
25466
25476
|
if (event._tag === "ToolCallUpdated") {
|
|
25467
25477
|
closeActiveAssistantSegment(activeTurnId);
|
|
@@ -25735,6 +25745,10 @@ function createAcpExecutor(options) {
|
|
|
25735
25745
|
error: error62 instanceof Error ? error62.message : String(error62)
|
|
25736
25746
|
});
|
|
25737
25747
|
},
|
|
25748
|
+
// 窗口在应答帧到达的那一刻同步收掉:应答之后的通知是真输出,不能再丢。
|
|
25749
|
+
onResponse: (method) => {
|
|
25750
|
+
if (method === "session/load") sessionLoadInFlight = false;
|
|
25751
|
+
},
|
|
25738
25752
|
onNotification: (notification) => {
|
|
25739
25753
|
if (notification.method === "session/update") {
|
|
25740
25754
|
handleSessionUpdate(notification.params);
|
|
@@ -25881,10 +25895,19 @@ function createAcpExecutor(options) {
|
|
|
25881
25895
|
});
|
|
25882
25896
|
nextSessionId = options.resumeSessionId;
|
|
25883
25897
|
} else if (options.resumeSessionId) {
|
|
25884
|
-
|
|
25898
|
+
sessionLoadInFlight = true;
|
|
25899
|
+
try {
|
|
25900
|
+
setup = await connection.request("session/load", {
|
|
25901
|
+
sessionId: options.resumeSessionId,
|
|
25902
|
+
cwd: options.cwd,
|
|
25903
|
+
mcpServers
|
|
25904
|
+
});
|
|
25905
|
+
} finally {
|
|
25906
|
+
sessionLoadInFlight = false;
|
|
25907
|
+
}
|
|
25908
|
+
options.log?.info("acp session loaded; replayed history was not projected", {
|
|
25885
25909
|
sessionId: options.resumeSessionId,
|
|
25886
|
-
|
|
25887
|
-
mcpServers
|
|
25910
|
+
droppedReplayUpdates
|
|
25888
25911
|
});
|
|
25889
25912
|
nextSessionId = options.resumeSessionId;
|
|
25890
25913
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2634",
|
|
4
4
|
"description": "DeepSeek Harness executor: dsh CLI over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"@types/node": "24.12.4",
|
|
22
22
|
"esbuild": "0.28.1",
|
|
23
23
|
"vite-plus": "0.2.2",
|
|
24
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
25
|
-
"ycodium-executor
|
|
26
|
-
"ycodium-
|
|
24
|
+
"@ycodium-ai/plugin-api": "0.2.2634",
|
|
25
|
+
"ycodium-acp-executor": "0.2.2634",
|
|
26
|
+
"ycodium-executor-testing": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"ycodium": {
|
|
29
29
|
"plugin": "./dist/index.js",
|