@ycodium-ai/agent-grok 0.2.2588 → 0.2.2596
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
|
@@ -23885,6 +23885,10 @@ function createAcpConnection(options) {
|
|
|
23885
23885
|
return;
|
|
23886
23886
|
}
|
|
23887
23887
|
pending.delete(key);
|
|
23888
|
+
try {
|
|
23889
|
+
options.onResponse?.(waiter.method);
|
|
23890
|
+
} catch {
|
|
23891
|
+
}
|
|
23888
23892
|
if (Object.hasOwn(message, "error")) {
|
|
23889
23893
|
const rpcError = readJsonRpcError(message["error"]);
|
|
23890
23894
|
waiter.reject(
|
|
@@ -25424,6 +25428,8 @@ function createAcpExecutor(options) {
|
|
|
25424
25428
|
let promptWaiters = [];
|
|
25425
25429
|
let abortLocalPrompt;
|
|
25426
25430
|
let connectionClosed = false;
|
|
25431
|
+
let sessionLoadInFlight = false;
|
|
25432
|
+
let droppedReplayUpdates = 0;
|
|
25427
25433
|
const stamp = () => ({
|
|
25428
25434
|
eventId: randomId(),
|
|
25429
25435
|
createdAt: nowIso2()
|
|
@@ -25495,6 +25501,10 @@ function createAcpExecutor(options) {
|
|
|
25495
25501
|
if (commands !== void 0) {
|
|
25496
25502
|
availableCommands = commands;
|
|
25497
25503
|
}
|
|
25504
|
+
if (sessionLoadInFlight) {
|
|
25505
|
+
droppedReplayUpdates += parsed.events.filter((event) => event._tag !== "ModeChanged").length;
|
|
25506
|
+
return;
|
|
25507
|
+
}
|
|
25498
25508
|
for (const event of parsed.events) {
|
|
25499
25509
|
if (event._tag === "ToolCallUpdated") {
|
|
25500
25510
|
closeActiveAssistantSegment(activeTurnId);
|
|
@@ -25768,6 +25778,10 @@ function createAcpExecutor(options) {
|
|
|
25768
25778
|
error: error62 instanceof Error ? error62.message : String(error62)
|
|
25769
25779
|
});
|
|
25770
25780
|
},
|
|
25781
|
+
// 窗口在应答帧到达的那一刻同步收掉:应答之后的通知是真输出,不能再丢。
|
|
25782
|
+
onResponse: (method) => {
|
|
25783
|
+
if (method === "session/load") sessionLoadInFlight = false;
|
|
25784
|
+
},
|
|
25771
25785
|
onNotification: (notification) => {
|
|
25772
25786
|
if (notification.method === "session/update") {
|
|
25773
25787
|
handleSessionUpdate(notification.params);
|
|
@@ -25914,10 +25928,19 @@ function createAcpExecutor(options) {
|
|
|
25914
25928
|
});
|
|
25915
25929
|
nextSessionId = options.resumeSessionId;
|
|
25916
25930
|
} else if (options.resumeSessionId) {
|
|
25917
|
-
|
|
25931
|
+
sessionLoadInFlight = true;
|
|
25932
|
+
try {
|
|
25933
|
+
setup = await connection.request("session/load", {
|
|
25934
|
+
sessionId: options.resumeSessionId,
|
|
25935
|
+
cwd: options.cwd,
|
|
25936
|
+
mcpServers
|
|
25937
|
+
});
|
|
25938
|
+
} finally {
|
|
25939
|
+
sessionLoadInFlight = false;
|
|
25940
|
+
}
|
|
25941
|
+
options.log?.info("acp session loaded; replayed history was not projected", {
|
|
25918
25942
|
sessionId: options.resumeSessionId,
|
|
25919
|
-
|
|
25920
|
-
mcpServers
|
|
25943
|
+
droppedReplayUpdates
|
|
25921
25944
|
});
|
|
25922
25945
|
nextSessionId = options.resumeSessionId;
|
|
25923
25946
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-grok",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2596",
|
|
4
4
|
"description": "Grok executor: grok 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
|
-
"
|
|
25
|
-
"ycodium-
|
|
26
|
-
"ycodium-
|
|
24
|
+
"ycodium-acp-executor": "0.2.2596",
|
|
25
|
+
"ycodium-executor-testing": "0.0.0",
|
|
26
|
+
"@ycodium-ai/plugin-api": "0.2.2596"
|
|
27
27
|
},
|
|
28
28
|
"ycodium": {
|
|
29
29
|
"plugin": "./dist/index.js",
|