@ycodium-ai/agent-grok 0.2.2092 → 0.2.2106
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 +24 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -24354,7 +24354,7 @@ function makeAcpContentDeltaEvent(input2) {
|
|
|
24354
24354
|
...input2.turnId !== void 0 ? { turnId: input2.turnId } : {},
|
|
24355
24355
|
...input2.itemId ? { itemId: input2.itemId } : {},
|
|
24356
24356
|
payload: {
|
|
24357
|
-
streamKind: "assistant_text",
|
|
24357
|
+
streamKind: input2.streamKind ?? "assistant_text",
|
|
24358
24358
|
delta: input2.text
|
|
24359
24359
|
},
|
|
24360
24360
|
raw: {
|
|
@@ -25038,21 +25038,24 @@ function parseSessionUpdateEvent(params) {
|
|
|
25038
25038
|
}
|
|
25039
25039
|
break;
|
|
25040
25040
|
}
|
|
25041
|
-
case "agent_message_chunk":
|
|
25041
|
+
case "agent_message_chunk":
|
|
25042
|
+
case "agent_thought_chunk": {
|
|
25042
25043
|
const content = isRecord3(upd["content"]) ? upd["content"] : void 0;
|
|
25043
25044
|
const contentType = content?.["type"];
|
|
25045
|
+
const streamKind = kind === "agent_thought_chunk" ? "reasoning_text" : "assistant_text";
|
|
25044
25046
|
if (contentType === "text") {
|
|
25045
25047
|
const text = typeof content?.["text"] === "string" ? content["text"] : "";
|
|
25046
25048
|
if (text.length > 0) {
|
|
25047
25049
|
events.push({
|
|
25048
25050
|
_tag: "ContentDelta",
|
|
25049
25051
|
text,
|
|
25052
|
+
streamKind,
|
|
25050
25053
|
rawPayload: params
|
|
25051
25054
|
});
|
|
25052
25055
|
}
|
|
25053
25056
|
break;
|
|
25054
25057
|
}
|
|
25055
|
-
if (content && contentType !== "audio") {
|
|
25058
|
+
if (streamKind === "assistant_text" && content && contentType !== "audio") {
|
|
25056
25059
|
events.push({
|
|
25057
25060
|
_tag: "AssistantContentBlock",
|
|
25058
25061
|
content,
|
|
@@ -25268,6 +25271,23 @@ function createAcpExecutor(options) {
|
|
|
25268
25271
|
continue;
|
|
25269
25272
|
}
|
|
25270
25273
|
if (event._tag === "ContentDelta") {
|
|
25274
|
+
if (event.streamKind === "reasoning_text") {
|
|
25275
|
+
if (event.text.trim().length === 0) {
|
|
25276
|
+
continue;
|
|
25277
|
+
}
|
|
25278
|
+
emit(
|
|
25279
|
+
makeAcpContentDeltaEvent({
|
|
25280
|
+
stamp: stamp(),
|
|
25281
|
+
provider: options.provider,
|
|
25282
|
+
threadId: options.threadId,
|
|
25283
|
+
turnId: activeTurnId,
|
|
25284
|
+
text: event.text,
|
|
25285
|
+
streamKind: "reasoning_text",
|
|
25286
|
+
rawPayload: event.rawPayload
|
|
25287
|
+
})
|
|
25288
|
+
);
|
|
25289
|
+
continue;
|
|
25290
|
+
}
|
|
25271
25291
|
if (event.text.trim().length === 0 && !assistantSegment.activeItemId) {
|
|
25272
25292
|
continue;
|
|
25273
25293
|
}
|
|
@@ -25280,6 +25300,7 @@ function createAcpExecutor(options) {
|
|
|
25280
25300
|
turnId: activeTurnId,
|
|
25281
25301
|
...itemId ? { itemId } : {},
|
|
25282
25302
|
text: event.text,
|
|
25303
|
+
streamKind: "assistant_text",
|
|
25283
25304
|
rawPayload: event.rawPayload
|
|
25284
25305
|
})
|
|
25285
25306
|
);
|
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.2106",
|
|
4
4
|
"description": "Grok executor: grok CLI over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@types/node": "24.12.4",
|
|
21
21
|
"esbuild": "0.28.1",
|
|
22
22
|
"vite-plus": "0.2.2",
|
|
23
|
-
"ycodium-
|
|
24
|
-
"
|
|
25
|
-
"ycodium-acp-
|
|
23
|
+
"@ycodium-ai/plugin-api": "0.2.2106",
|
|
24
|
+
"ycodium-acp-executor": "0.0.0",
|
|
25
|
+
"ycodium-acp-protocol": "0.0.0"
|
|
26
26
|
},
|
|
27
27
|
"ycodium": {
|
|
28
28
|
"plugin": "./dist/index.js",
|