@mcoda/agents 0.1.53 → 0.1.55
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodexCliRunner.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex/CodexCliRunner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodexCliRunner.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex/CodexCliRunner.ts"],"names":[],"mappings":"AAo1BA,eAAO,MAAM,UAAU,GAAI,sBAAoB,KAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CA+BjG,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,YAAY,MAAM,KACjB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CASzC,CAAC;AAEF,wBAAuB,kBAAkB,CACvC,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAmFhE"}
|
|
@@ -600,10 +600,10 @@ const extractAssistantText = (parsed) => {
|
|
|
600
600
|
return null;
|
|
601
601
|
const type = typeof parsed.type === "string" ? parsed.type : "";
|
|
602
602
|
if (type.includes("output_text.delta") && typeof parsed.delta === "string") {
|
|
603
|
-
return { text: parsed.delta, kind: "delta" };
|
|
603
|
+
return { text: parsed.delta, kind: "delta", terminal: false };
|
|
604
604
|
}
|
|
605
605
|
if (type.includes("output_text.done") && typeof parsed.text === "string") {
|
|
606
|
-
return { text: parsed.text, kind: "final" };
|
|
606
|
+
return { text: parsed.text, kind: "final", terminal: true };
|
|
607
607
|
}
|
|
608
608
|
const item = parsed.item;
|
|
609
609
|
const itemType = item?.item_type ?? item?.itemType ?? item?.type;
|
|
@@ -613,7 +613,7 @@ const extractAssistantText = (parsed) => {
|
|
|
613
613
|
if (normalizedType !== "assistant_message" && normalizedType !== "agent_message")
|
|
614
614
|
return null;
|
|
615
615
|
if (typeof item.delta === "string") {
|
|
616
|
-
return { text: item.delta, kind: "delta" };
|
|
616
|
+
return { text: item.delta, kind: "delta", terminal: false };
|
|
617
617
|
}
|
|
618
618
|
if (Array.isArray(item.delta)) {
|
|
619
619
|
const parts = item.delta
|
|
@@ -621,12 +621,12 @@ const extractAssistantText = (parsed) => {
|
|
|
621
621
|
.filter(Boolean)
|
|
622
622
|
.join("");
|
|
623
623
|
if (parts) {
|
|
624
|
-
return { text: parts, kind: "delta" };
|
|
624
|
+
return { text: parts, kind: "delta", terminal: false };
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
const isFinal = type.includes("completed") || type.includes("done");
|
|
628
628
|
if (typeof item.text === "string" && isFinal) {
|
|
629
|
-
return { text: item.text, kind: "final" };
|
|
629
|
+
return { text: item.text, kind: "final", terminal: false };
|
|
630
630
|
}
|
|
631
631
|
if (Array.isArray(item.content) && isFinal) {
|
|
632
632
|
const parts = item.content
|
|
@@ -634,7 +634,7 @@ const extractAssistantText = (parsed) => {
|
|
|
634
634
|
.filter(Boolean)
|
|
635
635
|
.join("");
|
|
636
636
|
if (parts) {
|
|
637
|
-
return { text: parts, kind: "final" };
|
|
637
|
+
return { text: parts, kind: "final", terminal: false };
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
return null;
|
|
@@ -742,7 +742,9 @@ const invokeCodexProcess = async (prompt, model, options) => {
|
|
|
742
742
|
}
|
|
743
743
|
else {
|
|
744
744
|
message = event.text;
|
|
745
|
-
|
|
745
|
+
if (event.terminal) {
|
|
746
|
+
scheduleCompletionGrace();
|
|
747
|
+
}
|
|
746
748
|
}
|
|
747
749
|
options?.hooks?.onAssistantEvent?.(event, normalized);
|
|
748
750
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcoda/agents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
4
4
|
"description": "Agent registry and capabilities for mcoda.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@mcoda/
|
|
34
|
-
"@mcoda/
|
|
33
|
+
"@mcoda/shared": "0.1.55",
|
|
34
|
+
"@mcoda/db": "0.1.55"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsc -p tsconfig.json",
|