@ycodium-ai/agent-kimi 0.2.2078 → 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
|
@@ -24359,7 +24359,7 @@ function makeAcpContentDeltaEvent(input2) {
|
|
|
24359
24359
|
...input2.turnId !== void 0 ? { turnId: input2.turnId } : {},
|
|
24360
24360
|
...input2.itemId ? { itemId: input2.itemId } : {},
|
|
24361
24361
|
payload: {
|
|
24362
|
-
streamKind: "assistant_text",
|
|
24362
|
+
streamKind: input2.streamKind ?? "assistant_text",
|
|
24363
24363
|
delta: input2.text
|
|
24364
24364
|
},
|
|
24365
24365
|
raw: {
|
|
@@ -25043,21 +25043,24 @@ function parseSessionUpdateEvent(params) {
|
|
|
25043
25043
|
}
|
|
25044
25044
|
break;
|
|
25045
25045
|
}
|
|
25046
|
-
case "agent_message_chunk":
|
|
25046
|
+
case "agent_message_chunk":
|
|
25047
|
+
case "agent_thought_chunk": {
|
|
25047
25048
|
const content = isRecord3(upd["content"]) ? upd["content"] : void 0;
|
|
25048
25049
|
const contentType = content?.["type"];
|
|
25050
|
+
const streamKind = kind === "agent_thought_chunk" ? "reasoning_text" : "assistant_text";
|
|
25049
25051
|
if (contentType === "text") {
|
|
25050
25052
|
const text = typeof content?.["text"] === "string" ? content["text"] : "";
|
|
25051
25053
|
if (text.length > 0) {
|
|
25052
25054
|
events.push({
|
|
25053
25055
|
_tag: "ContentDelta",
|
|
25054
25056
|
text,
|
|
25057
|
+
streamKind,
|
|
25055
25058
|
rawPayload: params
|
|
25056
25059
|
});
|
|
25057
25060
|
}
|
|
25058
25061
|
break;
|
|
25059
25062
|
}
|
|
25060
|
-
if (content && contentType !== "audio") {
|
|
25063
|
+
if (streamKind === "assistant_text" && content && contentType !== "audio") {
|
|
25061
25064
|
events.push({
|
|
25062
25065
|
_tag: "AssistantContentBlock",
|
|
25063
25066
|
content,
|
|
@@ -25273,6 +25276,23 @@ function createAcpExecutor(options) {
|
|
|
25273
25276
|
continue;
|
|
25274
25277
|
}
|
|
25275
25278
|
if (event._tag === "ContentDelta") {
|
|
25279
|
+
if (event.streamKind === "reasoning_text") {
|
|
25280
|
+
if (event.text.trim().length === 0) {
|
|
25281
|
+
continue;
|
|
25282
|
+
}
|
|
25283
|
+
emit(
|
|
25284
|
+
makeAcpContentDeltaEvent({
|
|
25285
|
+
stamp: stamp(),
|
|
25286
|
+
provider: options.provider,
|
|
25287
|
+
threadId: options.threadId,
|
|
25288
|
+
turnId: activeTurnId,
|
|
25289
|
+
text: event.text,
|
|
25290
|
+
streamKind: "reasoning_text",
|
|
25291
|
+
rawPayload: event.rawPayload
|
|
25292
|
+
})
|
|
25293
|
+
);
|
|
25294
|
+
continue;
|
|
25295
|
+
}
|
|
25276
25296
|
if (event.text.trim().length === 0 && !assistantSegment.activeItemId) {
|
|
25277
25297
|
continue;
|
|
25278
25298
|
}
|
|
@@ -25285,6 +25305,7 @@ function createAcpExecutor(options) {
|
|
|
25285
25305
|
turnId: activeTurnId,
|
|
25286
25306
|
...itemId ? { itemId } : {},
|
|
25287
25307
|
text: event.text,
|
|
25308
|
+
streamKind: "assistant_text",
|
|
25288
25309
|
rawPayload: event.rawPayload
|
|
25289
25310
|
})
|
|
25290
25311
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-kimi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2106",
|
|
4
4
|
"description": "Kimi Code executor: kimi 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-acp-
|
|
24
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
25
|
-
"ycodium-acp-
|
|
23
|
+
"ycodium-acp-protocol": "0.0.0",
|
|
24
|
+
"@ycodium-ai/plugin-api": "0.2.2106",
|
|
25
|
+
"ycodium-acp-executor": "0.0.0"
|
|
26
26
|
},
|
|
27
27
|
"ycodium": {
|
|
28
28
|
"plugin": "./dist/index.js",
|